imcrop function problem for 16bit image 2019b
Mostrar comentarios más antiguos
Dear all,
The following imcrop code gives an error in 2019b
I = imread('XX.tif');
[Icrop, rect] = imcrop(I, [ ]);
It seems that 2019b does't support [ ] with imcrop. If you are working with 16 bit images then you will be in trouble because you need to see the image before croping it, and for that you need to put the [ ].
Any idea how to overcome this problem?
Thank you in advance.
Meshoo
6 comentarios
Walter Roberson
el 20 de Sept. de 2019
Which of the syntaxes is that intended to be? Is it an empty colormap, or is it an empty rect specification ?
Meshooo
el 20 de Sept. de 2019
Sahar Tavakoli
el 4 de Oct. de 2019
I have the same problem, could you figure out how to fix it?
Walter Roberson
el 4 de Oct. de 2019
What is it that you intend the [] to mean to imcrop? The function has two possible arguments at that point: colormap or rect specification. Which one do you intend by the []?
Walter Roberson
el 12 de Oct. de 2019
Please name a particular release that documents using [] as a parameter to imcrop() . I looked through the archived documentation for several releases and could not find any evidence that it was ever a supported option.
Similarly, we need to use [ ] when croping uint16 image in order to dispaly the image before cropping it.
So display the image with imshow() with the documented [] option, and call imcrop() on the handle returned by imshow:
h = imshow(I, []);
[Icrop, rect] = imcrop(h);
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Basic Display en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!