How to change pixel values of background to zero

조회 수: 3 (최근 30일)
Kavitha Srinivasan
Kavitha Srinivasan 2013년 6월 18일
I have an gray image as uint16. the background of the image (air region)has got some pixel values. I want to make them all zero. Any idea how do do it? Your help is much appreciated. Thanks

채택된 답변

Matt J
Matt J 2013년 6월 18일
How about
image(image<airthreshold)=0;
  댓글 수: 2
Kavitha Srinivasan
Kavitha Srinivasan 2013년 6월 18일
thanks for your reply. But how to get the airthreshold value?
Matt J
Matt J 2013년 6월 18일
편집: Matt J 2013년 6월 18일
That depends on noise and what's going on in the rest of the image. In one of your tags, you seem to say that this is a CT image. In my experience, anything below 500 HU can usually be classified as air, but extreme noise-levels could change that.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by