CN101635058B - Method and a device for detecting margin - Google Patents

Method and a device for detecting margin Download PDF

Info

Publication number
CN101635058B
CN101635058B CN2009100867947A CN200910086794A CN101635058B CN 101635058 B CN101635058 B CN 101635058B CN 2009100867947 A CN2009100867947 A CN 2009100867947A CN 200910086794 A CN200910086794 A CN 200910086794A CN 101635058 B CN101635058 B CN 101635058B
Authority
CN
China
Prior art keywords
scan image
gray
projection
projection histogram
scale value
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
Application number
CN2009100867947A
Other languages
Chinese (zh)
Other versions
CN101635058A (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.)
Founder International Beijing Co Ltd
Original Assignee
Founder International Beijing Co Ltd
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 Founder International Beijing Co Ltd filed Critical Founder International Beijing Co Ltd
Priority to CN2009100867947A priority Critical patent/CN101635058B/en
Publication of CN101635058A publication Critical patent/CN101635058A/en
Application granted granted Critical
Publication of CN101635058B publication Critical patent/CN101635058B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method for detecting margins, which is used for accurately determining the positions of the margins. The method for detecting margins comprises the following steps: projecting a scanning image along the direction of the scanning image to obtain a projection histogram; the direction of the scanning image being analyzed or set by people; determining a corresponding reference point of a gray value of a background area of the scanning image in the projection histogram, wherein the reference point is arranged on one corresponding side of the projection histogram and is closest to a spare area in all corresponding points of the gray value of the background area in the projection histogram; determining a corresponding wave trough position of a wave trough which has a nearest distance with the reference point in the projection histogram; and ensuring the margins according to the wave trough position in the scanning image. The invention also discloses a device for realizing the method.

Description

