Developments in image processing have made possible the processing of images in a variety of forms. A variety of filtering methods are available to improve the quality of images including brightness, contrast, non-blurring of edges in the images etc. Conventional available filters reduce impulse-type noise in an image. However, the removal of noise adversely affects edges or corners which exist in an image. The existing techniques while alleviating the noise excessively in the acquired image introduces a severe blurring effect in the discontinuity or edge portions. Also, the noise smoothening is insufficient because the images are low light conditioned images.
Few images are low light conditioned or low contrast type images. An example of such image is a retinal image obtained from a retinal camera. The imaging is plagued by poor visibility conditions due translucent nature of the several tissues exist in the anatomical structure of the retina in the human eye. This amounts to the problem of spatially varying reduction of contrast due to stray radiations, which are scattered by the tissue material. Additionally, the acquisition of image would suffer from impulsive type of noise, which is caused by malfunctioning pixels in camera sensors.
Therefore, the present disclosure overcomes the above-mentioned problems by providing system and methods for tackling both the impulsive noise occur in the retina image due to malfunction of camera sensor and image contrast enhancement that suffered due to low light visibility conditions
The shortcomings of the prior art are overcome and additional advantages are provided through the provision of a method and a system as described in the description.
The present disclosure provides methods and apparatus to reduce impulsive noise and also correct the image against the attenuation due to air light condition by estimation of the required parameters using special type of filters.
The present disclosure involves applying widow size adapted weighted median filtering and guided image filtering in sequel to arrive at edge preserved retina image.
Accordingly, the present disclosure relates to a method for enhancing image quality. The method comprises obtaining an image and performing adaptive weighted median filtering operation on the obtained image to produce an intermediary image by removing impulse noise. Further, a guided image filtering operation is performed on the intermediary image to enhance contrast and preserve edges of the image.
Accordingly, the present disclosure relates to a system for image quality enhancement. The system comprises a median filtering module configured to perform adaptive weighted median filtering operation on the image to produce an intermediary image by removing impulse noise. Further, the system comprises a guided image filtering module configured to filter the intermediary image to enhance the contrast and preserve the edges of the image.
The foregoing summary is illustrative only and is not intended to be in any way limiting. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features will become apparent by reference to the drawings and the following detailed description.
The features of the present disclosure are set forth with particularity in the appended claims. The disclosure itself, together with further features and attended advantages, will become apparent from consideration of the following detailed description, taken in conjunction with the accompanying drawings. One or more embodiments of the present disclosure are now described, by way of example only, with reference to the accompanied drawings wherein like reference numerals represent like elements and in which:
The figures depict embodiments of the disclosure for purposes of illustration only. One skilled in the art will readily recognize from the following description that alternative embodiments of the structures and methods illustrated herein may be employed without departing from the principles of the disclosure described herein.
The foregoing has broadly outlined the features and technical advantages of the present disclosure in order that the detailed description of the disclosure that follows may be better understood. Additional features and advantages of the disclosure will be described hereinafter which form the subject of the claims of the disclosure. It should be appreciated by those skilled in the art that the conception and specific embodiment disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present disclosure. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the disclosure as set forth in the appended claims. The novel features which are believed to be characteristic of the disclosure, both as to its organization and method of operation, together with further objects and advantages will be better understood from the following description when considered in connection with the accompanying figures.
It is to be expressly understood, however, that each of the figures is provided for the purpose of illustration and description only and is not intended as a definition of the limits of the present disclosure.
The present disclosure relates to field of image processing. In particular, the present invention relates to image filtering techniques for enhancing image quality.
Accordingly, the present disclosure relates to a method for enhancing image quality. The method comprises obtaining an image and performing adaptive weighted median filtering operation on the obtained image to produce an intermediary image by removing impulse noise. Further, a guided image filtering operation is performed on the intermediary image to enhance contrast and preserve edges of the image.
In one embodiment of the present disclosure, the adaptive weighted median filtering operation and guided image filtering operation derive filter coefficients from the obtained image.
In another embodiment of the present disclosure, the adaptive weighted median filtering operation derives filter coefficients from the obtained image and the guided image filtering operation derives filter coefficients from the intermediary image.
In yet another embodiment of the present disclosure, the adaptive weighted median filtering operation comprises selecting a pixel of the obtained image and forming a window using all adjacent pixels around the selected pixel. Then, a pixel with maximum value and a pixel with minimum value in the window is determined. Further, value of the selected pixel is compared with the minimum pixel value and the maximum pixel value. Upon comparing, size of the window is increased by including all pixels adjacent to the window until the selected pixel value is determined to be within the minimum and the maximum pixel value. Alternatively, if upon comparison, the selected pixel value is determined to be within the minimum and the maximum pixel value, replacing the selected pixel value with a median of all the pixels values within said window.
In still another embodiment of the present disclosure, the filter coefficient is calculated by using an offset value.
In yet another embodiment of the present disclosure, the offset value is set as one of maximum pixel value of a selected window and median value of pixels of the selected window, upon determining mean removed guiding image pixel value to be positive. Alternatively, the offset value is set as one of minimum pixel value of the selected window, median value of pixels of the selected window and zero, upon determining the mean removed guiding image pixel value to be negative. Further, the offset value is set as zero, upon determining the mean removed guiding image pixel value to be zero.
In still another embodiment of the present disclosure, size of the selected window is fixed.
In another embodiment of the present disclosure, size of the selected window is determined for each pixel value by comparing the difference between variances of two consecutive odd size windows with a threshold value. Upon determining the difference to be less than the threshold value, selecting the selected window size as larger window size of the two consecutive odd size windows. Upon determining the difference to be greater than or equal to the threshold value, increasing size of the two consecutive odd size of windows by two and performing the above steps.
In yet another embodiment of the present disclosure, the size of window is initially set as 3×3.
Accordingly, the present disclosure relates to a system for image quality enhancement. The system comprises a median filtering module configured to perform adaptive weighted median filtering operation on the image to produce an intermediary image by removing impulse noise. The system comprises an adaptive data selection module configured to generate filter coefficients. Further, the system comprises a guided image filtering module configured to filter the intermediary image to enhance the contrast and preserve the edges of the image.
The adaptive weighted median filter 402 processes the inputted acquired image 406 and outputs an intermediate image 408. The intermediate image 408 is a smoothened image from which impulsive noise has been removed. In order to bring back the edges and discontinuities, the intermediate image 408 is input to the guided image filter 404. Simultaneously, the acquired image 406 is also input to the guided image filter 404. The guided image filter 404 derives filter coefficients from the acquired image 406 and processes the intermediate image 408 to output a final image 410. The final image 410 has enhanced contrast and also the edges of the image are preserved.
The adaptive weighted median filtering involves two implicit processes, wherein it selects the window size adaptively based on specific condition and also performs a weighted median filtering as described below.
An image is characterised as each pixel is correlated to its neighbouring pixels with either high or low correlation. This characteristic is fundamental to decide the degree of smoothness in the region or classify the various regions of the image. If the correlation is low, then it amounts to indicate as sharp discontinuity in the region or boundary of a region like edges or corners or regions are separated by two distinctive levels of contrast regions. On the other hand, if correlation is high, then it amounts to indicate the region is smooth. This indicator serves as a primary attributes in any image analysis algorithm. In order to exploit these characteristics, a local window of pixels is considered around a specified pixel with certain size. The size of the window determines the localness the dependency or correlation that exists between neighbourhood pixels.
Once the selected pixel is strictly within the minimum and the maximum value for the compute median med xk and weight ak Then, an intermediate image pixel is computed.
Repeat the above process throughout the image by sliding center image to next pixel in raster scan manner using original image. The output obtained by adaptive median filtering is intermediate image which is alleviated by impulsive type of noise.
The adaptive weighted median filtering performs the following operations.
First, all the variables are initialized at step 602. Initialization comprises setting a value for window wk formed around a selected pixel xk, where size of the window is defined by wsize=|wk|. The window is formed using all adjacent pixels around the selected pixel. Further, a weighting matrix ak is calculated as hsize vsize, where hsize and vsize are horizontal and vertical size of the input image. Then an acquired image (any low contrast image) is taken as input image and the image is represented as xij, where i=0 to (vsize−1), j=0 to (hsize−1). Further, an image scaling parameter alpha is initialized. The value of alpha can be between 1 and 3. In one embodiment, the value of alpha is taken as 1.
After initialization, at step 606, a pixel with maximum value and a pixel with minimum value are determined. At step 608, the value of the selected pixel is compared with minimum and maximum value pixel within the window.
Upon comparison, if the value of selected pixel is not within the minimum and the maximum value pixel within the window, the size of window is increased by including all pixels adjacent to the window. This step is performed until the value of selected pixel is within the minimum and the maximum value pixel,
Once the value of selected pixel is within the minimum and the maximum value pixel, the following steps are performed.
A median of the input image is calculated. Median need to be computed in each window only but each window is made to slide over all the pixels in image in a raster scan manner.
The median of image is represented as med xk. Once the median is calculated, weighting of the median value is calculated to obtain weighted median value ak as exp{−alpha*median xk−xi,j}, where alpha is image parameter selected on the basis context whether it is low light image or other type of image and xi,j is center pixel value of the window in the given image. Then, finally an intermediate image is calculated using the weighted median value of the image as medxk*ak. The intermediate image is smoothened image free of impulsive noise.
The guided image filtering process is an image filtering technique which takes two inputs, an input image that needs to be enhanced and filter coefficients for processing the image. In one embodiment, the filter coefficients are not fixed and are determined using a guiding image. In the present invention, the guiding image can either be the input image itself or the intermediate image obtained after an adaptive windowed median filtering enhancement process.
The general guided image filter comprises of following processes:
wherein,
Step 2: A constant variance threshold is pre-selected based on the context of input image (It is intermediate image obtained after an adaptive windowed median filtering) and compared with the actual variance inside window. If the variance inside window is greater than the variance threshold, then the center pixel of the window is retained as it is. Otherwise, the pixel value is multiplied with averaged ak value and added with coefficient bk value for that particular pixel.
The method in
The guided image filtering technique of the present invention is described as follows:
The first step in guided image filtering operation is initialization at step 802. Firstly, plurality of parameters is initialized. The parameters includes regularization parameter, epsilon (typical epsilon=0.1), image breadth, image width and a predefined threshold. In one embodiment, the predefined threshold is 0.0003=0.1*0.003. Then, the intermediate image, which is the image obtained from adaptive weighted median filter is input to the guided image filter. In one embodiment, the acquired image is also input along with intermediate image. After initialization, a white image W is formed of the same size as the input image.
At step 804, an image Y is formed by pixel wise squaring the input image. At step 806, a box filter is applied on W, Y and the input image separately.
At step 808, the above box filtered input image is scaled and pixel-wise squaring is done on the image Y with the corresponding pixels in the image W.
Then, a variance V is computed as normalized image. After that, filter coefficients ak and bk are computed using the acquired image or the intermediary image. These filter coefficients are computed for filtering the image. The computation of V, ak and bk is done pixel wise.
At step 810, a box filter is applied to obtain ak=Boxfilter (ak) and bk=Boxfilter (bk). Further, at step 812, average values of ak and bk are computed by performing pixel-wise operation.
At step 814, if V is greater than the predefined threshold, then the pixel values are not altered. Otherwise, if V is less than the predefined threshold pixel, an enhanced image is computed as follows:
x
i,j=χi,j
where
In an exemplary embodiment, a selected portion of the image can be enhanced with only guided image filtering and remaining portions of the image can be enhanced with the adaptive weighted median filtering followed by the guided image filtering.
The adaptive weighted median filter removes impulsive or camera sensor noise and the guided image filter retains the discontinuities or edges of the images.
In an embodiment, the filtering technique comprises an adaptive weighted median filter 402, an adaptive guided image filter 404 and an adaptive data selection module 902. In the illustrated embodiment, the filter coefficients provided to the guided image filter 404 are varied based on the various conditions set in the adaptive data selection module 902. Initially, an image is input to the adaptive weighted median filter 402. The adaptive weighted median filter 402 processes the inputted acquired image 406 and outputs an intermediate image 408. The intermediate image 408 is a smoothened image from which impulsive noise has been removed. In order to bring back the edges and discontinuities, the intermediate image 408 is input to the guided image filter 404. Simultaneously, the acquired image 406 is also input to the guided image filter 404. The guided image filter 404 derives filter coefficients from the acquired image 406 and the adaptive data selection module 902, and then processes the intermediate image 408 to output a final image 410.
Similarly,
In an embodiment, the edge preserving image enhancement technique is enhanced by two processes performed by the adaptive data selection module 902, namely data adaptive guided image filtering process and window size adaptive guided image filtering process.
The data adaptive guided image filtering process performed by adaptive data selection module 902 is formulated by introducing an offset value to the guiding image that is used as filter coefficient on basis of mean computation in the selected window. The required filter co-efficient ak is computed in adaptive manner with an introduction of offset value ξ as mentioned below:
Where ξ is offset is determined in the following different strategies.
Ii=guiding image at ith pixel value
win=selected window
where ΔI=(Ii−μ), mean removed guiding image pixel value
where ΔI=(Ii−μ), mean removed guiding image pixel value
where
In an alternate embodiment of the present disclosure, the offset value can be taken as zero. In this embodiment, the system of
In one embodiment of the present invention, the size of the selected window (win) can be predetermined and fixed.
In another embodiment of the present invention, the size of the selected window (win) can be varied based on each pixel location and image characteristics. For adaptive window size, an adaptive window size selection is performed by the adaptive data selection module 902. The window selection is performed by an adaptive procedure that exploits the local window variance such that the noise and smooth portion of the images are accounted.
In the embodiment, instead of choosing fixed window win while computing filter coefficients ak and bk, an adaptive procedure is used to select optimal size window win, out of several sizes of windows. In an exemplary embodiment, the windows is denoted by wini,where the size of window starts from 3×3. i.e. i=3, 5, . . . , etc. The window size is denoted by ixi with local window variance of wini denoted by σi, respectively.
The following steps are performed in adaptive way at each pixel location to arrive at an optimal window size wino
The present disclosure is not to be limited in terms of the particular embodiments described in this application, which are intended as illustrations of various aspects. Many modifications and variations can be made without departing from its spirit and scope, as will be apparent to those skilled in the art. Functionally equivalent methods and devices within the scope of the disclosure, in addition to those enumerated herein, will be apparent to those skilled in the art from the foregoing descriptions. Such modifications and variations are intended to fall within the scope of the appended claims. The present disclosure is to be limited only by the terms of the appended claims, along with the full scope of equivalents to which such claims are entitled. It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments only, and is not intended to be limiting.
While various aspects and embodiments have been disclosed herein, other aspects and embodiments will be apparent to those skilled in the art. The various aspects and embodiments disclosed herein are for purposes of illustration and are not intended to be limiting, with the true scope and spirit being indicated by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
2830/CHE/2011 | Sep 2011 | IN | national |
3740/CHE/2012 | Sep 2012 | IN | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/IB2012/054713 | 9/11/2012 | WO | 00 | 1/10/2014 |