How to resize a contour?
I have an application that detects an object by finding its contour. Because the image where I search for the object may be at a very big scale is affecting my detection because the contour can be too long and I skip the contours longer than a threshold. For fixing this, I have thought of resizing the image larger than a maximum size to that maw size. Doing so, I am detecting the object in the smaller image, and when drawing the contour on the initial image, I am getting a "wrong detection". Is there a possibility to resize the contour?
Hmm afaik contours are actually for visualisation purposes and for creating masks. Resizing them will not be that easy. How about the following approach
Would this suit your needs?
If I just do the (x, y) -> (resizer * x, resizer * y) is not correct? Actually I am trying to test this. (x and y are both positive)
That was my first tought. But I am not sure if this will actually work for each point. You should test and report back :)
Great! Yeah my approach suffers from artefacts ... hadn't thought on that...