include include "resfind.h" # xresfind1 -- find one reseau mark # This is based on xresfind in focgeom$rfindx/rfindx.x. This version # finds just one reseau position, rather than looping over all of them. procedure xresfind1 (im, Irx, Iry, Ix, Iy, rm, searchx, searchy, depth, mx, my, verbose, noindefs, corr, IRp, notfound) pointer im # i: imhdr struct for input image int Irx # i: column number of current reseau int Iry # i: row number of current reseau real Ix # i: estimated X-coord of (Irx,Iry) real Iy # i: estimated Y-coord of (Irx,Iry) pointer rm # i: reseau model data int searchx, searchy # i: size of search region real depth # i: correlation depth required int mx, my # i: size of largest reseau model bool verbose # i: print info about positions as they are found? bool noindefs # i: save approximate position if reseau not found? real corr[searchx,searchy] # o: scratch array real IRp[NRX,NRY,3] # o: reseau positions bool notfound # o: true if position was not found #-- real xout # Refined X-coord of (Irx,Iry) \ Returned from sub- real yout # Refined Y-coord of (Irx,Iry) / routine XRESCORL begin # Save estimated position in case reseau will not be found. IRp(Irx,Iry,1) = Ix IRp(Irx,Iry,2) = Iy IRp(Irx,Iry,3) = NO if (verbose) { call printf ("_____________________________________\n") call printf ("reseau mark (%d,%d), input position ( %g, %g )\n") call pargi (Irx) call pargi (Iry) call pargr (Ix) call pargr (Iy) } # Call rfindx subroutine. call xrescorl (im, Ix, Iy, rm, searchx, searchy, depth, mx, my, verbose, noindefs, corr, xout, yout, notfound) if (!notfound) { IRp(Irx,Iry,1) = xout IRp(Irx,Iry,2) = yout IRp(Irx,Iry,3) = YES # Else position not found; retain estimated position. } if (verbose) { call printf (" new position %g, %g \n") call pargr (xout) call pargr (yout) if (!notfound) { call printf (" displacements: %g, %g \n") call pargr (xout - Ix) call pargr (yout - Iy) } call flush (STDOUT) } end