Why imshow not working in stand alone application.Is there any alternative for that?

4 visualizaciones (últimos 30 días)
I developed a application using matlab compiler .Everything works fine except the command imshow.What is the probability of getting this isseus.How i can solve this.

Respuesta aceptada

Walter Roberson
Walter Roberson el 18 de Oct. de 2016
imshow is not in the list of MATLAB commands that cannot be compiled; see http://www.mathworks.com/help/compiler/unsupported-functions.html
However, if you are using a sufficiently old version of MATLAB, then imshow was in the Image Processing Toolbox rather than MATLAB itself, so with those older versions to use imshow() you would have needed to compile in the Image Processing Toolbox.
Which MATLAB version are you using? And what behaviour do you see when you attempt to use imshow() in a compiled executable?
Generally, either image() or imagesc() should work as replacements. If you are using imshow() with a logical image, then you should be able to use
image(BWImage); axis image off
If you are using imshow() with a two-level image, 0 and 1, then use
imagesc(TwoLevelImage); axis image off; colormap(gray(2))
If you are using imshow() with a grayscale uint8 image, then use
image(GrayImageUint8); axis image off; colormap(gray(256));
If you are using imshow() with an RGB uint8 image, then use
image(RGBImage8); axis image off

Más respuestas (0)

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by