필터 지우기
필터 지우기

how can i calculate variance of the intensity in an gray scale image

조회 수: 10 (최근 30일)
kalaivaani
kalaivaani 2013년 8월 7일
댓글: chitresh 2013년 11월 30일
in order to find the sigmoid function value of the image , i need the value of *mean and variance of the intensity of the image *

답변 (2개)

chitresh
chitresh 2013년 11월 30일
a = imread('input.tif'); % convet uint8 to double a_double = double(a); % get number of rows and columns value [r,c] = size(a); % mean of gray scale image total_mean = sum(a_double(:))/(r*c); % variance of gray scale image total_difference = (a_double - total_mean).^2; total_sum = sum(total_difference(:)); limit = (r*c)-1; total_variance = total_sum/limit;
please accept answer if its ok with you

Image Analyst
Image Analyst 2013년 11월 30일
meanGrayLevel = mean2(grayImage); % or mean(grayImage(:));
variance = var(grayImage(:));
  댓글 수: 1
chitresh
chitresh 2013년 11월 30일
if you trying above code then try this else u find some error
grayimage_double = double(grayimage);
variance = var(grayimage_double);

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by