11-03-2019 03:23 AM
Hi All,
I got an image after threholding and particle filtering, which leaves an oval and a rectangular. The oval area contains the information for further processing. However, I need to segament it from the base, which is close to a rectangular shape.
The attache image is only for a demonstration, which is not a perfect oval or rectangular in reality. Can you adivse on the segamentation between these two objects?
Thank you for your help in advance.
Solved! Go to Solution.
11-03-2019 05:49 AM - edited 11-03-2019 05:50 AM
Hello Jujian
You can fit a line(rectangle can be inclined anyways) and determine where exactly the rectangle lies (top or bottom of the circle - use centre of mass), then you can mask and extract whatever you want. Like this
Always try to attach the actual data rather than the sample. Hope this helps !
-Rahul
Hit KUDOS for Thanks
11-03-2019 08:45 PM
Hi Rahul,
Thank you for your reply and I do agree your solution can solve my problem.
Two images were attached with this thread for your reference, which is the image to process. The circles are the objects to analysis. In such a case, do you have a better idea to segament it from the base?
11-04-2019 05:28 AM
Hello Jujian
What do you mean by "segment from the base" ?
-Rahul
Hit KUDOS for Thanks
11-04-2019 07:33 AM
11-05-2019 04:25 PM
I slightly modified the Morphological Segmentation example and got it to remove the bar that the circles rest against, below are screenshots of the segmentation.
The only changes to the example are:
- Changed the initial threshold to search for dark objects instead of bright
- Added a Particle Filter after the IMAQ AND, to remove particles that aren't circular
Attached is the modified VI, saved for LV2018.