フィルターのクリア

How to compute threshold by dividing the histogram of the image into 2 classes?

4 ビュー (過去 30 日間)
Elysi Cochin
Elysi Cochin 2014 年 6 月 10 日
回答済み: HARI OM 2017 年 5 月 1 日
How to compute threshold by dividing the histogram of the image into two classes and calculates the optimum threshold T that separates these two classes so that their combined spread (intraclass variance) to be minimal.
Please can someone help me...
i found histogram of image
histgray = imhist(denoisedImage);
then how to get the value that separates two classes... please do reply...

採用された回答

Gemma Rotger
Gemma Rotger 2014 年 6 月 10 日
I think what you need is Otsu image global threshold,
I = imread('myimage.png');
level = graythresh(I);
This function performs the gray-level histogram and select the optimal threshold by the discriminant criterion so as to maximize the separability of the resultant classes in gray levels.
You can read the complete paper here
Type edit graythresh on your Matlab console to watch the code.

その他の回答 (1 件)

HARI OM
HARI OM 2017 年 5 月 1 日
hello , i also suffer this problem from last month . Please suggest me that how to divide the histogram of an image in sub-histogram on the basis of median of an image. thank you.

Community Treasure Hunt

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

Start Hunting!

Translated by