CN106227505A - Image detecting method, device and the device for image detection - Google Patents
Image detecting method, device and the device for image detection Download PDFInfo
- Publication number
- CN106227505A CN106227505A CN201610589361.3A CN201610589361A CN106227505A CN 106227505 A CN106227505 A CN 106227505A CN 201610589361 A CN201610589361 A CN 201610589361A CN 106227505 A CN106227505 A CN 106227505A
- Authority
- CN
- China
- Prior art keywords
- image
- projection
- boundary position
- pixel
- detected
- 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
- 238000000034 method Methods 0.000 title claims abstract description 100
- 238000001514 detection method Methods 0.000 title claims abstract description 44
- 230000008569 process Effects 0.000 claims abstract description 61
- 239000000284 extract Substances 0.000 claims abstract description 15
- 238000000605 extraction Methods 0.000 claims description 18
- 238000002203 pretreatment Methods 0.000 claims description 13
- 239000000203 mixture Substances 0.000 claims description 4
- 238000013507 mapping Methods 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 11
- 238000012545 processing Methods 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 7
- 238000006243 chemical reaction Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000000712 assembly Effects 0.000 description 3
- 238000000429 assembly Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- KLDZYURQCUYZBL-UHFFFAOYSA-N 2-[3-[(2-hydroxyphenyl)methylideneamino]propyliminomethyl]phenol Chemical compound OC1=CC=CC=C1C=NCCCN=CC1=CC=CC=C1O KLDZYURQCUYZBL-UHFFFAOYSA-N 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 201000001098 delayed sleep phase syndrome Diseases 0.000 description 1
- 208000033921 delayed sleep phase type circadian rhythm sleep disease Diseases 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000004807 localization Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/32—Address formation of the next instruction, e.g. by incrementing the instruction counter
- G06F9/322—Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
- G06F9/325—Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address for loops, e.g. loop detection or loop counter
Abstract
The disclosure is directed to a kind of image detecting method, device and the device for image detection.The method includes: in image to be detected, extracts the parts of images of preset range;Described parts of images is carried out pretreatment, the image after being processed;Image after described process is carried out projection process, the projection that image after being processed is corresponding;Projection is searched boundary position;The boundary position of word segment in image to be detected is determined, the region between the boundary position of word segment to be defined as described word segment region according to described boundary position.The method is capable of detecting when the word segment in image, in order to the zone location outside word segment publish picture as in document boundaries.
Description
Technical field
It relates to technical field of image processing, particularly relate to a kind of image detecting method, device and examine for image
The device surveyed.
Background technology
It is the more popular technology of current image processing field that document detects automatically, and substantially flow process is to utilize straight-line detection to tie
Close the technology such as filtering and obtain the four edges of document, utilize transformation matrix that paper is reduced to rectangle afterwards, it is simple to subsequent treatment.
In correlation technique, when blank (identity card, the credit card, ppt, blackboard, blank) border detection, can directly carry out
Border detection.But, owing to inside documents word is the most obvious and intensive with the gradient difference of background (usually blank sheet of paper), and civilian
Shelves border is the most inconspicuous, so it is the most infeasible directly to search document boundaries.
Summary of the invention
For overcoming problem present in correlation technique, the disclosure provides a kind of image detecting method, device and for image
The device of detection.
First aspect according to disclosure embodiment, it is provided that a kind of image detecting method, including: in image to be detected,
Extract the parts of images of preset range;Described parts of images is carried out pretreatment, the image after being processed;After described process
Image carry out projection process, the projection that image after being processed is corresponding;Projection is searched boundary position;According to institute
State boundary position and determine the boundary position of word segment in image to be detected, with by the region between the boundary position of word segment
It is defined as described word segment region.
Optionally, also include: in described image to be detected, the region in addition to described word segment region is entered
Row bound detects, and determines document boundaries.
Optionally, described in image to be detected, extract the parts of images of preset range, comprise determining that image to be detected
Central point;When requiring to look up the boundary point in x-axis direction, start to choose up and/or down from described central point, select width
Spend identical with the width of image to be detected, and the rectangle that height is preset value, as described parts of images;Or, look at needs
When looking for the boundary point in y-axis direction, start to choose to the left and/or to the right from described central point, select height and image to be detected
The most identical, and width is the rectangle of preset value, as described parts of images.
Optionally, described described parts of images is carried out pretreatment, the image after being processed, including: corresponding part figure
Each pixel in Xiang, if the pixel value of described pixel is more than predetermined threshold value, in image the most after the pre-treatment, by described picture
The pixel value of element is set to 0;If the pixel value of described pixel is less than or equal to predetermined threshold value, in image the most after the pre-treatment,
The pixel value of described pixel is set to 255.
Optionally, described image after described process is carried out projection process, the projection that image after being processed is corresponding
Figure, including: the coordinate axes at the boundary point place required to look up in the image after process is as axis of projection;On corresponding axis of projection
Each coordinate points, is added the pixel value of all white pixel of described coordinate points position or number is added, will be with value as institute
State the projection value that coordinate points position is corresponding.
Optionally, described on projection search boundary position, including: from the central point of the axis of projection of projection start to
Boundary direction is searched, and determines first in the search procedure view field more than predetermined threshold value, described view field pixel
Pixel value is zero;It is that the coordinate points position of non-zero is as boundary position using a projection value nearest with described view field.
Optionally, described determine the boundary position of word segment in image to be detected according to described boundary position, including:
When described projection is one, the boundary position of described projection is defined as the boundary position of described word segment;Or,
When described projection is multiple, by the position on border in the boundary position of each projection, it is defined as described word segment
Boundary position.
Second aspect according to disclosure embodiment, it is provided that a kind of image detection device, including: extraction module, it is used for
In image to be detected, extract the parts of images of preset range;Pretreatment module, for described parts of images is carried out pretreatment,
Image after being processed;Projection module, for the image after described process is carried out projection process, the image after being processed
Corresponding projection;Search module, for searching boundary position on projection;Determine module, for according to described boundary bit
Put and determine the boundary position of word segment in image to be detected, so that the region between the boundary position of word segment is defined as institute
State word segment region.
Optionally, also include: detection module, in described image to be detected, to except described word segment location
Region outside territory carries out border detection, determines document boundaries.
Optionally, described extraction module is further used for: determine the central point of image to be detected;Requiring to look up x-axis side
To boundary point time, start to choose up and/or down from described central point, select the width phase of width and image to be detected
With, and the rectangle that height is preset value, as described parts of images;Or, when requiring to look up the boundary point in y-axis direction, from
Described central point starts to choose to the left and/or to the right, selects height identical with the height of image to be detected, and width is preset value
Rectangle, as described parts of images.
Optionally, described pretreatment module is further used for: each pixel in corresponding part image, if described pixel
Pixel value more than predetermined threshold value, in image the most after the pre-treatment, the pixel value of described pixel is set to 0;If described picture
The pixel value of described pixel, less than or equal to predetermined threshold value, in image the most after the pre-treatment, is set to 255 by the pixel value of element.
Optionally, described projection module is further used for: with the boundary point place required to look up in the image after processing
Coordinate axes is as axis of projection;Each coordinate points on corresponding axis of projection, by the picture of all white pixel of described coordinate points position
Element value is added or number is added, using the projection value corresponding as described coordinate points position with value.
Optionally, described lookup module is further used for: start to boundary direction from the central point of the axis of projection of projection
Searching, determine first in the search procedure view field more than predetermined threshold value, the pixel value of described view field pixel is equal
It is zero;It is that the coordinate points position of non-zero is as boundary position using a projection value nearest with described view field.
Optionally, described determine that module is further used for: when described projection is one, by the border of described projection
Position is defined as the boundary position of described word segment;Or, when described projection is multiple, by the border of each projection
The position on Zhong border, position, is defined as the boundary position of described word segment.
The third aspect according to disclosure embodiment, it is provided that a kind of device for image detection, including: processor;With
Memorizer in storage processor executable;Wherein, described processor is configured to: in image to be detected, extracts pre-
If the parts of images of scope;Described parts of images is carried out pretreatment, the image after being processed;To the image after described process
Carry out projection process, the projection that image after being processed is corresponding;Projection is searched boundary position;According to described border
Position determines the boundary position of word segment in image to be detected, to be defined as in the region between the boundary position of word segment
Described word segment region.
Optionally, also include: in described image to be detected, the region in addition to described word segment region is entered
Row bound detects, and determines document boundaries.
Optionally, described in image to be detected, extract the parts of images of preset range, comprise determining that image to be detected
Central point;When requiring to look up the boundary point in x-axis direction, start to choose up and/or down from described central point, select width
Spend identical with the width of image to be detected, and the rectangle that height is preset value, as described parts of images;Or, look at needs
When looking for the boundary point in y-axis direction, start to choose to the left and/or to the right from described central point, select height and image to be detected
The most identical, and width is the rectangle of preset value, as described parts of images.
Optionally, described described parts of images is carried out pretreatment, the image after being processed, including: corresponding part figure
Each pixel in Xiang, if the pixel value of described pixel is more than predetermined threshold value, in image the most after the pre-treatment, by described picture
The pixel value of element is set to 0;If the pixel value of described pixel is less than or equal to predetermined threshold value, in image the most after the pre-treatment,
The pixel value of described pixel is set to 255.
Optionally, described image after described process is carried out projection process, the projection that image after being processed is corresponding
Figure, including: the coordinate axes at the boundary point place required to look up in the image after process is as axis of projection;On corresponding axis of projection
Each coordinate points, is added the pixel value of all white pixel of described coordinate points position or number is added, will be with value as institute
State the projection value that coordinate points position is corresponding.
Optionally, described on projection search boundary position, including: from the central point of the axis of projection of projection start to
Boundary direction is searched, and determines first in the search procedure view field more than predetermined threshold value, described view field pixel
Pixel value is zero;It is that the coordinate points position of non-zero is as boundary position using a projection value nearest with described view field.
Optionally, described determine the boundary position of word segment in image to be detected according to described boundary position, including:
When described projection is one, the boundary position of described projection is defined as the boundary position of described word segment;Or,
When described projection is multiple, by the position on border in the boundary position of each projection, it is defined as described word segment
Boundary position.
Fourth aspect according to disclosure embodiment, it is provided that a kind of non-transitory computer-readable recording medium, when described
When instruction in storage medium is performed by the processor of terminal so that terminal is able to carry out a kind of image detecting method, described side
Method includes: in image to be detected, extracts the parts of images of preset range;Described parts of images is carried out pretreatment, obtains everywhere
Image after reason;Image after described process is carried out projection process, the projection that image after being processed is corresponding;In projection
Boundary position is searched on figure;The boundary position of word segment in image to be detected is determined, with by word according to described boundary position
Region between portion boundary position is defined as described word segment region.
Optionally, also include: in described image to be detected, the region in addition to described word segment region is entered
Row bound detects, and determines document boundaries.
Optionally, described in image to be detected, extract the parts of images of preset range, comprise determining that image to be detected
Central point;When requiring to look up the boundary point in x-axis direction, start to choose up and/or down from described central point, select width
Spend identical with the width of image to be detected, and the rectangle that height is preset value, as described parts of images;Or, look at needs
When looking for the boundary point in y-axis direction, start to choose to the left and/or to the right from described central point, select height and image to be detected
The most identical, and width is the rectangle of preset value, as described parts of images.
Optionally, described described parts of images is carried out pretreatment, the image after being processed, including: corresponding part figure
Each pixel in Xiang, if the pixel value of described pixel is more than predetermined threshold value, in image the most after the pre-treatment, by described picture
The pixel value of element is set to 0;If the pixel value of described pixel is less than or equal to predetermined threshold value, in image the most after the pre-treatment,
The pixel value of described pixel is set to 255.
Optionally, described image after described process is carried out projection process, the projection that image after being processed is corresponding
Figure, including: the coordinate axes at the boundary point place required to look up in the image after process is as axis of projection;On corresponding axis of projection
Each coordinate points, is added the pixel value of all white pixel of described coordinate points position or number is added, will be with value as institute
State the projection value that coordinate points position is corresponding.
Optionally, described on projection search boundary position, including: from the central point of the axis of projection of projection start to
Boundary direction is searched, and determines first in the search procedure view field more than predetermined threshold value, described view field pixel
Pixel value is zero;It is that the coordinate points position of non-zero is as boundary position using a projection value nearest with described view field.
Optionally, described determine the boundary position of word segment in image to be detected according to described boundary position, including:
When described projection is one, the boundary position of described projection is defined as the boundary position of described word segment;Or,
When described projection is multiple, by the position on border in the boundary position of each projection, it is defined as described word segment
Boundary position.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect:
By extraction unit partial image in image to be detected, and parts of images is carried out pretreatment and projection process, and
Boundary position is searched, it may be determined that go out the boundary position of word segment in image to be detected on projection, such that it is able at image
In determine word segment region, and then can be that document boundaries detection provides basis.
In the disclosure one embodiment, by carrying out document boundaries detection in non-legible subregion, word can be removed
The part impact on document boundaries detection, such that it is able to improve the accuracy of document boundaries detection.
In the disclosure one embodiment, by starting outside extraction unit partial image from the central point of image to be detected, due to
Word is generally at the zone line of image, it may therefore be assured that the image extracted includes word segment, it is ensured that character portion go-on-go
The accuracy surveyed.
In the disclosure one embodiment, by parts of images is carried out pretreatment and projection process, can simplify follow-up
Computing during boundary position identification.
In the disclosure one embodiment, by carrying out the boundary position identification of image, Ke Yifang according to the non-zero of projection value
Just the boundary position identifying image.
In the disclosure one embodiment, by when projection is multiple, the position on border being defined as word segment
Boundary position, it is ensured that the recognition accuracy of the boundary position of word segment.
It should be appreciated that it is only exemplary and explanatory, not that above general description and details hereinafter describe
The disclosure can be limited.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet the enforcement of the disclosure
Example, and for explaining the principle of the disclosure together with description.
Fig. 1 is the flow chart according to a kind of image detecting method shown in an exemplary embodiment.
Fig. 2 is the flow chart of the parts of images according to the extraction preset range shown in an exemplary embodiment.
Fig. 3 is according to the schematic diagram that parts of images carries out pretreated image shown in an exemplary embodiment.
Fig. 4 is the schematic diagram of the projection according to a pretreated image shown in an exemplary embodiment.
Fig. 5 is the schematic diagram of the projection according to another the pretreated image shown in an exemplary embodiment.
Fig. 6 is the flow chart according to the another kind of image detecting method shown in an exemplary embodiment.
Fig. 7 is according to a kind of image detection device block diagram shown in an exemplary embodiment.
Fig. 8 is according to the another kind of image detection device block diagram shown in an exemplary embodiment.
Fig. 9 is according to a kind of device block diagram for image detection shown in an exemplary embodiment.
Figure 10 is the device block diagram detected for image according to the another kind shown in an exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to
During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they are only with the most appended
The example of the apparatus and method that some aspects that described in detail in claims, the disclosure are consistent.
Fig. 1 is the flow chart according to a kind of image detecting method shown in an exemplary embodiment, as it is shown in figure 1, the party
Rule such as may be used in the terminals such as mobile terminal, PC (Personal Computer, PC) or server, including with
Lower step.
Step S11, in image to be detected, extracts the parts of images of preset range.
Illustratively, during extraction unit partial image, such as, can be the central point first determining image to be detected, then from central point to
The direction needed intercepts, and obtains parts of images.
In some embodiments, seeing Fig. 2, the flow process of the parts of images extracting preset range may include that
Step S21, determines the central point of image to be detected.
Illustratively, after determining image to be detected, width value and the height value of image to be detected can be obtained, wherein, wide
Angle value refers to the value in x-axis direction, and height value refers to the value in y-axis direction, such as, represents with M and N respectively, then can be by coordinate
The pixel of (M/2, N/2) determines the central point of image to be detected.
If it is understood that M/2 or N/2 is not integer, then can using the value that rounds downwards or round up as
The coordinate of central point.
Step S22, when requiring to look up the boundary point in x-axis direction, starts to select up and/or down from described central point
Take, select width identical with the width of image to be detected, and the rectangle that height is preset value, as described parts of images;Or,
Step S23, when requiring to look up the boundary point in y-axis direction, starts to select to the left and/or to the right from described central point
Take, select height identical with the height of image to be detected, and width is the rectangle of preset value, as described parts of images.
In the present embodiment, as a example by the boundary point searching x-axis direction, it is to be understood that search the boundary point in y-axis direction
It is referred to perform.
In the present embodiment, when searching the boundary point in x-axis direction, in image to be detected, start upwards to select from central point
Take the first rectangular image and choose downwards as a example by the second rectangular image chooses two rectangular images altogether, it is to be understood that also may be used
To start to choose a rectangular image up or down from central point.
The width of each matrix image chosen is identical with the width of image to be detected, and height is preset value, such as, for
H, then can start to select the region at h row pixel place as parts of images the most up and down from central point.
Step S12, carries out pretreatment to described parts of images, the image after being processed.
Wherein, above-mentioned pretreatment can specifically binary conversion treatment.
Such as, when binary conversion treatment, a threshold value is set, if the pixel value of a pixel is more than this threshold value, then will
The pixel value of this pixel was set to for 0 (0 represents black picture element), if the pixel value of a pixel is less than or equal to this threshold value, then will
The pixel value of this pixel was set to for 255 (255 represent white pixel).
Therefore, by binary conversion treatment, above-mentioned parts of images can be converted to only include the figure of two kinds of pixels black, white
Picture, such as, the pixel value of black picture element is 0, and the pixel value of white pixel is 255.
For example, with reference to Fig. 3, the first rectangular image on image 30 to be detected and the second rectangular image are carried out at binaryzation
After reason, the image 32 after the image after the first process 31 and the second process can be respectively obtained.
Step S13, carries out projection process to the image after described process, the projection that image after being processed is corresponding.
Wherein, each pixel in the image after process is white pixel or black picture element, projection process be with process after
Image in the coordinate axes at boundary point place that requires to look up as axis of projection, each coordinate points on corresponding axis of projection, obtain
The pixel value sum of all white pixel of this coordinate points position or number sum, using corresponding as this coordinate points position with value
Projection value.
Such as, image after process as it is shown on figure 3, the boundary point required to look up due to corresponding diagram 3 is the boundary point of x-axis,
Therefore, the x-axis in image after processing is as axis of projection, and each coordinate points of corresponding x-axis, such as x1, the image after processing
The pixel value of all pixels of upper x=x1 is added, and owing to the pixel value of black picture element is 0, therefore, above-mentioned is also all with value
White pixel pixel value and value, or, it is also possible to the number of all white pixel of x=x1 on the image after processing
It is added.Pixel value sum or number sum is selected to pre-set.Assume and value is A, then using A as x=x1 position
Projection value.
See Fig. 4 and Fig. 5, projection corresponding to image after in Fig. 3 two process respectively such as first projection Figure 41 and
Shown in second projection Figure 51.
Step S14, searches boundary position on projection.
Wherein, when boundary position searched by projection, can start to border from the central point of the axis of projection of projection
Direction is searched, and determines first in the search procedure view field more than predetermined threshold value, the pixel of described view field pixel
Value is zero;It is that the coordinate points position of non-zero is as boundary position using a projection value nearest with described view field.
Such as, in the projection shown in Fig. 5, axis of projection is x-axis, and the central point of axis of projection is the half of width (M/2)
The position at place, the boundary direction of corresponding x-axis includes left margin and right margin, therefore, it can from the beginning of the position of x=M/2, to
Boundary position on the left of left lookup, searches to the right the boundary position on right side.
As a example by searching to the right, then search projection value corresponding to x=M/2, such as A1, then search projection corresponding to x=M/2+1
Value, such as A2, searches according to this, if projection value Ai corresponding to xi is non-zero, and the next coordinate points position xi+1 of xi is corresponding
Projection value Ai+1 be zero, and the difference of (xi-M/2) is more than predetermined threshold value, then xi is defined as the x-axis of the boundary position on right side
Coordinate figure.
Step S15, determines the boundary position of word segment in image to be detected according to described boundary position, with by character portion
Region between the boundary position divided is defined as described word segment region.
In one embodiment, if projection is one, then the boundary position of projection can be defined as word segment
Boundary position.Afterwards, the region between the boundary position of word segment is defined as word segment region.
Such as, similar above-mentioned searching to the right from central point, it is also possible to make a look up to the left from central point, it is assumed that xj
It is the x-axis coordinate figure of the boundary position in left side, then the region between xj≤x≤xi can be defined as the literary composition of image to be detected
The region of the x-axis shared by character segment.
It is similar to, it is assumed that determine the y shared by the word segment that the region between yj≤y≤yi is image to be detected
The region of axle, the region at the word segment place of image the most to be detected is: xj≤x≤xi, and, yj≤y≤yi.
Further, if projection is multiple, then can by the position on border in the boundary position of each projection,
It is defined as the boundary position of the word segment of image to be detected.
Such as, as a example by projection is two, it is assumed that when searching to the right, the boundary position of a projection is xi1, another
The boundary position of individual projection is xi2, it is assumed that xi2 > xi1, then xi2 is defined as the right side boundary position of word segment.
Being similar to, if searched to the left, the boundary position of a projection is xj 1, the boundary bit of another projection
Putting is xj2, it is assumed that xj2 > xj1, then xj1 is defined as the left border position of word segment.
And when y-axis is searched, it is to be understood that the boundary position of upside refers to y value in the boundary position of projection
Less position, the boundary position of downside refers to the position that in the boundary position of projection, y value is maximum.
In the present embodiment, by extraction unit partial image in image to be detected, and parts of images is carried out pretreatment and throwing
Shadow processes, and searches boundary position on projection, it may be determined that go out the boundary position of word segment in image to be detected, thus
Word segment region can be determined in the picture, and then can be that document boundaries detection provides basis.
Fig. 6 is the flow chart according to the another kind of image detecting method shown in an exemplary embodiment, as shown in Figure 6, and should
Method is in the terminal such as mobile terminal PC or server, and the present embodiment is as a example by binary conversion treatment by pretreatment.Including following
Step.
Step S61, in image to be detected, extracts the parts of images of preset range.
Step S62, carries out binary conversion treatment to described parts of images, the image after being processed.
Step S63, carries out projection process to the image after described process, the projection that image after being processed is corresponding.
Step S64, searches boundary position on projection.
Step S65, determines the boundary position of word segment in image to be detected according to described boundary position, with by character portion
Region between the boundary position divided is defined as described word segment region.
The particular content of S61-S65 may refer to S11-S15, no longer describes in detail at this.
Step S66, in described image to be detected, carries out border in the region in addition to described word segment region
Detection, determines document boundaries.
Wherein, in image to be detected, after determining word segment region, can be according to word segment location
Territory, determines the region (the most non-legible subregion) in addition to word segment region in image to be detected, non-
Word segment region, can use common bound test technology to detect document boundaries.Such as, straight-line detection is used to combine filtering
Technology, can detect document boundaries in non-legible subregion.
In the present embodiment, by carrying out document boundaries detection in non-legible subregion, word segment can be removed to literary composition
The impact of shelves border detection, such that it is able to improve the accuracy of document boundaries detection.
Fig. 7 is according to a kind of image detection device block diagram shown in an exemplary embodiment.With reference to Fig. 7, this device 70 wraps
Include extraction module 71, pretreatment module 72, projection module 73, search module 74 and determine module 75.
Extraction module 71, in image to be detected, extracts the parts of images of preset range;
Pretreatment module 72, for described parts of images is carried out pretreatment, the image after being processed;
Projection module 73, for the image after described process is carried out projection process, the image after being processed is corresponding
Projection;
Search module 74, for searching boundary position on projection;
Determine module 75, for determining the boundary position of word segment in image to be detected according to described boundary position, with
Region between the boundary position of word segment is defined as described word segment region.
In some embodiments, seeing Fig. 8, described device also includes:
Detection module 76, in described image to be detected, in the region in addition to described word segment region
Carry out border detection, determine document boundaries.
In some embodiments, described extraction module is further used for:
Determine the central point of image to be detected;
When requiring to look up the boundary point in x-axis direction, start to choose up and/or down from described central point, select width
Spend identical with the width of image to be detected, and the rectangle that height is preset value, as described parts of images;Or,
When requiring to look up the boundary point in y-axis direction, start to choose to the left and/or to the right from described central point, select height
Spend identical with the height of image to be detected, and width is the rectangle of preset value, as described parts of images.
In some embodiments, described pretreatment module is further used for:
Each pixel in corresponding part image, if the pixel value of described pixel is more than predetermined threshold value, then in pretreatment
After image in, the pixel value of described pixel is set to 0;
If the pixel value of described pixel is less than or equal to predetermined threshold value, in image the most after the pre-treatment, by described picture
The pixel value of element is set to 255.
In some embodiments, described projection module is further used for:
The coordinate axes at the boundary point place required to look up in the image after process is as axis of projection;
Each coordinate points on corresponding axis of projection, the pixel value of all white pixel of described coordinate points position is added or
Number is added, using the projection value corresponding as described coordinate points position with value.
In some embodiments, described lookup module is further used for:
Start to search to boundary direction from the central point of the axis of projection of projection, determine that in search procedure first is more than
The view field of predetermined threshold value, the pixel value of described view field pixel is zero;By one nearest with described view field
Projection value is that the coordinate points position of non-zero is as boundary position.
In some embodiments, described determine that module is further used for:
When described projection is one, the boundary position of described projection is defined as the boundary bit of described word segment
Put;Or,
When described projection is multiple, by the position on border in the boundary position of each projection, it is defined as described
The boundary position of word segment.
About the device in above-described embodiment, wherein modules performs the concrete mode of operation in relevant the method
Embodiment in be described in detail, explanation will be not set forth in detail herein.
In the present embodiment, by extraction unit partial image in image to be detected, and parts of images is carried out pretreatment and throwing
Shadow processes, and searches boundary position on projection, it may be determined that go out the boundary position of word segment in image to be detected, thus
Word segment region can be determined in the picture, and then can be that document boundaries detection provides basis.Further, logical
Cross and carry out document boundaries detection in non-legible subregion, the impact that document boundaries is detected by word segment can be removed, thus
The accuracy of document boundaries detection can be improved.Further, by starting outside extraction unit from the central point of image to be detected
Partial image, due to word generally at the zone line of image, it may therefore be assured that the image extracted includes word segment, protects
The accuracy of card word segment detection.Further, by parts of images is carried out pretreatment and projection process, can simplify
Computing during subsequent border location recognition.Further, by carrying out the boundary position identification of image according to the non-zero of projection value,
The boundary position of image can be identified easily.Further, by when projection is multiple, by true for the position on border
It is set to the boundary position of word segment, it is ensured that the recognition accuracy of the boundary position of word segment.
Fig. 9 is according to a kind of device block diagram for image detection shown in an exemplary embodiment.This device can be
Mobile terminal 900, such as, mobile terminal 900 can be mobile phone, computer, digital broadcast terminal, messaging devices,
Game console, tablet device, armarium, body-building equipment, personal digital assistant etc..
With reference to Fig. 9, mobile terminal 900 can include following one or more assembly: processes assembly 902, memorizer 904,
Power supply module 906, multimedia groupware 908, audio-frequency assembly 910, the interface 912 of input/output (I/O), sensor cluster 914,
And communications component 916.
Processing assembly 902 and generally control the integrated operation of mobile terminal 900, such as with display, call, data are led to
The operation that letter, camera operation and record operation are associated.Process assembly 902 and can include that one or more processor 920 is held
Row instruction, to complete all or part of step of above-mentioned method.Additionally, process assembly 902 can include one or more mould
Block, it is simple to process between assembly 902 and other assemblies is mutual.Such as, process assembly 902 and can include multi-media module, with
Facilitate multimedia groupware 908 and process between assembly 902 mutual.
Memorizer 904 is configured to store various types of data to support the operation at mobile terminal 900.These data
Example include on mobile terminal 900 operation any application program or the instruction of method, contact data, telephone directory
Data, message, picture, video etc..Memorizer 904 can by any kind of volatibility or non-volatile memory device or it
Combination realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), erasable
Except programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, soon
Flash memory, disk or CD.
The various assemblies that power supply module 906 is mobile terminal 900 provide electric power.Power supply module 906 can include power supply pipe
Reason system, one or more power supplys, and other generate, manage and distribute, with for mobile terminal 900, the assembly that electric power is associated.
The screen of one output interface of offer that multimedia groupware 908 is included between described mobile terminal 900 and user.
In certain embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch surface
Plate, screen may be implemented as touch screen, to receive the input signal from user.Touch panel includes one or more touch
Sensor is with the gesture on sensing touch, slip and touch panel.Described touch sensor can not only sense touch or slide
The border of action, but also detect the persistent period relevant to described touch or slide and pressure.In certain embodiments,
Multimedia groupware 908 includes a front-facing camera and/or post-positioned pick-up head.When mobile terminal 900 is in operator scheme, as clapped
When taking the photograph pattern or video mode, front-facing camera and/or post-positioned pick-up head can receive the multi-medium data of outside.Each preposition
Photographic head and post-positioned pick-up head can be a fixing optical lens system or have focal length and optical zoom ability.
Audio-frequency assembly 910 is configured to output and/or input audio signal.Such as, audio-frequency assembly 910 includes a Mike
Wind (MIC), when mobile terminal 900 is in operator scheme, during such as call model, logging mode and speech recognition mode, mike
It is configured to receive external audio signal.The audio signal received can be further stored at memorizer 904 or via logical
Letter assembly 916 sends.In certain embodiments, audio-frequency assembly 910 also includes a speaker, is used for exporting audio signal.
I/O interface 912 provides interface for processing between assembly 902 and peripheral interface module, above-mentioned peripheral interface module can
To be keyboard, put striking wheel, button etc..These buttons may include but be not limited to: home button, volume button, start button and lock
Set button.
Sensor cluster 914 includes one or more sensor, for providing the state of various aspects for mobile terminal 900
Assessment.Such as, what sensor cluster 914 can detect mobile terminal 900 opens/closed mode, the relative localization of assembly, example
Such as display that described assembly is mobile terminal 900 and keypad, sensor cluster 914 can also detect mobile terminal 900 or
The position change of 900 1 assemblies of mobile terminal, the presence or absence that user contacts with mobile terminal 900, mobile terminal 900
Orientation or acceleration/deceleration and the variations in temperature of mobile terminal 900.Sensor cluster 914 can include proximity transducer, is configured
It is used for when there is no any physical contact object near detecting.Sensor cluster 914 can also include optical sensor,
Such as CMOS or ccd image sensor, it is used for using in imaging applications.In certain embodiments, this sensor cluster 914 also may be used
To include acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 916 is configured to facilitate the communication of wired or wireless mode between mobile terminal 900 and other equipment.
Mobile terminal 900 can access wireless network based on communication standard, such as WiFi, 2G, 3G or 4G, or combinations thereof.One
In individual exemplary embodiment, communications component 916 via broadcast channel receive from external broadcasting management system broadcast singal or
Broadcast related information.In one exemplary embodiment, described communications component 916 also includes near-field communication (NFC) module, to promote
Enter junction service.Such as, can be based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra-wide
Band (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, mobile terminal 900 can be by one or more application specific integrated circuits (ASIC), number
Word signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components realize, be used for performing said method.
In the exemplary embodiment, a kind of non-transitory computer-readable recording medium including instruction, example are additionally provided
As included the memorizer 904 of instruction, above-mentioned instruction can have been performed said method by the processor 920 of mobile terminal 900.Example
If, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, soft
Dish and optical data storage devices etc..
In the present embodiment, by extraction unit partial image in image to be detected, and parts of images is carried out pretreatment and throwing
Shadow processes, and searches boundary position on projection, it may be determined that go out the boundary position of word segment in image to be detected, thus
Word segment region can be determined in the picture, and then can be that document boundaries detection provides basis.Further, logical
Cross and carry out document boundaries detection in non-legible subregion, the impact that document boundaries is detected by word segment can be removed, thus
The accuracy of document boundaries detection can be improved.Further, by starting outside extraction unit from the central point of image to be detected
Partial image, due to word generally at the zone line of image, it may therefore be assured that the image extracted includes word segment, protects
The accuracy of card word segment detection.Further, by parts of images is carried out pretreatment and projection process, can simplify
Computing during subsequent border location recognition.Further, by carrying out the boundary position identification of image according to the non-zero of projection value,
The boundary position of image can be identified easily.Further, by when projection is multiple, by true for the position on border
It is set to the boundary position of word segment, it is ensured that the recognition accuracy of the boundary position of word segment.
Figure 10 is the device block diagram detected for image according to the another kind shown in an exemplary embodiment.Such as, device
May be provided in a PC or server, as a example by server 1000.With reference to Figure 10, server 1000 includes processing assembly
1022, it farther includes one or more processor, and by the memory resource representated by memorizer 1032, is used for storing
Can be by the instruction of the execution processing assembly 1022, such as application program.In memorizer 1032, the application program of storage can include
One or more each corresponding to one group instruction module.It is configured to perform instruction additionally, process assembly 1022,
To perform said method.
Server 1000 can also include that a power supply module 1026 is configured to perform the power management of server 1000,
One wired or wireless network interface 1050 is configured to be connected to server 1000 network, and an input and output (I/O)
Interface 1058.Server 1000 can operate based on the operating system being stored in memorizer 1032, such as Windows
ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
In the present embodiment, by extraction unit partial image in image to be detected, and parts of images is carried out pretreatment and throwing
Shadow processes, and searches boundary position on projection, it may be determined that go out the boundary position of word segment in image to be detected, thus
Word segment region can be determined in the picture, and then can be that document boundaries detection provides basis.Further, logical
Cross and carry out document boundaries detection in non-legible subregion, the impact that document boundaries is detected by word segment can be removed, thus
The accuracy of document boundaries detection can be improved.Further, by starting outside extraction unit from the central point of image to be detected
Partial image, due to word generally at the zone line of image, it may therefore be assured that the image extracted includes word segment, protects
The accuracy of card word segment detection.Further, by parts of images is carried out pretreatment and projection process, can simplify
Computing during subsequent border location recognition.Further, by carrying out the boundary position identification of image according to the non-zero of projection value,
The boundary position of image can be identified easily.Further, by when projection is multiple, by true for the position on border
It is set to the boundary position of word segment, it is ensured that the recognition accuracy of the boundary position of word segment.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to its of the disclosure
Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modification, purposes or
Person's adaptations is followed the general principle of the disclosure and includes the undocumented common knowledge in the art of the disclosure
Or conventional techniques means.Description and embodiments is considered only as exemplary, and the true scope of the disclosure and spirit are by following
Claim is pointed out.
It should be appreciated that the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and
And various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.
Claims (15)
1. an image detecting method, it is characterised in that including:
In image to be detected, extract the parts of images of preset range;
Described parts of images is carried out pretreatment, the image after being processed;
Image after described process is carried out projection process, the projection that image after being processed is corresponding;
Projection is searched boundary position;
The boundary position of word segment in image to be detected is determined, with by the boundary position of word segment according to described boundary position
Between region be defined as described word segment region.
Method the most according to claim 1, it is characterised in that also include:
In described image to be detected, the region in addition to described word segment region is carried out border detection, determines literary composition
Shelves border.
Method the most according to claim 1 and 2, it is characterised in that described in image to be detected, extracts preset range
Parts of images, including:
Determine the central point of image to be detected;
When requiring to look up the boundary point in x-axis direction, start to choose up and/or down from described central point, select width with
The width of image to be detected is identical, and the rectangle that height is preset value, as described parts of images;Or,
When requiring to look up the boundary point in y-axis direction, start to choose to the left and/or to the right from described central point, select height with
The height of image to be detected is identical, and width is the rectangle of preset value, as described parts of images.
Method the most according to claim 1 and 2, it is characterised in that described described parts of images is carried out pretreatment, obtains
Image after process, including:
Each pixel in corresponding part image, if the pixel value of described pixel is more than predetermined threshold value, the most after the pre-treatment
In image, the pixel value of described pixel is set to 0;
If the pixel value of described pixel is less than or equal to predetermined threshold value, in image the most after the pre-treatment, by described pixel
Pixel value is set to 255.
Method the most according to claim 1 and 2, it is characterised in that described image after described process is carried out at projection
Reason, the projection that image after being processed is corresponding, including:
The coordinate axes at the boundary point place required to look up in the image after process is as axis of projection;
Each coordinate points on corresponding axis of projection, is added the pixel value of all white pixel of described coordinate points position or number
It is added, using the projection value corresponding as described coordinate points position with value.
Method the most according to claim 1 and 2, it is characterised in that described lookup boundary position on projection, including:
Start to search to boundary direction from the central point of the axis of projection of projection, determine that first in search procedure is more than presetting
The view field of threshold value, the pixel value of described view field pixel is zero;
It is that the coordinate points position of non-zero is as boundary position using a projection value nearest with described view field.
Method the most according to claim 1 and 2, it is characterised in that described determine mapping to be checked according to described boundary position
The boundary position of word segment in Xiang, including:
When described projection is one, the boundary position of described projection is defined as the boundary position of described word segment;
Or,
When described projection is multiple, by the position on border in the boundary position of each projection, it is defined as described word
Portion boundary position.
8. an image detection device, it is characterised in that including:
Extraction module, in image to be detected, extracts the parts of images of preset range;
Pretreatment module, for described parts of images is carried out pretreatment, the image after being processed;
Projection module, for the image after described process is carried out projection process, the projection that image after being processed is corresponding;
Search module, for searching boundary position on projection;
Determine module, for determining the boundary position of word segment in image to be detected according to described boundary position, with by word
Region between portion boundary position is defined as described word segment region.
Device the most according to claim 8, it is characterised in that also include:
Detection module, in described image to be detected, carries out limit to the region in addition to described word segment region
Boundary is detected, and determines document boundaries.
Device the most according to claim 8 or claim 9, it is characterised in that described extraction module is further used for:
Determine the central point of image to be detected;
When requiring to look up the boundary point in x-axis direction, start to choose up and/or down from described central point, select width with
The width of image to be detected is identical, and the rectangle that height is preset value, as described parts of images;Or,
When requiring to look up the boundary point in y-axis direction, start to choose to the left and/or to the right from described central point, select height with
The height of image to be detected is identical, and width is the rectangle of preset value, as described parts of images.
11. devices according to claim 8 or claim 9, it is characterised in that described pretreatment module is further used for:
Each pixel in corresponding part image, if the pixel value of described pixel is more than predetermined threshold value, the most after the pre-treatment
In image, the pixel value of described pixel is set to 0;
If the pixel value of described pixel is less than or equal to predetermined threshold value, in image the most after the pre-treatment, by described pixel
Pixel value is set to 255.
12. devices according to claim 8 or claim 9, it is characterised in that described projection module is further used for:
The coordinate axes at the boundary point place required to look up in the image after process is as axis of projection;
Each coordinate points on corresponding axis of projection, is added the pixel value of all white pixel of described coordinate points position or number
It is added, using the projection value corresponding as described coordinate points position with value.
13. devices according to claim 8 or claim 9, it is characterised in that described lookup module is further used for:
Start to search to boundary direction from the central point of the axis of projection of projection, determine that first in search procedure is more than presetting
The view field of threshold value, the pixel value of described view field pixel is zero;
It is that the coordinate points position of non-zero is as boundary position using a projection value nearest with described view field.
14. devices according to claim 8 or claim 9, it is characterised in that described determine that module is further used for:
When described projection is one, the boundary position of described projection is defined as the boundary position of described word segment;
Or,
When described projection is multiple, then by the position on border in the boundary position of each projection, it is defined as described literary composition
The boundary position of character segment.
15. 1 kinds of devices for image detection, it is characterised in that including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
In image to be detected, extract the parts of images of preset range;
Described parts of images is carried out pretreatment, the image after being processed;
Image after described process is carried out projection process, the projection that image after being processed is corresponding;
Projection is searched boundary position;
The boundary position of word segment in image to be detected is determined, with by the boundary position of word segment according to described boundary position
Between region be defined as described word segment region.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610589361.3A CN106227505A (en) | 2016-07-22 | 2016-07-22 | Image detecting method, device and the device for image detection |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610589361.3A CN106227505A (en) | 2016-07-22 | 2016-07-22 | Image detecting method, device and the device for image detection |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106227505A true CN106227505A (en) | 2016-12-14 |
Family
ID=57532399
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610589361.3A Pending CN106227505A (en) | 2016-07-22 | 2016-07-22 | Image detecting method, device and the device for image detection |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106227505A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107657474A (en) * | 2017-07-31 | 2018-02-02 | 石河子大学 | The determination method and service end on a kind of commercial circle border |
CN107862310A (en) * | 2017-09-17 | 2018-03-30 | 北京工业大学 | A kind of Tibetan language historical document text area extraction method based on block projection |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1687969A (en) * | 2005-05-12 | 2005-10-26 | 北京航空航天大学 | File image compressing method based on file image content analyzing and characteristic extracting |
KR20120018614A (en) * | 2010-08-23 | 2012-03-05 | 현대모비스 주식회사 | Vehicle and method for changing traffic line of automotive vehicle |
-
2016
- 2016-07-22 CN CN201610589361.3A patent/CN106227505A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1687969A (en) * | 2005-05-12 | 2005-10-26 | 北京航空航天大学 | File image compressing method based on file image content analyzing and characteristic extracting |
KR20120018614A (en) * | 2010-08-23 | 2012-03-05 | 현대모비스 주식회사 | Vehicle and method for changing traffic line of automotive vehicle |
Non-Patent Citations (1)
Title |
---|
黄文杰: "基于投影的车牌字符分割方法", 《现代计算机》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107657474A (en) * | 2017-07-31 | 2018-02-02 | 石河子大学 | The determination method and service end on a kind of commercial circle border |
CN107862310A (en) * | 2017-09-17 | 2018-03-30 | 北京工业大学 | A kind of Tibetan language historical document text area extraction method based on block projection |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106951884B (en) | Fingerprint acquisition method and device and electronic equipment | |
CN105528606B (en) | Area recognizing method and device | |
CN105469056A (en) | Face image processing method and device | |
CN105095881A (en) | Method, apparatus and terminal for face identification | |
CN106202194A (en) | The storage method and device of screenshot picture | |
CN104899610A (en) | Picture classification method and device | |
CN104461014A (en) | Screen unlocking method and device | |
CN105808050A (en) | Information search method and device | |
CN104636453A (en) | Illegal user data identification method and device | |
CN105139378A (en) | Card boundary detection method and apparatus | |
CN104615663A (en) | File sorting method and device and terminal | |
CN105426878A (en) | Method and device for face clustering | |
CN105975961A (en) | Human face recognition method, device and terminal | |
CN106535191A (en) | Network connection establishing method and device | |
CN112927122A (en) | Watermark removing method, device and storage medium | |
CN105205093B (en) | The method and device that picture is handled in picture library | |
CN104820549A (en) | Method, device and terminal for transmitting social networking application message | |
CN105224644A (en) | Information classification approach and device | |
CN105551047A (en) | Picture content detecting method and device | |
CN106227505A (en) | Image detecting method, device and the device for image detection | |
CN105488074A (en) | Photo clustering method and device | |
US9854559B2 (en) | Method and device for pushing user information | |
CN107993192A (en) | Certificate image bearing calibration, device and equipment | |
CN104281368A (en) | Interface display method and device and terminal device | |
CN103995844A (en) | Information search method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | 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: 20161214 |
|
RJ01 | Rejection of invention patent application after publication |