Borrar filtros
Borrar filtros

Assigning pixels a negative value

2 visualizaciones (últimos 30 días)
med-sweng
med-sweng el 15 de Feb. de 2014
Comentada: Image Analyst el 16 de Feb. de 2014
Using some criterion, there are some pixels in the image which I'm not interested in. So, I would like to neglect them. I just want to ask if the approach I have followed is acceptable. I have assigned such pixels a negative value. Would that be acceptable? And, what does it mean when a pixel has a negative value? Will it have some representation on the image?
Thanks.

Respuestas (2)

Image Analyst
Image Analyst el 15 de Feb. de 2014
That's not how it's done by the vast majority of people. Almost always you create a separate binary (logical) mask that defines what part of the image is to be processed or not processed. See my Image Segmentation Tutorial BlobsDemo for an example.
  1 comentario
Image Analyst
Image Analyst el 16 de Feb. de 2014
Regarding your edit - not sure what's changed or stayed the same. What you say can work but the question is how do you ignore the negative pixels? If you threshold them, like
if grayImage < 0
then you're essentially thresholding them. You can do it on a pixel-by-pixel basis with nested for loops but it's more efficient to just do it in one line to create a binary image, which is why virtually everyone does it that way.
I don't know what you mean by "some representation on the image". Of course the pixels are there , and you can see them if you use [] in imshow(grayImage, []), so I don't really understand what this question is asking.

Iniciar sesión para comentar.


Azzi Abdelmalek
Azzi Abdelmalek el 15 de Feb. de 2014
Editada: Azzi Abdelmalek el 15 de Feb. de 2014
The pixels are not rejected, they just have the same color

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by