Remapping contours (vectors of points) with maps from camera calibration (using cv::remap instead of cv::undistortPoints ?)
Hello there,
I have some contours (multiple std::vector of cv::Point) that I get using cv::findContours and I would like to modify the values of each point (meaning remapping the contours) using both maps that I got from cv::fisheye::initUndistortRectifyMap.
Is there any way to use cv::remap with contours as inputs and outputs ? When I try to use it, I get this assertion from matrix.cpp :
OpenCV Error: Assertion failed (d == 2 && (sizes[0] == 1 || sizes[1] == 1 || sizes[0]*sizes[1] == 0)) in create, file /home/lemaker/Documents/opencv-github/modules/core/src/matrix.cpp, line 2363
I am aware of the existence of cv::fisheye::undistortPoints but it seems that cv::remap is optimized for my case (NEON support + parallel_for_) and I don't need to re-calculate the maps matrix each time (as undistortPoints seems to do it by itself), that is why cv::remap would be a good solution.
Thank you in advance for your answer, and have a good day ! :)
Just an idea:
Sorry @Eduardo, I forgot to mention it : it takes a certain amount of time to remap the frame entirely, that is why I am looking for remapping the infos I need only. :)