View Single Post
  #6   Spotlight this post!  
Unread 17-01-2006, 01:34
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: Servos controlling camera and purple screen

Quote:
Originally Posted by Damian Manda
We were trying to figure out what to do with the purple screen in LabVIEW today, until I clicked on a random part of a frame grab taken when pointing at the green target. The selection area showed up on the outside with an un-highlighted section where the green light box was. Clicking in this area reversed the selection highlighting. I could not even see the difference on the laptop screeen (with highlighting turned off), so you may not be able to notice a difference either. However, the camera can certainly detect the difference and now tracks perfectly.

Also, we still hade problems with slight detections of other lights. The noise filter was not working well enough, so I corrected this by modifying
Code:
if(T_Packet_Data.my != 0)
to 
if(T_Packet_Data.my != 0 && T_Packet_Data.pixels > 10)
in tracking.c
Just wanted to let others know how to easily correct this problem in the default code.
The purple screen is due to a bug in the LabVIEW code for the camera which has the picture that is displayed interpret the YCrCb data as RGB data. The conversion ends up being "all purple" -> "all black". Fixed it up last weekend and will post it tomorrow when I get to work. It should be easier to see dark gray on black than purple on slightly darker purple. Besides, it's just ugly to look at.

Sorry for the delay on getting it posted. We are trying to get a site approved to host the VIs that everyone can get to. Some people have restrictions getting to FTP sites.

For you kids out there who are interested in what that problem is and how you can fix it, Google for "YUV RGB conversion" or "YCrCb RGB conversion". You'll find plenty of information about it. You can then try fixing it in the version you have by implementing the 3 equations. You can also download the fix tomorrow and see how I chose to implement it. Consider it a challenge. Play around with LabVIEW and you'll see just how powerful and easy to use it really is.

Best of luck!
-Joe