필터 지우기
필터 지우기

Assigning pixels a negative value

조회 수: 2 (최근 30일)
med-sweng
med-sweng 2014년 2월 15일
댓글: Image Analyst 2014년 2월 16일
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.

답변 (2개)

Image Analyst
Image Analyst 2014년 2월 15일
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
Image Analyst
Image Analyst 2014년 2월 16일
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.

댓글을 달려면 로그인하십시오.


Azzi Abdelmalek
Azzi Abdelmalek 2014년 2월 15일
편집: Azzi Abdelmalek 2014년 2월 15일
The pixels are not rejected, they just have the same color

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by