I am getting following error in code: Undefined function 'ctwoD' for input arguments of type 'double'.

조회 수: 4 (최근 30일)
clc
%coordinates of perspective camera projections
xc = ctwoD(5,10);
yc = ctwoD(10,5);
%coordinates of weak camera perspective
xw = ctwoD(5,10);
yw = ctwoD(10,5);
%plot the transformed points from 2D to 3D
plot (xc,yc, '-5',xw, yw,'-*b',markersize,10);
hleg1 = legend ('x,y 5,10');
xlabel ('5');
ylabel('10');
title ('x,y 5,10');
I am getting following error:
Undefined function 'ctwoD' for input arguments of type 'double'.
Error in CameraModel (line 3)
xc = ctwoD(5,10);
Please help with how to write correct code.
  댓글 수: 2
Ivy
Ivy 2021년 8월 1일
That;s where my struggle lays.... I am very new at MatLab. These codes were provided to me as a guidline..... I am trying to compute a code for a simple object with four 3D co-ordinates (-1, 0, 2), (1, 0, 5), (0, 1, 4), (0, -1, 3). to project these points onto an image using two methods, perspective, and weak perspective projection.

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

채택된 답변

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 8월 1일
The fcn ctwoD() in your code is not a MATLAB fcn unless you've created it. If you've created it, make sure it is residing in your MATLAB accessible directory.
You can verify it with:
>> which ctwoD

추가 답변 (0개)

카테고리

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