|
On Nov 8, 1:44=A0pm, Vicky <bonsa...@gmx.de> wrote:
> Hallo there,
>
> When I save with the command "imwrite" a binary labeled image then the
> image is saved as a rgb image. That means that each pixel has an rgb
> value like (0, 0, 0) for the black background and (255, 255, 255) for
> the objects. But in the saved image there are not the labels for each
> object.
>
> This is my code:
>
> image1 =3D imread('test_001.bmp');
> thresh =3D graythresh(image1);
> image =3D im2bw(image1, thresh);
>
> E =3D bwlabel(image);
>
> imwrite(E, 'ttt.bmp', 'bmp');
>
> Is it possible to save a binary labeled image so that in each pixel is
> the label that I give to it and NOT the rgb values?
>
> Best regards,
> Vicky
--------------------------------------
BMP is 24 bit RGB. Try saving as TIFF format.
|