07-18-2017 01:17 AM
I need to find the best rectangle around the object (block) I'm measuring. This block can have some tolerances, so opposite edges may not be exactly parallel to each other. I tried to use the Shape Detection VI from the Vision Development Module to find a rectangle fitting around the blok but it turns out that the found quadrangle does not have perpendicular edges, but that's exactly what I need!
The graph output of my findings.
In this image, the linear function represent the rectangle found. As you can easily recognise, the left edge is not parallel to the right edge.
Does anyone have an idea how to realise this?
Thank you!
07-21-2017 07:16 AM
Hi Dani,
would you have some raw data for us to work on? I can't recognize whether your raw data is just 4 points, or already a reactangle...
Thanks,
Niko
07-24-2017 01:47 AM
I'm measuring blocks which often do not have parallel edges, like the following:
I need to get the best rectangle (perpendicular edged but minimum distance between computed rect and object contour) around the object.
07-24-2017 07:29 AM
I think you may have a missing parameter in the fourth function of your Block Diagram. [My apologies to my colleagues who cannot properly "guess", or "make up", what the Block Diagram looks like -- maybe the_dani will attach the VI or VIs in question, possibly even the entire Project by compressing the folder containing the code and attaching the resulting .ZIP file, but otherwise, feel free to send in your Best Guess at how to improve the Block Diagram ...].
Bob Schor
07-24-2017 07:52 AM
You are contradicting yourself when you say that the rectangle's opposite edges may not be parallel, but the corners have to be perpendicular. If the opposite edges aren't parallel how can all of the corners be perpendicular?
07-24-2017 09:34 AM
Oh yeah, sorry!
This is the VI which detects the shape and extracts my contour!