Effacer les filtres
Effacer les filtres

Assigning pixels a negative value

2 vues (au cours des 30 derniers jours)
med-sweng
med-sweng le 15 Fév 2014
Commenté : Image Analyst le 16 Fév 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.

Réponses (2)

Image Analyst
Image Analyst le 15 Fév 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 commentaire
Image Analyst
Image Analyst le 16 Fév 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.

Connectez-vous pour commenter.


Azzi Abdelmalek
Azzi Abdelmalek le 15 Fév 2014
Modifié(e) : Azzi Abdelmalek le 15 Fév 2014
The pixels are not rejected, they just have the same color

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by