フィルターのクリア

how to calculate mean and variance of the image using W*W sliding window

9 ビュー (過去 30 日間)
kalaivaani
kalaivaani 2013 年 8 月 21 日
contrast enhancement is to improve the contrast of lesions for detection using a w*w sliding window with assumption that w is large enough to contain a statistically representative distribution of the local variation of lesions. where the sigmoid function used with the maximum and minimum intensity values of smooth green channel image,respectively. mean and variance of intensity values with in the window.
CAN U HELP ME WITH CODING

採用された回答

Image Analyst
Image Analyst 2013 年 8 月 21 日
Try this:
meanImage = conv2(grayImage, ones(w)/w^2);
stdDevImage = stdfilt(grayImage, ones(w)/w^2);
varianceIMage = stdDevImage .^2;
  10 件のコメント
kalaivaani
kalaivaani 2013 年 8 月 26 日
the error showing is * ??? Error using ==> mldivide * Matrix dimensions must agree. * what should i do how can i code the formula sigmoid function formula is 1 / {[1+exp((M-I)/V)]} were M is the meanimage, V is the varianceimage , I is the color image * and my code is sigmoid = 1/(1+exp((double(meanImage)-double(green))./double(sdImage))); * is it correct?
Image Analyst
Image Analyst 2013 年 8 月 27 日
Use the 'same' option in conv2 to get the same size image.
meanImage = conv2(grayImage, ones(w)/w^2, 'same');

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by