Why can't I use imcrop from deployed executable

3 views (last 30 days)
Hey there all, I've run in to some trouble and cannot seem to find a solution. I'm deploying a simple executable that brings up a figure, displays an image, and calls imcrop to crop the image and returns the properties of the rectangle. The problem is when the program has been deployed the command prompt returns an error stating that imcrop is an undefined function for an input type of double. But I know I can place doubles, singles and int8s into it as I do it in the Matlab environment all the time. I've tried this in both 2015a and 2014a on Matlabs 32 bit versions. There is no message in the excluded files log telling me that imcrop has been ignored and from what I've read Matlab Compiler 6.0 can deploy imcrop and other modular interactive tools. What am I doing wrong?

Accepted Answer

Image Analyst
Image Analyst on 6 Jul 2015
Check the mccexcluded file and see if it's listed in there. I doubt it would be. Put this line before calling imcrop
which imcrop
What does it spew out to the console window? Also, read this http://www.mathworks.com/matlabcentral/answers/728-how-do-i-write-a-good-question-for-matlab-answers. In there it will tell you, among other things, that we always like to have the actual, full error message, not some paraphrased snippet like you provided.
Alternatively, you can call rbbox().
  4 Comments
Ricardo Sifuentes
Ricardo Sifuentes on 7 Jul 2015
My apologies, I copied the link from a set of links I've been looking at. Fixed.
Image Analyst
Image Analyst on 7 Jul 2015
What was their answer when you said it did not work in your 2015a version? The bug report said it should have been fixed by then.

Sign in to comment.

More Answers (0)

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!