• No se han encontrado resultados

CAPÍTULO 4: Imple mentación del sistema

4.3 Conclusiones

The deconvolution methods were evaluated on a synthetic (1) and an EL image (2). The images were blurred with a radial symmetric (a) and an elliptic (b) 2D Gaussian PSF (Figure 4.11).

Figure 4.11: a,b) PSF used to blur 𝑰𝑰𝒐𝒐𝒓𝒓𝒊𝒊𝑬𝑬 of a synthetic pattern (1) and an EL image(2)

A comparison of the resulting (sharpened) images is shown in Figure 4.12 (synthetic pattern) and Figure 4.13 (EL image). An improvement ratio (𝑄𝑄) is shown below every image. This ratio is calculated from a relative RMSE as follows:

© Karl Bedrich - April 2017 154 𝑄𝑄 =𝑅𝑅𝑥𝑥𝑆𝑆𝐸𝐸�𝐼𝐼𝑐𝑐𝑐𝑐𝑖𝑖𝑔𝑔− 𝐼𝐼𝑏𝑏𝑐𝑐� − 𝑅𝑅𝑥𝑥𝑆𝑆𝐸𝐸�𝐼𝐼𝑐𝑐𝑐𝑐𝑖𝑖𝑔𝑔− 𝐼𝐼𝑚𝑚𝑚𝑚𝑐𝑐

𝑅𝑅𝑥𝑥𝑆𝑆𝐸𝐸�𝐼𝐼𝑐𝑐𝑐𝑐𝑖𝑖𝑔𝑔− 𝐼𝐼𝑏𝑏𝑐𝑐 ⋅ 100% (4.14)

The smaller numbers in brackets (Figure 4.12, 4.13) show the deconvolution control parameter (𝑛𝑛). This parameter was determined by maximizing Equation 4.14 using the Brent method [79]. To evaluate noise stability, a mix of 70% Gaussian and 30% shot noise was added to 𝐼𝐼𝑏𝑏𝑐𝑐 in the bottom two rows causing a signal-to-noise ratio SNR of 10. The deconvoluted output from Richardson-Lucy was especially prone to few, but high magnitude artefacts. Therefore, 𝐼𝐼𝑚𝑚𝑚𝑚𝑐𝑐 was clipped to −100% to 200% relative to the input intensity range.

Figure 4.12: Result of image deconvolution of the synthetic pattern (Figure 4.11(1)); first column: Input image (𝑰𝑰𝒂𝒂𝒓𝒓 ) used for image deconvolution; 2nd-5th column: deconvolution output; large numbers:

improvement ratio (𝑸𝑸 , Equation 4.14); small number in brackets:

control parameter (𝒊𝒊); green box: result with highest improvement ratio

© Karl Bedrich - April 2017 155

Figure 4.13: Same as Figure 4.12 for EL image (Figure 4.11(2))

Both Figure 4.12 and 4.13 show the common problems of image deconvolution: introduced noise, exaggerated gradients and artefacts.

Noise: Both Unsharp masking and Richardson-Lucy amplified existing image noise (Figure 4.13c,d). Therefore, noise removal with methods such as total variation regularization can be additionally applied [97].

Exaggerated gradients: On top and below both busbars (Figure 4.13a) image intensity increased to a higher value than in the original image.

Although this can improve qualitative feature visibility, it can cause problematic distortions when evaluating difference images.

Artefacts: Results from Unsupervised Wiener generated a wave-shaped pattern along the image borders. Here the input image size is 100x100 pixels. It can be assumed that the extent of this artefacts decreases with larger images or smaller PSF. These wave-shaped patterns caused negative improvement ratios (𝑄𝑄). Therefore, in the following comparison a border area of 20 pixels was excluded from the RMSE calculation in Equation

© Karl Bedrich - April 2017 156

4.14. Figure 4.14 compares 𝑄𝑄 for the synthetic pattern (1) and the EL image (2) together with the PSF (a), shown in Figure 4.11 for three common problems (a-c). For Unsharp masking, Richardson-Lucy and Wiener the control parameter (𝑛𝑛) was determined once on the base of the average value of the varied problem parameter.

Synthetic pattern EL image

a)

b)

c)

