Go to Post The programmers tend to get less credit than they deserve, but the robot wouldn't run if we weren't there. :) - IMDWalrus [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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
  #2   Spotlight this post!  
Unread 18-03-2009, 05:36
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: Camera bug and Suggestions to locate green

Quote:
Originally Posted by Green2 View Post
I think the issues resides in the code where it takes an RGB image and convert it to HSL for color detection. At times, the resulting HSL image will output a red/pink hue value that is in the single digits (normal red/pink hue is supposed to be from 220 to 255, but the converted HSL image will indicate some red/pink pixels are in the range of 1 to 5. This usually occurs when the target hue value is near the higher value of 255. The only conclusion that I can make is that there is a bug in the conversion code where it is not converting the red hue range properly. I believe that this bug is causing pink detection to fail at times. When pink fails, green natually also fails.
If this is the case, the bug is in the color threshold, not necessarily the HSL conversion. Hue in HSL is defined to be a continuous cycle, much the same way that an angle measurement is continuous: 360 degrees is "adjacent to" 359 degrees, but it can also be said to be "adjacent to" 1 degree. There are two options to that could be used to compensate for this: use a piecewise threshold, one piece for 220-255 and another for 0-5, or before you threshold for pink, shift all the hue values by ~100 mod 255, i.e. Hue' (hue prime) = Hue + 100 mod 255. If you're using LabVIEW, use the remainder output from the Quotient and Remainder function. Then just threshold for 65-105 or whichever range you need.

--Ryan
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
easy-c camera goes to corner when sees green light iiiii Programming 0 12-02-2007 19:07
Green Camera Light Questions Naveen Electrical 18 24-01-2007 22:52
Camera finds overhead lights not green light theycallhimtom Programming 4 20-01-2007 17:37
EasyC and the 8.2/8.3 Volt Bug TubaMorg Programming 2 15-03-2006 11:45
Camera Only Tracking Green sybert1ger Programming 2 08-02-2005 20:21


All times are GMT -5. The time now is 21:37.

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