comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » shifting a mask over an image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
shifting a mask over an image [message #82260] Mon, 26 November 2012 03:13
haikoley is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: SVN Toolkit - IDL8.2.1 Linux not working
Next Topic: Re: Any interest in READ/WRITE functions for sparse (CSR) matrices?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:26:48 PDT 2025

Total time taken to generate the page: 0.00475 seconds