Grayscale Image Intensity Threshold

1 回表示 (過去 30 日間)
Thomas
Thomas 2013 年 11 月 24 日
回答済み: Image Analyst 2013 年 11 月 24 日
I have a greyscale image where each pixel is given an intensity value with 0 being black and 1000 being white. (not actual values just given as an example. I want to set a threshold for intensioty values so that pixels above this threshold are turned red.
How do i do this?
I thought if i did a hist(intensity values, 1000) then i could simply set the threshold by the bins i wanted included. For example i could say only values that are in the last 200 bins are the ones i want turned to red. Is it possible to specify Matlab to manipulate individual bins?

回答 (1 件)

Image Analyst
Image Analyst 2013 年 11 月 24 日
You don't need to take the histogram. Simply threshold and set up the red, green, and blue color channels in a color image. See attached demo below in blue.

Community Treasure Hunt

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

Start Hunting!

Translated by