Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66786

Camera tracking problem - Keeping the target centered

$
0
0

Hi, i'm working on a project as part of my studies that involves building and programming a sentry gun. I have a prototype built and tested with R/C and i have no problem tracking stuff when the camera is static (mounted on the chassis or next to the rig). 

What i want to do is be able to attach the camera to the 'barrel', so it moves with it. This way i avoid having to map and re-map servos in accordance to distance, angles, etc. As long as the target stays in the center of the aquired image, i can assume that the aim is correct.

What i'm doing now is dividing the image into 3 'zones', left, centre and right, and panning a camera strapped to a servo in relation to where the target is located. Here's the issue i'm having - When the target reaches the center of the image, the camera keeps rotating until the target is at the opposite end, switches direction, and repeats the process. I'd appreciate it if someone could tell me what i'm doing wrong or missing, and if there's an alternative way of doing it. 

I'm using the Arduino module and an arduino nano for servo control.  

* When the camera is supposed to stop, as an imput for the servo i provide a reading of its current position, so it just stops.
 


Viewing all articles
Browse latest Browse all 66786

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>