Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I find the corners of a trapezoid particle%3F

I am trying to locate the pixel location of the corners of a U shaped particle.  I can successfully filter for the particle and locate the upper left corner using the IMAQ_MT_FIRST_PIXEL_X and Y functions.  However, depending on the angle, the U becomes trapezoidal, so the containing rectangle won't perfectly border it.

Is there a way to locate the pixel location of the upper right, lower right, and lower left corners without knowing whether the left or right, top or bottom will be bigger?

 

0 Kudos
Message 1 of 8
(4,723 Views)

honestly I could not understand what is your means but it want to point a trick that may help you for more help i need some more information to understand what is exactly your means
any way you can flip and mirror a image to use same algorithm for different direction
if you mirror the image and use your algorithm indeed end of the image act like begin of it an also if you flip up the image it will happen for y direction too

0 Kudos
Message 2 of 8
(4,715 Views)

In Vision Development Module 2015, we release IMAQ Corner Detector located in the Machine Vision>>Feature Correspondence palette.

This VI allows you to choose between the Harris and Shi-Tomasi corner detection algorithms.

Give it a try.

 

Hope this helps.

 

-Christophe

0 Kudos
Message 3 of 8
(4,707 Views)

I apologize for forgetting to mention it, but I'm working in C++.

0 Kudos
Message 4 of 8
(4,692 Views)

The function is also available in our C API:

IMAQ_FUNC DetectorReport*   IMAQ_STDCALL imaqCornerDetection(const Image* image, const ROI* roi, CornerOption* option, unsigned int pyramidLevel);

 

Christophe

0 Kudos
Message 5 of 8
(4,685 Views)

Excellent!  Thank you!

By ancy chance could you point me to the complete API?

 

0 Kudos
Message 6 of 8
(4,677 Views)

Nevermind, found it.

Thanks!

 

0 Kudos
Message 7 of 8
(4,670 Views)

Your include files are located here:

C:\Program Files (x86)\National Instruments\Vision\Include

 

Your lib files here:

C:\Program Files (x86)\National Instruments\Vision\Lib

 

Help here:

C:\Program Files (x86)\National Instruments\Vision\Help

 

MSVC examples can be found here:

C:\Users\Public\Documents\National Instruments\Vision\Examples\MSVC

 

Hope this helps.

 

Christophe

0 Kudos
Message 8 of 8
(4,659 Views)