Implementing equation doe 3x3 matrix
조회 수: 5 (최근 30일)
이전 댓글 표시
I have a image below ,please tell how to implement the equation for a 3x3 matrix
please assist
댓글 수: 0
채택된 답변
Matt J
2012년 12월 19일
편집: Matt J
2012년 12월 19일
qVMF=median(q(:));
댓글 수: 2
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
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
2012년 12월 19일
[minsum, minidx] = min( sum(abs(bsxfun(@minus, q(:), q(:).'))) );
qVFM = q(minidx);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!