How do contour "warpPerspective" and "warpAffine"
findContours(imgBinary, allContours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0));
I haved the allContours, and Matrix of Perspective and Affine Transformation
How do contours Perspective(2D) and Affine Transformation???
Which function use???
Use direct "perspectiveTransform", have error
vector<vector<Point> >contours1;
perspectiveTransform(allContours, contours1, H);
perspectiveTransform takes single vector<point> arguments
But "allContours" is not vector<point> arguments.
How to change?
^^ yes, that's your problem. iterate over allcontours, and use allcontours[i] ?
Now, use
vector<point>contours1;
But also have error
sorry, forgot to mention: you need a
vector<Point2f>
for both args, not avector<Point>
(you'll probably need to re-pack the whole thing)
How to get each point coordinates of Contours???
I tried "allContours[i].[j]", but error
vector<point2f>contours1;
Also error.
I think that Data Types of Contours is not correct.
try:
(similar for contours1, both args need to be same type)
Last question, how to transforming Point2f into Point.
I would like to rewrite "allContours" that use new datos
allContours[i]=contours1