Changes between Version 38 and Version 39 of Tutorial/ImageDisplay


Ignore:
Timestamp:
Apr 12, 2021, 7:33:32 PM (16 months ago)
Author:
sommeria
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial/ImageDisplay

    v38 v39  
    11[[TracNav(Tutorial/TOC)]]
     2
    23= [wiki:Tutorial] / Image display =
    3 
    44== Opening an image ==
    5 
    6 First download and unzip the folder UVMAT_DEMO01_pair containing the demo files (accessible on http://servforge.legi.grenoble-inp.fr/pub/soft-uvmat/)
    7 
    8 Then type 'uvmat' in the Matlab command window, the GUI (Graphic User Interface) opens with the date of last modification.
    9 If the command '>>uvmat' is not recognized, check the [wiki:Installation].
     5Then type 'uvmat' in the Matlab command window, the GUI (Graphic User Interface) opens with the date of last modification.  If the command '>>uvmat' is not recognized, check the [wiki:Installation].
    106
    117Activate the menu bar command '''[!Open/Browse...]''' at the upper left which displays a file browser, as shown in figure.
     
    139[[Image(browser.jpg)]]
    1410
    15 Move through your computer folders (use '+/..' to move upward in the tree) to select  the image file of the tutorial 'UVMAT_DEMO01_pair/images/frame_1.png'. The image should appear as in figure. 
     11Move through your computer folders (use '+/..' to move upward in the tree) to select  the image file of the tutorial 'UVMAT_DEMO01_pair/images/frame_1.png'. The image should appear as in figure.
    1612
    1713[[Image(uvmat_image.jpg)]].
    1814
     15Open the folder UVMAT_DEMO01_pair containing the demo files, either form the downloaded archive (accessible on http://servforge.legi.grenoble-inp.fr/pub/soft-uvmat/), either online in the OpenDAP address !http://servdap.legi.grenoble-inp.fr/opendap/meige/18UVMAT_DEMO_SOURCES/UVMA_DEMO001_pair (directly accessible in the menu '''[Open/Browse...]'''). Then select the folder 'Images' and the image' frame_1.png'.
     16
    1917The file name is displayed in the upper frame '''[Input]''', split in path '.../UVMAT_DEMO01_pair' (in '''[!RootPath]'''), subfolder '/images' (in '''[!SubDir]'''), root file name '/frame' (in '''[!RootFile]'''), index string '_1' (in '''[Index]''') and file extension '.png' (in '''[Ext]''').  The file index is also displayed in the left frame '''[i1]'''. You can move to the next image 'frame_2' by pressing the red arrow '''[+>]'''.
    2018
    21 The box '''[!NomType]''' indicates the convention for indexing, here using a separator '_'. It shows the first term in the series, which is '_1', while '''[!FileIndex]''' is incremented when we move to frame_2 or beyond.   
    22 
     19The box '''[!NomType]''' indicates the convention for indexing, here using a separator '_'. It shows the first term in the series, which is '_1', while '''[!FileIndex]''' is incremented when we move to frame_2 or beyond.
    2320
    2421== Brightness and contrast ==
    25 
    2622The frame '''[Scalar]''' on the right hand side indicates the number of pixels (1008, 301) ('''[npx, y]''') along the x and y directions, as well as the min and max brightness of the image (0 and 255). It is possible to change the brightness and contrast of the image display by setting values for these extrema. Pixels with brightness larger than the maximum will appear in white while pixels with brightness lower than the minimum will appear in black. The image histogram (number of pixels for each brigthness value A), is given in the lower left graph.
    2723
    2824== True color image ==
    29 
    30 Let us choose now a color image as input, for instance UVMAT_DEMO02_color/images/frame1.jpg' (the folder 'UVMAT_DEMO02_color' is accessible on  http://servforge.legi.grenoble-inp.fr/pub/soft-uvmat/). We notice in this example that the frame index '1' directly follows the '''[!RootFile]''' 'frame' (without separator '_'), so '''[!NomType]''' is '1'. By moving the mouse over the image, we notice that the luminosity A has three color components rgb (red, green, blue), shown in the upper right text window. Similarly the histogram has three curves.
     25Let us choose now a color image as input, for instance UVMAT_DEMO02_color/images/frame1.jpg'. We notice in this example that the frame index '1' directly follows the '''[!RootFile]''' 'frame' (without separator '_'), so '''[!NomType]''' is '1'. By moving the mouse over the image, we notice that the luminosity A has three color components rgb (red, green, blue), shown in the upper right text window. Similarly the histogram has three curves.
    3126
    3227== Zooming ==
     28When '''zoom on''' is selected (tag='''[!CheckZoom]'''), zoom in by pressing the left side button of the mouse on the image and zoom out by pressing the right button. Use the key board directional arrows to adjust the field of view. It is also possible to manually write the coordinate limits by editing the boxes '''[MinX]''','''[MaxX]''' and '''[MinY]''','''[MaxY]''' in the frame '''[Axes]'''. To come back to the whole image, unselect the check box '''fix''' ('''[!CheckFixLimits]''').
    3329
    34 When '''zoom on''' is selected (tag='''[!CheckZoom]'''), zoom in by pressing the left side button of the mouse on the image and zoom out by pressing the right button. Use the key board directional arrows to adjust the field of view. It is also possible to manually write the coordinate limits by editing the boxes '''[MinX]''','''[MaxX]''' and '''[MinY]''','''[MaxY]''' in the frame '''[Axes]'''. To come back to the whole image, unselect the check box '''fix''' ('''[!CheckFixLimits]''').
     30A zoomed region can be also extracted as a separate figure by selecting '''zoom fig''' (tag '''[!CheckZoomFig]''') and drawing the contour with the mouse (keeping the left hand mouse button pressed). The zoomed region can be moved with the keyboard arrows.
    3531
    36 A zoomed region can be also extracted as a separate figure by selecting '''zoom fig''' (tag '''[!CheckZoomFig]''') and drawing the contour with the mouse (keeping the left hand mouse button pressed). The zoomed region can be moved with the keyboard arrows.
     32Selecting the check box '''fix'''  maintains the bounds fixed when different images of fields are opened (useful for comparisons), while the opposite option allows the bounds to adjust to the extremal coordinates of the field. Finally the x/y scaling  can be set equal by selecting the box '''fix x/y''' (tag name '''[!CheckFixAspectRatio]'''). Otherwise the image is deformed to fit in the plot window.
    3733
    38 Selecting the check box '''fix'''  maintains the bounds fixed when different images of fields are opened (useful for comparisons), while the opposite option allows the bounds to adjust to the extremal coordinates of the field. Finally the x/y scaling  can be set equal by selecting the box '''fix x/y''' (tag name '''[!CheckFixAspectRatio]'''). Otherwise the image is deformed to fit in the plot window.
    39 
    40 Edit boxes in the GUI can be also zoomed by right hand mouse button selection: a new window appears with the tag name and content. This is convenient when a text box content exceeds its frame limits (for instance !RootPath).
    41 
     34Edit boxes in the GUI can be also zoomed by right hand mouse button selection: a new window appears with the tag name and content. This is convenient when a text box content exceeds its frame limits (for instance !RootPath).
    4235
    4336== Extracting data ==
    44 
    4537The current mouse coordinates in the image, as well as the local image intensity ('A'), are displayed in the upper right text window. The local image matrix  indices 'i' and 'j' are also displayed. By default the coordinates are expressed in pixel units, with origin (0,0) at the lower left of the image (the lower left pixel centre is at (0.5,0.5)). The x coordinate is equal to i-0.5 while the y coordinate is npy-(j-0.5), since the  image index j runs from top to bottom unlike the coordinate y. In case of low screen resolution, it is possible to duplicate this display in a bigger window, by right mouse button selection (after zoom has been desactivated). When the mouse is over an edit box or press button, its tag is displayed with a short explanation (tooltip). The tag and box string can be also displayed by selection with the right hand mouse button.
    4638