[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: correlating two arrays
dmarshall@ivory.trentu.ca writes:
> I would like to correlate, (optimize the registration) of two images, but I
> would like to de-emphasize the middle where one image has a reflection of a
> camera ( the other does not ).
>
> I was thinking I could fade the centers on both to the same colour (grey
> say) and run it through a normal image correlation optimization procedure.
This may seem obvious, but does your registration algorithm accept a
weighting term? If so, then you could clearly give less weight to the
center of the image. If the center of the image is (XC, YC) then the
weights could be generated with a quadratic like so:
xx = (x-xc) # (y*0+1)
yy = (x*0+1) # (y-yc)
rr = sqrt(xx^2 + yy^2)
wt = (rr/wid)^2 < 1
The half-width of the unweighted zone is WID. Outside of that circle
the data is fully weighted. Of course you could try other functional
forms (quadratic was easy), or in a pinch you could simply knock out
the center with a mask (ie, the expression "img * (rr/wid GT 1)").
Craig
--
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------