Change Pixel intensity value

조회 수: 11 (최근 30일)
Pugazhendhi
Pugazhendhi 2012년 2월 21일
댓글: Image Analyst 2018년 2월 17일
Hi all,
I have an image(gray scale) whose pixel intensity values ranges from -0.5373 to 0.4744. I would like to change the intensity value which is lesser than 0 to 0. Can any one help me to solve this.
Thanks.

채택된 답변

Honglei Chen
Honglei Chen 2012년 2월 21일
Say your image is x,
x(x<0) = 0;
  댓글 수: 5
Honglei Chen
Honglei Chen 2012년 2월 21일
I'm just making an example, make sure there are negative numbers in x.
Image Analyst
Image Analyst 2012년 2월 22일
No, you don't need all that reshaping stuff. "x(x<0)=0" is sufficient to work on the whole 3D matrix (e.g., a color image) - no reshaping is needed.

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

추가 답변 (2개)

Walter Roberson
Walter Roberson 2012년 2월 21일
X = max(0, X); %another way of changing anything less than 0 to 0
  댓글 수: 1
Pugazhendhi
Pugazhendhi 2012년 2월 22일
Thanks for the help

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


vishnu lohith
vishnu lohith 2018년 2월 16일
use a suitable transformation to change the intensities from ( 0,255) to (65,180).
  댓글 수: 1
Image Analyst
Image Analyst 2018년 2월 17일
Are you sure you posted to the correct six year old question? Not sure what your answer has to do with the original question about clamping the signal to zero.

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

카테고리

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