visionDistortPoints seems to be a built-in function from the computer vision toolbox.
>> which visionDistortPoints
built-in (/MATLAB/R2016b/toolbox/vision/vision/visionDistortPoints)
However, there is no visionDistortPoints file corresponding to the output of which. Note also that visionDistortPoints can be called from the Matlab prompt.
Where is the function visionDistortPoints or how can I find out where it is?
Thanks in advance!

댓글 수: 2

AP
AP 2021년 6월 17일
Were you able to figure this out?
I am looking to get back the distorted points from the undistorted points.
Walter Roberson
Walter Roberson 2021년 6월 18일
visionDistortPoints is a built-in function. Source for it is not available except to Mathworks employees.
However, as I indicated, source is available for a version used for generating code
If you need to know exactly which shared library contains the implementation, then I am unlikely to put together the resources to be able to do the analysis, except perhaps for MacOS (in which case I would just verify that the library name I used below still works.)

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

 채택된 답변

Walter Roberson
Walter Roberson 2017년 2월 5일

0 개 추천

R2016b, when deploying to code, on OS-X it uses
/Applications/MATLAB_R2016b.app/toolbox/vision/vision/+vision/+internal/+calibration/distortPoints.m
When not deploying to code, on OS-X it uses
/Applications/MATLAB_R2016b.app/bin/maci64/libmwvision.dylib
In some later version of the code it is plausible that cv::fisheye::distortPoints might get used in some circumstances, not entirely different from the way that /Applications/MATLAB_R2016b.app/toolbox/vision/builtins/src/ocvcg/opencv/include/opencv2/calib3d/calib3d.hpp is used to refer to cv::fisheye::undistortPoints

댓글 수: 6

Fernando Iglesias
Fernando Iglesias 2017년 2월 6일
How did you find out it uses libmwvision.dylib? On linux, I could not find any symbol matching the string distort in that library (libmwvision.so).
$ nm -g -defined-only /Applications/MATLAB_R2016b.app/bin/maci64/libmwvision.dylib |grep -i distort | c++filt
0000000000026480 T visionDistortPoints(int, mxArray_tag**, int, mxArray_tag const**)
To prove that it is libmwvision.so that is being used, go to the MATLAB command line on a session you do not need, and give the command
visionDistortPoints
with no input. This will crash MATLAB inside libmwvision.so at some nondescript location.
Presumably MATLAB has its own dispatch table.
Fernando Iglesias
Fernando Iglesias 2017년 2월 8일
I am curious why on linux nm is not showing the symbol visionDistortPoints as you have shown above in mac. But that is probably out of the scope of this question.
Thank you!
Walter Roberson
Walter Roberson 2017년 2월 8일
I am not sufficiently familiar with the Linux object format to make a reasonable guess on that :(
I found a couple more potential matches in R2021a; I am not sure which of those files is called under what circumstances.
Binary file ./bin/maci64/builtins/vision_builtins/mwvision_builtinimpl.dylib matches
Binary file ./bin/maci64/libopencv_calib3d.4.2.0.dylib matches
Binary file ./bin/maci64/libmwvision.dylib matches

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by