Harnessing the Potentials of Image Extrema for Blind Restoration

Images contain a wealth of information. The advances in modern technology makes it easier to deal with different kinds of images. As a result, its applications have been increasing and spreading out to different fields of research. Despite these, degradations are unavoidable owing to the fact that the acquisition systems are imperfect and the environment can highly vary. One of the most studied type of degradation is the blur. The process of removing this from an image is known as image deconvolution, restoration or reconstruction. We illustrate its importance in the field of image processing with an example in Fig. 1. In Fig. 1(a), an image is acquired but degradations make it difficult for further processing. Reconstruction is applied and the resulting image in Fig. 1(b) can now be used in order to obtain an accurate representation of the original bar code as shown in Fig. 1(c). In essence, reconstruction is necessary as a preprocessing step for degraded images in order to extract more information from it. As a result, this has been studied in various fields of applications such as bar code interpretation (Choksi & van Gennip, 2010; Esedoglu, 2004; Yahyanejad & Strom, 2010), fingerprint identification (Cappelli et al., 2007), iris recognition (Kang & Park, 2007), face identification (Chu, Yang & Chen, 2010; Nishiyama et al., 2010; Xin et al., 2003), among others.


Introduction
Images contain a wealth of information.The advances in modern technology makes it easier to deal with different kinds of images.As a result, its applications have been increasing and spreading out to different fields of research.Despite these, degradations are unavoidable owing to the fact that the acquisition systems are imperfect and the environment can highly vary.One of the most studied type of degradation is the blur.The process of removing this from an image is known as image deconvolution, restoration or reconstruction.We illustrate its importance in the field of image processing with an example in Fig. 1.In Fig. 1(a), an image is acquired but degradations make it difficult for further processing.Reconstruction is applied and the resulting image in Fig. 1(b) can now be used in order to obtain an accurate representation of the original bar code as shown in Fig. 1(c).In essence, reconstruction is necessary as a preprocessing step for degraded images in order to extract more information from it.As a result, this has been studied in various fields of applications such as bar code interpretation (Choksi & van Gennip, 2010;Esedoglu, 2004;Yahyanejad & Strom, 2010), fingerprint identification (Cappelli et al., 2007), iris recognition (Kang & Park, 2007), face identification (Chu, Yang & Chen, 2010;Nishiyama et al., 2010;Xin et al., 2003), among others.
In the two-dimensional domain, degradation is mathematically modelled as (Lagendijk & Biemond, 2005): g(x, y)= f (x, y) * h(x, y)+n(x, y) (1) where the symbol * is the two-dimensional convolution process.On the other hand, the variables g(x, y), f (x, y), h(x, y), and n(x, y) represent the degraded image, original image,

10
blur point spread function (PSF), and noise, respectively.In most cases, it is assumed that noise is negligible and the model is simplified to a purely convolutional process.Thus, the vector-matrix form of the model in the image domain is: in the blur domain.The small letters are vectors that represent their respective quantities, which are lexicographically ordered.On the other hand, the capital letters are Toeplitz matrices constructed from their corresponding quantities.We adapt the terms image and blur domain as used in (He et al., 2009) to indicate the quantity being estimated and the direction to which the reconstruction cost function is being projected.In this way, derivations can be more succinct.Based on these equations, the unblurred image can be easily computed if the models for the degraded image and PSF are known.However, this is not the case in actual applications.Images cannot be modelled in a straightforward manner thus, their features and properties are usually utilized.For some applications, probability models are created based on the imaging conditions and type of scenes (Simoncelli, 2005).On the other hand, blurring functions can be mathematically modelled (Lagendijk & Biemond, 2005).Exploiting the characteristics of these models can decrease the complexity of determining the unblurred image.
The reconstruction of a degraded image undergoes the following major steps: blur detection and identification; reference PSF (RPSF) determination; deconvolution; and image quality assessment.In this chapter, we will explore the various characteristics of image extrema that make it useful in each step.These are tested on numerous natural color images wherein synthetic and actual blurs are also considered.Experimental data will illustrate the effectiveness of the methods.

