shifting a mask over an image [message #82260] |
Mon, 26 November 2012 03:13 |
haikoley
Messages: 5 Registered: November 2012
|
Junior Member |
|
|
Hi,
I'm trying to move a mask over an image using the shift function. But I'm not sure if I really understood the description in the IDL help.
Let's say I have a 10x10 mask and a 100x100 image. In this case I have to create an array with the same size as my image. It is filles with 0 and my mask. Then I start moving the mask inside that array (in x direction and y direction). But every time I do it with both direction, there is an error message telling me that I have an incorrect number of arguments. It works fine for one dimension, though.
Has anyone an idea how I can shift in both directions?
Btw, my code looks like this:
for i=0, n-1 do begin
for j=0, n-1 do begin
result=shift(template, shift_x[i], shift_y[j])
cor=where(max(correlate(result, image))
endfor
endfor
thanks,
max
|
|
|