Figure 4.14: Improvement ratio (𝑸𝑸) for three varied problem parameters (a,b,c); left: results of synthetic pattern (1); right: results for EL image (2); both images were blurred with PSF (a) (Figure 4.11)

Problem a: The standard deviation of the PSF (𝜎𝜎𝐵𝐵) is not measured precisely. Whilst the actual 𝜎𝜎𝐵𝐵, used to blur the synthetic pattern and EL image, is 1.5 px, the PSF used to sharpen the blurred images varied between 1 and 2 px. Whilst Richardson-Lucy gives the best improvements

© Karl Bedrich - April 2017 157

for the synthetic pattern, it also shows highest sensitivity towards deviating 𝜎𝜎𝐵𝐵. In general, smaller 𝜎𝜎𝐵𝐵 will cause a smaller improvement decrease than 𝜎𝜎𝐵𝐵 which are measured too large.

Problem b: Noisy input image. The SNR of the blurry input image varied from 10 to 100. Whilst noise is practically invisible at SNR=100, images with SNR=10 can be considered noisy (Figure 4.13c,d). For the synthetic pattern, the improvement generated with Richardson-Lucy varies strongly. This is due to introduced noise and artefacts. It can be assumed that an added noise filter would reduce these variations. Only for the EL image both Wiener and unsupervised Wiener showed slightly higher improvements for lower SNR values.

Problem c: Noisy PSF. The PSF can include a certain noise level, depending on the measurement method. If this noise is not removed with for instance a functional fit, PSF noise can be tolerated to a large extent as Figure 4.14c shows. For SNR greater than 20, improvement remains unchanged.

4.5.6 SECTION SUMMARY

This section evaluated non-blind image deconvolution with a known point spread function (PSF). All the discussed deconvolution methods were able to partly restore image detail. Image deconvolution (sharpening) can introduce noise and artefacts and can overemphasize image gradients.

Therefore, image deconvolution cannot substitute best focus determination (Section 3.3). For successful image deconvolution, the PSF must be determined precisely and the blurred image should have a high signal-to-noise ratio (SNR). For the evaluated EL images, both Wiener and unsupervised Wiener generated highest improvement ratios.

© Karl Bedrich - April 2017 158

Lens Distortion Removal

Section 3.5 describes the measurement of lens distortion coefficients, focal length and image centre. These parameters are used to remove lens distortion using the Python interface of the C++ OpenCV framework as follows [64]:

1. Calculate size of the new image and adapt image centre and focal length to the image size (cv2.getOptimalCameraMatrix).

2. Generate a pixel indices array (𝑥𝑥𝑒𝑒,𝑦𝑦) mapping the uncorrected to the corrected positions (cv2.initUndistortRectifyMap).

3. Remap the image using 𝑥𝑥𝑒𝑒,𝑦𝑦 (cv2.remap).

Figure 4.15 shows as example of lens distortion removal.

a) Before correction b) After correction

Figure 4.15: EL image of a PV module before (a) and after removal of lens distortion (b); Distortions have been exaggerated for clarification

Perspective Correction

The alignment of a PV device within an image is essential for image comparison within and across different measurement setups. The required perspective transformation or homography matrix (𝐻𝐻) can be obtained either from a reference image using pattern recognition, or without reference from detected features within the image. The routine implemented in this work is shown in Figure 4.16.

© Karl Bedrich - April 2017 159

Figure 4.16: Schematic for correcting perspective of an EL image with and without reference image

The correction routine varies depending whether a reference image is available. A reference image is an EL image of the same device after perspective correction. If no reference image is available, a grid consisting of cell edges and busbars is detected in the image (step 1). The grid is then used to rectify the image by transforming every cell sequentially (step 2). Both steps are described in detail in Subsection 4.7.1. The

© Karl Bedrich - April 2017 160

resulting image can be used as a reference to correct further images. In this case, distinctive features in both images are matched (step 3) in order to calculate the homography (step 4). The applicability of this method depends on the homography quality. In case of a low quality homography matrix, image rectification is done using the four detected DUT corners (step 6). The right DUT orientation is then determined from the minimum of the magnitude difference between rectified and reference image (step 7). Perspective correction with reference image is further described in Subsection 4.7.2. Finally, remaining spatial deviation between the rectified image and its reference is minimised by using sub-pixel alignment (Section 4.8).

Documento similar