Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Image recognition API (http://www.chiefdelphi.com/forums/showthread.php?t=80905)

SavtaKenneth 23-01-2010 06:16

Image recognition API
 
Hi,

We're trying to program an Image recognition software and we're running into a problem as some(most) of the classes used in the Circle Tracker Demo don't have proper(any) documentation in the WPIlib API. If anyone knows of the documentation of the classes used in the Demo we'd highly appreciate knowing of it.

Many Thanks :)

~Kenneth
The Spikes #2212

Michael DiRamio 24-01-2010 02:12

Re: Image recognition API
 
The classes mirror the NI Vision library. There's a windows help file for it in the National Instruments folder:

C:\Program Files\National Instruments\Vision\Documentation\NIVisionCVI.chm

Look under imaqDetectEllipses in the index.

SavtaKenneth 24-01-2010 12:23

Re: Image recognition API
 
Thanks that helped. I've got another question though what are the variables m_score,m_rawScore and m_xMax representing?

Michael DiRamio 24-01-2010 19:16

Re: Image recognition API
 
I haven't found any documentation about these, but here's my stab at it based on the sample target code:

m_xMax - the width of the image put into the same units as the height. The one line of documentation in the java Target code talks about dividing everything by the height to get things in the same units.

m_rawScore - the score value sent back by the NIVision code. It appears to be a value between 0 and 1000 describing how "ellipse-like" the ellipse it detected is (with 0 being not at all and 1000 being perfect).

m_score - this is a calculation based on the size of the ellipse and the m_rawScore defined above. Large ellipse and high raw score will lead to a high m_score.

- It multiplies the major radius and minor radius (so bigger size will result in a bigger value)
- It divides by (1001 - m_rawScore). A perfect raw score would lead to it being divided by 1, but the less perfect it is, the larger the divisor.
- It is then divided by the area of the image to make it a percentage of the total image size.

Hope that helps.


All times are GMT -5. The time now is 09:41.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi