필터 지우기
필터 지우기

Matlab axis position camera

조회 수: 2 (최근 30일)
Umberto Fontana
Umberto Fontana 2017년 7월 20일
답변: Will Nitsch 2017년 7월 27일
Hi, I have a problem in axis position in perspective vision of the camera. I don't understand where it place the axis origin. Could someone help me? Thank you
  댓글 수: 2
Jan
Jan 2017년 7월 20일
What is your question? Please post some code which demonstrates your problem? Otherwise it would be required to rephrase the complete documentation of camorbit, zoom, axes, axis, camdolly, campan, camroll, camzoom, etc. Better spend the time to explain your specific problem.
Umberto Fontana
Umberto Fontana 2017년 7월 20일
편집: Umberto Fontana 2017년 7월 20일
thank you for your answer. I will try to explain better. 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 ceneter it by acting on axis position, but i don't understand where matlab places axis origin.

댓글을 달려면 로그인하십시오.

답변 (1개)

Will Nitsch
Will Nitsch 2017년 7월 27일
You can find some useful diagrams/information on camera properties here: https://www.mathworks.com/help/matlab/visualize/low-level-camera-properties.html
The origin in MATLAB is at 0,0,0. So if you want to calculate new camera positions for something like rotating around the center of your data, your math that does so should include an offset for x, y and z that account for the position of the center of the data. This point is also the camera target.

카테고리

Help CenterFile Exchange에서 Camera Views에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by