How to reduce brightness of ceratin pixels from an Image?

조회 수: 10 (최근 30일)
Dongyu Liang
Dongyu Liang 2021년 2월 2일
댓글: Dongyu Liang 2021년 2월 4일
Hi,
I have a set of particle micro-CT images for 3D structure generation. However, the ash on the particle cause pixels to be super brightness and brings negative effect on threshold value selection for segmentation. The basic idea is to set a value of brightness to be a threshold value, any higher brightness value of each pixel will be reduced to a lower brightness value. But how to appropriate determine those brightness values is a problem. Is there any methods or functions in Matlab can solve this problem?
Thanks!

채택된 답변

Bjorn Gustavsson
Bjorn Gustavsson 2021년 2월 2일
Is this the operation that you're asking for?
too_bright = 123; % or your chosen level
replacement_level = 123; % Not a good idea to give it a lower value, you might want a nan to flag pixels as bad?
Im(Im(:)>too_bright) = replacement_level;
Where Im is your image.
HTH
  댓글 수: 7
Bjorn Gustavsson
Bjorn Gustavsson 2021년 2월 4일
Well, if the ash-part is just a small super-bright part of the particles you want to identify, then by all means simply replace these outliers with nan and then use the inpaint_nans function to fill in those wholes. That should give you a non-toxic (for your processing) filling-in of your particles. Then the segmentation/identification should(ought to?) work OK. Just take extra care to check that nothing "peculiar" happens with the inpaint-threshold-identification sequence - I always think about this in terms of making a decision about radioteraphy on a brain-tumor, if I were to have done some inpainting type operation I'd like to be pretty darn sure about the advice I'd give (in my field the stakes are not that serious, but I assume that yours is...).

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

추가 답변 (0개)

카테고리

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