0

I am experimenting with the SfM Module in opencv_contrib, and I was reading the documentation for the reconstruct() function. I'm a bit confused as to one of the parameters that I can pass to it.

One of the arguments is:

InputArrayOfArrays points2d

and that's defined as:

points2d Input vector of vectors of 2d points (the inner vector is per image).

Does that mean we flatten the Mat data type of each image into a vector of vectors or something? I don't get it.

Do I need to use a feature matcher and find matching features, then put those features in this vector?

Either I'm not understanding what it means properly, or the documentation is a bit confusing. I'm rather new to OpenCV in C++.

Thanks in advance!

AndrewD
  • 75
  • 7
  • You can use the `std::vector` too, matching that definition. Or have a 2 channel `cv::Mat`, where each row holds points for one image. – Dan Mašek Apr 14 '18 at 15:45
  • @DanMašek Can I "flatten" a `Mat Image;` into a vector of points instead? Then aggregate them together into a single vector? – AndrewD Apr 14 '18 at 17:05
  • I'm not sure what you exactly mean by that -- can you elaborate? If something is called an "image", I'd expect it to be a 2d array of pixels, each pixel representing some colour. A Point2D represents a position (coordinates). I understand "flatten" to mean reducing the array into a single dimension, and I don't see how this process could turn colours into positions. – Dan Mašek Apr 15 '18 at 14:02

0 Answers0