
09-01-2012, 19:36
|
|
Labview Maniac
AKA: Cody Ripley
 FRC #3144 (Krypto-Knights)
Team Role: Programmer
|
|
Join Date: Jan 2010
Rookie Year: 2009
Location: Oklahoma City, OK
Posts: 22
|
|
|
Re: Advanced Vision Concept [help!]
Quote:
Originally Posted by Greg McKaskle
Ahh. I get your goal now. You aren't worried about where the robot is, you want the camera to be centered on a goal/target.
This is covered in the white paper under the position section. The typical coordinate system used in images processing with NI-IMAQ is 0,0 at the top left and the resolution X,Y at the lower right of the image. Fine for image processing, but not all that great for targeting or aiming. To translate to a new coordinate system, you first need to define what the new system is, and you are doing that.
To simplify a bit, the paper defined the new coordinate system as 0,0 in the center with the edges being either 1 or -1. This matches the joystick and servo range nicely and also tends to be something easy to remember for feeding into PID algorithms. To do the coordinate system transform I describe, you subtract the target location and the center of the image, which is half of the resolution. This gives you a system that ranges from resolution/2 to negative resolution/2. Next step is to divide by resolution/2 and potentially invert an axis if you wish. If you'd like to use a different system, you can then scale back to radians, degrees, or anything else you'd like.
If that didn't make sense, please try reading through the white paper from the NI site CD/media/papers and see if that helps.
Greg McKaskle
|
What I am going for is from my current research nearly impossible at this point. I was aiming to have an aiming mechanism always locked onto one goal so when a ball is fed through, it would always be on target.
|