2
$\begingroup$

I am trying to understand the MACE correlation filter as per the paper

Mahalanobis, A., Kumar, B.V.K.V., Casasent, D.: Minimum average correlation energy filters. Appl. Opt. 26, 3630–3633 (1987)

The equation to train the MACE filter is this

enter image description here

I however am abit confused about what values you use for u. From my reading u, is an N x 1 vector containing the desired peak values for the training images. Is this something I would just set to 1, could someone offer some suggested values

I have found a basic implementation in matlab from here (code posted below) but it does not give any definition to how I would go about deciding what u is?

D = diag(mean(abs(X),2));
% inv(A) * B = A \ B
XDX = ctranspose(X) * (D \ X);
h = (D \ X) * (XDX \ u);
H = reshape(h, size(I));

I will appreciate any help with this.

Thanks

$\endgroup$

2 Answers 2

1
$\begingroup$

The nth entry in the u vector corresponds to the value of the desired correlation peak of the nth training image. Typically you set u to be all ones if you have only images from the positive class. Entries corresponding to negative class example images are typically set to zero.

$\endgroup$
1
$\begingroup$

In your code, the D matrix should be the average of the magnitude squares of the columns. I.e the average power spectrum:

D = diag(mean(abs(X),2));

Should be

D = diag(mean(abs(X).^2,2));

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.