A kind of method and device that detects margin
Technical field
The present invention relates to computing machine and image processing field, particularly relate to the method and the device that detect margin.
Background technology
Along with the development of digital technology with popularize, digital publication has been broken original papery reading method, progressively enters into people's life.Especially aspect the popularization and research of ancient books, digitized process plays important effect.
Because ancient books is all more rare, duplicate or the second edition process in all keep its original appearance as far as possible.Normally books are opened at present, with its be printed on can hold about on the big paper of two pages of contents, and then with this paper doubling and bind into book form.In with the ancient books digitized process, often the book after the printing is scanned, obtain scan image.Scan image has comprised the target pages of ancient books, stacked margin zone and vacant zone.Owing to can not carry out dismounting to ancient books, so the zone of multipage stack is arranged when printing usually, this zone is stacked margin zone.This vacant zone has more the part of the ancient books page for printing paper.When digital layout, wish from scan image, to obtain target pages, then target pages is carried out layout, to obtain digitized ancient books.
The prerequisite that obtains target pages is to determine the margin of target pages.The border that the top margin of target pages and following margin are target pages and vacant zone because target pages and vacant zone difference aspect pixel value is bigger, therefore can be relatively easy to determine top margin and following margin.The side margin of target pages is the border in target pages and stacked margin zone, because target pages and stacked margin zone difference aspect pixel value is not clearly, therefore how to determine that the side margin becomes the key of technology.
The process that prior art detects margin comprises: 1) remove literal by morphological method and disturb; 2) use Suo Beier (Sobel) operator to ask for gradient information; 3) by Hough (Hough) conversion location margin.Yet the calculated amount of Sobel operator and Hough conversion is bigger, and the speed that implements is slower.And prior art just can determine that margin in a scope roughly, can't identify stacked margin zone, makes that the position of detected margin is not accurate enough, thereby has influenced the effect of layout.
Summary of the invention
The embodiment of the invention provides a kind of method and device that detects margin, is used for determining more accurately the position of margin.
A kind of method that detects margin may further comprise the steps:
Direction along scan image is carried out projection to scan image, obtains projection histogram; The direction of described scan image perhaps is artificial the setting for to obtain by analysis;
Determine gray-scale value corresponding reference point in projection histogram of the background area of scan image, this reference point is the point of the gray-scale value of background area the most close vacant zone side of correspondence in projection histogram during corresponding institute has a few in projection histogram;
In projection histogram, determine and the nearest pairing wave trough position of trough of reference point;
In scan image, determine margin according to the wave trough position of determining.
A kind of device that is used to detect margin comprises:
Projection module is used for along the direction of scan image scan image being carried out projection, obtains projection histogram; The direction of described scan image perhaps is artificial the setting for to obtain by analysis;
Seek point module, the gray-scale value of background area that is used for determining scan image is at projection histogram corresponding reference point, and this reference point is the point of the gray-scale value of background area the most close vacant zone side of correspondence in projection histogram during corresponding institute has a few in projection histogram;
The trough module is used for determining and the nearest pairing wave trough position of trough of reference point at projection histogram;
The margin module is used for determining margin according to the wave trough position of determining at scan image.
The embodiment of the invention is carried out projection to scan image, determines the trough at the most close target pages edge by the projection histogram that obtains, determines the position of margin in the scan image according to the position of this trough.This process realizes simple, and detected margin is more accurate.
Description of drawings
Fig. 1, Fig. 5, Fig. 6 and Figure 11 are the synoptic diagram of scan image in the embodiment of the invention;
Fig. 2 is the main method process flow diagram that detects margin in the embodiment of the invention;
Fig. 3, Fig. 7, Fig. 8 and Fig. 9 are the synoptic diagram of projection histogram in the embodiment of the invention;
Fig. 4 is the detailed method process flow diagram that detects margin in the embodiment of the invention;
Figure 10 obtains the method flow diagram that a plurality of projection histograms detect margin in the embodiment of the invention by rotation;
Figure 12 is the structural drawing of pick-up unit in the embodiment of the invention.
Embodiment
Scan image 101 is meant complete image shown in Figure 1 in the embodiment of the invention.Vacant regional 102 is the black region in left side among Fig. 1, and printing paper is with respect to part that ancient books had more.Stacked margin zone 103 and target pages 104 all belong to the ancient books part.Background area 105 is the part of no content in the target pages 104, and wherein content comprises literal, various lines and pattern.
The embodiment of the invention is carried out projection to scan image, by the trough at the definite the most close target pages edge of projection histogram, just can determine the position of margin in the scan image according to the position of this trough.This process realizes simple, and detected margin is more accurate.
Referring to Fig. 2, the main method flow process that detects margin in the present embodiment is as follows:
Step 201: the direction along scan image is carried out projection to scan image, obtains projection histogram.
Step 202: determine gray-scale value corresponding reference point in projection histogram of the background area of scan image, this reference point is the point of the gray-scale value of background area the most close vacant zone side of correspondence in projection histogram during corresponding institute has a few in projection histogram.
Step 203: in projection histogram, determine and the nearest pairing wave trough position of trough of reference point.
Step 204: in scan image, determine margin according to the wave trough position of determining.
The pixel value of each pixel of scan image is gray-scale value in the present embodiment, if scan image is colored, then it is carried out gray scale and handles.
In step 201, multiple specific implementation is arranged, as direction, obtain scan image middle row gray values of pixel points along scan image, the position of this middle row pixel and this middle row pixel corresponding gray have constituted projection histogram.As shown in Figure 1, the direction of scan image is that vertically this direction can obtain by analysis, also can be by artificial setting.Determine the direction of scan image if adopt the mode of analyzing, then a kind of optional mode is as the approximate range of determining the ancient books side, be the approximate range of critical line between vacant zone and the stacked margin zone, the direction of extension of this critical line is the direction of scan image.After having obtained the direction of scan image, just can obtain the middle row gray values of pixel points along the direction of scan image, form with legend can be expressed as curve shown in Figure 3, be the position of pixel laterally, the 1st pixel from the left side, be gray-scale value vertically, obtain middle row gray values of pixel points distribution curve.Directly choose the one-row pixels point and obtain projection histogram, its implementation procedure is simple, but antijamming capability a little less than.Can also adopt another kind of implementation for addressing this problem, as direction along scan image, the average gray of acquisition every row pixel on this direction, and then obtaining gray-scale value perpendicular to the one-row pixels point of this direction, the position of this one-row pixels point and this one-row pixels point corresponding gray have constituted projection histogram.As shown in Figure 1, obtain the average gray of pixel on each file, obtained the gray-scale value of one-row pixels point like this, each gray values of pixel points is all represented the average gray of a row pixel of its correspondence.Ask the otherness that average mode can enhance lamination margin texture by this, reduce the influence of disturbing factor (as spot etc.), help to obtain margin more accurately.
The gray-scale value of the background area in the step 202 is the gray-scale value of probability of occurrence maximum in the scan image.The method that obtains the gray-scale value of this probability of occurrence maximum has: obtain the grey level histogram of scan image, the maximal value in the grey level histogram is the gray-scale value of probability of occurrence maximum.Because most of zone is the background area in the scan image, so the gray-scale value of probability of occurrence maximum just can be thought the gray-scale value of background area.
Multiple specific implementation is also arranged in step 202, as arrive the direction of target pages along vacant zone in projection histogram, determine that first gray-scale value equals the point of the gray-scale value of background area, this point is reference point; Perhaps, along the direction of target pages to vacant zone, determine that last gray-scale value equals the point of the gray-scale value of background area in projection histogram, this point is reference point.The projection histogram that obtains according to Fig. 1 as shown in Figure 3, order from left to right is along vacant zone to the direction of target pages, the gray-scale value of line 301 expression background areas, point 302 is the point of first gray-scale value that satisfies the background area, and this point is a reference point just.
Make discovery from observation, the gray-scale value of background area is usually greater than the gray-scale value of margin, therefore can not directly determine margin according to reference point, then according to the gray-scale value of background area usually greater than these characteristics of gray-scale value of margin, in projection histogram, determine and the nearest pairing wave trough position of trough of reference point, determine in projection histogram that especially reference point is near the nearest pairing wave trough position of trough of a vacant regional lateral extent.Wave trough position just is meant the pixel of trough correspondence in the projection histogram, and this pixel is corresponding the row pixel along the scan image direction in scan image, and this row pixel is detected margin.
Introduce the implementation procedure that detects margin in detail below by an embodiment.
Referring to Fig. 4, the detailed method flow process that detects margin in the present embodiment is as follows:
With Fig. 1 is that example describes.
Step 401: according to longitudinal direction scan image is carried out projection, obtain the projection histogram that average gray constituted of every row pixel.
Step 402: the gray-scale value of determining the background area according to the grey level histogram of scan image.
Step 403: in projection histogram, determine that according to direction from left to right first equals the reference point of the gray-scale value of background area.
Step 404: obtain this first trough of reference point left side.
Step 405: determine the pixel of this first trough correspondence, promptly obtain wave trough position.
Step 406: this wave trough position is corresponded in the scan image, determine a row pixel of wave trough position correspondence, this row pixel constitutes margin.
The inventor finds, the gray-scale value of margin is usually greater than the gray-scale value of its both sides adjacent area.Therefore the wave trough position of first trough of reference point left side corresponds in the scan image, should be the pixel between the margin of the margin of target pages and next page.Then, can in scan image, determine interim pixel according to the wave trough position of determining, and on the basis of interim pixel, determine target pixel points, and determine margin according to target pixel points to the target pages direction according to default side-play amount according to these characteristics.As shown in Figure 1, determine interim pixel after, to the several pixels of right translation, obtain target pixel points according to default side-play amount, this target pixel points is a pixel on the margin, then can determine margin according to target pixel points.Default side-play amount and page thickness and image resolution ratio are proportional, and the scope of default side-play amount is a 1-3 pixel in the present embodiment, can decide according to actual conditions.
If ancient books is put than calibration in printing process, then this row pixel is margin.If in printing process ancient books put some deviation, certain angle that may tilt determines that by this row pixel margin is then not accurate enough.For addressing this problem, can when carrying out projection, scan image be rotated a certain angle, or the angle that the projection reverse rotation is certain.Attempt repeatedly rotation, adopt the different anglecs of rotation at every turn, each postrotational scan image is carried out projection respectively, or carry out projection according to the different anglecs of rotation at every turn, obtain a plurality of projection histograms.Sense of rotation can be referring to Fig. 5 and synoptic diagram shown in Figure 6.Determine and the nearest trough of reference point respectively that in each projection histogram then a plurality of projection histograms can be determined a plurality of troughs.Obtain the acutance of trough definite in each projection histogram, then a plurality of projection histograms can be determined a plurality of acutancees.Determine the pairing wave trough position of trough definite in the projection histogram of maximum sharpness correspondence.According to the wave trough position of determining and the pairing anglec of rotation of projection histogram of maximum sharpness correspondence, in scan image, determine margin.
Wherein, acutance is meant the smaller value of difference between current trough and the left and right sides adjacent peaks, the ratio of the width of the crest transversal current trough corresponding with described smaller value.Referring to shown in Figure 3, point 303 be current trough, point 304 and to put 305 be the adjacent crest in the current trough left and right sides, its difference is respectively h1 and h2, if h1 less than h2, then the width of the transversal current trough of crest of smaller value correspondence is the width w of line 306.Then acutance be Sharpness=min (h1, h2)/w.
Otherness after the zone stack of the stacked margin of the big more explanation of acutance is obvious more, so the pairing anglec of rotation of the projection histogram of maximum sharpness correspondence is the angle of inclination of margin.The anglec of rotation preferably is no more than default scope, and this scope is-10 ° to 10 ° in the present embodiment, and each rotatable 0.1 ° or 1 °, this rotation granularity is decided by actual needs.Referring to Fig. 7, Fig. 8 and shown in Figure 9, Fig. 7 departs from synoptic diagram when big for the anglec of rotation and margin angle of inclination, Fig. 8 for the anglec of rotation and margin angle of inclination depart from than hour synoptic diagram, Fig. 9 is the synoptic diagram of anglec of rotation when consistent with the margin angle of inclination.From Fig. 7, Fig. 8 and Fig. 9 as can be seen, the acutance maximum of trough when the anglec of rotation is consistent with the margin angle of inclination.Wherein, the straight line in left side represent to keep left in the scan image several gray values of pixel points of side are 0 among Fig. 7, Fig. 8 and Fig. 9, and promptly this part zone is a black.Because the gray-scale value of black is 0, can reduce data volume when scan image is handled and stored.This zone also can be white, because this zone corresponding straight line in projection histogram can not have intersection point by the straight line corresponding with the gray-scale value of background area, perhaps filters by the pixel of filtering module to vacant zone, therefore present embodiment is not had influence.
Describe the implementation procedure of determining margin by a plurality of projection histograms in detail below by an embodiment.
Referring to Figure 10, obtaining a plurality of projection histograms by rotation in the present embodiment, to detect the method flow of margin as follows:
With Fig. 1 is that example describes.
Step 1001: the gray-scale value of determining the background area according to the grey level histogram of scan image.
Step 1002: scan image is rotated to the default anglec of rotation.As rotating to-10 ° for the first time, rotate to-9 ° for the second time, by that analogy, rotate to 10 ° for the last time.
Step 1003: according to longitudinal direction scan image is carried out projection, obtain the projection histogram that average gray constituted of every row pixel.
Step 1004: in projection histogram, determine that according to direction from left to right first equals the reference point of the gray-scale value of background area.
Step 1005: obtain this first trough of reference point left side.
Step 1006: the acutance of calculating this first trough.
Step 1007: need to judge whether the rotation sweep image, if, then continue step 1002, otherwise continue step 1008, illustrate that the scan image to all different rotary angles has carried out projection, and determined trough.
Step 1008: from a plurality of acutancees of a plurality of projection histogram correspondences, determine maximum sharpness.
Step 1009: determine the pairing wave trough position of trough definite in the projection histogram of maximum sharpness correspondence.
Step 1010:, in scan image, determine margin according to the wave trough position of determining and the pairing anglec of rotation of projection histogram of maximum sharpness correspondence.As shown in figure 11, the direction of scan image is vertical, then carry out projection along the direction of scan image, the direction of this projection may be from top to bottom or from down to up, if from top to bottom, the pixel of bottom line in the corresponding scan image of horizontal each pixel in the projection histogram then, wave trough position is the pixel of relevant position in the bottom line.If the direction of projection is for from down to up, the pixel of top line in horizontal each pixel correspondence scan image in the projection histogram then, wave trough position is the pixel of relevant position in the top line.Be the axle center with the wave trough position in scan image then, determine the vergence direction of line according to the pairing anglec of rotation of the projection histogram of maximum sharpness correspondence, then can determine one group of pixel, this group of pixel has constituted margin, shown in Figure 11 center line 1101.
In the present embodiment, in fact step 1002 is not rotated image, but directly realizes the effect of rotating and projection in the image scanning process.
The scheme of present embodiment is particularly useful for the digitized processing to ancient books, but ancient books has spot or oil stain etc. through depositing for a long time on the page, thereby has influenced the accuracy that detects margin.For addressing this problem, present embodiment is before obtaining the projection histogram of scan image, scan image is filtered, the mode of filtering is as the grey level histogram that obtains scan image, (this step can also be used to obtain the gray-scale value of background area), grey level histogram has three intervals that probability is bigger, promptly distinguishes background area, content part and vacant zone in the corresponding scan image.In the present embodiment, can determine three corresponding respectively zones, space that probability is bigger by the gray-scale value size in the bigger interval of three probability of analysis.The gray-scale value scope that obtains vacant zone according to the corresponding crest probability in vacant zone and default probability side-play amount.In like manner, obtain the gray-scale value scope of content part according to the crest probability of content part correspondence and default probability side-play amount.In scan image, gray-scale value is in the pixel of gray-scale value scope of content part then and the pixel that is in the gray-scale value scope in zone, spatial domain filters, promptly, when carrying out projection, the gray values of pixel points that will determine does not count, to reach the purpose of filtering spot.
More than be the description to the implementation procedure that detects margin, this process can be by the pick-up unit realization that is used to detect margin, and the 26S Proteasome Structure and Function to pick-up unit is introduced below.
Referring to Figure 12, in the present embodiment pick-up unit comprise projection module 1201, seek point module 1202, trough module 1203 and margin module 1204.
Projection module 1201 is used for along the direction of scan image scan image being carried out projection, obtains projection histogram.Projection module 1201 comprises: the first projection submodule, be used for direction along scan image, obtain scan image middle row gray values of pixel points, the position of this middle row pixel and this middle row pixel corresponding gray have constituted projection histogram; Perhaps, the second projection submodule, be used for direction along scan image, the average gray of acquisition every row pixel on this direction, and then obtaining gray-scale value perpendicular to the one-row pixels point of this direction, the position of this one-row pixels point and this one-row pixels point corresponding gray have constituted projection histogram.
Seek point module 1202 and be used for determining the reference point at gray-scale value the most close target pages edge in the corresponding point of projection histogram of the background area of scan image.Seek point module 1202 and comprise that first seeks a submodule, be used for arriving along vacant zone at projection histogram the direction of target pages, determine that first gray-scale value satisfies the point of the gray-scale value of background area, this point is reference point; Perhaps, second seeks a submodule, is used at projection histogram along target pages determining that to the direction in vacant zone last gray-scale value satisfies the point of the gray-scale value of background area, and this point is reference point.
Trough module 1203 is used for determining and the nearest pairing wave trough position of trough of reference point at projection histogram.Concrete, trough module 1203 determines that in projection histogram reference point is near the nearest pairing wave trough position of trough of a vacant regional lateral extent.
Margin module 1204 is used for determining margin according to the wave trough position of determining at scan image.
Projection module 1201 carries out projection to scan image along the direction of scan image respectively according to default a plurality of anglecs of rotation, obtains a plurality of projection histograms.Wherein, by projection module 1201 rotation sweep images and judge whether need to continue the rotation sweep image.Trough module 1203 is determined and the nearest trough of reference point respectively in each projection histogram; Obtain the acutance of trough definite in each projection histogram; Determine the pairing wave trough position of trough definite in the projection histogram of maximum sharpness correspondence.Margin module 1204 is determined margin according to the wave trough position of determining and the pairing anglec of rotation of projection histogram of maximum sharpness correspondence in scan image.
Pick-up unit also comprises filtering module, is used for scan image is filtered.
Be used to realize that the software of the embodiment of the invention can be stored in storage mediums such as floppy disk, hard disk, CD and flash memory.
The embodiment of the invention is carried out projection to scan image, determines the trough at the most close target pages edge by the projection histogram that obtains, determines the position of margin in the scan image according to the position of this trough.This process realizes simple, and detected margin is more accurate.The embodiment of the invention also obtains a plurality of projection histograms according to a plurality of anglecs of rotation, and calculate the acutance of trough in a plurality of projection histograms, determine margin according to the wave trough position in the projection histogram of maximum sharpness correspondence and the anglec of rotation, the detected margin of this mode is more accurate.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.

