EP-4738277-A2 - HIGH EFFICIENCY DYNAMIC CONTRAST PROCESSING
Abstract
A system for enhancing image contrast in a digital image having a processor and memory for storing programmed instructions to process images to provide perceptual high contrast output. Pixel intensities are calculated by a weighted combination of a fixed number of static bounding rectangle sizes. This is more performant than incrementally growing the bounding rectangle size and performing expensive analysis on resultant histograms. To mitigate image artifacts and noise, blurring and down-sampling are applied to the image prior to processing.
Inventors
- STEINBERGER, ROBERT A.
- FLEMING, SPENCER
Assignees
- Freedom Scientific, Inc.
Dates
- Publication Date
- 20260506
- Application Date
- 20230309
Claims (9)
- A system for enhancing image contrast in a digital image, the system comprising: a processor; and a memory to store instructions that, when executed by the processor, cause the system to: create a grayscale version of the image comprising a plurality of pixels each having an intensity; establish a threshold contrast quality value indicative of a minimum range of intensities in determining areas of enhancement in the image for a desired enhanced contrast; for each pixel, pixel n , in the grayscale version: establish an array of fixed-dimension rectangles having a limited number of fixed-dimension rectangles within the array, where each fixed-dimension rectangle defines an area of pixels surrounding pixel n , each pixel has an intensity value, and where each fixed-dimension rectangle has larger dimensions than a previous fixed-dimension rectangle in the array; generate a first range defined by a minimum intensity value and a maximum intensity value of the pixels in a first fixed-dimension rectangle in the array of fixed-dimension rectangles and saving the first range; compare the first range and the threshold quality value to determine if the first range is equal to or greater than the threshold contrast quality value, and if equal to or greater than the threshold, skipping additional processing of the pixel n and resuming processing for a next pixel in the grayscale version at the step of establishing an array of fixed-dimension rectangles; generate a second range between a maximum intensity value and a minimum intensity in a second, larger fixed-dimension rectangle within the array when the first range is below the threshold contrast quality value; repeat steps of comparing and generating a next range for a next fixed-dimension rectangle in the array until the next range equals or exceeds the threshold contrast quality value or until each individual fixed-dimension rectangle within the array has been processed by the method whereby further processing of the pixel is abandoned thereby avoiding CPU-intensive latency; repeat the steps of establishing the array of fixed-dimension rectangles, generating the first range, comparing the first range and the threshold contrast quality value, generating the second range, and repeating the steps of comparing and generating the next range for each pixel in the grayscale version of the digital image; form a combined range image of pixel intensity ranges that exceed the threshold contrast quality value; and generate a higher contrast image from the pixel intensity ranges obtained for each pixel in the grayscale image by: establish an S-curve having original pixel intensity values along an x-axis and output intensity values along a y-axis, the S-curve having a predetermined shape between a maximum output intensity and a minimum output intensity; and for each pixel in the grayscale version: divide the pixel intensity ranges obtained for each pixel in the grayscale image by two to obtain a quotient and setting the quotient as the center of the slope in the S-curve; and apply the S-curve to the grayscale version of each pixel with the quotient for each pixel as the center of the slope and outputting the output intensity value for the higher contrast image corresponding to the original pixel intensity on the S-curve.
- The system of claim 1 further comprising a central processing unit and the processor is a parallel processor operating in parallel with the central processing unit.
- The system of claim 2 where the parallel processor is a graphics processing unit (GPU), a field programmable gate array (FPGA), or a digital signal processor (DSP).
- The system of claim 1, wherein the instructions further cause the system to apply a blur filter to the combined range image prior to generating the higher contrast image.
- The system of claim 1, wherein the instructions further cause the system to use either a logistic curve or a linear curve for the predetermined shape of the S-curve.
- The system of claim 5, wherein the predetermined shape of the S-curve is a logistic curve, the method further comprising the step of applying a bias offset to the center of the slope in the S-curve, whereby the bias offset is user-selected and where a negative bias offset causes the resultant higher contrast image to be lighter and a positive bias offset causes the resultant higher contrast image to be darker the instructions further cause the system to weight the interpolated final pixel intensity ranges towards a predetermined target range.
- The system of claim 1, where the predetermined shape of the S-curve is a logistic curve, where the step of establishing the S-curve further comprises: setting a user-defined slope value constant, slope, (31) used in: y = 1 1 + e − k x − x 0 , where: x 0 = Min + Range / 2 , which is a midpoint between the minimum intensity level, Min, defining the range and the maximum intensity level, and k = Slope Range , Range = pixel intensity range; and adjusting the slope value constant to a higher slope value for a sharper higher contrast image or to a lower slope value for a less sharp higher contrast image.
- The system of claim 7, wherein the instructions further cause the system to split the calculations of the minimum and maximum pixel intensities into two passes where a first horizontal calculation value is used to calculate a vertical value.
- The system of claim 1, wherein the instructions further cause the system to: convert the image to a hue, saturation and luminosity, HSL, color domain before the step of creating the grayscale version, where the step of generating the higher contrast image includes the step of modifying the luminosity of the HSL color domain.
Description
PRIORITY CLAIM This non-provisional patent application claims priority to a U.S. Non-Provisional Application No. 17/691,791 filed on March 10, 2022. BACKGROUND OF THE INVENTION Electronic magnification devices use a combination of optical and digital magnification to allow access to video information for low vision individuals. Digital magnification of real-world images and video blurs the edges of the content. Further, any objects that have low contrast with the background are difficult to see. This effect becomes worse with magnification. Image processing, specifically contrast and edge detection are possible but often require intensive processing not available on mobile devices. 1. FIELD OF THE INVENTION The described embodiments relate generally to image processing. Specifically, the described embodiments relate to systems and methods for qualitatively enhancing perceived contrast and edge detection on mobile devices with limited image processing affordances. 2. DESCRIPTION OF THE RELATED ART Contrast ratio in general is an important aspect of image adjustment. It is the ratio of luminance of the lightest shade (ultimately white) to that of the darkest (e.g., black). From a utilitarian perspective, high contrast imagery is preferrable to clearly identify elements and boundary edges within an image. Images having a higher contrast level generally display a greater degree of color or grayscale difference than low contrast images. Dynamic Contrast Processing is all about finding getting the "best" separation of the dark and light elements of an image. To do this we operate solely on the grayscale image. Every grayscale pixel in the image is replaced in a new image with a value found by traversing an S-curve graph representing the contrast change. For non-dynamic processing, the values and shape of the graph are constant across all pixels of the image; however, for dynamic processing the values and shape of the graph are specific to localized information about each pixel as it is examined. The definition of "best", the speed of the computation, the type of curve, and the parameters that define the curve are all variables that can be used to customize the algorithm. The highest detailed model of the "best" separation would find the area around the pixel in which the histogram contains enough pixels to clearly differentiate foreground from background pixels. This can be observed by having a histogram with a clear bimodal graph. The smaller peak would be assigned as the foreground and the larger peak would be assigned as the background. The common algorithms associated with finding contrast in images of text choose an area that is large enough to contain a single character of text. It is possible that these approaches eliminate outliers by combining buckets from the left and right side of the histogram simultaneously. When the number of pixels in a bucket is too low, it would be added to the next bucket in the direction travelled until the midpoint of the histogram is reached. A problem with this approach is that the histogram area when convolved across every pixel in the entire image may not be bimodal. This usually results in running the full scan again with a larger area in hopes that the larger area would have a bimodal representation. Alternatively, for speed, a rule, such as midpoint, may be applied to split the area of the histogram between low and high to create approximate foreground and background peaks to use. Using the repeat approach is slow, and using the approximation usually results in bad data and noise in zones of a consistent color. The net result of the approximation approach is an image that has good information around the edges of higher contrast, but the color either flips or becomes noisy (random pixels of either foreground or background color) as the contrast becomes similar. Text or objects that are larger than expected in either approach usually result in images showing hollow objects or text with rough inside borders. To improve the output quality, we grow the rectangle of interest. Accordingly, histograms would need to be calculated at each pixel for multiple rectangles. Given these histograms, each would need to be adjusted and analyzed to find the bimodal peaks. These steps require both a large amount of memory and a large amount of time. There are ways to reduce the time by maintaining a histogram in an integral image (also known as a summed area table). A serial pass through each pixel in the image is required to accumulate values for all pixels. There are ways to get some parallelization of this, but these methods tend to add memory and require many passes. It requires memory to store a histogram for every pixel containing all values for the histogram for all pixels up to and including the current pixel. Neither the analysis of histograms nor the generation of integral images is GPU friendly. There are techniques that increase the parallelism at the cost of multiple passes and