Method and apparatus for sharpening a grayscale image
AssigneeImage Processing Technologies LLC
InventorsNikos Asimopoulos, Alexander M. Barry, Morton Nadler
Life of this patent
Estimating the term…
Abstract
A digitized image is treated by an electronic system where pairs of pixels within a convolution window are compared, and for those differences which are greater than a preselected, or automatically calculated, threshold, a black or white vector is counted, respectively, depending on whether the more centrally located pixel is darker or lighter than the outer pixel. The central pixel is replaced with an enhanced value, if it is surrounded by a majority of significantly lighter or darker pixels, as indicated by the black and white vector counts. Weighting factors allows for custom tailoring the enhancement algorithm to suit the need of the particular image.
Claims20
A process for enhancing a digital grayscale image, comprising the steps of:
- (a) selecting a digital grayscale image, said image comprising a matrix of pixels, each of which has a characteristic grayscale value associated therewith;
- (b) applying a convolution window to said image, said convolution window having an odd number of pixels therein including a central pixel Pc and neighboring pixels Pn;
- (c) identifying the central pixel within said convolution window;
- (d) comparing the characteristic grayscale values of a plurality of selected pairs of pixels within said convolution window, said comparing step for each selected pair of pixels yielding a vector comprising an indication of the magnitude of the change in value between said selected pair of pixels and an indication of the direction of said change in value;
- (e) comparing said magnitude of each said selected pair of pixels to a threshold value, and if said magnitude is less than or equal to said threshold value, selecting the next of said selected pairs of pixels within said convolution window, and repeating steps (c) through (e), until all of the selected pairs in said convolution window have been compared and thereupon, proceeding to step (h);
- however
- (f) if said magnitude is more than said threshold value, counting the number of each of said vectors whose magnitudes have surpassed said threshold value;
- (g) repeating steps (c) through (f), until all of the selected pairs in said convolution window have been compared;
- (h) adjusting the grayscale value of said central pixel as a function of the number of vectors counted;
- (i) outputting the adjusted value of said central pixel;
- and
- (j) stepping said convolution window to the next pixel, and repeating steps (c) through (j), until all the pixels of said image have been processed as central pixels.
A method of enhancing a grayscale image, comprising the steps of:
- (a) inputting a grayscale image into an electronic system, said grayscale image comprising a set of pixels, each of which has a characteristic image value;
- (b) imposing a convolution window on the first pixel of said image, said convolution window comprising a square matrix of an odd number of pixels, the central pixel of said convolution window being said first pixel;
- (c) designating the central pixel in said window as the central pixel Pc;
- (d) designating the remaining pixels in said window as neighboring pixels Pn;
- (e) determining the difference in value between a selected pair of pixels within said window according to the formula
- D=(Pn1−Pn2)
- where Pn1 is one of the neighboring pixels Pn of a sequence of pixels in said convolution window selected seriatim and Pn2 is either another neighboring pixel Pn or said central pixel Pc;
- (f) determining the sign of said difference;
- (g) determining the absolute value of said difference according to the formula
- AD=|Pn1−Pn2|
- (h) comparing the absolute value of said difference with a threshold value S;
- (i) if said absolute value is more than said threshold value S, proceeding to step (k), or
- (j) if said absolute value is less than or equal to said threshold value, the steps of returning to step (e), selecting seriatim the next pair of pixels, and repeating steps (f) through (j), unless all of the selected pixel pairs in said convolution window have been selected, whereupon proceeding to step (m);
- (k) incrementing the count of either a positive sign sum or a negative sign sum, respectively, according to the sign of said sign of said difference;
- (l) returning to step (e), selecting seriatim the next pair of pixels, and repeating steps (f) through (k), unless all of the selected pixel pairs have been selected, whereupon proceeding to step (m);
- (m) determining the difference between said positive sign sums and said negative sign sums;
- (n) adjusting the grayscale value of said central pixel as a function of the difference of said positive and negative sign sums;
- and
- (o) stepping said window to the next pixel in said image, pixel by pixel and row by row;
- and
- (p) repeating steps (c)-(o) until every pixel in said image has been designated as a central pixel.
A system for enhancing a digital grayscale image, comprising:
- means for inputting a digital grayscale image into said system, said image comprising a matrix of pixels, each of which has a characteristic value;
- means for applying a convolution window to said image;
- means for selecting the central pixel Pc from the neighboring pixels Pn within said convolution window;
- means for enhancing said central pixel, said enhancing means comprising:
- (a) means for comparing the characteristic values of a plurality of selected pairs of pixels within said convolution window, said comparing means for each selected pair of pixels yielding a vector comprising an indication of the magnitude of the change in value between said selected pair of pixels and the direction of said change in value;
- (b) means for comparing said magnitude of each said selected pair of pixels to a threshold value;
- (c) means for counting the number of vectors for all of said plurality of selected pairs which surpassed said threshold value for each said direction of change;
- (d) means for adjusting the value of said central pixel as a function of the difference in the number of vectors for each said direction;
- (e) means for transfering the adjusted value of said central pixel to a suitable location to be utilized;
- and
- (f) means stepping said convolution window to the next pixel for adjustment thereof;
- and
- means for ending said process.
Dependencies are inferred from the claim text.