Blur detection and identification
Reconstruction algorithms assume that blurs are always present.However, subjecting an unblurred image to this will only waste resources.To avoid this, preprocessing the image with a blur detection method is a must.Some methods are based on edge information (Chung et al., 2004;Marziliano et al., 2002;Rooms et al., 2002;Tong et al., 2004) or frequency domain characteristics (Aizenberg et al., 2002;n.d.;2006;2008).A downside to these is its restrictiveness towards image size and orientation.Aside from this, most edge-based methods are only limited to detection and are not capable of identifying the type of degradation.
Transform-based methods have promising results but are mostly applicable to non-Gaussian types since these exploit the null patterns.These limitations can be overcome by using the characteristics of image extrema (Chong & Tanaka, 2008;2009).This method can be applied to images with different sizes and orientations.Additional parameters or settings are not necessary and different types of degradations can be included.

Images and their extrema
The presence of blurs will lessen the perception of details in an image.The method herein will show that the loss of details is not only obvious in edges but also in the extrema.For this reason, we can generally call this as image extrema analysis (IEXA) (Chong & Tanaka, 2009).The plots in Fig. 2 show a row of pixel values where the extrema are marked.Fig. 2(a) is from the unblurred image while its Gaussian blurred version is shown in Fig. 2(b).These illustrate that there are more extrema values in an unblurred image than its blurred version.Thus, the presence of blur makes some extrema disappear resulting to a decrease in its number.Aside from this, the unblurred images have pixel values that are highly separated from each other.
In other words, the extrema are non-neighbouring pixels with distances that are only small.
On the other hand, the blurred images have more neighbouring extrema because the presence of blur flattened the image pixels.This results to extrema values that are more clustered with greater separation from each other.This is illustrated in Fig. 3.It can be seen that the minima and maxima values have the same behaviour in the presence of blur.Similarly, these characteristics can also be observed not only in the image's rows but also in its columns.

Detection and identification technique
Taking into account the above-mentioned observations, blur detection and identification can be accomplished by extracting the features and using a classifier.Consider a blur classification problem with K categories consisting of unblurred images and K − 1 types of blurs.For each extrema in an image, the distances and plateaus are counted by rows then by columns.In the context of this work, we define distance as the number of pixels between extrema while plateau as the number of consecutive extrema values.Let h S (i) be an extrema histogram of S with S ∈{ dn, dx, pn, px} and the letters i, d, p, n, and x stand for histogram index, distance, plateau, minima, and maxima, respectively.Since there are two possible directions in populating the histogram, S is appended with _c or _r to indicate column-wise or row-wise, respectively.For each extrema histogram, the feature values are defined as follows: 1. dispersion, disp S This reflects the closeness between extrema for distances.On the other hand, it also quantifies the number of standalone extrema or those that do not have neighbours for plateaus.
5. variance of the counts, σ 2 S This is the measure of count dispersion of a histogram.
In summary, there are 5 feature values for each S where the directions for counting the distances (or plateaus) are row-and column-wise in order to completely account the extrema behaviour.Thus, each image must have a total of 40 features.Finally, all quantities are normalized with their respective maximum feature values for the training and testing sets.
The blur classification is accomplished by using nearest neighbour (Cover & Hart, 1967).It is noteworthy to mention that other more sophisticated classifiers are also applicable that may yield better performance.In this section, the discriminative power of the proposed features will be demonstrated despite the simplicity of the classifier.Through the experimental data, it will be shown that high values of accuracy are attainable.

