|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Vision Tracking Help
Try something similar to this.
You'll want to use the X coordinate from the camera as the process variable to a PID controller (since this will change with the rotation of the turret). Your setpoint should be the center of the image (where you want the target to appear). This can be found by dividing the X resolution of the image by two. Note that this also assumes that the camera is mounted exactly on the center of the shooter - you might have to tweak the setpoint to make it mesh with your system. You'll need to tune the PID constants in my snippet - since they're the default values. There are other threads around for help on PID gain tuning (just search for them). |
|
#2
|
|||
|
|||
|
Re: Vision Tracking Help
If you are using the Target location from the LV example, it is a -1 to 1 coordinate with 0 in the center, not 80. If you are using a more raw version, width/2 would be the right target for the PID.
Greg McKaskle |
|
#3
|
|||
|
|||
|
Re: Vision Tracking Help
how do you add another camera that is not an axis camera. mine is a trendnet tv-IP110/A
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|