Go to Post The GDC is becoming sane. - Zuelu562 [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 28-01-2009, 15:05
TDohse TDohse is offline
Registered User
AKA: Thomas
no team (NI)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 39
TDohse is an unknown quantity at this point
Just for fun - skin detection

Another example of what you can do with your FRC robot this year, is track human skin. I coded up a simple example in LabVIEW to detect skin in real time, with reasonable reliability. You can tweak the parameters and white balance to make it work better in your lighting environment. As an added bonus, the algorithm should work regardless race.
Attached Thumbnails
Click image for larger version

Name:	SkinDetection.JPG
Views:	295
Size:	106.0 KB
ID:	7252  
Attached Files
File Type: zip SkinDetection.zip (37.0 KB, 200 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 28-01-2009, 15:14
TubaMorg TubaMorg is offline
Programmermechanicalelect ricalcoach
AKA: Dan
FRC #1480 (Robatos Locos)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Houston
Posts: 450
TubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond reputeTubaMorg has a reputation beyond repute
Re: Just for fun - skin detection

Good thing. I would hate to think your robot is utilizing racial profiling.
Reply With Quote
  #3   Spotlight this post!  
Unread 29-01-2009, 20:16
demosthenes2k8's Avatar
demosthenes2k8 demosthenes2k8 is offline
Graduated but not gone
AKA: Matt Soucy
FRC #0166 (Chop Shop 166)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Merrimack, NH
Posts: 589
demosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to behold
Send a message via AIM to demosthenes2k8 Send a message via Yahoo to demosthenes2k8
Re: Just for fun - skin detection

What's the red goggle thing it's picking up on the right of the red image?
Reply With Quote
  #4   Spotlight this post!  
Unread 29-01-2009, 22:12
Burmeister #279's Avatar
Burmeister #279 Burmeister #279 is offline
What Time Is It?
AKA: Nick Burmeister
FRC #0279 (TechFusion)
Team Role: Programmer
 
Join Date: Nov 2008
Rookie Year: 2007
Location: Toledo
Posts: 207
Burmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of lightBurmeister #279 is a glorious beacon of light
Send a message via AIM to Burmeister #279
Re: Just for fun - skin detection

Quote:
Originally Posted by demosthenes2k8 View Post
What's the red goggle thing it's picking up on the right of the red image?
best guess is that its confusing the change in light [gray, blue, and red] with a human skin tone.
__________________
WHAT TIME IS IT? TWO SEVEN NINE!!! [Team B =) ] Awards: 4 Safety, 2 Ind. Design, 2 Xerox, 1 Nat. Champs
2009 Buckeye Semi-Finalists (1014 & 695) || 2008 GLR Safety Award || 2006 GLR Safety Award
2005 Buckeye Regional Champs (67 & 274) & GM Industrial Design Award & Safety Award GLR Quarter Finalist & Xerox Creativity Award & Safety Award National Xerox Creativity Award & Curie Quarter Finalist (1126 & 180)
2004 Buckeye Delphi Driving Tomorrows Technology Award & Quarter Finalist GLR Champs Nationals Curie Division Finalist
2003 GLR GM Industrial Design Award || 2001 National Newton Division Winner & National Champions
2000 MI DaimlerChrysler Team Spirit Award
Reply With Quote
  #5   Spotlight this post!  
Unread 30-01-2009, 12:43
TDohse TDohse is offline
Registered User
AKA: Thomas
no team (NI)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 39
TDohse is an unknown quantity at this point
Re: Just for fun - skin detection

Quote:
Originally Posted by demosthenes2k8 View Post
What's the red goggle thing it's picking up on the right of the red image?
The algorithm is pretty simple, just checking the red and green channels, normalized by intensity. The code runs quickly enough for processing live video, but is sensitive to lighting changes and prone to some false positives. There are a number of functions which could be used to reduce or remove noise and false positives, the posted code however just outputs anything falling into the correct color range.
Reply With Quote
  #6   Spotlight this post!  
Unread 30-01-2009, 19:29
TDohse TDohse is offline
Registered User
AKA: Thomas
no team (NI)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 39
TDohse is an unknown quantity at this point
Re: Just for fun - skin detection

We decided just detecting skin wasn't good enough, and decided to use the information for where people were to modify the original image by tinkering with the Hue, Saturation and Luminance. We also added an erode and dilate function to remove some of the random noise.

For those of you who want to put a face to the names you see in the forums, that's myself, Greg McKaskle and Christy Dellas (left to right) in the sample image.
Attached Thumbnails
Click image for larger version

Name:	Skin_Advanced.jpg
Views:	166
Size:	93.5 KB
ID:	7269  
Attached Files
File Type: zip SkinDetectionModified.zip (51.6 KB, 100 views)
Reply With Quote
  #7   Spotlight this post!  
Unread 06-06-2009, 11:36
Andromeda28 Andromeda28 is offline
Registered User
no team
 
Join Date: Jun 2009
Location: Palencia,Spain
Posts: 2
Andromeda28 is an unknown quantity at this point
Re: Just for fun - skin detection

Hi, I'm just new in this forum and in the world of robotics and labVIEW programs. I need to implement a program in LabVIEW that recognizes the movement of a hand using an usb camera for my final project career. I've downloaded your vi to the skin detection, but when I try to run it, it doesn't find "Camera.lvlib:Close.vi" and others similar elements. Where can I find the "Robotics Library" or the library I need to use your program?

Please, excuse my English and thank you very much.
Reply With Quote
  #8   Spotlight this post!  
Unread 06-06-2009, 13:57
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
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: Just for fun - skin detection

The libraries you are looking for are part of the FIRST robotics installation. The example used the camera support from that library.

If you already have LV, you can replace a few elements and do this without the FIRST library. Do you have a camera? What driver or VIs were you planning to use to get images from the camera? If you can get images, then you can replace the Open, Get, and Close with your camera specific VIs.

Greg McKaskle
Reply With Quote
  #9   Spotlight this post!  
Unread 07-06-2009, 19:51
IKE's Avatar
IKE IKE is offline
Not so Custom User Title
AKA: Isaac Rife
no team (N/A)
Team Role: Mechanical
 
Join Date: Jan 2008
Rookie Year: 2003
Location: Michigan
Posts: 2,150
IKE has a reputation beyond reputeIKE has a reputation beyond reputeIKE has a reputation beyond reputeIKE has a reputation beyond reputeIKE has a reputation beyond reputeIKE has a reputation beyond reputeIKE has a reputation beyond reputeIKE has a reputation beyond reputeIKE has a reputation beyond reputeIKE has a reputation beyond reputeIKE has a reputation beyond repute
Re: Just for fun - skin detection

I swear this is how Terminator FRC addition will start.
Reply With Quote
  #10   Spotlight this post!  
Unread 08-06-2009, 14:59
Andrew Schreiber Andrew Schreiber is offline
Joining the 900 Meme Team
FRC #0079
 
Join Date: Jan 2005
Rookie Year: 2000
Location: Misplaced Michigander
Posts: 4,068
Andrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond reputeAndrew Schreiber has a reputation beyond repute
Re: Just for fun - skin detection

Quote:
Originally Posted by IKE View Post
I swear this is how Terminator FRC addition will start.
Ike, don't give the theaters new ideas for bad sequels. Also, don't give my subconscious ideas for bad nightmares, being chased down by 67 scares me...

Very nifty stuff, this does show off the power of the system we now have access to. Thank you for sharing.

Now, what are the chances of getting OpenCV ported to the Crio? Then our robots could autonomously track down and pummel assorted people with balls for not wearing safety glasses.
__________________




.
Reply With Quote
  #11   Spotlight this post!  
Unread 08-06-2009, 16:35
dpeterson3 dpeterson3 is offline
Registered User
FRC #1178 (DURT)
Team Role: Alumni
 
Join Date: Aug 2008
Rookie Year: 2008
Location: St. Louis
Posts: 158
dpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the roughdpeterson3 is a jewel in the rough
Re: Just for fun - skin detection

Quote:
Now, what are the chances of getting OpenCV ported to the Crio? Then our robots could autonomously track down and pummel assorted people with balls for not wearing safety glasses.
I think some teams already managed that by accident. I saw in a thread (can't remember which one) where people walked by the camera with shirts the same color as the vision target 2 years ago. Not a good idea if you don't like poof balls. The CRIO does run a Linux kernel. If OpenCV will run on a Linux kernel, then it can probably be ported. Not my area of expertese, though.
Reply With Quote
  #12   Spotlight this post!  
Unread 08-06-2009, 20:52
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
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: Just for fun - skin detection

Quote:
Originally Posted by Andrew Schreiber View Post
Now, what are the chances of getting OpenCV ported to the Crio? Then our robots could autonomously track down and pummel assorted people with balls for not wearing safety glasses.
I'm curious what it is you want out of OpenCV? To my knowledge, it hasn't been ported to the PPC/VxWorks combo. If you find things in OpenCV that isn't in NIVision, please bring it up.

Greg McKaskle
Reply With Quote
  #13   Spotlight this post!  
Unread 07-07-2009, 12:56
Andromeda28 Andromeda28 is offline
Registered User
no team
 
Join Date: Jun 2009
Location: Palencia,Spain
Posts: 2
Andromeda28 is an unknown quantity at this point
Re: Just for fun - skin detection

Hello again,

I've replaced the VIs I haven't with my camera specific VIs, but I still haven't got some of the VIs you use: Set image compression.vi Set Exposure Priority.vi and Set White Balance.vi. I've omitted them and I can run the program, it captures the original image but the second display is always black. What VIs are essential? And what does Set White Balance. vi do exactly? I'm quite lost...

Thanks!

Last edited by Andromeda28 : 07-07-2009 at 13:01.
Reply With Quote
  #14   Spotlight this post!  
Unread 07-07-2009, 21:41
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
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: Just for fun - skin detection

Those VIs are simply setting acquisition properties on the camera. The Set White Balance takes in an enumeration to define the lights as fluorescent, indoor, outdoor, etc. This will help in producing more true colors, but clearly isn't available on all cameras or necessary as long as your colors don't look odd. The VIs are built upon the HTTP requests to the camera http server to change the parameters.

If you have the first image working, you may need to tweak the G and R limits. Thomas would be more knowledgable for how to set them. You may also be able to find the paper discussing the algorithm. Note that on the two images, Thomas tweaked the values to adjust for the lighting in the room.

Good luck.

Greg McKaskle
Reply With Quote
  #15   Spotlight this post!  
Unread 26-08-2009, 07:20
Sasals's Avatar
Sasals Sasals is offline
Registered User
no team
 
Join Date: Aug 2009
Location: Cyprus
Posts: 3
Sasals is an unknown quantity at this point
Just for fun skin detection

Thank you all for your comment. It was fun to do. And for Zesty, yeah, it takes some time, depending on the shot and your skills with photoshop. In general 20-30 min for a shot I guess.

Jan
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
Just for fun, Aug 21–Aug 25 and it is free Mikekizer Off-Season Events 0 08-07-2007 16:01
Just for fun: type your username with clothing... Billfred Chit-Chat 15 25-02-2005 19:05
Customizable Winamp3 Skin for Teams... Clark Gilbert Computer Graphics 3 07-10-2002 19:57
Just for fun. archiver 2000 7 24-06-2002 00:16


All times are GMT -5. The time now is 22:14.

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