Experiment descriptions
The images in the experiments were coloured however, we prefer to use the green channel.This is based on the fact that cameras have twice as much green sensors than the red or blue and that computations will be lesser as opposed to using the three channels.As a result, the experiment starts with the extraction of green component for each image.A database of different coloured natural images is used.This is composed of 300 unblurred images with sizes that randomly varies between 640 × 480 and 480 × 640.These images are then synthetically blurred using (1).We consider the following models for the synthetic blurs (Banham & Katsaggelos, 1997;Lagendijk & Biemond, 2005): Harnessing the Potentials of Image Extrema for Blind Restoration www.intechopen.com1. Gaussian or atmospheric turbulence blur: where K is a normalizing constant and σ is the variance.This is generally used to model a variety of imaging devices as well as long-term atmospheric exposure.2. Horizontal motion (HM) blur: where L is the length of motion.The variables b and d represent the PSF coordinates.This models the effect on the acquired image when the camera or object is horizontally moving faster than the camera's exposure period.3. uniform out-of-focus (OOF) blur: where R is the blur radius.This blur is observable as defocus in images and is caused by the finite size of camera aperture.
The synthetically degraded images are subjected to extrema extraction and histogram creation.The required features can then be computed from the histograms.The training set consisted of 2,660 images that is composed of 133 images with their corresponding 20 variations.The testing set also has 20 variations for 167 images for a total of 3,340 images.
In the classification process, the Euclidean distances from the test image to all of the training images are first calculated.The training image with the minimum distance from the test image is considered as the nearest neighbour.The unknown object's class is then identified by the class of this neighbour.

Data and results
The blur detection performance in this section is compared with the work in (Tong et al., 2004), which detects blur with Haar wavelet transform (BDHWT).This involves the creation of an edge map based on a three-level decomposition of an image.The different edge types are then identified and counted by using a threshold and comparative conditions.The resulting ratio between the counts is used to detect the blur by comparing it with another threshold.
The accuracy of the detection algorithms are shown in Table 1.The NA in the table indicates not applicable since the method in (Tong et al., 2004) is only for unblurred, motion, and OOF blurs.It can be observed that accuracies are consistently higher when extrema analysis is used.Furthermore, the result after feature selection yielded a better performance than using all the features.
The classification accuracies for IEXA1 and IEXA2 are in Table 2.Only the accuracy for the unblurred images did not change after feature selection.Motion classification performance slightly decreased however, Gaussian and OOF have higher values.As a result, the decrease became negligible and the overall accuracy improved.
This section shows the effectiveness of using extrema features for blur detection and identification.Furthermore, the accuracy is further improved by feature selection.In the next section, maxima and RPSF will be presented.

RPSF: Characteristics and extraction methods
The previous section shows that maxima and minima can be exploited to determine and identify the blur in an image.In contrast, this section will only use maxima in order to determine a quantity that closely resembles the PSF that is present in an image.We call this quantity as reference PSF (RPSF) (Chong & Tanaka, 2010a).Its purpose is to yield a rough idea regarding the blurring function by exploiting the effect of blurs on the maxima values and locations.Additional uses of RPSF will be discussed in the next section.In comparison with the previous section, this does not require a classifier or image features.It is extracted from the given image assuming only a PSF size.

Motion blurs and maxima
The presence of blur has the effect of flattening the pixel values.As a result, the locations of the maxima values are influenced by the blurring function.In (Chong & Tanaka, 2010a;2011b) the extraction of RPSF has been tested on motion and OOF blurred images.However, the most commonly encountered type of blur is motion.Thus, more focus will be given to this type.In this case we will consider the general model of the motion blur given by: where the parameter θ represents motion angle in degrees.
Figure 4 shows images blurred by motion in different directions.Each degraded image consists of two maxima images based on the direction of scanning.These are shown as binary images in Figs.4(c)-4(f) where the white pixels indicate the maxima.It can be observed that the locations are influenced by the direction of motion that is present.As a result, the maxima locations tend to be arranged in the direction of motion.Considering a small window in the image where the maxima are present, it is obvious that this will give us an idea regarding the direction of motion.This is indicated by the larger pixel values located at the direction of motion.To detect the direction Hough transform has been utilized in (Chong & Tanaka, 2010b;2011a).In image processing, this is commonly used to detect lines and circles in binary images.For a straight line, all of its points will intersect in the parameter space [ (Gonzales & Woods, 2008)].The parameters (ζ and θ) are specified from the representation of a line in the PSF space domain: where parameter θ can be interpreted as the direction of motion.Since the PSFs are discrete and have sizes smaller than the image, the parameter space can be easily subdivided.For practical purposes, we set θ = {0 • ,45 • ,90 • , 135 • }.The accumulator for a certain combination of ζ and θ is incremented based on the point located at (b, d).The detection of the motion direction is accomplished by selecting the accumulator with the maximum number of points.

