Go to Post Public Service Announcement: Pressing the spacebar when the robot is enabled isn't nearly as funny the forty-second time. - Taylor [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-2012, 17:30
BlueNova's Avatar
BlueNova BlueNova is offline
Registered User
FRC #2704 (Order 2 Chaos)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2005
Location: Batavia, Illinois
Posts: 13
BlueNova is an unknown quantity at this point
Re: Question from a Coach

My approach to the triangulation is like you said. I declare the camera to be at (0,0), and I input the object's width, and the angles that the camera is viewing the right and left edges of the object at.
I can then calculate the coordinates of the object, and from that find the distance and angle required to hit it.

However, I don't know how to find the angle that the camera is viewing the object at.
I would imagine that the simplest way would be to take the position the object is on the screen (in relation to the center), multiplying it by some constant, and then putting that number through an ArcSin function.
I think this would get the angle that the object's angle in relation to the center of the field of view.
Basically:
ArcSin((Position on Screen - Center of Screen) / Screen Width) = Angle Object is viewed at.

If the camera was a typical FRC Camera found in the kit of parts, would this be correct?
__________________
"We're all nerds here, no need to be socially awkward"
"Oh, you want to know what I would do? I'd make a helicopter."

Once a FIRST Student, ALWAYS a FIRST Student

Reply With Quote
  #2   Spotlight this post!  
Unread 09-01-2012, 17:45
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: Question from a Coach

I'm not following the approach you've laid out. Are you trying to determine the distance to the target, the height of the target, or the location of the robot on the field?

To review, sin(theta) is equal to (side opposite theta)/hypotenuse. This is of course only true for right triangles.

Can you draw a sketch showing the triangle and labeling what the points of the triangle correspond to?

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 10-01-2012, 18:10
BlueNova's Avatar
BlueNova BlueNova is offline
Registered User
FRC #2704 (Order 2 Chaos)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2005
Location: Batavia, Illinois
Posts: 13
BlueNova is an unknown quantity at this point
Re: Question from a Coach

I'm still new to the interface on chief delphi, so let me know if this didn't work.
I put some pictures up on my profile that describe what I am thinking.
Basically, I need to find Theta 1 and Theta 2 on the triangulation diagram somehow.
I would like to use some sort of vision.
However, I'm not sure what math is required to convert an image from a camera into the angle that the camera is viewing something at.
If you could explain that to me, or direct me to a site that does, it would be greatly appreciated.
__________________
"We're all nerds here, no need to be socially awkward"
"Oh, you want to know what I would do? I'd make a helicopter."

Once a FIRST Student, ALWAYS a FIRST Student

Reply With Quote
  #4   Spotlight this post!  
Unread 10-01-2012, 18:30
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: Question from a Coach

You may find it useful to look through the white paper on the NI site. It is also posted in the media papers section. There is also some discussion of this on the Java forum.

Greg Mckaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 13-01-2012, 23:55
BlueNova's Avatar
BlueNova BlueNova is offline
Registered User
FRC #2704 (Order 2 Chaos)
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2005
Location: Batavia, Illinois
Posts: 13
BlueNova is an unknown quantity at this point
Re: Question from a Coach

ok, thanks for the reccomendations.
I think LabVIEW actually has pre-made functions for this, so my team is most likely going to use those.
__________________
"We're all nerds here, no need to be socially awkward"
"Oh, you want to know what I would do? I'd make a helicopter."

Once a FIRST Student, ALWAYS a FIRST Student

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 20:42.

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