calculating the new coordinate of a point in the camera field of view after rotating the camera around the z-axis
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
alright, its bit complicated but i hope i will make it as clear as possible.
i have a camera looking straight and based on the distance from the cam to the objects in front of it ,i can calculate the dimentions ( width and height) of the object that appears on the image from the cam acoording to the following equation:
(Sensor Dimention(mm))/(Focal enght (mm))= (Field Dimention (mm))/(Disance to Field (mm))
so, if the sensor has 36 by 24 mm physical dimensions ( width* height), focal length 40 mm and the distance to the object is 1500 mm, we can see that the width and height of captured image is 1350 mm and 900 mm . for example, looking at the attached image ( image 1) the dimention of the point A ( the right edge of the captured plane) will be ( CAMx-1500, CAMy+675, CAMz+450) ; Point E is at (CAMx-1500, CAMy, CAMz) where all units are in mm and the cam is at ( CAMx, CAMy, CAMz) .
my question is : if i wanted to rotate the camera around the z axis lets say 20 degrees ( as shown in image 2), how can i calculate the point A or any other points coordinations ? I have tried to apply rotation matrix around z-axis on the points but the results werent correct as I can check with the simulation in 3d max. x coordination always negative and i guess its related to the fact that the plane is ' behind the cam' where the cam is looking at negative x direction?
I am sure I am missing something here and would appreciate it if anyone can help .
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Support Package for USB Webcams finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!