RPSF extraction
The RPSF can be extracted from motion blurred images by the following steps: 1. Scan the green channel of the image for local maxima locations in the horizontal and vertical directions.2. Determine the number of locations for each scanning direction and let Z be the total count.Determine the value of the constant ω that will normalize w such that: where (b, d) ∈{0, 1, . . ., s − 1}. 5. Create a binary matrix (o) that will mask out unnecessary values where t is the threshold that can be determined by the mean of the central and outermost elements of w. 6. Non-zero elements of o must satisfy the symmetry condition: where the matrix must satisfy the conditions in equations ( 15) and (17).
The detection process was also applied only to the green channels to minimize computational time.

Data and results
The data in Table 3 shows the accuracy of the method in detecting the direction of motion.It can be seen that horizontal and vertical motions have consistently high values for different PSF sizes.On the other hand, slanting directions (45 • and 135 • ) yielded lower values, which are fluctuating as the PSF size increases.These are attributed by the direction in scanning for the maxima.When the motion has the same direction as the scanning, the chances of preserving the blur's effects are higher.
These results show that RPSF is capable of giving us an idea of the PSF's characteristics using only the maxima of the degraded image.Although only one colour channel was processed, a high accuracy in detecting the motion direction was manifested in the experiment with various natural images.Due to these we can also use it for image deconvolution, which will be discussed in the next section.Table 3. Accuracy (%) in determining the motion direction with different PSF sizes.

Image deconvolution
In this section, we consider the deconvolution of a degraded image.This involves the estimation of f and h given only g.Since it is highly ill-posed, we use the alternating minimization (AM) technique.This enables the incorporation of information about f and h so that the solution is more stable.AM is a technique that is used in the minimization of a cost function involving two variables.In each cycle, one variable is set constant while the other is being solved.The roles are then reversed and the cycle repeats until a criterion is achieved.

Cost function
The estimation process involves the minimization of a cost function generally defined by: where J f is the image smoothness term and J ĥ is the PSF characterization term.The symbol • represents an estimated quantity.The first term is known as the fidelity term and is a basic term in most reconstruction cost functions.This was proposed in (Yang et al., 1994) wherein minimization was accomplished by projection-based blind deconvolution.The results showed good convergence properties and high flexibility for incorporation of prior knowledge.The image smoothness term is based on the concept of total variation (TV) proposed in (Rudin et al., 1992), which can be modelled by: The work of (Chan et al., 1999) added a variable to avoid its non-differentiability.Thus, the equation becomes TV in vector-matrix form was derived in (He et al., 2009) to make the minimization process simpler.We will be employing here the TV norm in equation ( 20) instead of the commonly used L 2 norm.This can be reformulated as where ε is an auxiliary variable, ε = |∇ f |.By following the fixed point scheme in (Chan & Wong, 1998), ε can be computed using the value from the previous iteration of the AM loop.
For simplicity, consider the gradients of the image in the x direction ∑ ∀(x,y)

