comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Image registration
items: Re: Image registration
items: Re: image registration

Image registration
type: item
description: Dear all, I am fairly new to IDL, so bear with me please. I have two images of the same object, only with different intensities. I want to create an image that displays the ratio of the two input images. I programmed that and it works. Problem is that the object I am imaging might have moved by up to 10 pixels (at a 256*256 matrix) in between, so I need to match the position of these two images before I calculate their ratio. The movement might include translation as well as rotation. Is there a routine in IDL that does such an operation? Alternatively, does any among you have any clever suggestion how to go about this? Many thanks! Carsten
creator: carsten
date: 2002-06-19T11:01:18-00:00

Re: Image registration
type: item
description: On 19 Jun 2002 04:01:18 -0700, carsten@rad.uni-kiel.de (Carsten Liess) wrote: Did you succeeded? I'm busy with an image registration program that I write in IDL. If you want to, I can send it to you or post it. > Dear all, > > I am fairly new to IDL, so bear with me please. > I have two images of the same object, only with different intensities. > I want to create an image that displays the ratio of the two input > images. I programmed that and it works. > Problem is that the object I am imaging might have moved by up to 10 > pixels (at a 256*256 matrix) in between, so I need to match the > position of these two images before I calculate their ratio. The > movement might include translation as well as rotation. > Is there a routine in IDL that does such an operation? Alternatively, > does any among you have any clever suggestion how to go about this? > Many thanks! > > Carsten
creator: nono
date: 2002-09-06T07:49:58-00:00

Re: image registration
type: item
description: Bryan William Jones <bryan.jones@m.cc.utah.edu> wrote: > Does anyone have or know of IDL code that will perform image > registration/mosaicking? Sure, I've got some routines which register and mosaic astronomical images (so each pixel is a float...). They're not online anywhere yet (hmm, I should do that one of these days!) but drop me an email and I'll send you a copy if you'd like. - Marshall
creator: mperrin+news
date: 2003-07-30T05:29:53-00:00

Re: image registration
type: item
description: I have written an image registration code a few days ago. It was used to perform semi-automated image matching base upon a few pairs of prior tie points (at least 4). Correlation coefficient is used to check the matching position of tie point, and polynomial of degree 1 or 2 is used to approximate the wrapping eometry of the unregistered image. But I found it gives bad results in many ases, especially when there exist local distortions in the image. Does someone have a good idea? I'd like to discuss the implementation of image matching in IDL with others. Tian. mperrin+news@cymric.berkeley.edu (Marshall Perrin) wrote in message news:<bg7l4h$1qui$1@agate.berkeley.edu>... > Bryan William Jones <bryan.jones@m.cc.utah.edu> wrote: >> Does anyone have or know of IDL code that will perform image >> registration/mosaicking? > > Sure, I've got some routines which register and mosaic astronomical > images (so each pixel is a float...). They're not online anywhere yet > (hmm, I should do that one of these days!) but drop me an email and I'll > send you a copy if you'd like. > > - Marshall
creator: tianyf_cn
date: 2003-08-05T07:43:57-00:00

Re: Image registration
type: item
description: On Friday, September 6, 2002 at 1:19:58 PM UTC+5:30, nono wrote: > On 19 Jun 2002 04:01:18 -0700, carsten@rad.uni-kiel.de (Carsten Liess) > wrote: > > Did you succeeded? I'm busy with an image registration program that I > write in IDL. If you want to, I can send it to you or post it. > >> Dear all, >> >> I am fairly new to IDL, so bear with me please. >> I have two images of the same object, only with different intensities. >> I want to create an image that displays the ratio of the two input >> images. I programmed that and it works. >> Problem is that the object I am imaging might have moved by up to 10 >> pixels (at a 256*256 matrix) in between, so I need to match the >> position of these two images before I calculate their ratio. The >> movement might include translation as well as rotation. >> Is there a routine in IDL that does such an operation? Alternatively, >> does any among you have any clever suggestion how to go about this? >> Many thanks! >> >> Carsten Hello all, The technique described by Dr. Thompson is certainly useful. However, I a trying to de-rotate large chunks of images. In that case, rotation followed by cross-correlation is painfully slow. Can someone suggest any alternative method? Any input would be highly appreciated! Thanks in advance, Souvik Bose
creator: sbose925
date: 2017-05-31T20:42:54-00:00

