finding minimum value in Quanterion matrix

조회 수: 2 (최근 30일)
FIR
FIR 2012년 12월 21일
I have a 386x514 quaternion array,in this please tell how to find the minimum value of that matrix
  댓글 수: 3
FIR
FIR 2012년 12월 21일
My form is 384x512 pure quaternion array with uint8 components
if i use min i get error
Undefined function or method 'min' for input arguments of type 'quaternion'.
Matt J
Matt J 2012년 12월 21일
FIR Commented:
i downloaded [the quaternion] tool box from here
FIR Commented:
Sorry Matt my code [which doesn't work] is
A=imreadq('peppers.png');
T=65;
for i=2:6
for j=2:6
q= A(i-1:i+1,j-1:j+1);
[minsum, minidx] = min( sum(abs(bsxfun(@minus, q(:), q(:).'))) );
qVFM = q(minidx);
V1=an equation
V2=an equation
S=min([V1 V1]);
if S>T
THE CENTRE PIXEL IS REPLACED BY qVFM %%%%3x3 matrix
else
THE CENTRE PIXEL IS not REPLACED BY qVFM%%%%3x3 matrix
end
end
end

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

채택된 답변

Matt J
Matt J 2012년 12월 21일
편집: Matt J 2012년 12월 21일
BSXFUN isn't overloaded well in the quaternion toolbox that you're using. Here is a workaround
q= convert(A(i-1:i+1,j-1:j+1),'single');
[minsum, minidx] = min( sum(abs( repmat(q(:),1,9)-repmat(q(:).',9,1) ) ));
  댓글 수: 9
Matt J
Matt J 2012년 12월 22일
Isn't the center pixel A(i,j)? If so, do A(i,j)=whatever.
Walter Roberson
Walter Roberson 2012년 12월 22일
Or, since that would affect the computations as you slid the window, create a second array and set the pixels in it -- as I showed you in one of your previous questions.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by