Go to Post Mentor to Student: "It's OK, if you mess it up you just get to do it again." - EStokely [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-02-2010, 16:25
Joshamuffin Joshamuffin is offline
Programmer
FRC #1723 (FBI)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Missouri
Posts: 24
Joshamuffin will become famous soon enough
Send a message via MSN to Joshamuffin
Camera Target (x,y) Position

On the driver's station, there's the thing which shows whether the robot should turn left or right. I was wondering where in the LabVIEW 2010 default program I may be able to reference the coordinates of the ellipse the camera has found.

Code is being sifted through at this moment. I'll re-post if you need more info or if we can find the variable. Thanks in advance.
Reply With Quote
  #2   Spotlight this post!  
Unread 09-02-2010, 16:31
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: Camera Target (x,y) Position

I believe that the information you are looking for is within the TARGET INFO global variable.

Note that this can have more than one target within this array of clusters. The highest scoring target is always sorted to #0.

We extract the target info by first indexing the array with a "0", then unbundling the cluster for the X and Y values
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics

Last edited by Ziaholic : 09-02-2010 at 16:33.
Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2010, 17:27
Joshamuffin Joshamuffin is offline
Programmer
FRC #1723 (FBI)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Missouri
Posts: 24
Joshamuffin will become famous soon enough
Send a message via MSN to Joshamuffin
Re: Camera Target (x,y) Position

I have located said reference.

It was a pain going through all of the clusters and indecies, so I turned it into a vi. I have attached it to this post. It should work with any code that runs the standard vision processing. It spits out (x,y) coordinates to your program.
Attached Files
File Type: vi camTarPos.vi (7.0 KB, 25 views)
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2010, 22:16
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Camera Target (x,y) Position

Quote:
Originally Posted by Joshamuffin View Post
It was a pain going through all of the clusters and indecies,...
Once you get familiar with how clusters work and how to bundle and unbundle things by name, it's a lot less painful. You did a whole bunch of work figuring out things in detail using simple "anonymous" unbundle steps. Here is something that does the same thing in fewer steps and with more built-in documentation using Unbundle by Name. It works a lot like structures in C, where you can drill down through multiple layers in one shot.
Attached Thumbnails
Click image for larger version

Name:	target position.jpg
Views:	49
Size:	9.3 KB
ID:	8593  
Reply With Quote
  #5   Spotlight this post!  
Unread 09-02-2010, 22:23
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: Camera Target (x,y) Position

OK Alan ... how'd you hack my computer? That's the exact code we have in our targetting routines.

__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote
  #6   Spotlight this post!  
Unread 09-02-2010, 23:31
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Camera Target (x,y) Position

Quote:
Originally Posted by Ziaholic View Post
That's the exact code we have in our targetting routines.
It is obviously the perfect code for the task. It does no more than is necessary.

Quote:
“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.”
-- Antoine de Saint Exupéry
Reply With Quote
  #7   Spotlight this post!  
Unread 16-02-2010, 22:48
Joshamuffin Joshamuffin is offline
Programmer
FRC #1723 (FBI)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Missouri
Posts: 24
Joshamuffin will become famous soon enough
Send a message via MSN to Joshamuffin
Re: Camera Target (x,y) Position

Oh, C. How you were so perfect. Why is my team convinced that LabVIEW offers so many advantages?

Bah, no matter. Unbundle by name is quite superior to the mess I produced. Thank you.
__________________
www.gnu.org / www.fsf.org

We should be using Free and Open Source Software with our robotics competition.
>"But National Instruments gives us 25 free [as in beer, not freedom] licenses out of their good graces!" -Name witheld.
Good graces? HOW DARE they make us jump through hurdles?
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2010, 00:46
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,512
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: Camera Target (x,y) Position

Labview does not offer any hugely significant advantages over C (other than it being slightly easier to learn for complete coding newbies).

C does not really offer any hugely significant advantages over Labview. People enjoy arguing about it, but the simple fact is that you will always be more effective programming in a language you know.

I will say that as a labview programmer I envy the C teams and their lightening fast compile times compared to mine.
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
Camera Target size configuration RKElectricalman C/C++ 3 03-02-2010 15:13
Camera Target Dimensions pribusin General Forum 8 13-01-2010 13:29
Target acquisition with camera- color issues Quarkster Programming 20 12-03-2009 00:11
CAMERA POSITION RDD Programming 1 18-02-2007 16:47
Camera Tracking Target Jade Programming 3 20-01-2007 01:41


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

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