Claims (22)

1. a method that detects margin is characterized in that, may further comprise the steps:
Direction along scan image is carried out projection to scan image, obtains projection histogram; The direction of described scan image perhaps is artificial the setting for to obtain by analysis;
Determine gray-scale value corresponding reference point in projection histogram of the background area of scan image, this reference point is the point of the gray-scale value of background area the most close vacant zone side of correspondence in projection histogram during corresponding institute has a few in projection histogram;
In projection histogram, determine and the nearest pairing wave trough position of trough of described reference point;
In scan image, determine margin according to the wave trough position of determining.
2. the method for claim 1, it is characterized in that, the step of scan image being carried out projection and obtain projection histogram along the direction of scan image comprises: along the direction of scan image, obtain scan image middle row gray values of pixel points, constitute projection histogram by position and this middle row pixel corresponding gray of this middle row pixel; Perhaps
The step of scan image being carried out projection and obtain projection histogram along the direction of scan image comprises: along the direction of scan image, the average gray of acquisition every row pixel on this direction, and then obtain gray-scale value perpendicular to the one-row pixels point of this direction, constitute projection histogram by position and this one-row pixels point corresponding gray of this one-row pixels point.
3. method as claimed in claim 2 is characterized in that, the gray-scale value of background area is the gray-scale value of probability of occurrence maximum in the scan image.
4. the method for claim 1 is characterized in that, the gray-scale value of background area of determining scan image in projection histogram in the corresponding some step of the reference point at the most close target pages edge comprise:
In projection histogram, arrive the direction of target pages, determine that first gray-scale value equals the reference point of the gray-scale value of background area along vacant zone; Perhaps
In projection histogram,, determine that last gray-scale value equals the reference point of the gray-scale value of background area along the direction of target pages to vacant zone.
5. the method for claim 1, it is characterized in that step definite and the pairing wave trough position of trough that reference point is nearest comprises in projection histogram: determine that in projection histogram reference point is in the close nearest pairing wave trough position of trough of a vacant regional lateral extent.
6. as each described method in the claim 1 to 5, it is characterized in that, the step of scan image being carried out projection and obtain projection histogram along the direction of scan image comprises: along the direction of scan image, respectively scan image is carried out projection according to default a plurality of anglecs of rotation, obtain a plurality of projection histograms.
7. method as claimed in claim 6 is characterized in that, step definite and the pairing wave trough position of trough that reference point is nearest comprises in projection histogram:
In each projection histogram, determine and the nearest trough of reference point respectively;
Obtain the acutance of trough definite in each projection histogram;
Determine the pairing wave trough position of trough definite in the projection histogram of maximum sharpness correspondence.
8. method as claimed in claim 7, it is characterized in that, the step of determining margin according to the wave trough position of determining in scan image comprises: according to the wave trough position of determining and the pairing anglec of rotation of projection histogram of maximum sharpness correspondence, determine margin in scan image.
9. method as claimed in claim 6 is characterized in that, the described anglec of rotation is between-10 ° to 10 °.
10. the method for claim 1 is characterized in that, determines in scan image that according to the wave trough position of determining the step of margin comprises: determine interim pixel according to the wave trough position of determining in scan image; On the basis of interim pixel, determine target pixel points according to default side-play amount to the target pages direction; Determine margin according to target pixel points.
11. the method for claim 1 is characterized in that, before along the direction of scan image scan image being carried out projection, scan image is filtered.
12. method as claimed in claim 11 is characterized in that, the step that scan image is filtered comprises:
In the grey level histogram of scan image, determine the crest probability that vacant zone and content part are corresponding respectively;
Obtain the gray-scale value scope in vacant zone according to the corresponding crest probability of default probability side-play amount and vacant zone, and give according to the gray-scale value scope that obtains content part according to the crest probability of default probability side-play amount and content part correspondence;
Determine that in scan image gray-scale value is included within the gray-scale value scope in vacant zone and is included in pixel within the gray-scale value scope of content part;
Described definite pixel is filtered.
13. a device that is used to detect margin is characterized in that, comprising:
Projection module is used for along the direction of scan image scan image being carried out projection, obtains projection histogram; The direction of described scan image perhaps is artificial the setting for to obtain by analysis;
Seek point module, the gray-scale value of background area that is used for determining scan image is at projection histogram corresponding reference point, and this reference point is the point of the gray-scale value of background area the most close vacant zone side of correspondence in projection histogram during corresponding institute has a few in projection histogram;
The trough module is used for determining and the nearest pairing wave trough position of trough of reference point at projection histogram;
The margin module is used for determining margin according to the wave trough position of determining at scan image.
14. device as claimed in claim 13 is characterized in that, projection module comprises:
The first projection submodule is used for the direction along scan image, obtains scan image middle row gray values of pixel points, and the position of this middle row pixel and this middle row pixel corresponding gray have constituted projection histogram; Perhaps
The second projection submodule, be used for direction along scan image, the average gray of acquisition every row pixel on this direction, and then obtain gray-scale value perpendicular to the one-row pixels point of this direction, the position of this one-row pixels point and this one-row pixels point corresponding gray have constituted projection histogram.
15. device as claimed in claim 14 is characterized in that, the gray-scale value of background area is the gray-scale value of probability of occurrence maximum in the scan image.
16. device as claimed in claim 13 is characterized in that, seeks point module and comprises
First seeks a submodule, is used for arriving along vacant zone at projection histogram the direction of target pages, determines that first gray-scale value satisfies the point of the gray-scale value of background area, and this point is reference point; Perhaps
Second seeks a submodule, is used at projection histogram along target pages determining that to the direction in vacant zone last gray-scale value satisfies the point of the gray-scale value of background area, and this point is reference point.
17. device as claimed in claim 13 is characterized in that, the trough module determines that in projection histogram reference point is near the nearest pairing wave trough position of trough of a vacant regional lateral extent.
18., it is characterized in that projection module carries out projection to scan image along the direction of scan image respectively according to default a plurality of anglecs of rotation, obtains a plurality of projection histograms as each described device in the claim 13 to 17.
19. device as claimed in claim 18 is characterized in that, the trough module is determined and the nearest trough of reference point respectively in each projection histogram; Obtain the acutance of trough definite in each projection histogram; Determine the pairing wave trough position of trough definite in the projection histogram of maximum sharpness correspondence.
20. device as claimed in claim 19 is characterized in that, the margin module is determined margin according to the wave trough position of determining and the pairing anglec of rotation of projection histogram of maximum sharpness correspondence in scan image.
21. device as claimed in claim 13, it is characterized in that, the margin module is determined interim pixel according to the wave trough position of determining in scan image, and on the basis of interim pixel, determine target pixel points, and determine margin according to target pixel points to the target pages direction according to default side-play amount.
22. device as claimed in claim 13 is characterized in that, also comprises: filtering module is used for scan image is filtered.
CN2009100867947A 2009-06-30 2009-06-30 Method and a device for detecting margin Expired - Fee Related CN101635058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100867947A CN101635058B (en) 2009-06-30 2009-06-30 Method and a device for detecting margin

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100867947A CN101635058B (en) 2009-06-30 2009-06-30 Method and a device for detecting margin

