Ask Your Question

NitinPrasad's profile - activity

2020-08-29 02:39:38 -0600 commented answer Where to find implementation of BFMatcher::match

Thank you!

2020-08-29 02:39:00 -0600 marked best answer Where to find implementation of BFMatcher::match

I want to study the implementation of BFMatcher to make some modifications.

I have found this file: https://github.com/opencv/opencv/blob..., which contains implementation of ocl_match in BFMatcher, but I am not able to find any implementation for ordinary match. Where can I find the code that executes when BFMatcher.match(...) is called if HAVE_OPENCL is not true?

Thanks!

2020-08-29 02:39:00 -0600 received badge  Scholar (source)
2020-08-29 02:38:57 -0600 received badge  Supporter (source)
2020-08-29 00:17:08 -0600 asked a question Where to find implementation of BFMatcher::match

Where to find implementation of BFMatcher::match I want to study the implementation of BFMatcher to make some modificati

2015-05-07 16:59:43 -0600 commented question No SURF Feature Detector

Sorry for the very very late response but yes, I was using OpenCV 3.0 - thanks for the comments! I just fixed my problem.

2015-03-10 17:19:59 -0600 asked a question No SURF Feature Detector

I'm trying to follow this tutorial:

http://docs.opencv.org/doc/tutorials/...

However I get the error:

undefined reference to `cv::SURF::SURF(double, int, int, bool, bool)'

I looked here

http://stackoverflow.com/questions/16...

but linker is not an option after I try "Project->Properties".

I've also tried using Star Feature Detector instead but this does not return any keypoints.

2014-08-10 22:21:27 -0600 commented question Problem with Hamming Matcher

@Guanta, if you too believe that this is a bug, would there be some better place to file an official ticket?

2014-08-09 07:49:11 -0600 received badge  Nice Question (source)
2014-08-09 01:29:36 -0600 received badge  Student (source)
2014-08-08 17:07:44 -0600 asked a question Problem with Hamming Matcher

I'm running into issues that lead me to believe that Hamming matcher is not working as expected (or at least, not as I expect). Consider the following code (please run it if you have the appropriate packages installed):

int main( int argc, char** argv ) {

const int rows = 2;
const int cols = 3;
const int bitl = cols * 8;

BruteForceMatcher<Hamming> matcher;
std::vector<DMatch> matches;

Mat mat1 = cv::Mat::zeros(rows, cols, CV_8U);
std::bitset<bitl>* ptr1 = (std::bitset<bitl>*) (mat1.data + (rows - 1) * mat1.step[0]);
Mat mat2 = cv::Mat::zeros(rows, cols, CV_8U);
std::bitset<bitl>* ptr2 = (std::bitset<bitl>*) (mat2.data + (rows - 1) * mat2.step[0]);

ptr1->set(0, 0);
ptr2->set(0, 1);

std::cout << mat1 << std::endl << std::endl;
  std::cout << mat2 << std::endl << std::endl;

  matcher.match(mat1, mat2, matches);

  for (int i = 0; i < (int) matches.size(); i++ ) {
    std::cout << matches[i].distance << std::endl;
  }

  std::cout << std::endl << std::endl;

  ptr1->set(0, 1);
  ptr2->set(0, 0);

  std::cout << mat1 << std::endl << std::endl;
  std::cout << mat2 << std::endl << std::endl;

  matcher.match(mat1, mat2, matches);

  for (int i = 0; i < (int) matches.size(); i++ ) {
    std::cout << matches[i].distance << std::endl;
  }
}

This gives the following output:

 [0, 0, 0;
  0, 0, 0]

[0, 0, 0;
 1, 0, 0]

0
0


[0, 0, 0;
 1, 0, 0]

[0, 0, 0;
 0, 0, 0]

0
1

which is, of course, nonsensical because the Hamming distance should be symmetric. Is there some subtlety in the way the Hamming matcher works that I am missing? Thank you all


EDIT: The example transferred to current OpenCV 2.4.9-version gives same output

const int rows = 2;
const int cols = 3;

cv::BFMatcher matcher(cv::NORM_HAMMING);
std::vector<cv::DMatch> matches;

cv::Mat mat1 = cv::Mat::zeros(rows, cols, CV_8U);
cv::Mat mat2 = cv::Mat::zeros(rows, cols, CV_8U);

mat2.at<uchar>(1,0) = 1;
std::cout << mat1 << "\n\n" << mat2 << "\n\n";

matcher.match(mat1, mat2, matches);

for (size_t i = 0; i < matches.size(); i++ ) { 
    std::cout << matches[i].distance << std::endl;
}   

std::cout << std::endl << std::endl;

mat2.at<uchar>(1,0) = 0;
mat1.at<uchar>(1,0) = 1;
std::cout << mat1 << "\n\n" << mat2 << "\n\n";

matcher.match(mat1, mat2, matches);

for (size_t i = 0; i < matches.size(); i++ ) { 
    std::cout << matches[i].distance << std::endl;
}
2014-06-14 17:41:03 -0600 received badge  Editor (source)
2014-06-14 17:40:04 -0600 asked a question Enable SSE2

I'm running on a machine (Intel i5) that runs SSE2, but when I run OpenCV code the CV_SSE2 sections never run. Is there an easy way to enable this without re installing?

I'm running Ubuntu 13.04 and Eclipse CDT, but I can change to command line if necessary.

Thanks

2014-02-25 04:35:17 -0600 asked a question Problem 'Installing' OpenCV Ubuntu 13.10

I recently found a paper with source code avaiable so I've been trying to get this to run; I believe I installed OpenCV itself correctly but when I try to use CMake to generate the proper makefiles for the code I'm trying to run, I get the following error.

        CMake Error at CMakeLists.txt:15 (find_package):
      Found package configuration file:

        /home/nitin/Documents/Research/SIFT/code/opencv/release/OpenCVConfig.cmake

      but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
      NOT FOUND.

-- Configuring incomplete, errors occurred!

Can someone shed some light on this situation? The only line in that cmake file that changes OpenCV_FOUND is:

if(ANDROID AND OpenCV_ANDROID_NATIVE_API_LEVEL GREATER ANDROID_NATIVE_API_LEVEL)
  ...
  set(OpenCV_FOUND "OpenCV_FOUND-NOTFOUND")
  ...
endif()