How do I use the 'worldToImage' function?
4 ビュー (過去 30 日間)
古いコメントを表示
I am trying to use the function "worldToImage" to superimpose a 3D point cloud representation of an object onto a 2D image. At the outset, I am not 100% sure this is the right function to do this. If there is a better way, then please let me know.
When I run the "worldToImage" function I get an error that says "Undefined function 'worldToImage' for input arguments of type 'double'." I'm not sure I understand what this error means or how to resolve it.
Below is a portion of my test code:
worldPoints = [x, y, z];
R = [1, 1, 1; 1, 1, 1; 1, 1, 1];
t = [0, 0, 0];
projectedPoints = worldToImage(camMatrix,R,t,worldPoints);
In my test code I am simply trying to see how the 3D points are projected onto the 2D image. My worldPoints are my point cloud points which is an Mx3 matrix in 'double'. I'm assuming that this is the problem, but I am not sure how else to input these points to make this function work. Does anyone have any insight?
I've already confirmed that this is not a license or path issue for this function.
0 件のコメント
回答 (1 件)
Amal George M
2018 年 8 月 29 日
To my understanding, the intention is to use 'worldToImage' function to project world coordinates onto a 2D Image. Can you check the datatype of the 'camMatrix' variable?
From the documentation, the first argument to ' worldToImage() ' is a 'cameraParameters' object, not a simple matrix.
Also, 'rotationMatrix' corresponding to no rotation is the Identity matrix.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Point Cloud Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!