Publications (2)

Publication Number Publication Date
CN101635058A CN101635058A (en) 2010-01-27
CN101635058B true CN101635058B (en) 2011-06-01

Family

ID=41594238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100867947A Expired - Fee Related CN101635058B (en) 2009-06-30 2009-06-30 Method and a device for detecting margin

Country Status (1)

Country Link
CN (1) CN101635058B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104484674B (en) * 2014-12-05 2019-04-26 深圳怡化电脑股份有限公司 A kind of method of the vertical folding line position of hundred yuan note of determination

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1495660A (en) * 1995-09-06 2004-05-12 富士通株式会社 Header extracting device and method for extracting header from file image
CN1542697A (en) * 2003-11-06 2004-11-03 上海交通大学 Words and image dividing method on the basis of adjacent edge point distance statistics
CN1554181A (en) * 2001-09-12 2004-12-08 精工爱普生株式会社 Composite printer and scan image copying method
US20050270580A1 (en) * 2004-05-14 2005-12-08 Seiko Epson Corporation Photographic image region extracting apparatus and copying apparatus
US20060190811A1 (en) * 2005-02-04 2006-08-24 Canon Kabushiki Kaisha Information processing apparatus, control method therefor, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1495660A (en) * 1995-09-06 2004-05-12 富士通株式会社 Header extracting device and method for extracting header from file image
CN1554181A (en) * 2001-09-12 2004-12-08 精工爱普生株式会社 Composite printer and scan image copying method
CN1542697A (en) * 2003-11-06 2004-11-03 上海交通大学 Words and image dividing method on the basis of adjacent edge point distance statistics
US20050270580A1 (en) * 2004-05-14 2005-12-08 Seiko Epson Corporation Photographic image region extracting apparatus and copying apparatus
US20060190811A1 (en) * 2005-02-04 2006-08-24 Canon Kabushiki Kaisha Information processing apparatus, control method therefor, and program

