Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Walter Roberson
Walter Roberson il 18 Ott 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

Più risposte (0)

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by