Non-existent file pointed by which

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 Commenti

AP
AP il 17 Giu 2021
Were you able to figure this out?
I am looking to get back the distorted points from the undistorted points.
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.)

Accedi per commentare.

 Risposta accettata

Walter Roberson
Walter Roberson il 5 Feb 2017

0 voti

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 Commenti

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.
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!
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

Accedi per commentare.

Più risposte (0)

Categorie

Community Treasure Hunt

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

Start Hunting!

Translated by