555 | | Transforming image to physical coordinates is a key problem for measuring techniques based on imaging. The ''image coordinates'' represent the two cartesian axis X,Y of the image, with origin at the lower left corner. The coordinate of the first lower left pixel centre is therefore (1/2,1/2). Note that the Y axis is directed upward, while the corresponding image index j increases downward. Therefore, denoting npy the number of pixels along Y, the (X,Y) coordinates of a pixel indexed (i,j) are [[BR]] X=i-1/2, Y=npy-j+1/2. |
| 555 | Transforming image to physical coordinates is a prerequisit for measuring techniques based on imaging. |
| 556 | |
| 557 | The ''image coordinates'', expressed in pixels, represent the two cartesian axis X,Y of the image, with origin taken at the lower left corner. The coordinate of the first lower left pixel centre is therefore (1/2,1/2). Note that the Y axis is directed upward, while the corresponding image index j increases downward. Therefore, denoting ''npy'' the number of pixels along ''Y'', the (''X,Y'') coordinates of a pixel indexed (''i,j'') are ''X''=''i''-1/2, ''Y''=''npy''-''j''+1/2. |
571 | | -''' Opening the GUI: ''' it is made visible from the GUI '''uvmat.fig''' by the menu bar command '''[!Tools/Geometric calibration] '''. If calibration data already exist in the current file <code>ImaDoc </code>, the corresponding list of reference points is displayed in the central window '''[!ListCoord] ''' of '''geometry_calib.fig'''. The three first columns indicate the physical coordinates and the two last ones the corresponding image coordinates. Calibration points can be alternatively introduced by opening any <code><!ImaDoc></code> xml file with the menu bar command''' [Open] ''' of '''geometry_calib.fig'''. |
572 | | |
573 | | -''' Plotting calibration points: ''' press the menu bar command button '''[Plot] ''' to visualise the list of calibration points. The physical or image coordinates will be used in the list '''[!ListCoord]''', depending on the option 'phys' or 'px' in the menu '''[transform_fct]''' of ''' uvmat.fig''' . |
| 573 | -''' Opening the GUI: ''' it is made visible from the GUI '''uvmat.fig''' by the menu bar command '''[!Tools/Geometric calibration] '''. If calibration data already exist in the current file !ImaDoc, the corresponding parameters and the list of reference points are displayed. The three first columns indicate the physical coordinates and the two last ones the corresponding image coordinates. Calibration points can be alternatively introduced by opening any ImaDoc xml file with the menu bar command''' [Open] ''' of '''geometry_calib.fig'''. |
| 574 | |
| 575 | -''' Plotting calibration points: ''' press the button '''[Plot] ''' to visualise the list of calibration points. The physical or image coordinates will be used in the list '''[!ListCoord]''', depending on the option 'phys' or 'px' in the menu '''[transform_fct]''' of ''' uvmat.fig''' . |
610 | | * <Tx_Ty_Tz></code>: translation, (Tz=1 for the options calib_lin and calib_rescale) |
611 | | |
612 | | * <R>: rotation matrix (in 3 lines). For the option <[https://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/search?q=wiki%3ACalibrationType CalibrationType]>= 'rescale', [[BR]] R (i=1)= [pxcmx 0 0] R (i=2)= [0 pxcmy 0] R (i=3)= [0 0 1], [[BR]]where pxcmx and pxcmy are the scaling factors along x and y. |
| 612 | * {{{<Tx_Ty_Tz>}}}: translation, (Tz=1 for the options calib_lin and calib_rescale) |
| 613 | |
| 614 | * {{{<R>}}}: rotation matrix (in 3 lines). For the option <[https://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/search?q=wiki%3ACalibrationType CalibrationType]>= 'rescale', [[BR]] R (i=1)= [pxcmx 0 0] R (i=2)= [0 pxcmy 0] R (i=3)= [0 0 1], [[BR]]where pxcmx and pxcmy are the scaling factors along x and y. |
618 | | * <ErrorMax> : maximum difference (in X and Y direction) between the image coordinates measured for the calibration points and the coordinates transformed from their physical coordinates. (using the function ''px_XYZ.m'' in uvmat) |
619 | | |
620 | | * <SourceCalib> set of the point coordinates used for calibration |
621 | | |
622 | | * <PointCoord> [x y z X Y] , where x,y,z are the physical coordinates of each point, X Y its image coordinates |
623 | | |
624 | | * <NbSlice_i> nbre of slices for the first field index i (multilevel case), =1 by default. |
625 | | |
626 | | * <NbSlice_j> nbre of slices for the second index j (volume scan), =1 by default. |
627 | | |
628 | | * <SliceCoord> [x y z] positions (nb lines) of the nb planes, where nb=NbSlice_i (multilevel case) or nb=NbSlice_j of j indices (volume scan), for parallel volume scan, x=y=0, z= slice height, for angular scan, [x,y,z]=[origin]. |
| 620 | * <!ErrorMax> : maximum difference (in X and Y direction) between the image coordinates measured for the calibration points and the coordinates transformed from their physical coordinates. (using the function ''px_XYZ.m'' in uvmat) |
| 621 | |
| 622 | * <!SourceCalib> set of the point coordinates used for calibration |
| 623 | |
| 624 | * <!PointCoord> [x y z X Y] , where x,y,z are the physical coordinates of each point, X Y its image coordinates |
| 625 | |
| 626 | * <!NbSlice_i> nbre of slices for the first field index i (multilevel case), =1 by default. |
| 627 | |
| 628 | * <!NbSlice_j> nbre of slices for the second index j (volume scan), =1 by default. |
| 629 | |
| 630 | * <!SliceCoord> [x y z] positions (nb lines) of the nb planes, where nb=NbSlice_i (multilevel case) or nb=NbSlice_j of j indices (volume scan), for parallel volume scan, x=y=0, z= slice height, for angular scan, [x,y,z]=[origin]. |