Go to Post Welcome to ChiefDelphi a month before Kick-Off. This is an annual traditional experience for quite a few regulars. - synth3tk [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 09-01-2011, 17:14
captainking's Avatar
captainking captainking is offline
Level 85 Programmer
FRC #0168 (MIB)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: North Miami Beach
Posts: 41
captainking is an unknown quantity at this point
Re: Image Tracking

I'm trying to see if I can get the program to identify the shapes and determine how far from center each square is
Attached Thumbnails
Click image for larger version

Name:	squares test.jpg
Views:	9
Size:	10.4 KB
ID:	9609  
__________________
Integrity first
Service before self
Excellence in all we do
Reply With Quote
  #2   Spotlight this post!  
Unread 09-01-2011, 17:48
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Image Tracking

Here's a file that will give you the bounds of each square.
I did it by extracting the saturation plane, thresholding that (to create a boolean image), and then used particle analysis (deselecting everything except the object bounds).
It may be that you would rather use the "center of mass" option, but I figured bounds would be most efficient in this case, since we know they are squares.

As a note, processing actual images (preferably captured with the actual camera on the robot) will usually provide the most reliable results.
Attached Files
File Type: zip find bounds of squares.zip (872 Bytes, 31 views)
__________________
-- Marshal Horn

Last edited by kamocat : 09-01-2011 at 17:51.
Reply With Quote
  #3   Spotlight this post!  
Unread 09-01-2011, 20:47
captainking's Avatar
captainking captainking is offline
Level 85 Programmer
FRC #0168 (MIB)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: North Miami Beach
Posts: 41
captainking is an unknown quantity at this point
Re: Image Tracking

I'm not sure how to use this, I turned it into a VI, how do I use the data it gives me? It just comes out as the edited picture.
__________________
Integrity first
Service before self
Excellence in all we do
Reply With Quote
  #4   Spotlight this post!  
Unread 09-01-2011, 21:15
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Image Tracking

When you're creating the VI, you must select the inputs and outputs you want.

The result is the uploaded "find bounds of squares.vi".


In this case, it also requires some further modification to see what data you have. The order of elements in the "particle analysis" is in the order you request the data.
The modified VI is the uploaded "find bounds of squares 2.vi"

If you want to find the center of these squares, just average the left and right bounds, and the top and bottom bounds.
Attached Files
File Type: vi find bounds of squares.vi (49.0 KB, 11 views)
File Type: vi find bounds of squares 2.vi (50.5 KB, 11 views)
__________________
-- Marshal Horn
Reply With Quote
  #5   Spotlight this post!  
Unread 11-01-2011, 02:01
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,533
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Image Tracking

Marshal, I'm more interested in the WHY of what you did rather than the "how". What operations should we choose to minimize processor overhead? Why use the saturation plane? Why not the intensity, or hue, or one of the others? Why did you threshold and use particle analysis instead of using a tool like the find circle or find ellipse?

Where can I find something that describes the "whys" of using vision with labview?
Reply With Quote
  #6   Spotlight this post!  
Unread 11-01-2011, 02:59
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: Image Tracking

Your best bet is to look through the Vision Concepts manual. It is in NI/documentation in the Start menu. Also, there are lots of vision examples to look through and instrument for performance comparison.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 11-01-2011, 12:50
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Image Tracking

I chose the saturation plane because it provided even shading for all three squares. The intensity plane had each square at a different darkness (and actually varied at the edges of the squares), and the hue plane would not apply (all three squares are wildly different hues, and the hue of white is unpredictable).

If I was looking specifically for circles, I would use the circle finder. In this case it's a very clean image, and so analyzing all the particles (without even an erode and dilate) will produce excellent results.

If it had been a real image, I probably would do some more processing to get a clean result.
__________________
-- Marshal Horn

Last edited by kamocat : 11-01-2011 at 12:56.
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


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

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