Skip to content

Commit f63396a

Browse files
committed
Merge branch 4.x
2 parents d9275cb + 48b5ded commit f63396a

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

modules/cudafeatures2d/src/brute_force_matcher.cpp

+7-9
Original file line numberDiff line numberDiff line change
@@ -791,15 +791,13 @@ namespace
791791
for (int i = 0; i < k; ++i)
792792
{
793793
const int trainIdx = *trainIdxPtr;
794-
if (trainIdx == -1)
795-
continue;
796-
797-
const int imgIdx = imgIdxPtr ? *imgIdxPtr : 0;
798-
const float distance = *distancePtr;
799-
800-
DMatch m(queryIdx, trainIdx, imgIdx, distance);
801-
802-
curMatches.push_back(m);
794+
if (trainIdx != -1)
795+
{
796+
const int imgIdx = imgIdxPtr ? *imgIdxPtr : 0;
797+
const float distance = *distancePtr;
798+
DMatch m(queryIdx, trainIdx, imgIdx, distance);
799+
curMatches.push_back(m);
800+
}
803801

804802
++trainIdxPtr;
805803
++distancePtr;

modules/cudaimgproc/include/opencv2/cudaimgproc.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,9 @@ class CV_EXPORTS_W CornersDetector : public Algorithm
578578
@param stream Stream for the asynchronous version.
579579
*/
580580
CV_WRAP virtual void detect(InputArray image, OutputArray corners, InputArray mask = noArray(), Stream& stream = Stream::Null()) = 0;
581+
582+
CV_WRAP virtual void setMaxCorners(int maxCorners) = 0;
583+
CV_WRAP virtual void setMinDistance(double minDistance) = 0;
581584
};
582585

583586
/** @brief Creates implementation for cuda::CornersDetector .

modules/cudaimgproc/src/gftt.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ namespace
6969
int blockSize, bool useHarrisDetector, double harrisK);
7070
~GoodFeaturesToTrackDetector();
7171
void detect(InputArray image, OutputArray corners, InputArray mask, Stream& stream);
72-
72+
void setMaxCorners(int maxCorners) CV_OVERRIDE { maxCorners_ = maxCorners; }
73+
void setMinDistance(double minDistance) CV_OVERRIDE { minDistance_ = minDistance; }
7374
private:
7475
int maxCorners_;
7576
double qualityLevel_;

modules/ximgproc/src/edge_drawing.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ void EdgeDrawingImpl::SplitSegment2Lines(double* x, double* y, int noPixels, int
13661366
{
13671367
// Start by fitting a line to MIN_LINE_LEN pixels
13681368
bool valid = false;
1369-
double lastA(0), lastB(0), error;
1369+
double lastA(0), lastB(0), error(0);
13701370
int lastInvert(0);
13711371

13721372
while (noPixels >= min_line_len)

0 commit comments

Comments
 (0)