Re: Image registration
type: item
description: Take a look at this links. I can't find files on web, so the code is pasted below as well. Hope it helps, Klemen http://www.sciencedirect.com/science/article/pii/S0098300403 001043 www.utsa.edu/LRSG/Teaching/EES5053-06/project/cynthiaproject remote.ppt ; Authors: ; Hongjie Xie, Nigel Hicks, G. Randy Keller, Haitao Huang, Vladik Kreinovich ; ; Title of the paper: ; An IDL/ENVI implementation of the FFT Based Algorithm for Automatic Image Registration ; ; IDL source code for shift, rotation and scaling ; ------------------------------------------------------------ ---------------- ; Functions and procedures: FUNCTION Ritio, ARR1, ARR2 ArrSize = SIZE(ARR1) Cols = ArrSize[1] Rows = ArrSize[2] R=COMPLEXARR(Cols,Rows) R1=COMPLEXARR(Cols,Rows) R2=FLTARR(Cols,Rows) R1=ARR1*(conj(ARR2)) R2=(abs(ARR1))*(abs(ARR2)) for j = 0, Cols - 1 do begin for i = 0, Rows - 1 do begin JUNK = CHECK_MATH() !EXCEPT=0 R[j, i] = R1[j, i] / R2[j, i] if FINITE(FLOAT(R[j, i])) EQ 0 then begin endif if FINITE(imaginary(R[j, i])) EQ 0 then begin endif endfor endfor RETURN, R END FUNCTION LogPolar, RECT, LP Pi = 3.14159365359 RArrSize = SIZE(RECT) RCols = RArrSize[1] RRows = RArrSize[2] LP=temporary(FLTARR(RCols, RRows,/Nozero)) dTheta= 1.0 * pi / RRows ; the angle b = 10 ^ (alog10(RCols) / RCols) for i=0.0, RRows-1.0 do begin Theta=i * dTheta for j=0.0, RCols-1.0 do begin r = b ^ j - 1 x=r * cos(Theta) + RCols / 2.0 y=r * sin(Theta) + RRows / 2.0 x0=floor(x) y0=floor(y) x1=x0+1 y1=y0+1 if (x0 LE RCols-1) and (y0 LE RRows-1) and (x0 GT 1) and (y0 GT 1) THEN V00=RECT[x0,y0] else V00=0.0 if (x0 LE RCols-1) and (y1 LE RRows-1) and (x0 GT 1) and (y1 GT 1) THEN V01=RECT[x0,y1] else V01=0.0 if (x1 LE RCols-1) and (y0 LE RRows-1) and (x1 GT 1) and (y0 GT 1) THEN V10=RECT[x1,y0] else V10=0.0 if (x1 LE RCols-1) and (y1 LE RRows-1) and (x1 GT 1) and (y1 GT 1) THEN V11=RECT[x1,y1] else V11=0.0 V=V00*(x1-x)*(y1-y)+V01*(x1-x)*(y-y0)+V10*(x-x0)*(y1-y)+V11* (y-y0)*(x-x0) LP[j,i]=temporary(V) endfor endfor RETURN, L…
creator: Klemen
date: 2017-06-01T06:44:25-00:00

Re: Image registration
type: item
description: There are a lot of evil loops in there, as far as I can see none of them necessary. I eliminated them, but did not verify the code. Once debugged, it should be a lot faster. Markus http://www.idlcoyote.com/tips/forloops.html http://www.idlcoyote.com/tips/forloops2.html On 06/01/2017 08:44 AM, Klemen wrote: > Take a look at this links. I can't find files on web, so the code is pasted below as well. > Hope it helps, Klemen > > http://www.sciencedirect.com/science/article/pii/S0098300403 001043 > www.utsa.edu/LRSG/Teaching/EES5053-06/project/cynthiaproject remote.ppt > > > > ; Authors: > ; Hongjie Xie, Nigel Hicks, G. Randy Keller, Haitao Huang, Vladik Kreinovich > ; > ; Title of the paper: > ; An IDL/ENVI implementation of the FFT Based Algorithm for Automatic Image Registration > ; > ; IDL source code for shift, rotation and scaling > ; ------------------------------------------------------------ ---------------- > ; Functions and procedures: > > FUNCTION Ritio, ARR1, ARR2 > ArrSize = SIZE(ARR1) > Cols = ArrSize[1] > Rows = ArrSize[2] > > R=COMPLEXARR(Cols,Rows) > R1=COMPLEXARR(Cols,Rows) > R2=FLTARR(Cols,Rows) > > R1=ARR1*(conj(ARR2)) > R2=(abs(ARR1))*(abs(ARR2)) > > for j = 0, Cols - 1 do begin > for i = 0, Rows - 1 do begin > JUNK = CHECK_MATH() > !EXCEPT=0 > R[j, i] = R1[j, i] / R2[j, i] > if FINITE(FLOAT(R[j, i])) EQ 0 then begin > endif > if FINITE(imaginary(R[j, i])) EQ 0 then begin > endif > endfor > endfor > RETURN, R > END function ritio, arr1, arr2 return, ARR1*(conj(ARR2))/(abs(ARR1))*(abs(ARR2)) end > FUNCTION LogPolar, RECT, LP > Pi = 3.14159365359 > RArrSize = SIZE(RECT) > RCols = RArrSize[1] > RRows = RArrSize[2] > LP=temporary(FLTARR(RCols, RRows,/Nozero)) > > dTheta= 1.0 * pi / RRows ; the angle > b = 10 ^ (alog10(RCols) / RCols) > for i=0.0, RRows-1.0 do begin > Theta=i * dTheta > for j=0.0, RCols-1.0 do begin > r = b ^ j - 1 > x=r * cos(Theta) + RCols / 2.0 > y=r * sin(Theta) + RRows / 2.0 > x0=floor(x) > y0=floor(y) > x1=x0+1 > y1=y0+1 > if (x0 L…
creator: Markus Schmassmann
date: 2017-06-01T11:13:42-00:00

