The present invention relates in general to image processing, and in particular to image/video enhancement or restoration.
With the proliferation of digital media, the number of digital image/video systems is on the rise. In such systems, digital information is transferred between various components. However, digitized image/video data can be degraded when transferred.
As such, image restoration and enhancement techniques are applied in various image processing systems/platforms to restore or enhance degraded image/video data. Many image data restoration and enhancement approaches may be utilized. However, such approaches often require different systems/platforms. This results in high overall hardware size and cost as the different approaches cannot efficiently share similar image processing platforms/systems.
The present invention provides a method and system for processing a digitized image including multiple pixels. One embodiment involves determining a characteristic value for a set of image pixels, determining a classification for the set of pixels based on the characteristic value, accessing a dictionary including transforms, and retrieving transforms for the set of pixels based on said classification, and applying the transforms to the set of pixels to obtain output pixels.
The transforms may include weighting coefficients. Further, determining a characteristic value for the set of pixels may further include reordering the set of pixels based on a selected image processing type, and determining a characteristic value for the set of reordered pixels. Accessing a dictionary may further include accessing a dictionary including weighting coefficients for said image processing type, and retrieving weighting coefficients therefrom for the set of pixels based on said classification. Applying the weighting coefficients to the reordered set of pixels may further include applying the weighting coefficients to the set of pixels according to said selected image processing type to obtain weighted pixel values, and combining the weighted pixel values to generate output image pixels.
These and other features, aspects and advantages of the present invention will become understood with reference to the following description, appended claims and accompanying figures.
The present invention provides a method and system for a dictionary-based processing platform which may be utilized as a common platform for image/video enhancement and restoration, according to trained dictionary data.
In one embodiment, the dictionary-based processing platform provides a common procedure for image/video enhancement and restoration of image/video data under specific circumstance based on a dictionary implemented as a LookUp Table (LUT).
The size of the LUT is actively reduced. For a digitized image represented by a two-dimensional frame of pixels, a pixel reordering technique is implemented to reduce the size of the LUT.
As a result, the dictionary-based processing platform requires reduced overall hardware size for an image processing system by providing a common platform that may be shared with different image processing techniques, each such technique utilizing its own LUT in a dictionary (or a separate dictionary may be used per technique).
The above steps 21-26 may be repeated for each pixel in an image frame by using shifting a window for each pixel.
For each selected pixel p, the pixel p and its neighboring pixels in the window 33 are reordered into a set 34 according to their spatial distances and intensity deviations, relative to the pixel p according to a penalty function. The penalty function works inverse proportional to the distance between the pixel p and the center pixel of a window. A classification is determined for the pixels to lookup weighting coefficients 36 from a dictionary 35. The classification is obtained by quantizing the measure A based on the predefined table. The weighting coefficients are multiplied to the reordered pixels 34 to obtain an output image 37.
Several approaches for training data and implementing a dictionary efficiently are possible. An example based on a least mean square (LMS) optimization is provided below.
An example is described below for processing a distorted image 31 to be restored/enhanced. Each pixel p and its neighboring pixels in the window 33, belonging to a specific class and their corresponding pixels in the reference images are accumulated to compute weighting coefficients in a dictionary 35.
Let fcI(p) and fcR(p) represent the windows in a distorted input image and a reference image for a particular class c, respectively. The reference image comprises the undistorted image. Then, an output value fcO(p) for the pixel p located at p=[m n]T in the input image can be expressed as relation (1) below:
wherein fcI(i, p) is an element of the given window with a class c, centered at pixel p, and wc(i) is a set of weighting coefficients. The order i of elements in the window centered at pixel location p is determined by a reordering process for each image processing application.
An error ec at the pixel location p belonging to a class c in an image can be expressed as relation (2) below:
e
c(p)=fcR(p)−fcO(p). (2)
If the number of pixel locations belonging to the class c is NC, then the error in the class c is
Therefore, a total error for class c in the image window can be expressed as relation (3) below:
Then, the squared error is expressed as relation (4) below:
To minimize the squared error ec2, the first derivative of ec2 to each element wc(k), for kε[0, . . . , n−1] should be equal to zero as relation (5) below:
Rearranging terms of relation (5) above provides relation (6) below:
Rearranging terms of relation (6) above provides relation (7) below:
Relation (7) above can be expressed in a closed matrix form, starting with k=0, as relation (8) below:
When k=n−1, the matrix can be expressed as relation (9) below:
Therefore providing relation (10) below:
As such, the final LMS optimized coefficients for each class c can be obtained using an inverse matrix as relation (11) below:
In a detail enhancement image processing approach, the corresponding dictionary w can be obtained with an original (reference) image fR and a blurred (distorted) image fI. Similarly, reference fR and noise corrupted images fI are used to obtain a set of weighting coefficients which is a dictionary for a de-noising process. The above process can be used for other applications under different requirements such as contrast enhancement, super-resolution, and etc.
As is known to those skilled in the art, the aforementioned example architectures described above, according to the present invention, can be implemented in many ways, such as program instructions for execution by a processor, as logic circuits, as an application specific integrated circuit, as firmware, etc. The present invention has been described in considerable detail with reference to certain preferred versions thereof, however, other versions are possible. Therefore, the spirit and scope of the appended claims should not be limited to the description of the preferred versions contained herein.