rotation rate from image stream(please help)

asked 2016-02-29 18:16:17 -0500

pdm gravatar image

Hi,

I have little experience with OPENCV, but have always been intrigued by it. In the hopes of avoiding any pitfalls, I would like the input of experienced users before I start learning/hacking.

My Problem... Imagine a camera on a platform that can rotate in azimuth only. The initial conditions will have the camera pointed at a uniform background with a target object filling the majority of the field of view. The wall/background and object will not move. The camera will have random rotations applied by rotating the table. I am attempting to use image processing to determine the rate of rotation from frame to frame.

I assume if my background and object don't change contrast or shape rapidly (and range is constant), I don't need any sophisticated object tracking algorithm. I plan to perform a phase correlation between two sequential images to get the quantity of pixels shifted. If range and frame rate are constant, I should be able to calculate a rotational rate from this stream of pixel shifts. Eventually I would implement this algorithm with hardware acceleration(FPGA/Zynq) and use this derived rate as feedback to a control system, so the target wouldn't move too far from the center of the image in the final system.

My Questions... Is phase correlation a good approach? Is there maybe a better way to get the pixel shift as I rotate the camera? Before going to hardware, I would like to prototype as much as possible on a PC. To perform this sort of task on a 640x512 image would I be able to do this with the processor @ 60-100 Hz, or will I need to incorporate a GPU to get to those speeds?

Any other suggestions are appreciated. Thank you.

edit retag flag offensive close merge delete

Comments

"I plan to perform a phase correlation" -- please have a look here - what you want (global motion from phase correlation) might be already implementd

berak gravatar imageberak ( 2016-03-01 00:11:14 -0500 )edit

The only think you should be wary about is telling the difference between object motion and the rotational motion. But since you say you want to keep the target in the center, that may not matter much.

For that size image and a decent CPU, you should be fine. You can also modify the phaseCorrelate function to save the last frame's FFT so you don't have to calculate it again next time, which cuts your processing time in half.

Tetragramm gravatar imageTetragramm ( 2016-03-01 06:59:52 -0500 )edit