Axis Position in perspective vision

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.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기

질문:

2017년 7월 21일

편집:

2019년 7월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by