how to display variance of an image in command box?

조회 수: 1(최근 30일)
median_image=medfilt2(im_n) axes(handles.axes3); imshow(median_image);
%variance% IM= im2double(median_image); V_image = var(IM(:));

채택된 답변

Image Analyst
Image Analyst 2018년 3월 25일
Get rid of the semicolon and the value will report to the command window:
V_image = var(IM(:))
Beware though that im2double will scale the image to the range 0-1, so your variance will be the variance of that scaled image, not of the original image. If you want the variance of the original image, use double() instead of im2double().
  댓글 수: 1
Komal Gaikwad
Komal Gaikwad 2018년 3월 25일
ok sir thank u so much,also i have to compare two images one from median filter and other from wiener to compare them using variance or by using some other parameters

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

추가 답변(0개)


Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by