Skip to content

Commit 4942f71

Browse files
committed
Merge branch 4.x
2 parents 6de28c2 + bdc0518 commit 4942f71

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

modules/fastcv/include/opencv2/fastcv/tracking.hpp

+11-12
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,12 @@ namespace fastcv {
2929
* @param winSize Size of window for optical flow searching. Width and height ust be odd numbers. Suggested values are 5, 7 or 9
3030
* @param termCriteria Termination criteria containing max number of iterations, max epsilon and stop condition
3131
*/
32-
void trackOpticalFlowLK(InputArray src, InputArray dst,
33-
InputArrayOfArrays srcPyr, InputArrayOfArrays dstPyr,
34-
InputArray ptsIn, OutputArray ptsOut, InputArray ptsEst,
35-
OutputArray statusVec, cv::Size winSize = {7, 7},
36-
cv::TermCriteria termCriteria = {cv::TermCriteria::MAX_ITER | cv::TermCriteria::EPS,
37-
/* maxIterations */ 7,
38-
/* maxEpsilon */ 0.03f * 0.03f});
32+
CV_EXPORTS_W void trackOpticalFlowLK(InputArray src, InputArray dst,
33+
InputArrayOfArrays srcPyr, InputArrayOfArrays dstPyr,
34+
InputArray ptsIn, OutputArray ptsOut, InputArray ptsEst,
35+
OutputArray statusVec, cv::Size winSize = cv::Size(7, 7),
36+
cv::TermCriteria termCriteria = cv::TermCriteria(cv::TermCriteria::MAX_ITER | cv::TermCriteria::EPS,
37+
/* maxIterations */ 7, /* maxEpsilon */ 0.03f * 0.03f));
3938

4039
/**
4140
* @brief Overload for v1 of the LK tracking function
@@ -52,11 +51,11 @@ void trackOpticalFlowLK(InputArray src, InputArray dst,
5251
* @param winSize Size of window for optical flow searching. Width and height ust be odd numbers. Suggested values are 5, 7 or 9
5352
* @param maxIterations Maximum number of iterations to try
5453
*/
55-
void trackOpticalFlowLK(InputArray src, InputArray dst,
56-
InputArrayOfArrays srcPyr, InputArrayOfArrays dstPyr,
57-
InputArrayOfArrays srcDxPyr, InputArrayOfArrays srcDyPyr,
58-
InputArray ptsIn, OutputArray ptsOut,
59-
OutputArray statusVec, cv::Size winSize = {7, 7}, int maxIterations = 7);
54+
CV_EXPORTS_W void trackOpticalFlowLK(InputArray src, InputArray dst,
55+
InputArrayOfArrays srcPyr, InputArrayOfArrays dstPyr,
56+
InputArrayOfArrays srcDxPyr, InputArrayOfArrays srcDyPyr,
57+
InputArray ptsIn, OutputArray ptsOut,
58+
OutputArray statusVec, cv::Size winSize = cv::Size(7, 7), int maxIterations = 7);
6059

6160
//! @}
6261

modules/fastcv/perf/perf_hough.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PERF_TEST_P(HoughLinesPerfTest, run,
2121
{
2222
auto p = GetParam();
2323
std::string fname = std::get<0>(p);
24-
double threshold = std::get<1>(p);
24+
double thrld = std::get<1>(p);
2525

2626
cv::Mat src = imread(cvtest::findDataFile(fname), cv::IMREAD_GRAYSCALE);
2727
// make it aligned by 8
@@ -34,7 +34,7 @@ PERF_TEST_P(HoughLinesPerfTest, run,
3434
{
3535
std::vector<cv::Vec4f> lines;
3636
startTimer();
37-
cv::fastcv::houghLines(src, lines, threshold);
37+
cv::fastcv::houghLines(src, lines, thrld);
3838
stopTimer();
3939
}
4040

modules/fastcv/test/test_mser.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ TEST_P(MSERTest, accuracy)
8181
// find pair of contours by similar moments
8282
typedef cv::Matx<double, 10, 1> MomentVec;
8383

84-
auto calcEstimate = [](const std::vector<std::vector<Point>>& contours, Size srcSize) -> std::vector<std::pair<Mat, MomentVec>>
84+
auto calcEstimate = [](const std::vector<std::vector<Point>>& ctrs, Size srcSize) -> std::vector<std::pair<Mat, MomentVec>>
8585
{
8686
std::vector<std::pair<Mat, MomentVec>> res;
87-
for (size_t i = 0; i < contours.size(); i++)
87+
for (size_t i = 0; i < ctrs.size(); i++)
8888
{
89-
const std::vector<Point>& contour = contours[i];
89+
const std::vector<Point>& contour = ctrs[i];
9090
Mat ptsMap(srcSize, CV_8U, Scalar(255));
9191
for(size_t j = 0; j < contour.size(); ++j)
9292
{

0 commit comments

Comments
 (0)