Re: Image registration
type: item
description: On Thursday, June 1, 2017 at 12:14:29 PM UTC+5:30, Klemen wrote: > Take a look at this links. I can't find files on web, so the code is pasted below as well. > Hope it helps, Klemen > > http://www.sciencedirect.com/science/article/pii/S0098300403 001043 > www.utsa.edu/LRSG/Teaching/EES5053-06/project/cynthiaproject remote.ppt > > > > ; Authors: > ; Hongjie Xie, Nigel Hicks, G. Randy Keller, Haitao Huang, Vladik Kreinovich > ; > ; Title of the paper: > ; An IDL/ENVI implementation of the FFT Based Algorithm for Automatic Image Registration > ; > ; IDL source code for shift, rotation and scaling > ; ------------------------------------------------------------ ---------------- > ; Functions and procedures: > > FUNCTION Ritio, ARR1, ARR2 > ArrSize = SIZE(ARR1) > Cols = ArrSize[1] > Rows = ArrSize[2] > > R=COMPLEXARR(Cols,Rows) > R1=COMPLEXARR(Cols,Rows) > R2=FLTARR(Cols,Rows) > > R1=ARR1*(conj(ARR2)) > R2=(abs(ARR1))*(abs(ARR2)) > > for j = 0, Cols - 1 do begin > for i = 0, Rows - 1 do begin > JUNK = CHECK_MATH() > !EXCEPT=0 > R[j, i] = R1[j, i] / R2[j, i] > if FINITE(FLOAT(R[j, i])) EQ 0 then begin > endif > if FINITE(imaginary(R[j, i])) EQ 0 then begin > endif > endfor > endfor > RETURN, R > END > > > > FUNCTION LogPolar, RECT, LP > Pi = 3.14159365359 > RArrSize = SIZE(RECT) > RCols = RArrSize[1] > RRows = RArrSize[2] > LP=temporary(FLTARR(RCols, RRows,/Nozero)) > > dTheta= 1.0 * pi / RRows ; the angle > b = 10 ^ (alog10(RCols) / RCols) > for i=0.0, RRows-1.0 do begin > Theta=i * dTheta > for j=0.0, RCols-1.0 do begin > r = b ^ j - 1 > x=r * cos(Theta) + RCols / 2.0 > y=r * sin(Theta) + RRows / 2.0 > x0=floor(x) > y0=floor(y) > x1=x0+1 > y1=y0+1 > if (x0 LE RCols-1) and (y0 LE RRows-1) and (x0 GT 1) and (y0 GT 1) THEN V00=RECT[x0,y0] else V00=0.0 > if (x0 LE RCols-1) and (y1 LE RRows-1) and (x0 GT 1) and (y1 GT 1) THEN V01=RECT[x0,y1] else V01=0.0 > if (x1 LE RCols-1) and (y0 LE RRows-1) and (x1 GT 1) and (y0 GT 1) THEN V10=RECT[x1,y0] else V10=0.0 > if (x1 LE RCols-1…
creator: sbose925
date: 2017-06-02T12:14:17-00:00