How to reduce brightness of ceratin pixels from an Image?
2 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
采纳的回答
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
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 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!