how many pixels are moved when servo is moved one degree??

i am using a servo motor and a camera fixed on it.during real time, i take an image with an help of camera using getsnapshot command.the image i get is [200x200].now i move the servo motor one degree to right.now i want to find how many pixels have been shifted to right when servo motor is moved one degree.please help me.actually i want to find how many pixels are shifted when servo is moved one degree

Antworten (2)

Walter Roberson
Walter Roberson am 6 Apr. 2011

0 Stimmen

Surely everything movable on the motor will be moved??
"degree" is an angular measurement, not a measurement of distance (not unless the distance is being measured at a fixed radius.)
Unless you give more information, I don't think we are going to be able to answer your question. Perhaps you could make a pair of images available ?

3 Kommentare

sabeeh
sabeeh am 6 Apr. 2011
camera is fixed on servo motor.i will give a pulse which will move the servo one degree.now i want to find how many pixels are shifted.you suppose that camera is moved one degree.
sabeeh
sabeeh am 6 Apr. 2011
just give me an idea to calculate the pixels moved.suppose i want to know how many pixels the centre pixel of the image is moved when servo is moved...dont be very specific
Is the motor moving one *degree* or is it moving one *step* in a straight line such that the camera remains at the same angle to the scene?

Melden Sie sich an, um zu kommentieren.

sabeeh
sabeeh am 6 Apr. 2011

0 Stimmen

i was thinking to find the center pixel of image and then somehow label it.when servo will move,i will find number of pixels the center pixel which i had labelled earlier has moved..how is this approach...please help me out

5 Kommentare

You could find a large object and find its centroid, and calculate how far the centroid moved. Once you have thresholded to isolate the object from the background, and have used bwlabel to label the image, regionprops() can tell you the centroid.
sabeeh
sabeeh am 6 Apr. 2011
i dont want to go in image processing.please tell me something without it.any easier method.
sabeeh
sabeeh am 6 Apr. 2011
is there any method to do the same without doing segmentation e-t-c????
sabeeh
sabeeh am 6 Apr. 2011
i am sure there will be a way to do it
There is no way to do what you want without image processing of _some_ kind. *Any* examination of the content of an image is "image processing". Image processing does not necessarily require segmentation; segmentation is not likely to help in your situation. You need to identify foreground from background, which you will probably do using differences in pixel intensities.

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 6 Apr. 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by