4.3. THE SOFTWARE PHOENIX c�
fact is that the reliability of the results of a DIC software has to be evaluated according to some scientific approaches by engineers and experts in experimental mechanics techniques. However the commercial developed software follow the idea of “a solution must be given to the user”, so that sometimes the user may lose the reliability of the results, even unconsciously. Therefore the lack of powerful DIC software is felt as well as many other numerical applying software.
Considering all these, this research is mostly focused on presenting a home-made software able to produce good results in a reasonable time, focusing on the understanding of the influence of several reported techniques available in this field. Phoenix c� has developed according to algorithm explained in Section 4.2. The present section focuses on the internal structure of the software. As first the main task is to chose a programming language. The most used programming languages are C (or its object-oriented version C++), Visual Basic c�, PythonTM, Java, etc.
Considering that the application to develop is quite heavy, full of calculations, and skipping the user friendly interface that can be neglected in the beginning, C++ sounds the preferred language.
It is a compiled language (not interpreted) and can be used easily for cross-platform software.
To make it even more cross-platform and in order to be sure that all the requirements of the ANSI standard ISO 9899 are fulfilled, GCC (GNU Compiler Collection, http://gcc.gnu.org/) compiler has been selected. In particular the object-oriented C++ “dialect” has been selected.
The GCC includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, as well as libraries for these languages.
As the GCC is mainly a GNU/Linux tool but with porting on all the main operating systems, an application that will compile in Microsoft c� Windows c� will easily compile also in GNU/Linux and Mac OS X, just with changing the few libraries that are operating system dependent. The software is command line and it works as follows:
Dic -f list_images -size left bottom right top [options]
where list_images is an ASCII file containing the list of the path of the files containing all the images to be analyzed (master and slaves). While left, bottom, right and top are the coordinates of the rectangle where the analysis has to be focused. Inside this area the grid defining the sub-windows centers will be created. The options can be as follows:
• -g: defines the grid spacing (the default value is 25 pixels)
• -w: defines the sub-window size (the default value is 30 pixels)
• -o: defines the name of the folder where the results will be saved (the default value is simply “output”)
• -d: defines the path of an ASCII file containing the x and y coordinates of the points of the grid that should not be analyzed (in order to remove areas of the previously defined rectangle)
• -s: defines the algorithm used to calculate the strains (possible values are the default
4.3. THE SOFTWARE PHOENIX c�
• -i: defines the algorithm used for the sub-pixel interpolation (possible values are bilinear or the default bicubcspline)
• -m: defines the minimization approach (possible values are newtonraphson or the default levenbergmarquardt)
• -df: defines the displacement field degree (possible values are rigid, the default affine or quadratic)
• -ms: defines the maximum number of iterations to be used in the minimization algorithm (the default value is 50)
• -t: defines the value of the correlation coefficient that stops the minimization iterations
• -n: defines the number of points in an area of (2 · n + 1)2points for the smoothing of strain data
• -h: shows the help page
When the software starts, it checks the availability of the license and then it checks the existence of all the listed images (master and slaves). Then it creates the sub-windows grid as defined at the command-line and it starts loading the master image and the first slave image.
Now the real DIC algorithm starts and at the end the displacements associated with each sub-window is calculated. Then the strains are calculated and the cycle starts again with a new slave image.
4.3.1 Image loader
In order to read the pixel color of many kinds of image formats, some library have been developed and some others have been download from the open source community and joined inside the software. The image formats accepted are: BMP, JPEG (or JPG), PNG and TIFF (or TIF).
BMP file format
This file format is directly implemented using GDI+ APIs. The file especially is opened by the object CBitmap and then the pixels data are extracted by the use of GetBits method. Finally the data are converted in 8-bit gray-scale.
JPEG file format
JPEG standard is widely used in many applications and even if is not the best choice for digital image to be used in DIC analyses, it is considered by this software. The implementation is done by the use of the open source and free to use library by the Independent JPEG Group (IJG, http://www.ijg.org/). The process is mainly consisting in the following steps:
4.3. THE SOFTWARE PHOENIX c�
• open the file
• create a “decompressor”
• read the header of the file
• decompress the header
• read the file and convert it in pixel colors
• destroy the “decompressor”
• close the file
At the end the colors are converted in 8-bit gray-scale.
PNG file format
The PNG is another widely used standard. It is a lossless compression image format with 8-bit alpha channel (see http://www.libpng.org/pub/png/). This is a very good format as usually it needs much less storage space respect to formats like TIFF, but it keeps still the same quality as it is a lossless format. The library used to manage the file is an open source free to use library developed by the PNG team. The process is mainly consisting in the following steps:
• open the file
• read the header
• read the file and convert it in pixel colors
• close the file
As the file can be saved in different formats (like RGB, RGBA, 8-bit gray, 8-bit gray plus 8-nit alpha channel, etc.), at the end the colors are converted in 8-bit gray-scale.
TIFF file format
The TIFF is a relatively old standard, developed by Aldus and now under the control of Adobe Systems. Even with being old, as it can store more than 8 bits per channel or floating point color information, it is still quite used in scientific applications. Moreover more than one image can be stored in a unique file. The library used to manage the file is an open source free to use library (see http://www.remotesensing.org/libtiff/). The process is mainly consisting in the following steps:
• open the file
• read the header