フィルターのクリア

how to know if the image is homogeneous

1 回表示 (過去 30 日間)
bay rem
bay rem 2016 年 2 月 4 日
編集済み: Image Analyst 2016 年 2 月 4 日
i have a set of images and i'd like to extract from them the homogeneous images, like this following one (what i mean of homogeneity means have same degree of color):

採用された回答

Image Analyst
Image Analyst 2016 年 2 月 4 日
編集済み: Image Analyst 2016 年 2 月 4 日
Extract the separate color channels:
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
then call unique() and if the length is 1, it's homogenous in that color channel
if length(unique(redChannel)) == 1
% Only one color so it's homogenous
end
Or you could check the variance
if var(redChannel(:)) == 0
Or you could call std() or imhist(). There are a multitude of ways.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing and Computer Vision についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by