not limitKps inside Feature2D::generateKeypoints when using pyDetector (#1223)

* not limitKps when using pyDetector

* update with upstream

---------

Co-authored-by: Long Vuong <vuong@wheel.me>
This commit is contained in:
Long Vuong
2024-02-27 00:21:15 +01:00
committed by GitHub
parent 81e249b56c
commit 752ca76cf5

View File

@@ -734,7 +734,10 @@ std::vector<cv::KeyPoint> Feature2D::generateKeypoints(const cv::Mat & image, co
cv::Rect roi(globalRoi.x + j*colSize, globalRoi.y + i*rowSize, colSize, rowSize);
std::vector<cv::KeyPoint> subKeypoints;
subKeypoints = this->generateKeypointsImpl(image, roi, mask);
limitKeypoints(subKeypoints, maxFeatures);
if (this->getType() != Feature2D::Type::kFeaturePyDetector)
{
limitKeypoints(subKeypoints, maxFeatures);
}
if(roi.x || roi.y)
{
// Adjust keypoint position to raw image