Also Published As

Publication number Publication date
CN101635058A (en) 2010-01-27

Similar Documents

Publication Publication Date Title
US9509884B2 (en) Skew detection
TWI655586B (en) Method and device for detecting specific identification image in predetermined area
CN109034165B (en) Method, device and system for cutting certificate image and storage medium
US5517587A (en) Positioning method and apparatus for line scanned images
CN102196112B (en) Page border detection method and device
CN100369066C (en) Characteristic region extraction device, characteristic region extraction method, and characteristic region extraction program
US10068150B2 (en) Method and apparatus for OCR detection of valuable documents by means of a matrix camera
US20070253031A1 (en) Image processing methods, image processing systems, and articles of manufacture
CN102496018B (en) Document skew detection method and system
CN100338549C (en) An anti-copy method for documents
WO2010140159A2 (en) Edge detection
CN107679442A (en) Method, apparatus, computer equipment and the storage medium of document Data Enter
CN105044114A (en) Electrolytic capacitor appearance package defect image detection system and electrolytic capacitor appearance package defect image detection method
KR20120130684A (en) Image processing apparatus, image processing method, and computer readable medium
WO2021000948A1 (en) Counterweight weight detection method and system, and acquisition method and system, and crane
CN102054275B (en) Real-time detection method for sea sky line of gray level image
EP2536123B1 (en) Image processing method and image processing apparatus
US9332154B2 (en) Image binarization using dynamic sub-image division
CN101635058B (en) Method and a device for detecting margin
US20160180164A1 (en) Method for converting paper file into electronic file
JP2003016440A5 (en)
CN110736688A (en) crude oil emulsion particle size detection method, device and readable storage medium
US8538162B2 (en) Data capture from multi-page documents
CN114049481B (en) Grain kernel detection alignment method, device, equipment and storage medium
JP3733686B2 (en) Image processing method and apparatus

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110601