CN108345891A - Books contour extraction method and device - Google Patents
Books contour extraction method and device Download PDFInfo
- Publication number
- CN108345891A CN108345891A CN201710048396.0A CN201710048396A CN108345891A CN 108345891 A CN108345891 A CN 108345891A CN 201710048396 A CN201710048396 A CN 201710048396A CN 108345891 A CN108345891 A CN 108345891A
- Authority
- CN
- China
- Prior art keywords
- books
- rectangular
- profile
- module
- approximate
- 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.)
- Pending
Links
- 238000000605 extraction Methods 0.000 title claims abstract description 60
- 238000012545 processing Methods 0.000 claims abstract description 40
- 239000000284 extract Substances 0.000 claims abstract description 19
- 238000000034 method Methods 0.000 claims description 16
- 230000000877 morphologic effect Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 24
- 238000004590 computer program Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000003860 storage Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000011478 gradient descent method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The present invention discloses a kind of books contour extraction method and device, is related to image processing field.Wherein by the way that processing is identified to extract books edge to books photo, form is carried out to books edge and is closed processing to obtain enclosed region, by carrying out polygonal approximation to enclosed region to obtain books outline polygon, if in the presence of approximate rectangular, the rectangular profile based on the approximate rectangular extraction books close with the books outline polygon.By using the morphological character of books itself, that is, it is that the rectangular feature of standard so as to effectively improve books contours extract efficiency, and improves books contours extract precision using the rectangle close with books outline polygon as books profile to utilize books profile.
Description
Technical field
The present invention relates to image processing field, more particularly to a kind of books contour extraction method and device.
Background technology
Currently, in the storehouse management of such as electric business, need to take pictures to the books on conveyer belt when books are put in storage,
To determine the profile of the books, and then picture is cut using identified books profile to obtain book information progress
Filing and other corresponding application processing.
In order to obtain books profile, image recognition in the prior art can be used and image procossing mode is realized.But it needs
It should be noted that image recognition in the prior art and image procossing mode are less efficient, and the stop of books on a moving belt
Time is limited, therefore can not obtain out books profile from picture in time, can seriously affect subsequent application processing.
Invention content
A kind of books contour extraction method of offer of the embodiment of the present invention and device, it is special by using the form of books itself
Property, that is, it is the rectangular feature of standard to utilize books profile, using the rectangle close with books outline polygon as books wheel
Exterior feature so as to effectively improve books contours extract efficiency, and improves books contours extract precision.
According to an aspect of the present invention, a kind of books contour extraction method is provided, including:
By the way that processing is identified to books photo, to extract books edge;
Form closure processing is carried out to books edge, to obtain enclosed region;
By carrying out polygonal approximation to enclosed region to obtain books outline polygon;
If in the presence of approximate rectangular, the rectangle wheel based on approximate rectangular extraction books close with books outline polygon
It is wide.
In one embodiment, include based on the approximate rectangular rectangular profile for extracting books:
On the approximate rectangular middle highest two approximate rectangular sides of lookup vertical extent;
The rectangular profile of books is determined using two approximate rectangular sides.
In one embodiment, determine that the rectangular profile of books includes using two approximate rectangular sides:
Determine the Bisector of angle on two approximate rectangular sides;
Two approximate rectangular intersection points while approximate rectangular rotating around two are rotated, to obtain orthogonal two
Rectangular profile side, two of which rectangular profile while Bisector of angle and two it is approximate rectangular while Bisector of angle overlap;
The rectangular profile of books is determined using two rectangular profile sides.
In one embodiment, if there is no approximate rectangular, minimal face is searched according to the vertex of books outline polygon
The circumscribed rectangle of product;
Utilize the rectangular profile of the circumscribed rectangular extraction books of minimum area.
In one embodiment, searching the circumscribed rectangle of minimum area according to the vertex of books outline polygon includes:
Count the vertex of books outline polygon;
The reference frame of books profile is set according to the books profile angle of inclination of selection;
According to the projection that each vertex of books outline polygon is fastened in reference coordinate, determine boundary rectangle with reference to seat
Mark the length of side Lx and Ly fastened;
The length of side Lx and Ly fastened in reference coordinate according to boundary rectangle determines the area of boundary rectangle;
Using the boundary rectangle of area minimum as the circumscribed rectangle of minimum area.
In one embodiment, the projection fastened in reference coordinate according to each vertex of books outline polygon determines outer
Connecing the length of side that rectangle is fastened in reference coordinate includes:
In the X-axis of reference frame, using the difference of maximal projection value and minimum projection's value as boundary rectangle in X-axis
Length of side Lx;
In the Y-axis of reference frame, using the difference of maximal projection value and minimum projection's value as boundary rectangle in Y-axis
Length of side Ly.
In one embodiment, include to obtain books outline polygon by carrying out polygonal approximation to enclosed region:
Extract the contour line of enclosed region;
Polygonal approximation is carried out to contour line, to obtain books outline polygon.
In one embodiment, before processing is identified to books photo, the conveyer belt background in books photo is removed
Noise.
According to another aspect of the present invention, a kind of books contour extraction apparatus is provided, including edge extracting module, form are closed
Processing module, polygonal approximation module and profile extraction module are closed, wherein:
Edge extracting module, for by the way that processing is identified to books photo, to extract books edge;
Form is closed processing module, for carrying out form closure processing to books edge, to obtain enclosed region;
Polygonal approximation module, for by carrying out polygonal approximation to enclosed region to obtain books outline polygon;
Profile extraction module, for when having close with books outline polygon approximate rectangular, based on approximation square
Shape extracts the rectangular profile of books.
In one embodiment, profile extraction module is specifically in approximate rectangular middle highest two approximations of lookup vertical extent
Rectangular edges determine the rectangular profile of books using two approximate rectangular sides.
In one embodiment, profile extraction module is additionally operable to determine the Bisector of angle on two approximate rectangular sides, by two
Approximate rectangular intersection point while approximate rectangular rotating around two of item is rotated, to obtain orthogonal two rectangular profiles
Side, two of which rectangular profile while Bisector of angle and two it is approximate rectangular while Bisector of angle overlap, utilize two squares
Shape profile side determines the rectangular profile of books.
In one embodiment, above-mentioned apparatus further includes circumscribed rectangular profile module, wherein:
Circumscribed rectangular profile module, for when there is no approximate rectangular, being searched according to the vertex of books outline polygon
The circumscribed rectangle of minimum area utilizes the rectangular profile of the circumscribed rectangular extraction books of minimum area.
In one embodiment, circumscribed rectangular profile module specifically counts the vertex of books outline polygon, according to selection
Books profile angle of inclination setting books profile reference frame, referred to according to each vertex of books outline polygon
Projection on coordinate system determines the length of side Lx and Ly that boundary rectangle is fastened in reference coordinate, according to boundary rectangle in reference coordinate
The length of side Lx and Ly that fasten determine the area of boundary rectangle, using the boundary rectangle of area minimum as the circumscribed rectangle of minimum area.
In one embodiment, circumscribed rectangular profile module is additionally operable to maximal projection value in the X-axis of reference frame
Length of side Lx with the difference of minimum projection value as boundary rectangle in X-axis, in the Y-axis of reference frame by maximal projection value and
Length of side Ly of the difference of minimum projection's value as boundary rectangle in Y-axis.
In one embodiment, polygonal approximation module specifically extracts the contour line of enclosed region, is carried out to contour line more
Side shape is approximate, to obtain books outline polygon.
In one embodiment, above-mentioned apparatus further includes background noise removal module, wherein:
Background noise removes module, for before processing is identified to books photo in edge extracting module, removing books
Conveyer belt background noise in photo.
According to another aspect of the present invention, a kind of books contour extraction apparatus, including memory and processor are provided,
In:
Memory, for storing instruction;
Processor, is coupled to memory, and the instruction execution that processor is configured as storing based on memory is realized as above-mentioned
The method that any embodiment is related to.
By referring to the drawings to the detailed description of exemplary embodiment of the present invention, other feature of the invention and its
Advantage will become apparent.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention without having to pay creative labor, may be used also for those of ordinary skill in the art
With obtain other attached drawings according to these attached drawings.
Fig. 1 is the schematic diagram of books contour extraction method one embodiment of the present invention.
Fig. 2 is the schematic diagram that form of the present invention is closed one embodiment.
Fig. 3 is the schematic diagram of contour line extraction one embodiment of the present invention.
Fig. 4 is the schematic diagram of present invention extraction rectangular profile one embodiment.
Fig. 5 is the schematic diagram of present invention extraction another embodiment of rectangular profile.
Fig. 6 is the schematic diagram of another embodiment of books contour extraction method of the present invention.
Fig. 7 is the schematic diagram that the present invention searches the circumscribed rectangle one embodiment of minimum area.
Fig. 8 is the schematic diagram present invention determine that outline polygon vertex one embodiment.
Fig. 9 is the schematic diagram present invention determine that boundary rectangle one embodiment.
Figure 10 is the schematic diagram of books contour extraction apparatus one embodiment of the present invention.
Figure 11 is the schematic diagram of another embodiment of books contour extraction apparatus of the present invention.
Figure 12 is the schematic diagram of the another embodiment of books contour extraction apparatus of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Below
Description only actually at least one exemplary embodiment is illustrative, is never used as to the present invention and its application or makes
Any restrictions.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Lower obtained every other embodiment, shall fall within the protection scope of the present invention.
Unless specifically stated otherwise, positioned opposite, the digital table of the component and step that otherwise illustrate in these embodiments
It is not limited the scope of the invention up to formula and numerical value.
Simultaneously, it should be appreciated that for ease of description, the size of attached various pieces shown in the drawings is not according to reality
Proportionate relationship draw.
Technology, method and apparatus known to person of ordinary skill in the relevant may be not discussed in detail, but suitable
In the case of, the technology, method and apparatus should be considered as authorizing part of specification.
In shown here and discussion all examples, any occurrence should be construed as merely illustrative, without
It is as limitation.Therefore, the other examples of exemplary embodiment can have different values.
It should be noted that:Similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined, then it need not be further discussed in subsequent attached drawing in a attached drawing.
Fig. 1 is the schematic diagram of books contour extraction method one embodiment of the present invention.Wherein:
Step 101, by the way that processing is identified to books photo, to extract books edge.
Optionally, before processing is identified to books photo, the conveyer belt background noise in books photo is removed.
Since black conveyer belt can include image texture, noise can be brought when carrying out edge finding, can be led to thus
Crossing the method for subtracting conveyer belt background reduces noise.For example, specifically when execution subtracts background process, can first by image from
8 positive integer types are converted to the numeric type of more high-order tape symbol, then execute phase reducing again and avoid overflowing.Subtract background
It is needed later by the pixel zero setting less than 0.
In addition, Canny algorithms or other common gradient extraction means can be used and execute threshold transformation to extract side
Edge.It should be noted that since extraction books edge is individually not the inventive point place of the present invention, it is not unfolded to retouch here
It states.
Step 102, form closure processing is carried out to books edge, to obtain enclosed region.
It, can be according to a certain size subregion to image in order to avoid the image outline information behind extraction edge is excessively abundant
Execute morphologic closure processing.For example, as shown in Fig. 2, also having shape due to books breakage in the books profile shown in left side
At subregion (shown in the black irregular area in figure), by carry out form closure processing, with obtain right side shown in close
Close region.
It should be noted that since form closure is individually not the inventive point place of the present invention, it is not unfolded here
Description.
Step 103, by carrying out polygonal approximation to enclosed region to obtain books outline polygon.
Optionally, may include with obtaining books outline polygon by carrying out polygonal approximation to enclosed region:Extraction is closed
The contour line for closing region carries out polygonal approximation to obtain books outline polygon to contour line.
For example, carrying out the contour line extraction of whole figure to the image after closure, contour line is that all pixels change
Position line set, as shown in Figure 3.
Step 104, if in the presence of close with books outline polygon approximate rectangular, approximate rectangular extraction books are based on
Rectangular profile.
It is special by using the form of books itself according to the books contour extraction method that the above embodiment of the present invention provides
Property, that is, it is the rectangular feature of standard to utilize books profile, using the rectangle close with books outline polygon as books wheel
Exterior feature so as to effectively improve books contours extract efficiency, and improves books contours extract precision.
Optionally, include based on the approximate rectangular rectangular profile for extracting books:Approximate rectangular middle lookup vertical extent most
Two high approximate rectangular sides determine the rectangular profile of books using this two approximate rectangular sides.
As shown in figure 4, it is as shown by the solid line it is approximate rectangular in, while 41 and while 42 be that vertical extent is highest, 41 He of side
Angle between side 42 is close to right angle, in this case, can will be adjusted according to 41 opposite side 43 of side, according to 42 opposite side 44 of side into
Row adjustment, to obtain the rectangular profile of books, as shown in phantom in figure 4.
Optionally, the angle between the approximate rectangular middle highest two approximate rectangular sides of vertical extent also has one with right angle
Determine deviation, in order to improve the precision of extracted rectangular profile, following manner also can be used, as shown in Figure 5.For ease of description,
Two approximate rectangular sides are only gived in Figure 5.
First, on the approximate rectangular middle highest two approximate rectangular sides 51 and 52 of lookup vertical extent, and approximate square is determined
The Bisector of angle 55 on shape side 51 and 52.
Then, by Bisector of angle 55 around the intersection point on two approximate rectangular sides 51 and 52, respectively to the left and to right rotation 45
Degree, to obtain orthogonal two rectangular profile sides 53 and 54, while also ensuring the folder on two rectangular profile sides 53 and 54
Angular bisector is overlapped with the Bisector of angle on two approximate rectangular sides 51 and 52.
Finally, the rectangular profile of books is determined using two rectangular profile sides 53 and 54.
In this embodiment, since two rectangular profile sides 53 and 54 of acquisition are mutually perpendicular to, while two rectangular profiles
When 53 and 54 Bisector of angle and two are approximate rectangular, 51 and 52 Bisector of angle overlaps, and ensures that rectangular profile
Precision is high, will not there is a situation where profiles to deform.
Fig. 6 is the schematic diagram of another embodiment of books contour extraction method of the present invention.Wherein:
Step 601, the conveyer belt background noise in books photo is removed.
Step 602, by the way that processing is identified to books photo, to extract books edge.
Step 603, form closure processing is carried out to books edge, to obtain enclosed region.
Step 604, by carrying out polygonal approximation to enclosed region to obtain books outline polygon.
Step 605, it judges whether close with books outline polygon approximate rectangular.If in the presence of with books profile
Polygon is similar approximate rectangular, thens follow the steps 606;If there is no the approximate squares being similar with books outline polygon
Shape thens follow the steps 607.
Step 606, the rectangular profile based on approximate rectangular extraction books.
For example, Fig. 4 or embodiment illustrated in fig. 5 progress rectangular profile extraction can be used.
Step 607, the circumscribed rectangle of minimum area is searched according to the vertex of books outline polygon.
Step 608, the rectangular profile of the circumscribed rectangular extraction books of minimum area is utilized.
Fig. 7 is the schematic diagram that the present invention searches the circumscribed rectangle one embodiment of minimum area.Wherein:
Step 701, the vertex of books outline polygon is counted.
Step 702, the reference frame of books profile is set according to the books profile angle of inclination of selection.
Step 703, the projection fastened in reference coordinate according to each vertex of books outline polygon, determines boundary rectangle
In the length of side Lx and Ly that reference coordinate is fastened.
Wherein, in the X-axis of reference frame, using the difference of maximal projection value and minimum projection's value as boundary rectangle in X
Length of side Lx on axis;In the Y-axis of reference frame, using the difference of maximal projection value and minimum projection's value as boundary rectangle in Y
Length of side Ly on axis.
Step 704, the length of side Lx and Ly fastened in reference coordinate according to boundary rectangle determines the area of boundary rectangle.
Step 705, using the boundary rectangle of area minimum as the circumscribed rectangle of minimum area.
For example, using the area of boundary rectangle as object function, minimum value is solved with gradient descent method, to obtain area most
Small boundary rectangle.
As shown in figure 8, by handling books photo shown in left side, corresponding outline polygon is obtained, including
One quadrangle and a triangle, as shown in the middle parts Fig. 8.The quadrangle and vertex of a triangle are further determined that, in Fig. 8
Shown in right side.
As shown in figure 9, setting the angle of inclination of books profile as θ, referred to according to each vertex of books outline polygon
Projection on coordinate system determines the length of side Lx and Ly that boundary rectangle is fastened in reference coordinate, to which the area of boundary rectangle is Lx
×Ly.Using the area of boundary rectangle as object function, minimum value is solved with gradient descent method, to obtain the external of area minimum
Rectangle.
Figure 10 is the schematic diagram of books contour extraction apparatus one embodiment of the present invention.As shown in Figure 10, books profile carries
It includes edge extracting module 1001, form closure processing module 1002, polygonal approximation module 1003 and contours extract to take device
Module 1004, wherein:
Edge extracting module 1001 is used for by the way that processing is identified to books photo, to extract books edge.
Form is closed processing module 1002 and is used to carry out form closure processing to books edge, to obtain enclosed region.
Polygonal approximation module 1003 is used for polygon to obtain books profile by carrying out polygonal approximation to enclosed region
Shape.
Optionally, polygonal approximation module 1003 specifically extracts the contour line of enclosed region, and polygon is carried out to contour line
Approximation, to obtain books outline polygon.
Profile extraction module 1004 is used for when having close with books outline polygon approximate rectangular, based on approximate
The rectangular profile of rectangular extraction books.
For example, profile extraction module 1004 is specifically approximate rectangular in approximate rectangular highest two of middle lookup vertical extent
Side determines the rectangular profile of books using two approximate rectangular sides.
Optionally, profile extraction module 1004 is additionally operable to determine the Bisector of angle on two approximate rectangular sides, close by two
Intersection point like rectangular edges rotating around two approximate rectangular sides is rotated, to obtain orthogonal two rectangular profile sides,
In two rectangular profiles while Bisector of angle and two it is approximate rectangular while Bisector of angle overlap, utilize two rectangular profiles
While determining the rectangular profile of books.
It is special by using the form of books itself according to the books contour extraction apparatus that the above embodiment of the present invention provides
Property, that is, it is the rectangular feature of standard to utilize books profile, using the rectangle close with books outline polygon as books wheel
Exterior feature so as to effectively improve books contours extract efficiency, and improves books contours extract precision.
Figure 11 is the schematic diagram of another embodiment of books contour extraction apparatus of the present invention.Compared with embodiment illustrated in fig. 10,
In the embodiment shown in fig. 11, books contour extraction apparatus removes edge extraction module 1101, form is closed processing module 1102, more
Further include circumscribed rectangular profile module 1105 except side shape approximate module 1103 and profile extraction module 1104.Wherein:
Circumscribed rectangular profile module 1105 is used for when there is no approximate rectangular, is looked into according to the vertex of books outline polygon
The circumscribed rectangle of minimum area is looked for, the rectangular profile of the circumscribed rectangular extraction books of minimum area is utilized.
Optionally, circumscribed rectangular profile module 1105 specifically counts the vertex of books outline polygon, according to the figure of selection
The reference frame of books profile is arranged in book profile angle of inclination, according to each vertex of books outline polygon in reference coordinate
The projection fastened determines the length of side Lx and Ly that boundary rectangle is fastened in reference coordinate, is fastened in reference coordinate according to boundary rectangle
The length of side Lx and Ly determine the area of boundary rectangle, using the boundary rectangle of area minimum as the circumscribed rectangle of minimum area.
Wherein, circumscribed rectangular profile module 1105 can be in the X-axis of reference frame by maximal projection value and minimum projection
Length of side Lx of the difference of value as boundary rectangle in X-axis, by maximal projection value and minimum projection's value in the Y-axis of reference frame
Length of side Ly of the difference as boundary rectangle in Y-axis.
Optionally, in the embodiment shown in fig. 11, further include background noise removal module 1106, wherein:
Background noise removes module 1106 and is used for before processing is identified to books photo in edge extracting module, removal figure
Conveyer belt background noise in book photo.
Figure 12 is the schematic diagram of the another embodiment of books contour extraction apparatus of the present invention.As shown in figure 12, books profile carries
It includes memory 1201 and processor 1202 to take device.Wherein:
For storing instruction, processor 1202 is coupled to memory 1201 to memory 1201, and processor 1202 is configured as
Instruction execution based on memory storage realizes the method that any embodiment is related in such as Fig. 1, Fig. 6, Fig. 7.
As shown in figure 12, books contour extraction apparatus further includes communication interface 1203, for miscellaneous equipment into row information
Interaction.Meanwhile the device further includes bus 1204, processor 1202, communication interface 1203 and memory 1201 pass through bus
1204 complete mutual communication.
Memory 1201 can include high-speed RAM memory, also can further include nonvolatile memory (non-volatile
Memory), a for example, at least magnetic disk storage.Memory 1201 can also be memory array.Memory 1201 is also possible to
By piecemeal, and block can be combined into virtual volume by certain rule.
In addition, processor 1202 can be a central processor CPU, or it can be application-specific integrated circuit ASIC
(Application Specific Integrated Circuit), or be arranged to implement the one of the embodiment of the present invention
A or multiple integrated circuits.
By applying the present invention, by using the morphological character of books itself, that is, it is standard rectangle to utilize books profile
The characteristics of, using the rectangle close with books outline polygon as books profile, so as to effectively improve books contours extract
Efficiency, and improve books contours extract precision.By test, extracted profile and books actual profile area intersection and its
The ratio of frame of the ratio of profile union more than 0.95 is more than 99%.
Accurate contours extract is to carry out the premise of many further image procossings, for example image compares, image alignment, high
The accuracy of the contours extract energy significant increase subsequent applications of accuracy rate brings artificial saving and economic benefit.
For example, region cutting can be carried out according to identified books profile, and part will be cut and believed directly as books
Breath is filed;It can will also cut part and commodity master map or advertising map is directly compared to judge whether deviation.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, the present invention can be used in one or more wherein include computer usable program code computer
The calculating implemented on non-transient storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) can be used
The form of machine program product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided
Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real
The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to
Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or
The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Description of the invention provides for the sake of example and description, and is not exhaustively or will be of the invention
It is limited to disclosed form.Many modifications and variations are obvious for the ordinary skill in the art.It selects and retouches
It states embodiment and is to more preferably illustrate the principle of the present invention and practical application, and those skilled in the art is enable to manage
Various embodiments with various modifications of the solution present invention to design suitable for special-purpose.
Claims (17)
1. a kind of books contour extraction method, which is characterized in that including:
By the way that processing is identified to books photo, to extract books edge;
Form closure processing is carried out to the books edge, to obtain enclosed region;
By carrying out polygonal approximation to the enclosed region to obtain books outline polygon;
If in the presence of approximate rectangular, the square based on the approximate rectangular extraction books close with the books outline polygon
Shape profile.
2. according to the method described in claim 1, it is characterized in that,
Include based on the approximate rectangular rectangular profile for extracting books:
On the approximate rectangular middle highest two approximate rectangular sides of lookup vertical extent;
The rectangular profile of books is determined using two approximate rectangular sides.
3. according to the method described in claim 2, it is characterized in that,
Determine that the rectangular profile of books includes using two approximate rectangular sides:
Determine the Bisector of angle on two approximate rectangular sides;
Described two approximate rectangular intersection points while approximate rectangular rotating around described two are rotated, to be mutually perpendicular to
Two rectangular profile sides, wherein two rectangular profiles while Bisector of angle with described two it is approximate rectangular while angle
Bisector overlaps;
The rectangular profile of books is determined using two rectangular profile sides.
4. according to the method described in claim 1, it is characterized in that,
If there is no described approximate rectangular, the circumscribed rectangle of minimum area is searched according to the vertex of the books outline polygon;
Utilize the rectangular profile of the circumscribed rectangular extraction books of the minimum area.
5. according to the method described in claim 4, it is characterized in that,
Searching the circumscribed rectangle of minimum area according to the vertex of the books outline polygon includes:
Count the vertex of the books outline polygon;
The reference frame of books profile is set according to the books profile angle of inclination of selection;
According to the projection that each vertex of the books outline polygon is fastened in reference coordinate, determine boundary rectangle with reference to seat
Mark the length of side Lx and Ly fastened;
The length of side Lx and Ly fastened in reference coordinate according to boundary rectangle determines the area of boundary rectangle;
Using the boundary rectangle of area minimum as the circumscribed rectangle of minimum area.
6. according to the method described in claim 5, it is characterized in that,
The projection fastened in reference coordinate according to each vertex of the books outline polygon determines boundary rectangle with reference to seat
Marking the length of side fastened includes:
In the X-axis of reference frame, using the difference of maximal projection value and minimum projection's value as boundary rectangle in the X-axis
Length of side Lx;
In the Y-axis of reference frame, using the difference of maximal projection value and minimum projection's value as boundary rectangle in the Y-axis
Length of side Ly.
7. according to the method described in any one of claim 1-6, which is characterized in that
Include to obtain books outline polygon by carrying out polygonal approximation to the enclosed region:
Extract the contour line of the enclosed region;
Polygonal approximation is carried out to the contour line, to obtain books outline polygon.
8. according to the method described in any one of claim 1-6, which is characterized in that
Before processing is identified to books photo, the conveyer belt background noise in books photo is removed.
9. a kind of books contour extraction apparatus, which is characterized in that be closed processing module, polygon including edge extracting module, form
Shape approximate module and profile extraction module, wherein:
Edge extracting module, for by the way that processing is identified to books photo, to extract books edge;
Form is closed processing module, for carrying out form closure processing to the books edge, to obtain enclosed region;
Polygonal approximation module, for by carrying out polygonal approximation to the enclosed region to obtain books outline polygon;
Profile extraction module, for when having close with the books outline polygon approximate rectangular, based on it is described closely
Like the rectangular profile of rectangular extraction books.
10. device according to claim 9, which is characterized in that
Profile extraction module is specifically on the approximate rectangular middle highest two approximate rectangular sides of lookup vertical extent, using described
Two approximate rectangular sides determine the rectangular profile of books.
11. device according to claim 10, which is characterized in that
Profile extraction module is additionally operable to determine the Bisector of angle on two approximate rectangular sides, by two approximate rectangular sides
It is rotated rotating around the intersection point on two approximate rectangular sides, to obtain orthogonal two rectangular profile sides, wherein institute
State two rectangular profiles while Bisector of angle and described two it is approximate rectangular while Bisector of angle overlap, utilize described two
Rectangular profile side determines the rectangular profile of books.
12. device according to claim 9, which is characterized in that further include circumscribed rectangular profile module, wherein:
Circumscribed rectangular profile module is used for when there is no described approximate rectangular, according to the vertex of the books outline polygon
The circumscribed rectangle of minimum area is searched, the rectangular profile of the circumscribed rectangular extraction books of the minimum area is utilized.
13. device according to claim 12, which is characterized in that
Circumscribed rectangular profile module specifically counts the vertex of the books outline polygon, according to the books profile inclination angle of selection
The reference frame of degree setting books profile, the throwing fastened in reference coordinate according to each vertex of the books outline polygon
Shadow determines the length of side Lx and Ly that boundary rectangle is fastened in reference coordinate, the length of side Lx fastened in reference coordinate according to boundary rectangle
The area that boundary rectangle is determined with Ly, using the boundary rectangle of area minimum as the circumscribed rectangle of minimum area.
14. device according to claim 13, which is characterized in that
Circumscribed rectangular profile module be additionally operable in the X-axis of reference frame using the difference of maximal projection value and minimum projection's value as
Length of side Lx of the boundary rectangle in the X-axis makees the difference of maximal projection value and minimum projection's value in the Y-axis of reference frame
The length of side Ly for being boundary rectangle in the Y-axis.
15. according to the device described in any one of claim 9-14, which is characterized in that
Polygonal approximation module specifically extracts the contour line of the enclosed region, and polygonal approximation is carried out to the contour line, with
Obtain books outline polygon.
16. according to the device described in any one of claim 9-14, which is characterized in that further include background noise removal module,
Wherein:
Background noise removes module, for before processing is identified to books photo in edge extracting module, removing books photo
In conveyer belt background noise.
17. a kind of books contour extraction apparatus, which is characterized in that including memory and processor, wherein:
Memory, for storing instruction;
Processor is coupled to the memory, and it is real that the processor is configured as the instruction execution stored based on the memory
The now method as described in any one of claim 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710048396.0A CN108345891A (en) | 2017-01-23 | 2017-01-23 | Books contour extraction method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710048396.0A CN108345891A (en) | 2017-01-23 | 2017-01-23 | Books contour extraction method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108345891A true CN108345891A (en) | 2018-07-31 |
Family
ID=62974769
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710048396.0A Pending CN108345891A (en) | 2017-01-23 | 2017-01-23 | Books contour extraction method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108345891A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101533517A (en) * | 2009-04-15 | 2009-09-16 | 北京联合大学 | Structure feature based on Chinese painting and calligraphy seal image automatic extracting method |
CN101567955A (en) * | 2008-04-23 | 2009-10-28 | 村田机械株式会社 | Image processing apparatus, image scanning apparatus, and image processing method |
US20100067805A1 (en) * | 2006-12-18 | 2010-03-18 | Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. | Device, method and computer program for identifying a traffic sign in an image |
CN103049746A (en) * | 2012-12-30 | 2013-04-17 | 信帧电子技术(北京)有限公司 | Method for detecting fighting behavior based on face identification |
CN103425984A (en) * | 2013-08-15 | 2013-12-04 | 北京京北方信息技术有限公司 | Method and device for detecting regular polygonal seal in bill |
CN103692447A (en) * | 2013-12-27 | 2014-04-02 | 西安航天精密机电研究所 | EV (electric vehicle) battery positioning method based on overlook and side-view cameras |
CN103914687A (en) * | 2014-03-14 | 2014-07-09 | 常州大学 | Rectangular-target identification method based on multiple channels and multiple threshold values |
-
2017
- 2017-01-23 CN CN201710048396.0A patent/CN108345891A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100067805A1 (en) * | 2006-12-18 | 2010-03-18 | Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung E.V. | Device, method and computer program for identifying a traffic sign in an image |
CN101567955A (en) * | 2008-04-23 | 2009-10-28 | 村田机械株式会社 | Image processing apparatus, image scanning apparatus, and image processing method |
CN101533517A (en) * | 2009-04-15 | 2009-09-16 | 北京联合大学 | Structure feature based on Chinese painting and calligraphy seal image automatic extracting method |
CN103049746A (en) * | 2012-12-30 | 2013-04-17 | 信帧电子技术(北京)有限公司 | Method for detecting fighting behavior based on face identification |
CN103425984A (en) * | 2013-08-15 | 2013-12-04 | 北京京北方信息技术有限公司 | Method and device for detecting regular polygonal seal in bill |
CN103692447A (en) * | 2013-12-27 | 2014-04-02 | 西安航天精密机电研究所 | EV (electric vehicle) battery positioning method based on overlook and side-view cameras |
CN103914687A (en) * | 2014-03-14 | 2014-07-09 | 常州大学 | Rectangular-target identification method based on multiple channels and multiple threshold values |
Non-Patent Citations (1)
Title |
---|
林厚从: "《信息学奥赛之数学一本通》", 31 July 2016, 东南大学出版社 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104134234B (en) | A kind of full automatic three-dimensional scene construction method based on single image | |
CN107636727A (en) | Target detection method and device | |
CN104809684B (en) | Graphic processing method, apparatus and system | |
CN106157341A (en) | Generate the method and device of synthesising picture | |
CN107862698A (en) | Light field foreground segmentation method and device based on K mean cluster | |
US8295610B1 (en) | Feature scaling for face detection | |
CN107545223B (en) | Image recognition method and electronic equipment | |
CN108334802A (en) | The localization method and device of roadway characteristic object | |
CN108717709A (en) | Image processing system and image processing method | |
CN111862110A (en) | Green curtain image matting method, system, equipment and readable storage medium | |
US20190065877A1 (en) | Using multiple cameras to perform optical character recognition | |
CN109255808A (en) | Building texture blending method and apparatus based on inclination image | |
CN110738092B (en) | Invoice text detection method | |
EP2813973A1 (en) | Method and system for processing video image | |
Li et al. | Road markings extraction based on threshold segmentation | |
CN113971833A (en) | Multi-angle face recognition method and device, computer main equipment and storage medium | |
Meus et al. | Embedded vision system for pedestrian detection based on HOG+ SVM and use of motion information implemented in Zynq heterogeneous device | |
CN107478152A (en) | TR chip positionings method and detection method | |
CN109492639A (en) | " loaded " position three-dimensional coordinate acquisition methods, system and image recognition apparatus | |
CN106156691A (en) | The processing method of complex background image and device thereof | |
CN111462164A (en) | Foreground segmentation method and data enhancement method based on image synthesis | |
CN110910334A (en) | Instance segmentation method, image processing device and computer readable storage medium | |
CN110135408B (en) | Text image detection method, network and equipment | |
CN105786957A (en) | Table sorting method based on cell adjacency relation and depth-first traversal | |
CN107507130A (en) | A kind of quickly QFN chip pins image obtains and amplification method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180731 |
|
RJ01 | Rejection of invention patent application after publication |