Go to Post Spoiler: There will be no plasma cutters available in FIRST Choice - Jibsy [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 22-01-2012, 21:15
malachias malachias is offline
Registered User
FRC #1311
 
Join Date: Jan 2012
Location: Kell High School, Marietta, GA
Posts: 9
malachias is on a distinguished road
NI Vision Functions Documentation and Use

I have yet to find any good documentation on the C language NIVision API. Does anyone know of such a document? I have looked at NI LabView documentation and have not found it that helpful.

Absent the above documentation, perhaps someone can provide some insight on how to use some of the IMAQ functions. At present I am following the general pattern laid out the vision white paper. The WPILIB API appears to force one to work with IMAQ functions, because the *Image classes don't expose enough of the IMAQ methods. I think using particle analysis alone would have me reinventing much of what is already in IMAQ.

The first step is to construct a preliminary mask from the luminance plane of an HSLImage obtained from the AxisCamera. I exclude low luminancity pixels from the image using imaqColorThreshold using a replace value of 255 (I am using the Image from the returned MonoImage). I can write the resulting image out and FTP the file back to my computer for inspection. This part works. Next I run a size filter to exclude small particles. I use imaqSizeFilter and that appears to work. Next I use imaqConvexHull. This is the point at which I am stuck. The source image is a U8 format where values are either 0 or 255. I have inspected the source image and it looks reasonable -- a thick outlined square with some imperfections. The resulting image is black. I have not inspected the resulting image in detail. Does the convex hull method expect 0's and 1's or does it change all the 255's to 1's creating an almost black image? Or am I doing something else wrong?

A final question -- when I get an underlying Image from an ImageBase object am I responsible for disposing of it? If so, how?
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 17:39.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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