How to measure the mean contrast of edge pixels?

1 回表示 (過去 30 日間)
Krishna Chaitanya
Krishna Chaitanya 2020 年 1 月 24 日
編集済み: KALYAN ACHARJYA 2020 年 1 月 28 日
I need to find the mean contrast of edge pixels and standard deviation of edge pixels.
I came across this definition but I didn't understand that
where A is the 8 neighboring pixels of current pixel with high intensity and B is the remaining 8 neighboring pixels of the A, numA is the number of pixels in A.
Can somebody help me in implementing this?
Thank you.
  2 件のコメント
KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 1 月 25 日
Is it edge boundary or edges within the image?
Krishna Chaitanya
Krishna Chaitanya 2020 年 1 月 26 日
There are some white regions within a binary image and I have to find the mean contrast for every such white region in the image.
I don't know whether it is edge boundary or edges within the image.

サインインしてコメントする。

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 1 月 25 日
image is a gray scale image.
th=128; %considering unit8 image having range 0-255, you can decide or calculate
data=image>=th;
data1=uint8(data).*image;
imag_high=sum(data1(:))/sum(data(:));
data2=uint8(~data).*image;
image_low=sum(data2(:))/sum(~data(:));
c=imag_high-image_low;
  1 件のコメント
Krishna Chaitanya
Krishna Chaitanya 2020 年 1 月 26 日
編集済み: KALYAN ACHARJYA 2020 年 1 月 28 日
can you please explain me what 'th' is and what exactly is the code doing?
th> Threshold value gray to binary

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by