1 | initial version |
you can't approximate an Image with a polygon, you need to to find some contours first.
it's not a matter of converting Mat types.
to do it, you need to: 1. binarize your (grayscale) image using threshold, compare or Canny 2. findContours() in the binary image , probably filter out stuff you don't want 3. now you can approxpoly those contours
2 | No.2 Revision |
you can't approximate an Image with a polygon, you need to to find some contours first.
it's not a matter of converting Mat types.
to do it, you need to:
1. to:
3 | No.3 Revision |
you can't approximate an Image with a polygon, you need to to find some contours first.
it's not a matter of converting Mat types.types, you're missing some processing steps.
to do it, you need to: