06-01-2011 04:12 AM
Can someone tell me how to get the coordinates of four corners of a quadrilateral from a image. I want to use this coordinates to calculate the pixel length of two sides of this quadrilateral. All the Operation should be automatic. Thanks a lot!
06-03-2011 05:55 AM
Short Answer: It depends.
Long Answer: Since you didn't gave any information regarding the image we could make weird assumptions now and gave you millions of formulars since your question is just something like "How to get coordinates of an object in an image". However, you first need to search for the object, or the quadrilateral boarders, then you can use geometric functions to get the intersection of them, which actually is the corner.
Christian
06-03-2011 06:17 AM
06-03-2011 07:09 AM - edited 06-03-2011 07:14 AM
hi Christian, thanks for answering. I already found the objekt, and now i use a very foolish method to located four corner. I can get the coordinates of four small red punkt from the first picture. But its not so precise sometimes. Have you some advice for me?
Thanks and regards.
06-03-2011 07:12 AM
hi srikrishnaNF,
thanks for answering. But im not sure which VI u mean, can u give a picture of this VI's symbol or tell me where i can find it? Thanks a lot.
06-03-2011 07:32 AM
Hi,
Use "Find Straight Edge" to search for the borders, then use the caliper to get the corners.
Christian
06-03-2011 08:25 AM - edited 06-03-2011 08:29 AM
hi,
thank you very much. It looks great. But can u please tell me how u dealing with the setting of "Find a Straight Edge", i have tried but cant get the same effect as u did. Maybe a screenshot would be very helpful.
Regards
06-03-2011 08:42 AM
Hi,
I just did it with Vision Assistant 2010.
You will find the script as well as the VI generated with the assistent within the attached .zip file.
Christian
06-03-2011 08:55 AM
hi,
thank you very much!