bwareaopen for RGB and binary

1 visualización (últimos 30 días)
Tulips
Tulips el 29 de Oct. de 2012
hi sir, can I know how to use bwareaopen for RGB image. after I convert the rgb image to binary, do I need to put uint8 and [] when displaying the binary images?
[Merged information from duplicate question]
hi sir, may I know how to assign the conversion of rgb to binary. for instance,, I've used this coding but the output is all black,why is that:
%%Binary
im=uint(im)
figure;imshow(im,[])
%%remove pxls less than 100
pixels=100;
detectObject=uint8(bwareaopen,pixels)
figure;imahow(detectObject,[])

Respuestas (2)

Image Analyst
Image Analyst el 29 de Oct. de 2012
Editada: Image Analyst el 30 de Oct. de 2012
That doesn't make sense. You don't use bwareaopen for RGB AND binary. You use it just for binary images.
You do not need to cast binary (logical) images to uint8 or use [] in imshow() for binary images.
Try
binaryImage = im < someThresholdValue;
detectObject = bwareaopen(binaryImage, pixels);
imshow(detectObject);
  5 comentarios
Tulips
Tulips el 1 de Nov. de 2012
I just want to why after the conversion from rgb to binary , the used of bwrareaopen function produced all black images?I want to remove certain noise from the binary image.how can I do that , instead of using bwareaopen.thanks!
Image Analyst
Image Analyst el 1 de Nov. de 2012
Are you asking us to give advice on your image without showing us your image? How successful do you think we can be in that situation?

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 29 de Oct. de 2012
bwareaopen() is a function call that you need to apply to your data. You are instead calling it with no parameters, so it would be returning the empty matrix.

Categorías

Más información sobre Platform and License 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