CN1361500A - Automatic image cutting out method - Google Patents

Automatic image cutting out method Download PDF

Info

Publication number
CN1361500A
CN1361500A CN 00137170 CN00137170A CN1361500A CN 1361500 A CN1361500 A CN 1361500A CN 00137170 CN00137170 CN 00137170 CN 00137170 A CN00137170 A CN 00137170A CN 1361500 A CN1361500 A CN 1361500A
Authority
CN
China
Prior art keywords
pattern unit
base plate
pattern
image
plate style
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.)
Granted
Application number
CN 00137170
Other languages
Chinese (zh)
Other versions
CN1200389C (en
Inventor
王清贤
徐伟书
吴明哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hongyou Science & Technology Co Ltd
Original Assignee
Mustek Systems Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Mustek Systems Inc filed Critical Mustek Systems Inc
Priority to CN 00137170 priority Critical patent/CN1200389C/en
Publication of CN1361500A publication Critical patent/CN1361500A/en
Application granted granted Critical
Publication of CN1200389C publication Critical patent/CN1200389C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The present invention is method of automatically cutting out scanned image of irregular edges. Fixed shaped pattern is supplied to the upper cover plate as reference coordinates for cutting out. The said pattern is scanned is advance while the initial installation of the scanner, pattern coordinates are analyzed to obtain its average RGB value and variance so as to establish base plate pattern data base. Then, while executing automatic image cutting out, the data in the base plate pattern data base and the RGB chroma difference of the scanned matter image are compared successively to judge the position of the scanned matter. The background part of the scanned matter edges are treated with transparent color to obtain the needed figure.

Description

Automatic image cutting out method
The present invention relates to a kind of automatic image cutting out method of scan image, relate in particular to a kind of cutting automatically and have the method for the scanned object of broken edge.
Scanner in the market provides in advance mostly sweeps the function that the file of image is swept in (pre-scan) and automatic search in advance.Yet the automatic method of cutting out of known scanned object is all got the square frame of figure periphery based on frame.With Fig. 1 is example.If the object of scanning is a star, the real image that institute's frame is got is but for square.Therefore, actual institute image to be processed has just comprised a large amount of gibberish in star periphery.The user must cut and handle the data that institute's frame is got, and just can obtain desired mulle.And the algorithm of general cutting is not good, and the speed of make handling is slower, just can see the result after the cutting process after usually will waiting for a period of time.
For figure with fine arts purposes, for example be applied to the pattern of webpage, its edge is generally irregular shape, if utilize known automatic method of cutting out, must cut out the periphery of figure earlier with square frame, be solid color with unwanted background transitions again, utilize the instrument of other application program then, in manual mode this solid color is set at Transparent color, is stored as specific file layout again, just can obtain wherein desired figure.Because this kind method depends on art designing professional person's processing, not only use inconvenience, and time-consuming consumption power.If scanning often and the data volume of handling when big, the apprentice is increased cost.And, with regard to the function that scanner provided, the regret of blemish in an otherwise perfect thing is also arranged.
Based on the problems referred to above, fundamental purpose of the present invention provides a kind of automatic image cutting out method, has the object image of broken edge with automatic cutting, and then improves the using value of scanner.
Another object of the present invention provides a kind of high efficiency automatic image cutting out method, the scope of cutting can be approached the actual size of broken edge, reducing the data volume of required processing, and then improves the efficient of handling.
Another purpose of the present invention provides a kind ofly can directly remove the method for the background image of object by scanner, so that scanner is widely used in the processing of graph data.
In order to achieve the above object, a kind of automatic image cutting out method of being applied on the one scan device of the present invention comprises step at least: set up a loam cake base plate style database; Read the preposition scan image of scanned object; According to a pattern unit that sets, compare the reference data of this base plate style database and the RGB colour difference of this preposition scan image successively; When the RGB colour difference of judging two pattern units is in a setting range, judge the image that does not comprise this scanned object in this pattern unit; When the RGB colour difference of judging two pattern units exceeds in the setting range, judge the image that comprises this scanned object in this pattern unit, and write down the position of this pattern unit; After the comparison of finishing entire image, in the pattern unit of this record, link adjacent pattern unit, to form the array graph data; And, read this graph data according to this array graph data edge.
In order to achieve the above object, the another kind of automatic image cutting out method that the present invention is applied on the one scan device comprises step at least: the base plate style of a loam cake is provided, and this base plate style is made of several identical pattern units of size; Carry out the scanning in advance of this base plate style, to produce the preposition scan image of this base plate style; Seek the actual coordinate of the pattern unit of this base plate style; Calculate and store the reference coordinate of each pattern unit, and RGB mean value reaches the wherein coordinate position of each pixel; Read the preposition scan image of scanned object; According to this pattern unit, compare the rgb value of RGB mean value and this preposition scan image of the pattern unit of this base plate style successively; When the RGB colour difference of judging two pattern units exceeds in the setting range, judge the image that comprises this scanned object in this pattern unit, and write down the position of this pattern unit; After the comparison of finishing entire image, in the pattern unit of this record, link adjacent pattern unit, to form the array graph data; Reach graph data edge, read this graph data according to this array.
Based on above-mentioned purpose, the present invention proposes a kind of cutting automatically and has the method for the scanned object of broken edge.The present invention provides to have the fixedly pattern of style at the loam cake base plate of scanner, the reference coordinate when getting object to be used as frame, and as the usefulness of the comparison of color.When scanner is installed for the first time, just scan the pattern of base plate in advance, with position and RGB mean value and the variance (variance) of analyzing each pattern, and set up the database of this base plate style.Afterwards, all when carrying out the automatic cutting of scanned object image, as long as according to a pattern unit, in turn compare the data of being stored in this base plate style database and the RGB colour difference of this preposition scan image, just whether include the view data of scanned object in each pattern unit of decidable.If the RGB colour difference of judging two pattern units in a scope of setting the time, does not then comprise the image of this scanned object in this pattern unit of decidable.Otherwise, the position of then writing down this pattern unit.After the judgement of entire image is finished in wait, linking adjacent pattern unit, just is the image-region of scanned object.Prolong the cutting in addition of its edge then, just can obtain the image of scanned object.The present invention not only can be applicable to the automatic cutting of irregular figure, also can accelerate known frame for the square chart picture and get speed.
The synoptic diagram that Fig. 1 gets for known automated graphics frame;
Fig. 2 A is the synoptic diagram of a kind of base plate style of the present invention;
Fig. 2 B is the pattern unit's enlarged diagram in the base plate style of Fig. 2 A;
Fig. 3 is a process flow diagram of setting up base plate style database of the present invention;
Fig. 4 utilizes base plate style database, the process flow diagram that carries out the automatic cutting of image for the present invention.
For addressing the above problem, the present invention provides one to have the fixedly pattern of style, shown in Fig. 2 A at the loam cake base plate of scanner.Reference coordinate when the purpose of this pattern is to be used as the cutting object, and as the usefulness of the comparison of color.As long as pattern itself has style and size is consistent, and the characteristic of queueing discipline gets final product, and is not limited to use the pattern of trellis.And should reduce overlapping fuzzy area between the pattern, the accuracy when increasing cutting.
Because the loam cake base plate of every scanner has error when mounted, therefore for trying to achieve reference coordinate accurately, must when the initial start-up scanner, read the pattern of base plate, debate the coordinate of knowing pattern, to set the database of a base plate style.Pattern with Fig. 2 A is an example, and the database building method of its base plate style as shown in Figure 3.
Step 31: with the low resolution of 50dpi, the style of run-down base plate in advance is to produce the preposition view data (pre-scanned image) of base plate style.
Step 32: seek the actual coordinate of pattern then, i.e. the position at pixel place.From the image of preposition scanning, begin to be used as the block of sampling by the upper left corner with a pocket.Then, from wherein looking for the most black block of gray scale.After finding,, make the coordinate of upper left corner black pattern, and find out the position (size of known pattern is all identical) of all black patterns according to this coordinate as the normal size of all black patterns.Then, find out the position (known have only two kinds of different gray scales) of all grey colored patterns with the same manner.The mode of looking for of pattern has many known algorithms to use, and repeats no more.
Step 33: reference coordinate and the RGB reference value of setting each pattern.Setting each pattern is a unit, because in each black pattern or grey colored pattern unit of being found out, therefore constituted by many pixels, with the RGB mean value and the variance of all pixels in this pattern unit, as the RGB reference value of this pattern unit.For example, have 20 pixels in each black pattern, just after the difference summation with the value of the red, green, blue colourity of 20 pixels in this unit, again respectively divided by 20, to be used as the RGB mean value of this black pattern unit, square margin then is that the red, green, blue chromatic value of 20 pixels in each pattern unit is subtracted each other back square with mean value respectively, in addition average again value.
Then, be used as a unit, to set its reference coordinate with the block of black pattern or grey colored pattern.With the enlarged drawing of Fig. 2 B is the example explanation, in the black pattern of finding out and grey colored pattern, set successively with reference to coordinate be (i, j).Because greater than its actual coordinate, the pattern comparison after therefore can making it is more quick effective with reference to the scope of coordinate.
Step 34: store the reference data of each pattern unit then, comprise: the position of each pixel in RGB reference value, this pattern unit, and the reference coordinate of this pattern unit.
So, just, set up base plate style data of database.The foundation of database only needs to set when scanner is installed for the first time once to get final product.Afterwards, just can carry out the processing of automatic cutting to the graph data of Any shape.
The principle of the automatic cutting of image of the present invention is that the reference data of the preposition scan image of scanned object and base plate style database is compared.The user can the punishment of the side of selection frames images get, or select a frame to get desired irregular figure.
The method of automatic cutting of the present invention is as shown in Figure 4:
Step 401: the reference data that is written into base plate style database.
Step 402: with same resolution,, carry out the program of sweeping in advance of scanned object, to produce the preposition view data of scanned object as 50dpi.
Step 403: according to the pattern unit that sets, in the position of comparison same units, the RGB colourity difference of the preposition image reference data of base plate pattern and the preposition scan image of scanned object.The purpose of this comparison is to find out the position at scanned object place.Because be not scanned the part that object hides, the feature of necessary meeting display backpanel type pattern.In like manner, the part of the pattern characteristics of display backpanel pattern just is not the position at scanned object place.And the color in the same pattern unit is all very approaching, and the image of general scanned object does not then have this characteristic.In addition, the mean flow rate data in the same pattern unit are also close, the reference when can be used for as filtration.
During comparison be reference coordinate with pattern be unit relatively.In the position of same pattern unit, compare the RGB mean value and the variance (variance) of the preposition scan image of scanned object, with the RGB reference value of this pattern unit.
Step 404: if both RGB colour differences in a default error amount, execution in step 405; Otherwise, execution in step 406.
Step 405: judge the image that does not comprise institute's scanned object in this pattern unit.
Step 406:, represent that this pattern unit comprises the image of scanned object if both colourity difference exceeds a default error amount.So, the position of writing down this pattern unit.
Step 407: after finishing the comparison of whole pattern units, in the pattern unit that is write down, link adjacent pattern unit, to become same group figure.If the image of single pass three pictures, just have three groups figure.
Step 408: at this moment, if select square frame to get mode, just according to the reference coordinate of the pattern unit in the upper left corner and the lower right corner, the scope of calculation block, comparison is to actual figure primitive unit cell, with the view data in the cutting square frame then.
Step 409: if select a frame to get wherein irregular pattern, just need find out record pattern unit on, down, a left side, right reference coordinate cuts out the irregular figure that will read.The mode of cutting can utilize present existing many algorithms to carry out.
After having cut,, can take out desired figure as long as carry out the processing of Transparent color at the data at scanned object edge.The fineness of the irregular area that cuts out is relevant with the style size of base plate pattern.If pattern is less, cutting area is comparatively meticulous, and the required block scope of handling again is also little, and data volume is also less.But, then be difficult to find out feature, and can't effectively compare with scanned object if style is too little.
So, use method of the present invention, not only can be applicable to cutting out of any irregular figure, also can improve the using value of scanner, any such as art designing's figure all can be by the cutting out of scanner, and be applied to the processing of webpage, or other Flame Image Process.And method of the present invention is not limited to the figure quantity of single pass, therefore can significantly improve the efficient that scanner uni is cut out.
The above only is the preferred embodiments of the present invention, and has reached practical effect widely, and all equalizations of doing according to claims of the present invention change and distortion, within the scope that all still belongs to patent of the present invention and contained.

Claims (12)

1. automatic image cutting out method is applied to comprise step at least on the one scan device:
Set up a loam cake base plate style database;
Read the preposition scan image of scanned object;
According to a pattern unit that sets, compare the reference data of this base plate style database and the RGB colour difference of this preposition scan image successively;
When the RGB colour difference of judging two pattern units is in a setting range, judge the image that does not comprise this scanned object in this pattern unit;
When the RGB colour difference of judging two pattern units exceeds in the setting range, judge the image that comprises this scanned object in this pattern unit, and write down the position of this pattern unit;
After the comparison of finishing entire image, in the pattern unit of this record, link adjacent pattern unit, to form the array graph data; And
According to this array graph data edge, read this graph data.
2. the method for claim 1, the wherein above-mentioned step of setting up base plate style database comprises at least:
The base plate style of one loam cake is provided, and this base plate style is made of several identical pattern units of size;
Carry out the scanning in advance of this base plate style, to produce the preposition scan image of this base plate style;
Seek the actual coordinate of the pattern unit of this base plate style;
Calculate the reference coordinate and the RGB reference value of each pattern unit; And
Store the reference data of each pattern unit.
3. method as claimed in claim 2, the reference data of wherein above-mentioned pattern unit comprises:
The RGB reference value of pattern unit, the coordinate position of each pixel, and the reference coordinate of pattern unit.
4. method as claimed in claim 2, the preposition scan image of wherein above-mentioned base plate style is identical with the resolution of the preposition scan image of above-mentioned scanned object.
5. method as claimed in claim 3, wherein above-mentioned RGB reference value are the mean value of RGB in the above-mentioned pattern unit.
6. method as claimed in claim 3, the reference coordinate scope of wherein above-mentioned pattern unit are at least greater than the scope of a pixel.
7. method as claimed in claim 3, the actual coordinate of wherein above-mentioned pattern unit are the pixel coordinate in the above-mentioned pattern unit.
8. the method for claim 1 also comprises step:
Handle above-mentioned array graph data edge with Transparent color.
9. automatic image cutting out method is applied to comprise step at least on the one scan device:
The base plate style of one loam cake is provided, and this base plate style is made of several identical pattern units of size;
Carry out the scanning in advance of this base plate style, to produce the preposition scan image of this base plate style;
Seek the actual coordinate of the pattern unit of this base plate style;
Calculate and store the reference coordinate of each pattern unit, and RGB mean value reaches the wherein coordinate position of each pixel;
Read the preposition scan image of scanned object;
According to this pattern unit, compare the rgb value of RGB mean value and this preposition scan image of the pattern unit of this base plate style successively;
When the RGB colour difference of judging two pattern units exceeds in the setting range, judge the image that comprises this scanned object in this pattern unit, and write down the position of this pattern unit;
After the comparison of finishing entire image, in the pattern unit of this record, link adjacent pattern unit, to form the array graph data; And
Graph data edge according to this array reads this graph data.
10. method as claimed in claim 9 also comprises step:
When the RGB colour difference of judging two pattern units is in a setting range, judge the image that does not comprise above-mentioned scanned object in this pattern unit.
11. method as claimed in claim 9 also comprises step:
Handle above-mentioned array graph data edge with Transparent color.
12. method as claimed in claim 9, the preposition scan image of wherein above-mentioned base plate style is identical with the resolution of the preposition scan image of above-mentioned scanned object.
CN 00137170 2000-12-29 2000-12-29 Automatic image cutting out method Expired - Fee Related CN1200389C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 00137170 CN1200389C (en) 2000-12-29 2000-12-29 Automatic image cutting out method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 00137170 CN1200389C (en) 2000-12-29 2000-12-29 Automatic image cutting out method

Publications (2)

Publication Number Publication Date
CN1361500A true CN1361500A (en) 2002-07-31
CN1200389C CN1200389C (en) 2005-05-04

Family

ID=4597695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 00137170 Expired - Fee Related CN1200389C (en) 2000-12-29 2000-12-29 Automatic image cutting out method

Country Status (1)

Country Link
CN (1) CN1200389C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1324874C (en) * 2004-03-25 2007-07-04 宇东电浆科技股份有限公司 Image scanning device with position line designed on covering plate
US9413912B2 (en) 2012-10-26 2016-08-09 Abbyy Development Llc Scanning device having a bed cover including a pattern of repeated design elements

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1324874C (en) * 2004-03-25 2007-07-04 宇东电浆科技股份有限公司 Image scanning device with position line designed on covering plate
US9413912B2 (en) 2012-10-26 2016-08-09 Abbyy Development Llc Scanning device having a bed cover including a pattern of repeated design elements

Also Published As

Publication number Publication date
CN1200389C (en) 2005-05-04

Similar Documents

Publication Publication Date Title
US6993169B2 (en) System and method for finding regions of interest for microscopic digital montage imaging
US7565028B2 (en) Digital composition of a mosaic image
US6738154B1 (en) Locating the position and orientation of multiple objects with a smart platen
US5594815A (en) OCR image preprocessing method for image enhancement of scanned documents
US6556721B1 (en) Method for image auto-cropping
US5892854A (en) Automatic image registration using binary moments
JPH09139856A (en) Image processor
CN110533583B (en) Self-adaptive image augmentation system based on cervical fluid-based cells
CN1200389C (en) Automatic image cutting out method
CN1148946C (en) Automatic image clipping method
EP0975146B1 (en) Locating the position and orientation of multiple objects with a smart platen
US6583897B1 (en) Non-local approach to resolution enhancement
EP0930777B1 (en) Image coding based on regions and segmented border lines thereof
TW469732B (en) Auto-crop method of image
CN113239806A (en) Curtain wall plate identification method and system based on image identification
CN1397915A (en) Deivce and method for processing covered picture to become transparent one
US20040091173A1 (en) Method, apparatus and system for the spatial interpolation of color images and video sequences in real time
EP1018694B1 (en) System and method for automatic graph parsing
CN110390339A (en) A kind of method for correcting image, device and storage medium
CN1581926A (en) Half-tone processing method for automatic detecting image-text
CN1256837C (en) Color scanning automatic judging method for scanner
EP0974931A1 (en) Method and apparatus for identifying a plurality of sub-images in an input image
CN1501687A (en) Method for improving sweep efficiency
AU2002301153B2 (en) Scanning and Detecting a Number of Images
CN1504963A (en) Color display method for black and white pictures

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: YUDONG OPTICAL CO., LTD.

Free format text: FORMER OWNER: HONGYOU SCIENCE AND TECHNOLOGY CO LTD

Effective date: 20070119

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20070119

Address after: Delaware

Patentee after: Hongyou Science & Technology Co., Ltd.

Address before: Hsinchu Science Industrial Park, Taiwan

Patentee before: Hongyou Science and Technology Co., Ltd.

C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20050504

Termination date: 20121229