DE10026700B4 - Method of automatically trimming a scanned image - Google Patents
Method of automatically trimming a scanned image Download PDFInfo
- Publication number
- DE10026700B4 DE10026700B4 DE2000126700 DE10026700A DE10026700B4 DE 10026700 B4 DE10026700 B4 DE 10026700B4 DE 2000126700 DE2000126700 DE 2000126700 DE 10026700 A DE10026700 A DE 10026700A DE 10026700 B4 DE10026700 B4 DE 10026700B4
- Authority
- DE
- Germany
- Prior art keywords
- pixel
- values
- boundary
- pixels
- thresholds
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/387—Composing, repositioning or otherwise geometrically modifying originals
- H04N1/3872—Repositioning or masking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/46—Colour picture communication systems
- H04N1/56—Processing of colour picture signals
- H04N1/60—Colour correction or control
Abstract
Verfahren
zum automatischen Zurichten eines abgetasteten Bildes, umfassend
einen interessierenden Bereich und ein Hintergrundbild, wobei das
Bild Pixel mit jeweils einem zugeordneten R-, G- und B-Wert aufweist,
gekennzeichnet durch die folgenden Schritte:
(a) Bestimmen
der Koordinaten von Grenzpixeln für ein erstes abgetastetes Bild,
wobei die Grenzpixel an den interessierenden Bereich angrenzende
Pixel des Hintergrundbilds sind, die ein Bild in dem interessierenden
Bereich (IB-Bild) umschreiben, und ein Pixel dem Hintergrundbild zugeordnet
wird, wenn seine Standarddifferenzen kleiner als ein vorgegebener
Wert sind, wobei seine Standarddifferenzen die Differenzen seiner
R-, G- und B-Werte von vorgegebenen Standardwerten sind;
(b)
Ermitteln von R-, G- und B-Mittelwerten sämtlicher Grenzpixel, deren
Koordinaten in Schritt (a) bestimmt wurden, und Festlegen von R-,
G- und B-Schwellenwerten abhängig
von den ermittelten R-, G- und B-Mittelwerten;
(c) Für jedes
Pixel des ersten abgetasteten Bildes erneut bestimmen oder für jedes
Pixel eines weiteren abgetasteten Bildes bestimmen, ob das Pixel...A method of automatically trimming a scanned image comprising a region of interest and a background image, the image having pixels each with an associated R, G and B value, characterized by the steps of:
(a) determining the coordinates of boundary pixels for a first scanned image, wherein the boundary pixels are adjacent pixels of the background image that circumscribe an image in the region of interest (IB image) and a pixel is assigned to the background image when its standard differences are less than a predetermined value, its standard differences being the differences of its R, G and B values from given default values;
(b) determining R, G and B averages of all the boundary pixels whose coordinates were determined in step (a) and determining R, G and B thresholds depending on the determined R, G and B -Mittelwerten;
(c) redetermine for each pixel of the first scanned image or for each pixel of another scanned image determine whether the pixel is ...
Description
Die Erfindung betrifft ein Verfahren zum automatischen Zurichten eines abgetasteten Bildes und insbesondere ein Verfahren, mit dem die Schwellenwerte für die rote (R), die grüne (G) und die blaue (B) Farbe dynamisch verfeinert werden können, um anhand der Werte eines Hintergrundbildes Grenzpixel zu bestimmen, wodurch der Zurichtbereich präzise bestimmt werden kann.The The invention relates to a method for automatic dressing of a scanned image and in particular a method by which the Thresholds for the red (R), the green (G) and the blue (B) color can be dynamically refined to using the values of a background image to determine boundary pixels whereby the dressing area is precisely determined can be.
Ein herkömmliches Verfahren zum automatischen Zurichten eines abgetasteten Bildes wird nach dem Vorabtastprozeß ausgeführt. Die Technik des automatischen Zurichtens umfaßt eine präzise Unterscheidung des interessierenden Bereichs (im folgenden mit IB bezeichnet) von einem Hintergrundbild durch Suchen der Grenzen des IB. Da die Farbe des Hintergrundbildes gewöhnlich schwarz ist, sind die R-, G- und B-Werte eines Hintergrundpixels sehr ähnlich. Im Idealfall sind alle R-, G- und B-Werte eines Hintergrundpixels null. Hingegen sind die Farben des IB sehr verschieden, so daß die R-, G- und B-Werte der IB-Pixel nicht gleichmäßig sind und ein Hintergrundbild-Pixel von einem IB-Pixel einfach unterschieden werden kann, indem die Standarddifferenzen ihrer R-, G- und B-Werte geprüft werden.One conventional Method of automatically trimming a scanned image is executed after the prescanning process. The Automatic dressing technique involves precise discrimination of the subject of interest Area (hereinafter referred to as IB) from a background image Searching the boundaries of the IB. Because the background color is usually black is, the R, G and B values of a background pixel are very similar. Ideally, all R, G, and B values of a background pixel zero. On the other hand, the colors of the IB are very different, so that the R, G and B values of the IB pixels are not uniform and are a background image pixel from an IB pixel can be easily distinguished by the standard differences their R, G and B values become.
Eine Erfassungsprozedur wird herkömmlicherweise dadurch ausgeführt, daß die R-, G- und B-Werte jedes Pixels zeilenweise und spaltenweise geprüft werden. Falls die Differenzen der R-, G- und B-Werte eines Pixels einen vorgegebenen Wert übersteigen, wird das Pixel im allgemeinen als IB-Pixel bestimmt. Andernfalls wird das Pixel als Hintergrundpixel bestimmt. Die Grenzen des IB beziehen sich auf die Hintergrundpixel, die den IB umschreiben. Um ein Kriterium für die Bestimmung der R-, G- und B-Werte eines Hintergrundpixels zu schaffen, wendet die herkömmliche Technik konstante R-, G- und B-Schwellenwerte an, um ein Hintergrundpixel von einem IB-Pixel zu unterscheiden.A Detection procedure becomes conventional executed by that the R, G and B values of each pixel are tested line by line and column by column. If the differences of the R, G and B values of a pixel have a exceed given value, In general, the pixel is determined as an IB pixel. Otherwise the pixel is determined as a background pixel. The limits of the IB refer to the background pixels that rewrite the IB. To be a criterion for the determination of the R, G and B values of a background pixel create, applies the conventional Technique sets constant R, G and B thresholds to a background pixel to distinguish from an IB pixel.
Die konstanten R-, G- und B-Schwellenwerte können jedoch unter verschiedenen Umständen keine ausreichenden Informationen liefern, um ein Hintergrundpixel von einem IB-Pixel zu unterscheiden. Wenn beispielsweise die Farbe des Originaldokuments selbst dunkler als die Hintergrundfarbe ist, kann das Hintergrundbild fehlerhaft als Teil des IB aufgefaßt werden, falls die R-, G- und B-Schwellenwerte zu hoch angesetzt sind. Falls andererseits die R-, G- und B-Schweltenwerte zu niedrig angesetzt sind, können die IB-Pixel fehlerhaft als Hintergrundpixel aufgefaßt werden. Unter Umständen bestimmen die R-, G- und B-Schwellenwerte die Genauigkeit der automatischen Zurichtung.The however, constant R, G and B thresholds may be different circumstances do not provide enough information to create a background pixel to distinguish from an IB pixel. For example, if the color The original document itself may be darker than the background color the background image is mistakenly understood as part of the IB, if the R, G and B thresholds are set too high. On the other hand, if the R, G and B threshold values may be set too low the IB pixels are mistaken for background pixels. In certain circumstances The R, G and B thresholds determine the accuracy of the automatic Finishing.
Die Unterscheidung eines Hintergrundpixels von einem IB-Pixel ist in Wirklichkeit nicht einfach. Ein Grund hierfür besteht darin, daß das Hintergrundbild ein Reflexionsbild der Abdeckung des Scanners ist. Gewöhnlich ist die Abdeckung des Scanners aus einem schwarzen Material hergestellt. Wenn eine Lichtquelle Licht auf die schwarze Abdeckung des Scanners richtet, wird das Reflexionsbild der schwarzen Abdeckung vermutlich gleichmäßig schwarz sein. Sobald jedoch das schwarze Material aus einem Material geringer Qualität besteht oder bei der Herstellung Risse erfährt, erzeugt das Reflexionsbild unerwartete Ergebnisse.The Distinction of a background pixel from an IB pixel is in Reality not easy. One reason for this is that the background image is a reflection image of the cover of the scanner. Usually is the cover of the scanner made of a black material. When a light source light on the black cover of the scanner The reflection image of the black cover will presumably be directed be evenly black. However, as soon as the black material of a material lower quality exists or cracks during manufacture, the reflection image produces unexpected Results.
Darüber hinaus sollten die vielen verschiedenen Scannermodelle und die vielen verschiedenen Typen von Lichtquellen berücksichtigt werden. Da die Lichtintensität nach dem Einschalten stärker ist und sich nach einer bestimmten Zeitperiode stabilisiert, ist das Hintergrundbild nicht gleichmäßig schwarz, wenn der Abtastvorgang während des Aufwärmprozesses erfolgt. Falls in einem solchen Fall der Scanner einen Aufwärmprozeß nach dem Einschalten durchlaufen muß oder falls die Lichtquelle instabil ist, ist die Lichtintensität eines abgetasteten Bildes nicht gleichmäßig verteilt. Weiterhin kann die Farbe des Originaldokuments selbst dunkler als die Farbe der Abdeckung sein. Folglich ist es schwierig, ein Hintergrundpixel von einem IB-Pixel anhand konstanter R-, G- und B-Schwellenwerte zu unterscheiden.Furthermore Should the many different scanner models and the many different types considered by light sources become. Because the light intensity stronger after switching on is and stabilizes after a certain period of time is the background image is not uniformly black when the scanning process while the warm-up process he follows. In such a case, if the scanner performs a warm-up process after the Must go through or if the light source is unstable, the light intensity is a scanned image is not evenly distributed. Furthermore, can The color of the original document itself is darker than the color of the cover be. Consequently, it is difficult to get a background pixel from one Distinguish IB pixels based on constant R, G and B thresholds.
Eine zuverlässigere Bestimmung der Hintergrundpixel bieten Verfahren, bei denen die Schwellenwerte auf Basis des abgetasteten Bildes bestimmt werden.A more reliable Determination of the background pixels provide methods in which the Threshold values are determined based on the scanned image.
Aus
der Druckschrift
In
der Druckschrift
Beide genannten Verfahren sind einstufig und eher für Bilder mit großem Helligkeits- bzw. Farbunterschieden zwischen Hintergrund und interessierendem Bereich geeignet.Both The above-mentioned methods are one-stage and more suitable for images with high brightness. or color differences between background and interesting Suitable area.
In
der Druckschrift
Ein weiteres iteratives Verfahren wird in dem Artikel "Comments an Picture Thresholding Using an Iterative Selection Method", IEEE Transactions an Systems, Man and Cybernetics, Vol. 20, Nr. 5, S. 1238-1239, September/Oktober 1990, beschrieben. Gemäß dem Verfahren werden Schwellenwerte zur Umwandlung eines Graustufenbildes in ein Schwarzweißbild iterativ bestimmt, indem bestimmte Bereiche des Histogramms der Helligkeitsverteilung ausgewertet werden. Bei diesem Verfahren bedingt das Erstellen des Histogramm einen erhöhten Rechenaufwand.One Another iterative process is described in the article "Comments to Picture Thresholding Using an Iterative Selection Method, IEEE Transactions to Systems, Man and Cybernetics, Vol. 20, No. 5, pp. 1238-1239, September / October 1990, described. According to the procedure are thresholds for converting a grayscale image into a Black and white image determined iteratively by adding specific areas of the histogram Brightness distribution are evaluated. Conditional on this procedure creating the histogram requires more computation.
Der Erfindung liegt daher die Aufgabe zugrunde, ein unaufwendiges Verfahren zum automatischen Zurichten eines abgetasteten Bildes zu schaffen, mit dem die Schwellenwerte der roten, grünen und blauen Farben dynamisch verfeinert werden können, um Grenzpixel anhand der Werte eines Hintergrundbildes zu bestimmen, so daß das Bild des interessierenden Bereichs präzise gewählt werden kann.Of the Invention is therefore the object of an inexpensive process to provide automatic trimming of a scanned image, with which the thresholds of red, green and blue colors are dynamic can be refined to determine boundary pixels based on the values of a background image so that Image of the area of interest can be selected precisely.
Der Erfindung liegt die weitere Aufgabe zugrunde, einen automatischen Lernprozeß für den Bildscanner zu schaffen, um die Informationen bezüglich der R-, G- und B-Schwellenwerte und der Hintergrundfarbe in Vorabtastprozeduren effizient zu lernen, so daß der Prozeß des automatischen Zurichtens nach wenigen Durchläufen eines Lernprozesses präziser erfolgen kann und der Lernprozeß nicht mehr erforderlich ist, sobald die R-, G- und B-Werte an die R-, G- und B-Schwellenwerte angenähert worden sind.Of the Invention is the further object of an automatic Learning process for the image scanner to provide the information regarding the R, G and B thresholds and efficiently learn the background color in prescanning procedures, so that the Process of automatic dressing after a few passes of a learning process made more precise can not and the learning process anymore is required, as soon as the R, G and B values to the R, G and B Approximated B thresholds have been.
Diese Aufgaben werden erfindungsgemäß gelöst durch ein Verfahren zum automatischen Zurichten eines abgetasteten Bildes nach Anspruch 1. Weiterbildungen der Erfindung sind in den abhängigen Ansprüchen angegeben.These Tasks are achieved by a method of automatically trimming a scanned image according to claim 1. Further developments of the invention are specified in the dependent claims.
Das erfindungsgemäße Verfahren umfaßt die folgenden Schritte: Zunächst werden die Koordinaten von Grenzpixeln für ein erstes abgetastetes Bild bestimmt, wobei die Grenzpixel an den interessierenden Bereich angrenzende Pixel des Hintergrundbilds sind, die ein Bild in dem interessierenden Bereich umschreiben. Ein Pixel wird dem Hintergrundbild zugeordnet, wenn seine Standarddifferenzen kleiner als ein vorgegebener Wert sind, wobei seine Standarddifferenzen die Differenzen seiner R-, G- und B-Werte von vorgegebenen Standardwerten sind. Anschließend werden die R-, G- und B-Mittelwerte sämtlicher zuvor bestimmter Grenzpixel ermittelt. Es werden dann R-, G- und B-Schwellenwerten abhängig von den ermittelten R-, G- und B-Mittelwerten festgelegt. Für jedes Pixel des ersten abgetasteten Bildes wird erneut bestimmt oder für jedes Pixel eines weiteren abgetasteten Bildes wird bestimmt, ob das Pixel ein Grenzpixel ist, wobei ein Pixel als ein Grenzpixel bestimmt wird, wenn die R-, G- und B- Werte dieses jeweiligen Pixels kleiner als die R-, G- und B-Schwellenwerte sind. Die Koordinaten eines als Grenzpixel bestimmten Pixels werden aufgezeichnet und das IB-Bildes wird im Zurichtbereich, der durch jedes der Grenzpixel definiert ist, zugerichtet.The inventive method includes the following steps: First become the coordinates of boundary pixels for a first scanned image determined, with the boundary pixels adjacent to the region of interest Pixels of the background image are an image in the area of interest rewrite. A pixel is assigned to the background image when its standard differences are smaller than a given value, its standard differences being the differences of its R, G, and B values are from default values. Then be the R, G and B averages all previously determined boundary pixels. There are then R, G and B thresholds determined by the determined R, G and B averages. For each Pixel of the first scanned image is redetermined or for each Pixel of another scanned image is determined if the pixel is a boundary pixel, where a pixel is determined to be a boundary pixel, if the R, G and B values of that respective pixel are less than are the R, G and B thresholds. The coordinates of a Boundary pixels of certain pixels are recorded and the IB image is defined in the trimming area defined by each of the boundary pixels is, prepared.
Das Verfahren ist demnach zweistufig aufgebaut, wobei zunächst (vorläufige) Grenzpixel aufgrund von vorgegebenen Standard-Schwellenwerten bestimmt werden. Danach werden die Schwellenwerte anhand der Farbwerte der im ersten Schritt bestimmten (vorläufigen) Grenzpixel angepasst und es werden die endgültigen Grenzpixel, die zum Zuschneiden des Bildes eingesetzt werden, auf Basis der angepassten Schwellenwerte ermittelt.The Accordingly, the method is structured in two stages, whereby initially (provisional) boundary pixels based on predetermined standard thresholds. Thereafter, the threshold values are determined based on the color values of the first Step specific (provisional) Boundary pixels are adjusted and it will be the final boundary pixels, the Cropping the image will be based on the adjusted Thresholds determined.
Weitere Merkmale und Vorteile der Erfindung werden deutlich beim Lesen der folgenden Beschreibung einer bevorzugten Ausführungsform, die auf die Zeichnung Bezug nimmt; es zeigen:Further Features and advantages of the invention will become apparent upon reading the following description of a preferred embodiment based on the drawing Refers; show it:
Die im folgenden beschriebene bevorzugten Ausführungsform stellt lediglich ein Beispiel dar. Fachleute werden erkennen, daß an der offenbarten Ausführungsform Änderungen vorgenommen werden können, ohne vom Erfindungsgedanken oder vom Umfang der Erfindung abzuweichen.The in the following described preferred embodiment provides only As an example, those skilled in the art will recognize that changes are made to the disclosed embodiment can be made without departing from the spirit or scope of the invention.
Zunächst werden
erfindungsgemäß die Grenzpixel
gesucht, die das IB-Bild umschreiben. Wie in
Die anfängliche Erfassung dient lediglich dem Auffinden der momentanen R-, G- und B-Mittelwerte der Grenzen a und b. Daher werden die Pixel von links nach rechts nacheinander gelesen und mit den Standarddifferenzen der R-, G- und B-Werte jedes Pixels der ersten Zeile des abgetasteten Bildes verglichen. Die Standarddifferenz bezieht sich auf die Differenz zwischen einem der R-, G- und B-Werte und einem Standardwert. Falls die Standarddifferenzen der R-, G- und B-Werte sämtlich kleiner als ein vorgegebener Wert, etwa 10, sind, wird das Pixel als Kandidat für ein Grenzpixel bestimmt. Dann werden fortgesetzt sämtliche Pixel derselben Spalte des Grenzpixel-Kandidaten geprüft, um zu bestimmen, ob die Standarddifferenzen der R-, G- und B-Werte für jedes Pixel in der Spalte sämtlich kleiner als der vorgegebene Wert sind. Wenn ja, bezeichnet die Spalte des Grenzpixel-Kandidaten eine Grenze a. Dann ist die Suche der Grenze a beendet.The initial Detection serves only to find the current R, G and B-averages of limits a and b. Therefore, the pixels are from the left read right one after the other and with the standard differences the R, G and B values each pixel of the first line of the scanned image compared. The standard difference refers to the difference between one the R, G and B values and a default value. If the standard differences of the R, G and All B values less than a predetermined value, say 10, becomes the pixel as a candidate for determines a boundary pixel. Then all continue Pixels of the same column of boundary pixel candidate checked to Determine if the standard differences of the R, G, and B values for each Pixels in the column all are smaller than the predetermined value. If yes, the column indicates of the boundary pixel candidate a limit a. Then the search is the Border a finished.
Wenn nein, wird das nächste Pixel in derselben Zeile des Grenzpixel-Kandidaten gewählt, um dieselbe Prüfung auszuführen. Der Prozeß wird solange wiederholt, bis eine Grenze a gefunden wird. Die Prozedur ist die gleiche für die Suche der Grenze b. Der Unterschied besteht lediglich darin, daß die Prüfung statt an der ersten Zeile an der ersten Spalte erfolgt und daß die Suchreihenfolge statt von links nach rechts von oben nach unten erfolgt.If no, the next will be Pixels in the same row of the boundary pixel candidate are chosen to be the same exam perform. The process becomes repeated until a limit a is found. The procedure is the same for the search of the border b. The only difference is that the exam took place at the first line on the first column and that the search order instead of going from left to right from top to bottom.
Nun
wird mit Bezug auf
-
201 : Setze X = 0, Y = 0, W = Breite des abgetasteten Bildes, L = Länge des abgetasteten Bildes. -
202 : Lese das Pixel bei den Koordinaten (X, Y) -
203 : Bestimme, ob X = W? Wenn ja, gehe zum Schritt207 . Wenn nein, gehe zum Schritt204 . -
204 : Bestimme, ob die R-, G- und B-Standarddifferenzen des Pixels an der (X, Y)-Position größer als ein vorgegebener Wert, etwa 10, sind? Wenn ja, gehe zum Schritt205 . Wenn nein, gehe zum Schritt206 . -
205 : Da die R-, G- und B-Standarddifferenzen des momentanen Pixels zu groß sind, wird das momentane Pixel bei (X, Y) als ein IB-Pixel bestimmt und wird das nächste Pixel X = X + 1 geprüft. Gehe dann zum Schritt202 . -
206 : Da die R-, G- und B-Standarddifferenzen des momentanen Pixels zu klein sind, wird das momentane Pixel bei (X, Y) als ein Hintergrundpixel bestimmt. Zeichne dann die Koordinaten des momentanen Pixels auf, um das nächste Pixel in derselben Spalte, Y = Y + 1, zu prüfen, und gehe dann zum Schritt202 . -
207 : Ende. -
208 : Bestimme, ob Y = L? Wenn ja, gehe zum Schritt209 . Wenn nein, gehe zum Schritt207 . -
209 : Bestimme die Spalte des momentanen Pixels als eine Grenze a und gehe zum Schritt207 .
-
201 : Set X = 0, Y = 0, W = width of the scanned image, L = length of the scanned image. -
202 : Read the pixel at the coordinates (X, Y) -
203 : Determine if X = W? If yes, go to the step207 , If not, go to the step204 , -
204 : Determine whether the R, G, and B standard differences of the pixel at the (X, Y) position are greater than a predetermined value, say 10? If yes, go to the step205 , If not, go to the step206 , -
205 Since the R, G and B standard differences of the current pixel are too large, the current pixel at (X, Y) is determined to be an IB pixel and the next pixel X = X + 1 is checked. Then go to the step202 , -
206 Since the R, G, and B standard differences of the current pixel are too small, the current pixel at (X, Y) is determined to be a background pixel. Then plot the coordinates of the current pixel to check the next pixel in the same column, Y = Y + 1, and then go to the step202 , -
207 : The End. -
208 : Determine if Y = L? If yes, go to the step209 , If not, go to the step207 , -
209 : Determine the column of the current pixel as a boundary a and go to the step207 ,
Das
Verfahren zum Bestimmen der Grenze b kann demselben Ablauf folgen.
Falls das Originaldokument nicht richtig auf die beiden Seiten der
Blattauflage ausgerichtet ist, ist das Erfassungsverfahren von
Nach dem Auffinden der Grenzen a und b für das Originaldokument kann der Anfangsschwellenwert für die R-, G- und B-Werte eines Pixels durch Mitteln der Werte jedes R-, G- und B-Kanals für sämtlich Grenzpixel bestimmt werden. Die Durchschnittswerte für die R-, G- und B-Kanäle können folgendermaßen dargestellt werden:To finding the boundaries a and b for the original document the initial threshold for the R, G and B values of a pixel by averaging the values of each R, G and B channels for all Boundary pixels are determined. The average values for the R, G and B channels can as follows being represented:
Die Durchschnittswerte für R, G und B für sämtliche Grenzpixel der Seiten a und b sind durch AVG_R, AVG_G bzw. AVG_B gegeben. n gibt die Gesamtzahl der Pixel auf der Grenze an.The Averages for R, G and B for all Boundary pixels of pages a and b are AVG_R, AVG_G and AVG_B, respectively given. n indicates the total number of pixels on the border.
Dann werden die momentanen R-, G- und B-Schwellenwerte, die durch Curr_R, Curr_G bzw. Curr_B gegeben sind, mit den anfänglichen R-, G- und B-Durchschnittswerten AVG_R, AVG_G bzw. AVG_B gemittelt. Das heißt, daß die Ausdrücke (AVG_R + Curr_R)/2, (AVG-G + Curr_G)/2 und (ACG_B + Curr_B)/2 berechnet werden. Dann werden sämtliche temporären R-, G- und B-Durchschnittswerte im Speicher bei New_R, New_G bzw. New_B als R-, G- und B-Schwellenwerte gespeichert, um die Hintergrundpixel im nachfolgenden vorabgetasteten Bild zu bestimmen. Diese Prozedur wird wiederholt, bis sich die R-, G- und B-Schwellenwerte an die genauen Werte annähern. Dieser Prozeß ist einem Lernprozeß sehr ähnlich. Obwohl die R-, G- und B-Schwellenwerte für das Hintergrundpixel für jede Vorabtastung von einem Zeitpunkt zum nächsten unterschiedlich sind, werden sie nach wenigen Vorabtastungen gegen den genauen Wert konvergieren, wenn der Scanner gerade initialisiert worden ist. Die Aufgabe besteht darin, zu verhindern, daß Hintergrundpixel fehlerhaft als IB-Pixel aufgefaßt werden. Obwohl die R-, G- und B-Schwellenwerte für jede Vorabtastung gemittelt werden, verlangsamt die für die Berechnung der R-, G- und B-Mittelwerte erforderliche Zeit den Vorabtastprozeß nicht. Da darüber hinaus die R-, G- und B-Schwellenwerte für die Bestimmung der Grenzpixel dynamisch aktualisiert werden, ist das Verfahren auch auf jede von Schwarz verschiedene Hintergrundfarbe anwendbar, solange die Farbe gleichmäßig verteilt ist.Then are the current R, G, and B thresholds determined by Curr_R, Curr_G and Curr_B, respectively, with the initial R, G and B averages AVG_R, AVG_G or AVG_B averaged. That is, the expressions (AVG_R + Curr_R) / 2, (AVG-G + Curr_G) / 2 and (ACG_B + Curr_B) / 2. Then be all temporary R, G, and B averages in memory at New_R, New_G, and New_B, respectively stored as R, G and B thresholds to the background pixels in the subsequent prescanned image. This procedure will until the R, G and B thresholds match the exact Approximate values. This process is very similar to a learning process. Although the R, G and B thresholds for the background pixel for every prescan varies from one time to the next, they will converge to the exact value after a few prescans, if the scanner has just been initialized. The task exists in it, to prevent background pixels erroneously be construed as IB pixels. Although the R, G and B thresholds for each Precalculation, slows down the calculation required for the R, G and B averages do not require the prescan process. There about it In addition, the R, G, and B thresholds for determining the boundary pixels be updated dynamically, the procedure is also on each of Black different background color applicable as long as the color equally distributed is.
In
Das Verfahren umfaßt die folgenden Schritte:
-
301 : Initialisiere Update, T und Curr_R, Curr_G, Curr_B. Setze Update = 1, T = 0, Curr_R = 0, Curr_G = 0, Curr_B = 0. -
302 : Lese im Vorabtastprozeß die Werte von Update, T und Curr_R, Curr_G und Curr_B. -
303 : Bestimme, ob Update = 0? Wenn ja, liegen Curr_R, Curr_G, Curr_B sehr nahe beim Wert T. Gehe dann zum Schritt317 und halte an. Wenn nein, gehe zum Schritt304 . -
304 : Bestimme, ob die Standarddifferenzen (Std_R, Std_G, Std_B) der R-, G- und B-Werte eines momentanen Pixels kleiner als ein vorgegebener Wert, etwa 10, sind? Wenn ja, kann das momentane Pixel ein Hintergrundpixel sein, gehe dann zum Schritt305 . Wenn nein, gehe zum Schritt317 . -
305 : Update = 1 und die Standarddifferenzen der R-, G- und B-Werte sind kleiner als der vorgegebene Wert, so daß das momentane Pixel als Hintergrundpixel bestimmt wird. Berechne dann den Mittelwert jedes R-, G- und B-Kanals aller Pixel in derselben Spalte des momentanen Pixels. Speichere dann die neu berechneten Durchschnittswerte der R-, G- und B-Kanäle in den New_R-, New_G- bzw. New_B-Speichervorrichtungen. -
306 : Nehme den größten in New_R, New_G und New_B gespeicherten Wert auf und speichere ihn in einer Speichervorrichtung Max. -
307 : Bestimme, ob T = 0? Wenn ja, werden zum ersten Mal die Mittelwerte der R-, G- und B-Kanäle für sämtliche Pixel der Grenze berechnet. Gehe dann zum Schritt308 . Wenn nein, gehe zum Schritt309 . -
308 : Speichere den Max-Wert, der im Schritt306 gefunden wurde, in New_T. Gehe dann zum Schritt310 . -
309 : Bilde den Mittelwert der in Max und T gespeicherten Werte und speichere dann den Mittelwert in New_T. -
310 : Bestimme, ob die R-, G- und B-Mittelwerte, die in Curr_R, Curr_G und Curr_B gespeichert sind, gleich 0 sind. Wenn ja, gehe zum Schritt31 . Wenn nein, gehe zum Schritt312 . -
311 : Gibt an, daß der Mittelwert der R-, G- und B-Schwellenwerte zum ersten Mal berechnet wurde. Weise dann die in New_R, New_G und New_B gespeicherten R-, G- und B-Mittelwerte den R-, G- bzw. B-Speichervorrichtungen zu. Gehe dann zum Schritt316 . -
312 : Da die R-, G- und B-Mittelwerte nicht nahe genug bei den genauen Werten liegen, berechne die Mittelwerte aus den momentanen R-, G- und B-Mittelwerten, die in Curr_R, Curr_G und Curr_B gespeichert sind, und aus den vorhergehenden R-, G- und B-Mittelwerten, die in New_R, New_G und New_B gespeichert sind. Speichere dann die Mittelungsergebnisse in den R-, G- bzw. B-Speichervorrichtungen. -
313 : Berechne die Differenz der in T und New_G gespeicherten Werte und bestimme dann, ob die Differenz kleiner als ein vorgegebener Wert, etwa 10, ist. Bestimme außerdem, ob die Differenz zwischen R und Curr_R, die Differenz zwischen G und Curr_G und die Differenz zwischen B und Curr_B sämtlich kleiner als eine vorgegebene Zahl, etwa 10, sind. Wenn ja, gehe zum Schritt314 . Wenn nein, gehe zum Schritt315 . -
314 : Da die Differenzen alle kleiner als ein vorgegebener Wert sind, sollte der approximierte Wert sehr nahe beim genauen Wert liegen. Setze dann Update = 0 und beende die Approximation. Gehe dann zum Schritt316 . -
315 : Da die Differenzen alle größer als ein vorgegebener Wert sind, bedeutet dies, daß der momentane Schwellenwert noch immer approximiert werden muß. Gehe dann zum Schritt316 . -
316 : Speichere die Summe aus den R-, G- und B-Schwellenwerten, die in New_G gespeichert sind, und aus einem vorgegebenen Gewicht δ in einer Speichervorrichtung T. Speichere die Werte von R, G und B in den Speichervorrichtungen Curr_R, Curr-G bzw. Curr_B. -
317 : Beende die Approximation der R-, G- und B-Schwellenwerte für die Vorabtastung. Das heißt, daß der Lernprozeß beendet werden kann.
-
301 : Initialize Update, T and Curr_R, Curr_G, Curr_B. Set Update = 1, T = 0, Curr_R = 0, Curr_G = 0, Curr_B = 0. -
302 Read the values of Update, T and Curr_R, Curr_G and Curr_B in the pre-scan process. -
303 : Determine if Update = 0? If so, Curr_R, Curr_G, Curr_B are very close to the value T. Then go to the step317 and stop. If not, go to the step304 , -
304 : Determine if the standard differences (Std_R, Std_G, Std_B) of the R, G, and B values of a current pixel are less than a predetermined value, say 10? If so, the current pixel may be a background pixel then go to step305 , If not, go to the step317 , -
305 : Update = 1 and the standard differences of the R, G and B values are smaller than the default value, so the current pixel is determined to be the background pixel. Then calculate the average of each R, G and B channel of all pixels in the same column of the current pixel. Then store the recalculated averages of the R, G, and B channels in the New_R, New_G, and New_B memory devices, respectively. -
306 Take the largest value stored in New_R, New_G, and New_B and store it in a Max storage device. -
307 : Determine if T = 0? If so, for the first time the averages of the R, G and B channels are calculated for all pixels of the boundary. Then go to the step308 , If not, go to the step309 , -
308 : Save the max value in the step306 was found in New_T. Then go to the step310 , -
309 : Make the mean of the values stored in Max and T and then save the mean in New_T. -
310 : Determine if the R, G, and B averages stored in Curr_R, Curr_G, and Curr_B are equal to 0. If yes, go to the step31 , If not, go to the step312 , -
311 : Indicates that the average of the R, G, and B thresholds was calculated for the first time. Then, assign the R, G, and B average values stored in New_R, New_G, and New_B to the R, G, and B memory devices, respectively. Then go to the step316 , -
312 Since the R, G and B averages are not close enough to the exact values, calculate the means from the current R, G and B averages stored in Curr_R, Curr_G and Curr_B, and from the previous R, G and B averages stored in New_R, New_G and New_B. Then store the averaging results in the R, G and B memory devices, respectively. -
313 Calculate the difference of the values stored in T and New_G and then determine if the difference is less than a predetermined value, say 10. Also, determine if the difference between R and Curr_R, the difference between G and Curr_G, and the difference between B and Curr_B are all smaller than a given number, say 10. If yes, go to the step314 , If not, go to the step315 , -
314 Since the differences are all smaller than a given value, the approximated value should be very close to the exact value. Then set Update = 0 and finish the approximation. Then go to the step316 , -
315 Since the differences are all greater than a given value, this means that the current threshold still needs to be approximated. Then go to the step316 , -
316 : Store the sum of the R, G and B thresholds stored in New_G and a given weight δ in a memory device T. Store the values of R, G and B in the memory devices Curr_R, Curr-G or Curr_B. -
317 : Finish the approximation of the R, G and B thresholds for the prescan. This means that the learning process can be ended.
Jedesmal,
wenn die Vorabtastung ausgeführt
wird, müssen
die obenerwähnten
R-, G- und B-Schwellenwerte so lange approximiert werden, bis die
R-, G- und B-Schwellenwerte sehr nahe bei den tatsächlichen
R-, G- und B-Mittelwerten liegen. Außerdem werden die Prozesse
vom Schritt
In
-
401 : Start. -
402 : Lese nacheinander jedes Pixel des abgetasteten Bildes. -
403 : Bestimme, ob die Differenzen der R-, G- und B-Werte eines momentanen Pixels kleiner als die approximierten R-, G- und B-Schwellenwerte sind, die in T gespeichert sind? Oder ob die Differenzen zwischen den momentanen R-, G- und B-Mittelwerten, die in New_R, New_G und New_B gespeichert sind, und den vorhergehenden R-, G- und B-Mittelwerten, die in Curr_R, Curr_G und Curr_B gespeichert sind, kleiner als ein vorgegebener Wert sind? Wenn ja, gehe zum Schritt404 . Wenn nein, gehe zum Schritt405 . -
404 : Bestimme, ob das momentane Pixel ein Hintergrundpixel ist, und markiere dann die Position des momentanen Pixels. -
405 : Bestimme das momentane Pixel als ein IB-Pixel. -
406 : Setze die Bilddaten in binäre Bilddaten um, nachdem sämtliche Grenzpixel bestimmt worden sind. -
407 : Lese das IB-Bild anhand der Positionen der markierten Pixel. -
408 : Ende.
-
401 : Begin. -
402 : Read each pixel of the scanned image in succession. -
403 : Determine if the differences of the R, G and B values of a current pixel are less than the approximated R, G and B thresholds stored in T? Or whether the differences between the current R, G and B averages stored in New_R, New_G and New_B and the previous R, G and B averages stored in Curr_R, Curr_G and Curr_B, are smaller than a given value? If yes, go to the step404 , If not, go to the step405 , -
404 : Determine if the current pixel is a background pixel and then mark the position of the current pixel. -
405 : Determine the current pixel as an IB pixel. -
406 : Convert the image data to binary image data after all boundary pixels have been determined. -
407 : Read the IB image based on the positions of the marked pixels. -
408 : The End.
Zusammenfassend kann die Erfindung die Grenzpixel, die das IB-Bild umschreiben, präziser bestimmen, weil die R-, G- und B-Schwellenwerte auf approximierten R-, G- und B-Werten und nicht auf konstanten R-, G- und B-Werten basieren. Die approximierten R-, G- und B-Werte werden anhand einer momentanen Hintergrundbild-Situation wiederholt approximiert. Folglich kann die Erfindung an verschiedene Scannermodelle und an verschiedene Lichtquellen angepaßt werden und ist auch für jede von Schwarz verschiedene, gleichmäßige Farbe als Hintergrundfarbe geeignet.In summary For example, the invention can use the boundary pixels that rewrite the IB image. more precise because the R, G and B thresholds are approximated R, G and B values and not based on constant R, G and B values. The approximated R, G and B values are determined by a current one Background image situation repeatedly approximated. Consequently, the Invention to various scanner models and to different light sources customized be and is also for Any color other than black, uniform in color as the background color suitable.
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE2000126700 DE10026700B4 (en) | 2000-05-30 | 2000-05-30 | Method of automatically trimming a scanned image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
DE2000126700 DE10026700B4 (en) | 2000-05-30 | 2000-05-30 | Method of automatically trimming a scanned image |
Publications (2)
Publication Number | Publication Date |
---|---|
DE10026700A1 DE10026700A1 (en) | 2001-12-06 |
DE10026700B4 true DE10026700B4 (en) | 2008-03-27 |
Family
ID=7644041
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
DE2000126700 Expired - Fee Related DE10026700B4 (en) | 2000-05-30 | 2000-05-30 | Method of automatically trimming a scanned image |
Country Status (1)
Country | Link |
---|---|
DE (1) | DE10026700B4 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102006028646A1 (en) * | 2006-06-22 | 2007-12-27 | Siemens Ag | Evaluation method for image data record of object to be examined, involves assigning location to each image data element, where image data record has several image data elements with image data value |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0549255A2 (en) * | 1991-12-23 | 1993-06-30 | Xerox Corporation | Method and programmable apparatus for determining document background level |
US5900953A (en) * | 1997-06-17 | 1999-05-04 | At&T Corp | Method and apparatus for extracting a foreground image and a background image from a color document image |
EP0732842B1 (en) * | 1992-07-23 | 1999-12-15 | Fuji Xerox Co., Ltd. | Image processing for removing a background density portion from a scanned document image |
-
2000
- 2000-05-30 DE DE2000126700 patent/DE10026700B4/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0549255A2 (en) * | 1991-12-23 | 1993-06-30 | Xerox Corporation | Method and programmable apparatus for determining document background level |
EP0732842B1 (en) * | 1992-07-23 | 1999-12-15 | Fuji Xerox Co., Ltd. | Image processing for removing a background density portion from a scanned document image |
US5900953A (en) * | 1997-06-17 | 1999-05-04 | At&T Corp | Method and apparatus for extracting a foreground image and a background image from a color document image |
Non-Patent Citations (2)
Title |
---|
MAGID, A.; ROTMAN, S.R.; WEISS, A.M.: "Comments on Picture Thresholding Using an Iterative Selec- tion Method", IEEE Transactions on Systems, Man and Cybernetics, Volume: 20, Issue 5, pp. 1238-1239, Sep/Oct 1990 |
MAGID, A.; ROTMAN, S.R.; WEISS, A.M.: "Comments on Picture Thresholding Using an Iterative Selection Method", IEEE Transactions on Systems, Man and Cybernetics, Volume: 20, Issue 5, pp. 1238-1239, Sep/Oct 1990 * |
Also Published As
Publication number | Publication date |
---|---|
DE10026700A1 (en) | 2001-12-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
DE60118240T2 (en) | METHOD FOR IMAGE ANALYSIS | |
DE60218876T2 (en) | IMAGE PROCESSING TO REMOVE RED EYES | |
DE69734855T2 (en) | Apparatus and method for extracting an object in an image | |
DE69720399T2 (en) | Digital composition of a mosaic-like picture | |
DE69432239T2 (en) | Field detection | |
DE69533054T2 (en) | Multi-windowing technique for thresholding an image using local image properties | |
DE69728127T2 (en) | Apparatus and method for extracting an object in an image | |
DE3446880C2 (en) | ||
DE4103229C2 (en) | ||
DE60030798T2 (en) | Identification of actual pixel colors in the area with uncertain pixels | |
DE60210199T2 (en) | METHOD FOR DETECTING SCENARIOUS AREAS IN PICTURES | |
DE60307583T2 (en) | Evaluation of the sharpness of an image of the iris of an eye | |
DE3633743C2 (en) | ||
DE10317917B4 (en) | System and method for bounding and classifying regions within a graphic image | |
DE69937785T2 (en) | Method of selecting color block points for block coding | |
DE3444701C3 (en) | Image processing device | |
EP1293933A1 (en) | Method for automatically detecting red-eye defects in photographic image data | |
EP1288860A1 (en) | Method for processing digital photographic image data including a method for the automatic detection of red-eye defects | |
DE2948341A1 (en) | METHOD FOR PROCESSING IMAGE ELEMENTS AND DEVICE FOR PROCESSING AN IMAGE DATA SERIES | |
EP1288858A1 (en) | Method for automatically detecting red-eye defects in photographic image data | |
EP0012713B1 (en) | Method for setting the exposure in the production of photographic copies | |
DE3935067A1 (en) | DOT AREA DIFFERENTIATION PROCEDURE | |
DE4117038C2 (en) | Row range segmentation method | |
DE60207785T2 (en) | Method for extracting objects and image recording apparatus using this method | |
DE2256617C3 (en) | Facility for analyzing a template |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
8128 | New person/name/address of the agent |
Representative=s name: EPPING HERMANN FISCHER, PATENTANWALTSGESELLSCHAFT |
|
8110 | Request for examination paragraph 44 | ||
8127 | New person/name/address of the applicant |
Owner name: TRANSPACIFIC OPTICS LLC, WILMINGTON, DEL., US |
|
8364 | No opposition during term of opposition | ||
R119 | Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal fee |
Effective date: 20131203 |