Implementing equation doe 3x3 matrix

조회 수: 5 (최근 30일)
FIR
FIR 2012년 12월 19일
I have a image below ,please tell how to implement the equation for a 3x3 matrix
please assist

채택된 답변

Matt J
Matt J 2012년 12월 19일
편집: Matt J 2012년 12월 19일
qVMF=median(q(:));
  댓글 수: 2
Walter Roberson
Walter Roberson 2012년 12월 19일
편집: Walter Roberson 2012년 12월 19일
Will the median necessarily be the one that minimizes the sums ? Wouldn't the pixel that is closest to the mean be the one that minimizes the sums ?
Matt J
Matt J 2012년 12월 19일
편집: Matt J 2012년 12월 19일
Yes, the median is the known solution to this problem, which you can also verify by comparing it with the output of the code in your Answer.
The mean minimizes the sum of squared differences.
It would get slightly complicated if there were an even number of pixels, because then the median wouldn't be attained at any of the q(i). Here, however, there are an odd number of pixels.

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2012년 12월 19일
[minsum, minidx] = min( sum(abs(bsxfun(@minus, q(:), q(:).'))) );
qVFM = q(minidx);

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by