1.Introduction
The famous French photographer Gustave Le Gray (1884-1820), pursuing land and sea photography, faced the following problem: due to the limited camera equipment and photographic materials used in photography at that time, it was impossible to create an image that included, at the same time, the details of the bright sky and the dark sea. As a solution, he recorded two film negatives at different times so that he captured the details of the sky and the details of the sea separately. After that, he produced a single composite image by carefully combining the appropriate parts from the films of the negatives in the printing process. In this way, the resulting image was well visible in all parts of the image [1]. The researchers hypothesized that the combination of two spectral sensors in one compact scene would improve detection sensitivity based on the fact that each sensor provides important characteristics of the scene. The investor's detection of the target was improved by increasing the contrast by collecting the most important spectral information from each sensor, and then combining the two scenes in an improved Scene [2]. In 1997, researchers used visual search experiments to try to show that combining images improves target detection time [3]. In 1998 Hall and Linas gave a general introduction to multi-sensor data integration and an article was published containing an in-depth review on multi-sensor data integration techniques. Since then the field of image integration has received increasing attention and more scientific articles have been published on this field with a focus on improving the quality of integration and finding more areas of application [4]. As an example, data integration applications in remote sensing, such as obtaining elevation maps from radar interferometers (SAR), multi-image integration, and multi-frequency integration [5]. In 2002 it was shown that the integration of MRI images is able to plan the surgical operation [6]. Since that time, the new technology has made a clear difference in patient care by reducing the time between diagnosis and treatment and this technique has been known as integrated imaging. They allow combining multimedia medical images into a single image with a more integrated and accurate description of the same organ, providing both functional and anatomical information at the same time. A review on "current trends in medical image alignment and integration" was presented in 2015 by Fatima Al-Zahra al-Jamal and Mohammed Al-Moji[7], the study aims to provide a description of the steps of image integration with special attention to the steps of alignment and integration and some of the main advantages, disadvantages and applications of integrations can be summarized through this review [8] [9] [10] [11]:
Disadvantages Advantages
- Extract all useful information from the source images and put them into one image.
- Merging images overcomes some disadvantages such as misalignment.
- Image integration can improve reliability through integrated information.
- Easy identification and identification of objects.
- Reduce the required data storage volume and the actual time of its transfer.
- Noise may affect the integration process
- Color traces can be produced due to the algorithm used in the merging technique.
- The problem of uneven lighting in the resulting images.
- Image processing is slow during the merging process due to the huge amount of information to be processed.
- Requires more than one image source.
1.1. Some applications of the integration process: • Medical diagnosis • Detection and identification of persons. • Control of military and civilian navigation in difficult weather conditions. • Detection of weapons and camouflaged items. • In robotics applications. • In remote sensing applications.
2. Research objective:
Video cameras are the most widespread nowadays because they are relatively cheap, easy to use and capable of producing high-quality images under favorable conditions. However, it can be severely affected by surrounding environmental factors such as low light, fog, clouds, smoke and dust. Thermal imaging systems may overcome or alleviate some of these problems but are subject to a number of limitations of their own including much lower separation resolution than visual cameras and lack of important visual features (such as color), they are impermeable to visually transparent materials (such as car windshields and glass doors) and may suffer from low thermal contrast between the subjects and the background in special circumstances and times. Due to this, the combination of the two types of images (visual and thermal) is useful to obtain an integrated image that includes visual and thermal vision features and helps us detect and identify targets depending on different weather factors and Conditions [12] [13].
3. Characterization of the algorithm for aligning and merging two images within the MATLAB environment
1.3. The algorithm of work followed to achieve the merging of two images:
Scheme (1) algorithm of merging two images The figure shows the scheme of the algorithm for combining two images. • The first stage begins with uploading the two images. •The second stage is based on aligning the two images in order to achieve a geometric match between the two images, and this is done using a geometric transformation, which we will explain later. • The third stage boils down to the application of merging two images at the pixel level. • The last stage displays the output image.
3.2. The importance of aligning two images:
Below we assume that we have two images of one scene, the first taken with the thermal camera and the second image taken with the visual camera. Although the scene is the same in the two pictures, but they are not exactly identical, due to: •There is a mismatch between the two optical axes of the two cameras or the rotation of one camera relative to the other about its optical axis. • The two camera fields do not match exactly. •The presence of visual defects in the optical system.
Figure (1)
3.3. Geometric transformation matrix:
It is a geometric process T that modifies the geometric shape of the image by repositioning the pixels. The coordinates of each Old Point (x,y) change to a new Point (x', y')
T(x, y)=T′(x′, y′)
Figure (2)
The geometric transformation matrix uses the form to achieve the following:
- Correction of geometric and optical distortions.
- Create special effects on existing photos, such as rotate or compress.
- Estimate the displacement obtained on the coordinate axes and correct it.
Figure (3)
3.4. Types of geometric transformation matrices:
3.4.1. The projective transformation matrix:
This conversion is used when the scene appears tilted. Straight lines remain straight, but they converge towards a point.
Figure (4)
3.4.2. Polynomial transformation matrix:
This transformation is used when straight lines become curved with a local deformation in one of the parts of the image.
Figure (5)
3.4.3. Affine transformation matrix:
This transformation is used when straight lines remain straight and parallel lines are parallel, but the change becomes the result of rotation of the figure or its resizing.
Figure (6)
3.4.4. Piecewise linear transformation matrix:
This transformation is used when parts of the image appear distorted differently.
Figure (7)
3.4.5. Lwm transformation matrix:
This transformation is used when the deformation changes locally nonlinearly.
Figure (8)
Transformations (projective, polynomial , affine) are considered general geometric transformations in which the transformation coefficients are applied to the entire image, while transformations piecewise lwm, linear) are considered local geometric transformations in which the transformation coefficients are applied to different areas of the image. Due to the ability of the affine Transform to calculate the coefficients of rotation, standardization, displacement and deviation between two images [14] [15], it was adopted in this research.
3.5. Affine geometric transformation:
The Affine geometric transformation consists of several geometric transformations that can be given by the following transformations [16]:
a) 3.5.1. Displacement according to (𝐱𝟎, 𝐲𝟎)
Figure (9) b) 3.5.2. Resize the image according to (𝐬𝟏, 𝐬𝟐)
Figure (10) c) rotation according to (𝐜𝐱, 𝐜𝐲)
d) rotation according to the angle θ
Figure (11)
The final transformation matrix is a series of the following transformations:
Where (A,B,C,D,E, F)are the conversion coefficients.
(x,y) The Old coordinates of the Pixel and they belong to the transformed image.
(X,Y) The New coordinates of the Pixel and they belong to the reference image.
We obtain the coordinates of any pixel by applying the following relation:
(7) X=Ax+By+C (8) Y=Dx+Ey+F
3.6. Steps in the process of merging two images within the MATLAB environment
We consider in our case that the visual image is the reference image and the thermal image is the transformed image that needs to be corrected.
The integration process is divided into the following steps:
a) collection of two images from the visual and thermal cameras
Figure (12) visual image
Figure (13) thermal image b) Identification of a set of reference points in the transformed image and their corresponding from the reference image
Note that at least three reference points must be specified to estimate the conversion and to increase accuracy, we have selected four points.
Figure (14)
- The table shows an example of reference points taken from the two images in the MATLAB program:
Table (1)
263.75 442.75 189.25 308.25 1 274.25 577.75 218.25 492.25 2 291.75 855.75 264.25 859.75 3 519.25 756.25 563.25 690.25 4 c) perform the affine geometric transformation on the points and estimate the conversion coefficients.
To obtain the matrix of the geometric transformation affine, we apply the following relation:
Where n is the number of reference points,and (X, Y)the coordinates of the points in the visible reference image.
(x,y) the coordinates of the corresponding points in the transformed (thermal) image.
C= 197.2511 B=0.0878 A=0.7382 F=138.9022 E=0.7346 D=-0.0484 d) use the estimated coefficients and transformation equations to calculate the coordinates of each pixel of the transformed image.
Applying the following two equations to each pixel (x,y) in the transformed image we get its new coordinates (X,Y) :
X=Ax+By+C (10) Y=Dx+Ey+F (11) For example: we have a point of the transformed (thermal) image with coordinates (462.405) as shown in the figure, applying the previous two equations, the new coordinates are (573.414), which corresponds to the coordinates of the corresponding point in the visual image.
Figure (15) thermal image after conversion
Figure (16) thermal metamorphic image
Figure (17) reference visual image e) matching the transformed image with the reference image and performing the merging operation.
f) display the merge image.
We can apply the image alignment process to the video by applying the coordinate transformation to each frame of the thermal video and we get a new frame identical to the frame of the visible video.
3.7. Merge photos using Matlab:
After the alignment of the visual and thermal images is achieved, the two captured scenes become identical, that is, the opposite pixels point to the same object with an error not exceeding one pixel, considering the reference points taken from a standard target.
The idea of combining the two images is to take the pixel values of the visual image with the corresponding thermal image pixel values and perform calculations (merge algorithm) to get a final image that bears the characteristics of the thermal scene and the visual scene.
Several methods have been worked on to combine images depending on spatial domain techniques, including computational and comparison-based ones.
3.7.1. Computational techniques:
Considering that I is the illumination value of the Luminance value Pixel.
I1(x1, y1): Pixel illumination value of the visible image.
I2(x2, y2): Pixel illumination value of the thermal image.
We have the following methods:
a. Summing the illumination values of opposite pixels: the merging of images is carried out by calculating the average illumination value of opposite pixels in both the thermal and visual image according to the equation: IF = I1(x1, y1) + I2(x2, y2) (12) b. Difference of illumination values of opposite pixels:
IF = I1(x1, y1) −I2(x2, y2) (13) c. Centering the illumination values of opposite pixels:
2 (14) Weighting the visual and thermal image with coefficients and summing the luminance values of the resulting pixels from the two images:
3.7.2. Comparison techniques:
a. The maximum values of illumination of opposite pixels IF = max(I1(x1, y1) , I2(x2, y2)) (16) b. Minimum values of illumination of opposite pixels:
3.8. Results of integrations using the Matlab environment:
In this paragraph we show the practical results of applying merging algorithms and comparing the results. Table (2)
The applied algorithm Result of the merger
4. Comparison of results:
Since there is no reference image or perfect integration image to compare the results with, the integration methods are evaluated humanly by the investor directly. Based on this, the rating was taken on the basis of the clarity of details, the appearance of image colors and the appearance of new details in the image and was as follows: The method of combining according to the average intensities and the maximum values of the pixel intensities and image weighting of the pixel intensities gives good results compared to other methods, but the method of centering the values of the opposing pixel intensities does not allow showing important information in the merged image as a result of centering the values of the intensities (contrast reduction) . As for the method of taking the maximum values of pixel intensities, it allows showing important information with good contrast without taking into account the lighting effect in the two images, unlike the weighting method, through which the weighting coefficient can be controlled according to the scene lighting in both images.
5. Conclusions and recommendations:
- In the current work, two images (thermal and visual) of the same scene have been merged, but it is possible to work on merging a larger number of images from different sensors to achieve greater gains, such as merging visual and thermal images and images resulting from millimeter-wave radar. - The current work integrates a visual and thermal image with fixed fields, in the future it is possible to work on merging two images in which the visual camera has a variable magnification. - In this work, the reference points are determined manually by the Investor, later it is possible to work on determining the reference points automatically by revealing the angles and trying to connect the reference points from the first image with their corresponding from the second image. - Work has been done to merge two images at the pixel level, which can later be combined at the area level or using other merging methods suitable for combining visual images with thermal images. - Some integration algorithms produce color effects that pose a strong challenge to the integration process, especially if these techniques are used in stalking systems, and therefore research should be done to overcome them. - The integration process is a basic rule for ultra-precise systems, and therefore these ideas can be touched upon in the future and worked on. Scientific References
[1]. ROBINSON H.,1869-Pictorial Effect in Photography. Hints on Composition and Chiaroscuro for Photographers. Piper & Carter, London, PP 288. [2]. PA;MER J., RYAN D., TINKLER R., CRESWIK H., 1993- Assessment of image fusion in a Night pilotage system. Multisensors and Sensor Fusion. Symposium conducted at North Atlantic Treaty Organization, Brussels Belgium, PP 241. [3]. BOYCE S., POLLATSEK A., 1992-An exploration of the effects of scene context on object identification. In K. Rayner. Eye Movements and Visual Cognition, New York, PP 23. [4]. POHL C., VAN GENDEREN J., 1998-Multisensor image fusion in remote sensing: concepts, methods and applications. int. j . remote sensing, Vol.19, PP 33. [5]. SIMONE G., FARINA A., MORABITO F., SERPICO B., BRUZZONE L., 2002- Image fusion techniques for remote sensing applications. Information Fusion. Vol.3, PP 26. [6]. PATIAS P., 2002- Medical imaging challenges photogrammetry. ISPRS Journal of Photogrammetry and Remote Sensing, Vol. 56, No.5-6, PP. 295-310 [7]. EL-GAMAL F., ELMOGY M., 2015-Current Trends in Medical Image Registration and Fusion. Egyptian Informatics Journal, Egypt , PP. 99-124. [8]. PAJARES G., Manuel de la Cruz J., 2004- A wavelet- based image fusion tutorial. Pattern Recognition Society, Spain, PP 18. [9]. CHETAN K., SOLANKI M., 2011-Pixel based and Wavelet based Image fusion Methods with their Comparative Study. National Conference on Recent Trends in Engineering & Technology, PP 7. [10]. PIELLA G. 2003- A general framework for multiresolution image fusion: from pixels to regions. Information Fusion , PP 259 – 280. [11]. CONSTANTIONS S., PATTICHIS M., MICHELI T., 2001- Medical imaging fusion applications: An overview, Signals, Systems and Computers. Conference Record of the Thirty-Fifth Asilomar, PP 1263. [12]. DEEPALI A., DATTATRAYA S., 2011-Wavelet based image fusion using pixel based maximum selection rule. International Journal of Engineering Science and Technology , PP 7. [13]. VEKKOT S., SHUKLA P., 2009-A Novel Architecture for Wavelet based Image Fusion. World Academy of Science Engineering and Technology, PP6. [14]. KADYROV A., PETROU M., 2004-Affine parameter estimation from the trace transform. Electrical and Electronic Engineering Department, Imperial College, London, PP35.
[15]. MONDAL P., BISWAL K., BANERJEE S., 2012-Acceleration of Affine Transform for Multiplane Image Stabilization in Digital Camera. International Journal of Computer and Electrical Engineering, PP 5. [16]. Ghali S.2008-Introduction to Geometric Computing. Springer Verlag, London, PP43.