Go to Post They just kind of sit there chilling, like "Hey I'm a trailer, where's my robot?" - artdutra04 [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 22-01-2009, 17:20
ericbarch's Avatar
ericbarch ericbarch is offline
221 Robotic Systems Engineer
FRC #0027 (Team Rush)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Clarkston, MI
Posts: 15
ericbarch is a jewel in the roughericbarch is a jewel in the roughericbarch is a jewel in the roughericbarch is a jewel in the rough
Send a message via AIM to ericbarch
Webcam RGB Calibration VI

Just finished this VI for our team...figured it would be of use to other teams. It's somewhat similar to the CMU2 VI that has been used in past years.

All you need to do is run the VI and it will ask you to load a webcam image in.

If you have a webcam loop setup in your main project you can just send the webcam image to a display and from there you can save frames captured from the webcam. Input these images into this calibration VI and then you can get your RGB color values set dead on.

Enjoy.
Attached Files
File Type: zip Highlight_Webcam.zip (222.5 KB, 128 views)
__________________
Eric Barch
221 Robotic Systems
Controls Engineer
http://team221.com
Reply With Quote
  #2   Spotlight this post!  
Unread 23-01-2009, 07:04
Greg McKaskle Greg McKaskle is online now
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Webcam RGB Calibration VI

That is a very useful VI. Just a few observations though.

When using a loop going through an array in LV, you don't really need to wire the size. If you remove the 320 and 240 it will still work, and now it will work for other image sizes.

The bottom logic for pinning between 0 and 255 can also be done with a few In Range and Coerce nodes. They are used in the loop on top to tell if the color is in range, and they have another terminal of the coerced value.

Finally, now that you have this working, you may want to try using HSL color space. For your app, it would just be converting the image before you extract the array, and renaming the comparison inputs and outputs.

The examples for vision all use HSL color math because it will give you much better results, especially when the lights cause shadows or glare.

Greg McKaskle
Reply With Quote
Reply


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
Light RGB Sensor knine143 Programming 6 06-05-2008 21:21
Pre-programmed RGB values bush Programming 3 28-01-2006 22:13
RGB colors in camera.h X-Istence Programming 5 11-01-2006 21:59
WebCam archiver 2001 0 23-06-2002 23:00
WebCam archiver 2001 2 23-06-2002 22:55


All times are GMT -5. The time now is 08:05.

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