02-04-2012 08:54 PM
Me and my FIRST robotics team are trying to use the Northern Instruments Vision Assistant program to make a labview VI capable of detecting a rectangle, then comparing the center of that rectangle to the middle of the image on the x axis then deciding which direction to turn a window motor (to which the camera is attached) in order to make the center of the rectangle line up with the center of the image on the x axis. How do I do that?
02-04-2012 09:44 PM
There is a FIRST tutorial that talks about methods to process your image to locate the boxes. It involves converting the image to binary, then isolating the boxes using different techniques. I strongly recommend studying it.
Our team is also experimenting with pattern matching. By creating a pattern of the top half of the side, including the top corner, it should be possible to locate most corners.
After you locate the boxes and figuring out where you want to aim, compare it to center of the image. I assume your camera is centered and aligned with the trajectory axis of the ball. The difference is your error, which you want to go to zero. You can use PID control to determine the output to the motor.
Bruce
02-28-2012 04:15 PM
were did u find the tutorial
02-28-2012 05:23 PM
Here is a link: https://decibel.ni.com/content/docs/DOC-20173
We decided binary processing works best. When we added the LED ring light to the camera, the targets were always the brightest items in the field of view.
Bruce