Why am I getting the error "Cannot find builtin function '_grayto16'"?
9 views (last 30 days)
Show older comments
I am trying to run the code:
% Convert the stack of RAW images to int16 for export
images2 = im2uint16(images(:,:,:)/(2^16-1));
Images is a stack of RAW images and each individual image matrix has already been converted to type double.
However, when I run it I get this error message:
Error using builtin
Cannot find builtin function '_grayto16'
Error in im2uint16 (line 65)
u = builtin("_grayto16", img);
Error in RawExtractRGB (line 43)
images2 = im2uint16(images(:,:,:)/(2^16-1));
What do I need to do to get the builtin function '_grayto16' working?
0 Comments
Accepted Answer
dpb
on 14 Aug 2020
Moved: DGM
on 15 May 2023
Try clear and then try again -- if you've inadvertentedly created a variable of same name this will get rid of it...
If that doesn't work, try rehash tollboxcache if something has munged the path/cached files in toolbox.
Failing that, if a restart of MATLAB doesn't resolve the problem may need to reinstall the Image Processing Toolbox.
2 Comments
dpb
on 14 Aug 2020
Moved: DGM
on 15 May 2023
Glad to hear...be careful to not make names of things in the Toolbox and to also be sure to not be writing into MATLABPATH directories...
It's possible to inadvertentedly open supplied m-files in the editor by clicking on an error message or the debugger may stop internally and open a file -- if then do something unwittingly in one of those files, that can cause problems. That's one bad thing that comes along with the nice things about having m-files that can see.
More Answers (0)
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!