211
Harnessing the Potentials of Image Extrema for Blind Restoration www.intechopen.comwhere .
Applying the concept of equation ( 22) to equation ( 23) where For practical purposes, we also implement the following conditions: From equation ( 24), let T x (ε)=V T WV.The same derivation will follow for the y direction.The result of using the two directions will be T(ε)=T x (ε)+T y (ε) and equation ( 24) can be rewritten as Thus, the image smoothness term will be where λ is the image regularization parameter.On the other hand, the PSF characterization term in (He et al., 2008;2009) uses a reinforcement blur estimation (RBE) framework.This assumes that real-life blurs satisfy a certain degree of parametric structure.Mathematically, this can be modelled by where t is the best-fit parametric PSF selected from a training set.This is highly dependent on the current estimate as well as the contents of the training set.As a result, failure of reinforced learning is possible when the estimate changes as the iteration progresses.In some cases, learning can also be erroneous when the selected model does not match the actual PSF.Furthermore, the learning set must be exhaustive to ensure an accurate model selection.To overcome these problems, RPSF can be used in its place.Thus, J( ĥ)=α ĥT T ĥ(ε) ĥ + β( ĥ − r) T ( ĥ − r) (28) where α and β are the regularization parameters and r is RPSF.The first term is the PSF smoothness term while the second is PSF learning term.The image and PSF smoothness terms have the same derivations.These are employed for the reason that the TV norm is known for edge preservation and robustness in the presence of noise.The use of RPSF will yield a rough idea on the blurring function using only the degraded image.As a result, the need for a training set is eliminated, the learning model is determined only once and it is independent from other estimated values.
The cost function that will be minimized is defined in equation 19 where J f is in equation 26 and J ĥ is in equation 28.As a whole, this is not convex however, iterative projection into f and ĥ will result in convex functions.Thus, we use the AM technique to solve the two unknowns.The first step is the partial differentiation of the cost function with respect to f where ĥ is set as constant: ∂J( f , ĥ) Equating this with zero will yield f at (n + 1)-th iteration: Reversing the roles will yield: ∂J( f , ĥ) ∂ ĥ = FT F + αT ĥ(ε)+βI ĥ − FT g + βr (31 where I is an identity matrix.Thus, To summarize, the AM technique involves solving equations 30 and 32 alternately until convergence or when the desired number of iterations is reached.

Regularization parameters
The computations of f and ĥ involve λ, α, and β, which are collectively called as regularization parameters.These are positive values that measure the trade off between a good fit and the regularity of the solutions.These can be accurately determined using many methods.However, these are usually computationally expensive and time consuming.To make the selection process less complicated, we will follow the concept used in (Sroubek & Flusser, 2003;You & Kaveh, 1996).The idea is based on the fact that the partial derivatives of the cost function are zero assuming that we are given the correct values of f and h.Thus equations 29 and 31 will become: respectively.The resulting equations are overdetermined system of linear equations (OSLE).
In general, an OSLE with E linear equations and N unknowns can be expressed as:

213
Harnessing the Potentials of Image Extrema for Blind Restoration www.intechopen.comwhere c is a vector of given values with c ∈ℜ E×1 , A is a matrix of coefficients with A ∈ℜ E×N , and χ is a vector of unknown variables with χ ∈ℜ N×1 .Using minimum sum of squared error approximation (Cadzow, 2002), the solution can be determined by: Based on equation 33, λ can then be computed by: where Similarly, α and β can be solved from equation 34: where In practical applications, the correct values of f and h are unknown.The estimated values, f and ĥ, may be utilized in lieu of the unknown correct values then equations 37 and 38 can be used to compute approximate values of the regularization parameters.In this case, parameter tuning is done iteratively with a stopping criterion that may be based on the maximum PSNR; a fixed iteration count; or the minimum cost function, among others.

Experiment descriptions
The experiment in this section will investigate the effects of integrating the RPSF during the deconvolution of synthetically blurred images.An unblurred image shown in Fig. 5(c) has a size of 60 × 60 pixels.This is synthetically blurred with a PSF defined by equation 10 with the following parameters: L ∈{3, 5, 7} and θ ∈{0 • ,45 • ,90 • , 135 • }.The unblurred image and PSF are known thus, the results can be easily monitored and verified.In this way, a reference can be established for cases when both the unblurred image and PSF are unknown.
The regularization parameters are computed for 50 iterations.The selection is based on the maximum peak signal-to-noise ratio (PSNR) in dB, which can be computed as follows: where MSE is defined by and b is the number of bits used to represent a pixel value.The selected parameters are shown in Table 4. Using these values, f and ĥ are computed for 20 iterations.The initial estimated image is equated to the given degraded image while the PSF is composed of positive real random numbers.
The quality of the estimated image is quantitatively evaluated by computing its PSNR.On the other hand, the estimated PSF is compared with the actual PSF by mean squared error (MSE).To demonstrate the effectiveness of using the cost function in equation 26, three techniques are compared.These have cost functions wherein the image term uses TV while the PSF term is varied.The first technique uses TV on PSF as proposed in (Chan & Wong, 1998).The second uses reinforced blur estimation (RBE) as in (He et al., 2009) with a training set containing the same number of parameters as previously mentioned.The third, maxima-based deconvolution (MXB), uses the cost function in equation 28.

Data and results
The PSNRs of the estimated images with various motion directions and PSF sizes are shown in Table 5.It can be observed that MXB values are mostly higher in contrast with the other methods.Furthermore, the horizontal and vertical directions tend to have higher PSNRs than the diagonal motions.This is attributed by the fact that the gradients used in the TV prior are also in the same directions.The PSF estimation errors for the three methods can be compared in Table 6.The lower values demonstrate the method's effectiveness in estimating the PSF in different conditions.Notice that when the error is low in Table 6, a high PSNR in Table 5 can be observed.A sample image reconstructed by MXB is shown in Fig. 5.It shows the method's capability in recovering the details of the image.
This section shows the effects of integrating the RPSF during image deconvolution.The PSF smoothness and learning terms resulted to a lesser PSF estimation error with a larger PSNR value.Furthermore, we can see the importance of monitoring the image quality.This is very useful in selecting the regularization parameters as well as the estimated image.In the next section, we consider the case wherein the unblurred image is unknown making it impossible for the computation of the PSNR.

Quality assessment
As mentioned in the previous section, image reconstruction is highly ill-posed.This results to the solution being solved through an iterative method wherein several images and PSFs will be produced.In most cases, the image quality is given more priority.Comparison between them can be easily achieved if the unblurred image is known or given.However, this is not the case in practical applications.It is, therefore, crucial to establish a method of evaluating an image that is independent of its unblurred version.
The most common approach of evaluating an image is through a measure based on the edges.An image is composed of different types of edges whose number is affected by the type of blur that is present.Haar Wavelet Transforms (HWT) can discriminate these edges and can be used for blur extent measurement as proposed in (Tong et al., 2004).Another technique is to employ edge active measure on 8 × 8 blocks of the wavelet coefficients as proposed in (Xin et al., 2003).A downside to these is that it requires a transformation with at least three levels of decompositions.Thus, it greatly increases the computational cost when considering an iterative reconstruction method.A technique that does not require a transform has been proposed in (Marziliano et al., 2002;2004) where the blur metric is computed using the edge points and their local extrema.The metric's accuracy is dependent on the edges that can be detected.However, when blur increases edge points will decrease and in turn result to inaccurate values.
In (Li et al., 2005) selection of the best deblurred image with Wiener filter is achieved by kurtosis minimization.It has been shown that the results are similar to those of PSNR maximization.However, it can be empirically shown that this is not consistent in natural images (Chong & Tanaka, 2011c).A different objective criterion using variance and kurtosis will be discussed next.

Maxima and image quality
The variance and kurtosis will be considered for the characterization of images.The variance can be computed by Harnessing the Potentials of Image Extrema for Blind Restoration where f is the mean of the image and N represents the total number of pixels.On the other hand, kurtosis can be represented by These quantities can be used to describe the distribution of the values for a given image.To demonstrate this, the unblurred image shown in Fig. 6 is synthetically blurred with OOF.
The PSF sizes are {7 × 7, 5 × 5, 3 × 3} and these are indexed by an integer number where the smallest index represents the largest size.Thus, a large index number indicates a smaller PSF size and an image with better quality.For each image, the maxima values are scanned from left to right and from top to bottom.The variance and kurtosis are computed using the pixel and maxima values.This means that every degraded image will have four quantities.Fig. 7 shows that the variance of the pixel values monotonically increases as the size becomes smaller or as the index becomes larger.This trend is also the same for the kurtosis of the maxima values.
Although kurtosis of the pixel values decreased, this trend is not monotonic.Therefore, the decrease in blur can be described by the increase of pixel variance (v p ) and maxima kurtosis (k m ).The subscripts are used to indicate the values that are used i.e., p for pixel values and m for maxima values.These characteristics are empirically proven to be consistent in many images as will be shown by the data.Due to this, the trends of v p and k m can be used for the selection of the regularization parameters and the deblurred image.For a method with n iterations, v p and k m will be composed of a set with n values.Each set is first scaled such that the minimum value is zero and the maximum is one.The average (q) for each iteration is then computed as Thus, the criterion for selection is the maximum q among the n values.

Experiment descriptions
There are three experiments that are being considered here.The first will investigate the effect of the different PSF sizes to the distribution of the pixel and maxima values.The latter are extracted by scanning the green channel from left to right and from top to bottom.The variances and kurtoses are compared for different conditions (Cond) as shown in Table 7.
The subscript z ∈{ 1, 2, ..., 4} is the index of the PSF support size where z = 4 indicates an unblurred image.The support sizes are {7 × 7, 5 × 5, 3 × 3}.There are 300 unblurred images with natural scenes that may be 640 × 480 or 480 × 640 pixels in size.Synthetic blurs include horizontal motion (HM), vertical motion (VM), and OOF.The second experiment is the evaluation of the parameter selection and the resulting reconstructed images.For practical purposes, the image size is 60 × 60 and degradations are the same with the previous experiment but the support sizes are {3 × 3, 5 × 5}.The regularization parameters are computed for 100 iterations using the PSF sizes {3 × 3, 5 × 5, 7 × 7}.RGB images are used so that subtle changes in the images can be seen easily.As a result, the modified cost function in (Chong & Tanaka, 2010b) is used.The final PSF size and parameters are selected using the maximum value of q.These values are then used for the reconstruction of the degraded image computed for 50 iterations.Although this experiment deals with RGB, the images are evaluated using only the green channel.
The third experiment involves the selection of the motion blur parameters, L and θ, through image deconvolution with Wiener filter.We follow the procedure in (Li et al., 2005) where deconvolution is computed over a set of parameters.In this experiment, the values are L = {3, 5, 7, 9, 11, 13, 15} and θ = {0 • ,45  Table 8.Condition consistency with v p and k m (%).

Data and results
Table 8 shows the consistency of specific conditions using image pixels and maxima values.
The consistency here refers to the trueness of a condition when tested to a number of images.The letter s indicates sets where each set consists of four images with increasing PSF size.
Cond A shows that all v p of the degraded images are lower than the unblurred image.This means that a high v p is expected in the absence of blur.The same is observable for k m as shown by the data for Cond B. The monotonicity of the increase in v p is evaluated by Cond C. The percentage indicates that this is true for all the tested images.This shows that the v p value consistently increases as the PSF size decreases.On the other hand, monotonicity of k m is not true for all the tested images.However, these only affect a few images as manifested by the high consistency values in row Cond D. With reference to the conditions in Table 7, it can be observed that these indicate that both v p and k p will increase as blur decreases.Since their behaviour are similar, integration will be easier in order to produce a single quantity that can reflect an image's quality.
For the second experiment, the PSF size and regularization parameters are chosen by the maximum value of q.This is shown in Table 9 for each PSF size.The emphasized number is the maximum considering a certain degraded image.The underlined number indicates correct identification of the PSF size.Based on the emphasized values, the resulting regularization parameters are also shown in Table 9.It can be observed that when s = 3, the correct size is selected for those blurred with VM and OOF.For HM, the selected size is larger than the actual.In contrast, this reverses when s = 5.Only HM is correct while VM and OOF have smaller sizes than the actual.The parameters are employed during reconstruction and the image quality measures are computed and shown in Table 10.The PSNR and q values are compared when one of these is the maximum.The rows with emphasized values are those with correct PSF sizes.It can be seen that when the size is incorrect the PSNRs are approximately the same.These are consistent despite the fact that when s = 3 the selected size is larger and when s = 5 the size is smaller.The same can be observed with the values of q except for VM when s = 5.On the other hand, when the size is correct both values (PSNR and q) are different.If we consider maximum PSNR then q is smaller and vice versa.To illustrate the difference in values, the corresponding images, when s = 3, are shown in Fig. 8.It can be observed, from the first row in Fig. 8, that reconstruction with an incorrect PSF size will yield images with a higher contrast.The second and third rows used correct PSF sizes.The reconstructed images show more details than the degraded versions.The difference is with the perceptible focus of the image.When PSNR is maximum the image appears smoother.However, when q is maximum the image appears sharper.The same observations are true even if the blur types are different.Thus, a q with higher value indicates a sharper image and low indicates a smoother image.This is due to the fact that the statistical distributions of the pixels and maxima are taken into consideration.
The data in Table 11 show the selected parameters using different criteria.It can be observed that only the angle, θ = 0 • , are correctly identified by the maximum PSNR criterion.In contrast, θ = 90 • and L = 3 are selected by minimum k p .Finally, for maximum q all parameters are correct for small PSFs while only θ are correct for larger PSFs.
This section shows the effects of blur on the pixel variance and maxima kurtosis.The values are highest when the image is unblurred and these decrease as the PSF size increases.A new criterion for comparing images is also discussed.This does not require the unblurred image, which makes it useful for the reconstruction of images.By exploiting the pixel variance and maxima kurtosis, perceptible focus can be quantized.Higher values have sharper images while lower ones have smoother images.RPSF can also be used during the estimation of the unblurred image.In section 4 the classical cost function for deconvolution is reformulated.It contains the terms for fidelity, image smoothness , and PSF characterization, which consists of the PSF smoothness and learning terms.The smoothness terms are included due to the fact that images as well as piecewise PSFs have edges.The PSF learning term integrates the RPSF during deconvolution.In this way, RPSF provides a way of reinforcement without the need for a training set.During the estimation process, RPSF also eliminates the dependence of learning on the current computed PSF.The cost function requires three regularization parameters that can be solved using the OSLEs.All equations have been expressed in the vector-matrix form to facilitate easier derivations.The resulting data show consistently high PSNRs for different motion directions and PSF sizes.This means that the image quality are improved.Furthermore, the MSEs of the PSFs are also very low, which indicates a high accuracy in estimating the PSF.
Lastly, a method to compare images is discussed in section 5. Iterative methods for deconvolution will naturally result in several estimated images and PSFs.When image quality is given more importance, an assessment technique is needed to choose the best one.Classical methods require the unblurred version however, this is not applicable in practical applications.Thus, the pixel variance and maxima kurtosis have been exploited to overcome this problem.It has been shown that both quantities are low when the blur is high and these monotonically increase as the blur decreases.Their combination resulted to a single value that can be used to compare several images.Experimental results have shown that this is high when an image is sharp.In contrast, when the value is low the image is smooth.
The extrema considered in this chapter are extracted by horizontal and vertical scanning.The effects of using other scanning directions are still unknown.Additionally, the degraded images are all invariantly blurred.This means that the PSF is assumed to be uniform all throughout the image.In practical applications, the variant case is also possible.The results for this case remain an open problem at this time.Finally, the image comparison technique is capable of differentiating images based on the sharpness of the details without the unblurred image.However, it cannot indicate the presence of distortions such as ringing and color artefacts.Quantizing these is not only important in image deconvolution but also in other applications of image processing.Aizenberg, I., Butakoff, C., Karnaukhov, V., Merzlyakov, N. & Milukova, O. (2002).Type of blur and blur parameters identification using neural network and its application to image restoration, Proceedings of the International Conference on Artificial Neural Networks (ICANN2002), Madrid, Spain, pp.1231-1236.Aizenberg, I., Butakoff, C., Karnaukhov, V., Merzlyakov, N. & Milukova, O. (n.d.).Blurred image restoration using the type of blur and blur parameters identification on the neural network, Proceedings of the SPIE, Vol.4667.Aizenberg, I., Paliy, D., Moraga, C. & Astola, J. (2006).Blur identification using neural network for image restoration, Proceedings of the International Conference 9th Fuzzy Days, Dortmund, Germany, pp.441-455.

224
Image Restoration -Recent Advances and Applications www.intechopen.com

Fig. 2 .
Fig. 2. Sample plots of extrema values in a row.

Fig. 3 .
Fig. 3. Example of an unblurred image with its Gaussian blurred version.
Fig. 4. Blurry images and their maxima locations.

221
Harnessing the Potentials of Image Extrema for Blind Restoration www.intechopen.comindicate the efficacy of the method.An advantage of this is that it can reveal the nature of the embedded PSF using only the degraded image.It does not require a training set to determine the direction of motion.

Table 1 .
Comparison of blur detection accuracy.

Table 2 .
Comparison of blur classification accuracy.

Table 5 .
the Potentials of Image Extrema for Blind Restoration Comparison of the image PSNR (dB)for different methods.

Table 6 .
Comparison of the PSF estimation error.