Does anyone know how to write arg min code in matlab with explanation?

I am referring to a paper for my research. I am not sure whether I can paste the paper link here. At first, I try to do feature extraction of finger using Gabor Filter. According to the paper, after feature extraction level, I need to do the following using formula to get my desired image:

OriCode(x, y) = arg j min {I(x, y) ∗ G(x, y, θj)}

∗ stands for convolution, I(x,y) stands for input image, G(x,y,θj) stands for gabor filtered image

There is actually a small j between arg and min. OriCode ranges from 0 to J-1 whereby j ranges from 0 to J. Here,J is set to 6.

I try to use conv2 to convolute my original input image and gabor filtered image. End up I am getting a blank white image. And what is the arg min used for? Please help me. Thanks.

  • $\begingroup$ Please post a reference to the paper. $\endgroup$ – porten Dec 9 '13 at 17:16

I'm going to use a grayscale image for simplicity. Suppose you have a 3D matrix and each slice is the result of filtering the image with the Gabor filter for that angle.

I = randn(256, 256); % Just some random image
G = gabor_filter; % Assume G is 256x256xNum_Angles, e.g. 256x256x6 if you had 6 angles
Y = zeros(256, 256, size(G, 3)); % Preallocate a temporary matrix

for idx = 1:size(G, 3)
    Y(:, :, idx) = conv2(I, G(:, :, idx), 'same');

Ymin = min(Y, [], 3); % This takes the minimum along the 3rd dimension
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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