Axis Position in perspective vision

1 visualización (últimos 30 días)
Umberto Fontana
Umberto Fontana el 21 de Jul. de 2017
Editada: Rena Berman el 30 de Jul. de 2019
I want to simulate a camera which points to the center of a grid of known measures, so i specify the camera features. This is the code:
% code
pos_cam_z = 4450;
fig = figure;
imshow(imIn);
[altezza,larghezza] = size(im);
axis on;
ax=gca;
ax.Units = 'pixel';
ax.Projection = 'perspective';
ax.CameraViewAngle = Vfov;
ax.CameraUpVector = [0 -1 0]';
ax.DataAspectRatio = [1 1 1];
ax.CameraTarget = [larghezza/2 altezza/2 0];
ax.CameraPosition = [(larghezza/2) altezza/2 pos_cam_z];
My problem is that the representation of the scene is not centered. I want to center it by acting on axis position, but i don't understand where matlab places axis origin.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by