Go to Post I believe the only cure... is more cowbell? :D - The Megan 2207 [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 01-30-2012, 11:31 AM
DjScribbles DjScribbles is offline
Programming Mentor
AKA: Joe S
FRC #2474 (Team Excel)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2012
Location: Niles MI
Posts: 284
DjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to beholdDjScribbles is a splendid one to behold
Image Threshold Produces Black Image

We used the NI Vision Assistant to generate code, and the script there works great on all our images, however once we generate code, modify to compile, and deploy to the robot, it doesn't seem to work properly.

I added code to write the image out to the CRIO filesystem as a jpeg before and after the threshold, the image going in looks normal, and can be loaded in vision assistant and results in particles as we expected; and the image saved after the threshold is just black.


We have additional steps doing particle analysis, and some custom code that decomposes the particle analysis results structure (which could be the problem, haven't debugged heavily yet).

Is there a reason this image is all black, I saw several labview topics where it has to do with the color pallete in labview, but is it a similar issue i'm seeing when I ftp to the robot where the squares are just dark-grey (and throwing me a red herring), or is there something different in the threshold function that is a problem.

Here is some psuedo code of what we're doing:
1.get camera image as color image (write it out)
2.run HSV threshold filter,
3.storing the result to binary image (write out binary image, this one looks black),
4.apply other image processing steps, convex hull + particle filter + particle analysis (we pass back the particle analysis by reference)
5.decompose the particle analysis results searching for the result name "Center Of Mass X" (i think) using if(strcmp() == 0)


If anyones got some helpful info or ideas it would be appreciated, once I figure this out I'll post back what went wrong.
tldr; I'm mostly curios if the black image is ok (just a color space issue) or if the threshold operation is failing to find anything.
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 10:23 AM.

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