CN110298282A - Document image processing method, storage medium and calculating equipment - Google Patents
Document image processing method, storage medium and calculating equipment Download PDFInfo
- Publication number
- CN110298282A CN110298282A CN201910541457.6A CN201910541457A CN110298282A CN 110298282 A CN110298282 A CN 110298282A CN 201910541457 A CN201910541457 A CN 201910541457A CN 110298282 A CN110298282 A CN 110298282A
- Authority
- CN
- China
- Prior art keywords
- image
- matrix
- document
- gray
- point
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
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
-
- 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/56—Extraction of image or video features relating to colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/40—Document-oriented image-based pattern recognition
Abstract
The invention discloses a kind of document image processing method, storage medium and equipment is calculated, method includes: to obtain former file and picture first, extracts the document areas edge of former file and picture, obtains the first document areas image;Distortion correction is carried out to the first document areas image, obtains the second document areas image;Gamma correction is carried out to the second document areas image, obtains third document areas image;Document background color is removed to third document areas image, exports destination document area image;The present invention can accurately extract the document areas in former file and picture, obtain straight document areas, brightness uniformity, prospect text clearly document areas image, be conducive to the readability for improving document areas image.
Description
Technical field
The present invention relates to digital image processing techniques field, in particular to a kind of document image processing method, storage medium
With calculating equipment.
Background technique
Under the background that internet office technology becomes office mainstream power-assisted, more and more scenes of handling official business are needed papery
Document becomes file and picture to store.Since scanner portability is insufficient, and the timeliness of data transmission is more demanding, uses mobile phone
Carrying out shooting to paper document becomes convenient and fast first choice.In the process for being converted into file and picture using mobile phone shooting paper document
In, since the accuracy manually shot is high not as good as scanner, in addition ambient lighting is undesirable when actual photographed, the text shot
There are many deficiencies for shelves picture quality, for example, background area outside document edges can be photographed, shooting angle inclination leads to document area
Area deformation, file and picture uneven illumination and there are the paper document of the different shade of bright-dark degree, white background imaging after become not
With the grey of degree, it is bad that effect is come out so as to cause document print.
In currently used processing method, there are mature inclination angle detection algorithm and rotation for scan image correction
Correcting algorithm, however, mobile phone, which shoots paper document problems faced, wants complicated more than scan image correction.Scan image can be protected
Demonstrate,prove content it is straight with it is parallel, it is only necessary to can complete to correct by simple affine transformation;When mobile phone shoots file and picture
Deformation caused by shooting angle tilts cannot only lean on translation and rotation correction, it is necessary to be completed using complicated perspective transform.
In terms of illumination compensation, in the illumination compensation method of mainstream, there are histogram equalization, Retinex algorithm, gamma correction etc..By
More dull in the background gray scale of file and picture, histogram equalization will lead to very bad effect.Retinex algorithm, gamma school
Contrast can just be increased, but not can be removed the variation of light and shade caused by uneven illumination, can only slightly increase the brightness of shadow region,
Improve its readability.This kind of algorithm is not suitable for the uneven illumination compensation of file and picture, therefore, it is necessary to be directed to the spy of file and picture
Point proposes new uneven illumination compensation method, solves the problems, such as file and picture uneven illumination and shade everywhere.And in removal background
Processing on, current binarization segmentation method is sensitive to the contrast of image, be easy to cause segmentation after text be interrupted, it is non-round
It is sliding.
Summary of the invention
The first object of the present invention is the shortcomings that overcoming the prior art and deficiency, provides a kind of testing document side
Method, this method can accurately extract the document areas in the former file and picture of the shootings such as mobile phone, camera, and it is flat to obtain document areas
Directly, brightness uniformity, prospect text clearly document areas image.
The second object of the present invention is to provide a kind of document image processing method, and this method is directed to former file and picture and carries out
Gamma correction and background colour removal, available brightness uniformity, prospect text clearly document areas image.
The third object of the present invention is to provide a kind of document image processing method, and this method is directed to former file and picture and carries out
Gamma correction, the document areas image of available brightness uniformity.
The fourth object of the present invention is to provide a kind of storage medium.
The fifth object of the present invention is to provide a kind of calculating equipment.
The first object of the present invention is achieved through the following technical solutions: a kind of document image processing method, including is walked as follows
It is rapid:
Former file and picture is obtained, the document areas edge of former file and picture is extracted, obtains document areas image;
For document areas image, distortion correction is carried out;
For the image after distortion correction, gamma correction is carried out;
For the image after gamma correction, document background color is removed, exports destination document area image.
The second object of the present invention is achieved through the following technical solutions: a kind of document image processing method, including is walked as follows
It is rapid:
Obtain former file and picture;
It is directed to former file and picture and carries out gamma correction;
For the image after gamma correction, document background color is removed, exports destination document area image.
The third object of the present invention is achieved through the following technical solutions: a kind of document image processing method, including is walked as follows
It is rapid:
Obtain former file and picture;
It is directed to former file and picture and carries out gamma correction, by the image after gamma correction directly as output destination document area
Area image.
It is above-mentioned to image carry out distortion correction specific steps include:
Step S21, the image for treating distortion correction first carries out the transformation of probability Hough line, and obtaining all edges is straightway
Extreme coordinates;Wherein, every straightway has 2 extreme coordinates;
Step S22, whether the intersection point for judging every two straightways is useful cross, if two straightways are vertical or institute at
Acute angle is more than or equal to certain angle, then the intersection point of two straightways is useful cross, and the coordinate for calculating the useful cross, which is used as, to be had
Imitate intersecting point coordinate (x0,y0);
Step S23, all useful cross coordinates are obtained into practical intersecting point coordinate set multiplied by scaling multiplying power α;Wherein, it contracts
Multiplying power α=m/T1 is put, m is the maximum value in the wide and high the two of former file and picture, and T1 is default wide high threshold;
Step S24,4 angle points of document areas are filtered out from practical intersecting point coordinate set, respectively upper left angle point is sat
Mark, upper right angular coordinate, lower-left angular coordinate and bottom right angular coordinate;
Step S25, the upper side length that document areas is calculated according to upper left angular coordinate and upper right angular coordinate, according to the lower left corner
Point coordinate and bottom right angular coordinate calculate the lower side length of document areas, take maximum side length as figure in upper side length and lower side length
As expected width W;
The left side for calculating document areas according to upper left angular coordinate and lower-left angular coordinate is high, according to upper right angular coordinate and
The right that bottom right angular coordinate calculates document areas is high, and on the left side, height and the right senior middle school are maximized pre- as document areas image
Phase height H;
S26,4 angular coordinates obtained using S24 are as four vertex of document areas quadrangle in former file and picture
Coordinate, 4 coordinates with (0,0), (0, W), (H, 0), (W, H) 4 coordinate points as rectangle in target image calculate perspective
Then transformation matrix sets the high respectively W and H of width of target image, obtains image by perspective transformation matrix perspective transform, make
For the image I6 after distortion correction.
Wherein, in step S24, method is extended out from practical intersecting point coordinate set using 45 ° of centers and filters out the 4 of document areas
A angle point, specifically:
S241, using the upper left corner former file and picture I1 as origin, establish rectangular coordinate system, be straight down along left picture boundary
X-axis positive direction is Y-axis positive direction along image coboundary horizontally to the right;
4 groups of S242, construction coordinates, initial value are the centre coordinate of former file and picture I1, the corresponding point note of four groups of coordinates
Upper left angle point, upper right angle point, lower-left angle point and the lower right corner of document areas are respectively corresponded for p1, p2, p3, p4;
All intersection points in practical intersecting point coordinate set that S243, traversal step S23 are obtained remember that the intersection point currently traversed is
P;
S244, the intercept for crossing point P and point p1, two straight lines that slope is -1 more respectively, if crossing the straight line of point P in Y-axis
Intercept be less than intercept of the straight line of point p1 in Y-axis, then with P point coordinate replace p1 coordinate;
Point P and point p2 is crossed more respectively, the intercept for two straight lines that slope is 1, if crossing intercept of the straight line of point P in Y-axis
Less than intercept of the straight line of point p2 in Y-axis is crossed, then replace the coordinate of p2 with P point coordinate;
Point P and point p3 is crossed more respectively, the intercept for two straight lines that slope is -1, if crossing intercept of the straight line of point P in Y-axis
Greater than intercept of the straight line of point p3 in Y-axis is crossed, then replace the coordinate of p3 with P point coordinate;
Point P and point p4 is crossed more respectively, the intercept for two straight lines that slope is 1, if crossing intercept of the straight line of point P in Y-axis
Greater than intercept of the straight line of point p4 in Y-axis is crossed, then replace the coordinate of p4 with P point coordinate;
Step S245, return step S243 continues to traverse intersection point and repeats step S244, until having traversed all intersection points,
Obtain document areas upper left angular coordinate p1, upper right angular coordinate p2, lower-left angular coordinate p3 and bottom right angular coordinate p4.
It is above-mentioned to image carry out gamma correction specific steps include:
Step S31, the image to gamma correction is converted into gray level image I7 first;
Step S32, gaussian filtering is carried out to gray level image I7, obtains gray level image I8;
Step S33, gray level image I8 is equally divided into M*N block region;
Step S34, according to the M*N block region being divided into, average gray matrix M is constructedmWith standard deviation matrix Ms, then root
According to average gray matrix MmWith standard deviation matrix MsCalculate background gray matrix Mb, calculation formula is as follows:
Step S35, background gray matrix M is calculatedbAverage value and the sum of standard deviation as ideal background gray scale g, according to
Ideal background gray scale g and background gray matrix MbCalculate gray level ratio matrix Mr, calculation formula is as follows:
Step S36, using bicubic interpolation method, by gray level ratio matrix MrInterpolation is extended to and the image to gamma correction
Identical size obtains gray level ratio technology transform Me;
Step S37, it will be transformed into YUV color space from rgb color space to the image of gamma correction, it will be to gamma correction
Image Y-component element multiplied by gray level ratio technology transform MeIn corresponding element, the Y-component after obtaining operation, judgement
Whether the value of the Y-component after operation exceeds the upper limit value of gray value, and the Y-component that will be greater than upper limit value is set to the upper limit of gray value
Value;YUV color space after the image of gamma correction is from correction Y-component is converted back into rgb color space, obtains completing brightness
Image I9 after correction.
Wherein, in step S34, according to the M*N block regional structure average gray matrix M being divided intomWith standard deviation matrix
Ms, it is specific as follows:
According to the M*N block regional structure average gray matrix M being divided intom, wherein average gray matrix MmThe i-th row jth
Column elementAre as follows:
According to the M*N block regional structure standard deviation matrix M being divided intos, standard deviation matrix MsThe i-th row jth column element
Are as follows:
Wherein: i indicates average gray matrix MmWith standard deviation matrix MsMatrix line number, i=1,2 ..., M;J indicates flat
Equal gray matrix MmWith standard deviation matrix MsMatrix columns, j=1,2 ..., N;
Bi-1,j-1Indicate the average value of the (i-1)-th row j-1 column block region all pixels gray value in gray level image I8;
Bi-1,jIndicate the average value of the (i-1)-th row j column block region all pixels gray value in gray level image I8;
Bi,j-1Indicate the average value of the i-th row j-1 column block region all pixels gray value in gray level image I8;
Bi,jIndicate the average value of the i-th row j column block region all pixels gray value in gray level image I8;
Indicate B in gray level image I8 picturei-1,j-1, Bi-1,j, Bi,j-1And Bi,jCorresponding region all pixels gray value
Average value;
For B in gray level image I8i-1,j-1, Bi-1,j, Bi,j-1And Bi,jThe standard of corresponding region all pixels gray value
Difference.
Above-mentioned to remove document background color for image, the specific steps of output destination document area image include the following:
Step S41, by the gray level image I8 that step S32 the is obtained and gray level ratio technology transform M that step S36 is obtainedePhase
Multiply, the gray level image I10 after obtaining gray scale multiplicative correction;
Step S42, construction size with will be to the identical first background distributions matrix M of image of gamma correctionb2, initial value is complete
It is 0;
Step S43, all pixels in the gray level image I10 that traversal step S41 is obtained, if the gray value of pixel is big
In the background gray matrix M that gray threshold T2, gray threshold T2 obtain for step S34bMean value, then by the first background distributions square
Battle array Mb2Corresponding element be assigned a value of 1, the second background distributions matrix M is obtained with thisb3;
Step S44, the second background distributions matrix M is traversedb3In all elements, if value for 0 element adjacent element
It is all 1, then the element is assigned a value of 1, third background distributions matrix M is obtained with thisb4;
Step S45, third background distributions matrix M is traversedb4In all elements, if value for 1 element adjacent element
There are 3 or 3 or more 0, then the element is assigned a value of -1, the 4th background distributions matrix M is obtained with thisb5;
Step S46, the 4th background distributions matrix M is traversedb5In all elements, find value be 1 element position, and
The pixel of position corresponding to image I9 that step S37 is obtained is set to white, final output destination document area image.
The fourth object of the present invention is achieved through the following technical solutions: a kind of storage medium, is stored with program, and feature exists
In, when described program is executed by processor, document image processing method described in realization of the invention first and second and three purposes.
The fifth object of the present invention is achieved through the following technical solutions: a kind of calculating equipment, including processor and is used for
The memory of storage processor executable program, which is characterized in that when the processor executes the program of memory storage, realize
The present invention first and second and three document image processing methods described in purposes.
The present invention has the following advantages and effects with respect to the prior art:
(1) document image processing method of the present invention includes: the document areas edge for extracting former file and picture, obtains document area
Area image;Distortion correction is carried out to document areas image;Gamma correction is carried out to the image after distortion correction;After gamma correction
Image remove document background color, export destination document area image.The method of the present invention can accurately be extracted in former file and picture
Document areas, by distortion correction to document areas image, gamma correction and removal background colour, obtained document areas figure
As content is straight, brightness uniformity, prospect text are clear, document areas is extracted, distortion correction and gamma correction technology can make up for it
The deficiency lack of standardization for placing the resulting file and picture of document directly is scanned using camera shooting document and using scanning device,
Enhance the readability of document areas image.
(2) document image processing method of the present invention also may include: to obtain former file and picture, be directed to former file and picture into
Row gamma correction;For the image after gamma correction, document background color is removed, exports destination document area image.Side of the present invention
Method aforesaid operations can carry out gamma correction and background colour removal for former file and picture, and obtained document areas image has bright
Degree uniformly, the clear advantage of prospect text, be suitble to be directed to some brightness irregularities and the noisy former file and picture of background
Processing.
(3) document image processing method of the present invention also may include: to obtain former file and picture, be directed to former file and picture into
Row gamma correction, by the image after gamma correction directly as output destination document area image.The method of the present invention aforesaid operations
Gamma correction can be carried out for former file and picture, obtained document areas image has the advantages that brightness uniformity, is suitble to be directed to
In the processing of the former file and picture of some brightness irregularities.
(4) in document image processing method of the present invention, former file and picture is first converted into gray level image, it is pre- using closed operation
Gray level image is handled, text in former file and picture can be excluded, the adverse effect of edge detection is examined by closed operation and edge
Survey the document areas that can accurately extract in former file and picture.
(5) in document image processing method of the present invention, pass through the judgement and utilization of the useful cross to document areas edge
45 ° of centers extend out 4 angle points that method filters out document areas, can reduce processing document area to avoid the interference of meaningless intersection point
The calculation amount of area image and raising are to the processing speed of document areas image.It can change figure by the distortion correction of perspective transform
As the angle of projection, the deformation of former file and picture is handled, the document areas image of deformation is allowed to be restored to normal viewing angle
Document areas image under degree.
(6) in document image processing method of the present invention, by the way that gray level image is equally divided into muti-piece region, Divided-fitting method back
Scape gray scale and the correlation for guaranteeing neighbor pixel before and after the processing using gray scale multiplication, realize the brightness school to document areas image
Just, the uneven illumination and shadow problem of document areas image are compensated, improves complex illumination environment to document areas picture quality
It influences.
(7) it in document image processing method of the present invention, is found in document areas image by tectonic setting distribution matrix
Background pixel is set to white by background pixel, so that background removal excellent effect, prospect text is prominent obvious.
Detailed description of the invention
Fig. 1 is the flow chart of document image processing method in the embodiment of the present invention 1.
Fig. 2 is the former file and picture in embodiment 1.
Fig. 3 is the second document areas image obtained after distortion correction in embodiment 1.
Fig. 4 is the third document areas image in embodiment 1 after gamma correction.
Fig. 5 is that the destination document area image after background colour is removed in embodiment 1.
Specific embodiment
Present invention will now be described in further detail with reference to the embodiments and the accompanying drawings, but embodiments of the present invention are unlimited
In this.
Embodiment 1
The invention discloses a kind of document image processing methods, as shown in Figure 1, including the following steps:
Step S1, former file and picture is obtained, the document areas edge of former file and picture is extracted, obtains the first document areas figure
Picture.
Wherein, former file and picture is that camera shoots the resulting RGB image of document, and camera specifically can be the shifting such as mobile phone
Camera in dynamic equipment, is also possible to the camera of the other equipment such as camera.In the present embodiment, former file and picture is mobile phone
Included camera shoots gained, and the resolution ratio of former file and picture is 1440 × 1080.
Original text shelves image document edges of regions is extracted in this step, and detailed process is as follows:
Step S11, former file and picture I1 is converted into gray level image I2.
Step S12, the maximum value for choosing grayscale image image width and high the two, is denoted as m, determines the size of m;If m is greater than default
Scaling multiplying power α=m/T1 is then arranged in wide high threshold T1, and by α times of gray level image I2 wide high scaled down;
If m is less than or equal to default wide high threshold T1, retain gray level image I2;
In the present embodiment, presetting wide high threshold T1 can be set to 720.
Step S13, gaussian filtering is carried out to the image obtained after step S12 processing, obtains image I3;The present embodiment is benefit
Gaussian filtering is carried out with Gaussian filter, the size of Gaussian filter is 7 × 7 here.
Step S14, closed operation processing is carried out to image I3, obtains image I4.
Step S15, edge detection is carried out to image I4, document areas edge image is obtained, as the first document areas figure
As I5.In the present embodiment, algorithm used by edge detection is Canny edge detection algorithm.
Step S2, distortion correction is carried out to the first document areas image, obtains the second document areas image.
Carrying out distortion correction to the first document areas image in this step, detailed process is as follows:
Step S21, the transformation of probability Hough line is carried out to the first document areas image, obtains the end that all edges are straightway
Point coordinate;Wherein, every straightway has 2 extreme coordinates;The present embodiment is specifically the probability Hough transformation letter for utilizing OpenCV
Number cv2.HoughLinesP realizes the transformation of probability Hough line.
Step S22, whether the intersection point for judging every two straightways is useful cross, if two straightways are vertical or institute at
Acute angle is more than or equal to certain angle, and the angle can be 60 ° in the present embodiment, then the intersection point of two straightways is effectively to hand over
Point calculates the coordinate of the useful cross as useful cross coordinate (x0,y0);
In the present embodiment, the calculation formula of useful cross coordinate is specific as follows:
Wherein, (x1,y1) and (x2,y2) be wherein two endpoints of a straight line coordinate, (x3,y3) and (x4,y4) it is another
The coordinate of two endpoints of a piece straight line.
Step S23, all useful cross coordinates are obtained into practical intersecting point coordinate set multiplied by scaling multiplying power α;Wherein, it contracts
It is identical as the scaling multiplying power in step S12 as above to put multiplying power, scales multiplying power α=m/T1, m is in the wide and high the two of former file and picture
Maximum value, that is to say the high maximum value of the width of the first gray level image;T1 is default wide high threshold, the high threshold of default width of the present embodiment
Value T1 is 720.
Step S24,4 angle points of document areas are filtered out from practical intersecting point coordinate set, respectively upper left angle point is sat
Mark, upper right angular coordinate, lower-left angular coordinate and bottom right angular coordinate.
In the present embodiment, 4 for extending out that method filters out document areas from practical intersecting point coordinate set using 45 ° of centers
Angle point, specifically:
S241, using the upper left corner former file and picture I1 as origin, establish rectangular coordinate system, be straight down along left picture boundary
X-axis positive direction is Y-axis positive direction along image coboundary horizontally to the right
4 groups of S242, construction coordinates, initial value are the centre coordinate of former file and picture I1, the corresponding point note of four groups of coordinates
Upper left angle point, upper right angle point, lower-left angle point and the lower right corner of document areas are respectively corresponded for p1, p2, p3, p4
All intersection points in practical intersecting point coordinate set that S243, traversal step S23 are obtained remember that the intersection point currently traversed is
P。
S244, the intercept for crossing point P and point p1, two straight lines that slope is -1 more respectively, if crossing the straight line of point P in Y-axis
Intercept be less than intercept of the straight line of point p1 in Y-axis, then with P point coordinate replace p1 coordinate;
Point P and point p2 is crossed more respectively, the intercept for two straight lines that slope is 1, if crossing intercept of the straight line of point P in Y-axis
Less than intercept of the straight line of point p2 in Y-axis is crossed, then replace the coordinate of p2 with P point coordinate;
Point P and point p3 is crossed more respectively, the intercept for two straight lines that slope is -1, if crossing intercept of the straight line of point P in Y-axis
Greater than intercept of the straight line of point p3 in Y-axis is crossed, then replace the coordinate of p3 with P point coordinate;
Point P and point p4 is crossed more respectively, the intercept for two straight lines that slope is 1, if crossing intercept of the straight line of point P in Y-axis
Greater than intercept of the straight line of point p4 in Y-axis is crossed, then replace the coordinate of p4 with P point coordinate.
Step S245, return step S243 continues to traverse intersection point and repeats step S244, until having traversed all intersection points,
Obtain document areas upper left angular coordinate p1, upper right angular coordinate p2, lower-left angular coordinate p3 and bottom right angular coordinate p4.
Step S25, the upper side length that document areas is calculated according to upper left angular coordinate and upper right angular coordinate, according to the lower left corner
Point coordinate and bottom right angular coordinate calculate the lower side length of document areas, take maximum side length as figure in upper side length and lower side length
As expected width W;
The left side for calculating document areas according to upper left angular coordinate and lower-left angular coordinate is high, according to upper right angular coordinate and
The right that bottom right angular coordinate calculates document areas is high, and on the left side, height and the right senior middle school are maximized pre- as document areas image
Phase height H.
S26,4 angular coordinates obtained using S24 are as four vertex of document areas quadrangle in former file and picture
Coordinate, 4 coordinates with (0,0), (0, W), (H, 0), (W, H) 4 coordinate points as rectangle in target image calculate perspective
Then transformation matrix sets the high respectively W and H of width of target image, obtains target figure by perspective transformation matrix perspective transform
Picture, as the second document areas image I6.In the present embodiment, OpenCV-Python perspective transformation matrix function can be used
Cv2.getPerspectiveTransform calculates perspective transformation matrix, utilizes OpenCV-Python perspective transformation function
Cv2.warpPerspective realizes perspective transform, completes distortion correction.
Step S3, gamma correction is carried out to the second document areas image, obtains third document areas image.
In the present embodiment, to the second document areas image progress gamma correction, detailed process is as follows:
Step S31, the second document areas image is converted into gray level image I7.
Step S32, gaussian filtering is carried out to gray level image I7, obtains gray level image I8;In the present embodiment, specifically sharp
Gaussian filtering is carried out with Gaussian filter, the size of Gaussian filter is 3 × 3 here.
Step S33, gray level image I8 is equally divided into M*N block region;In the present embodiment, M=90,
N=68.
Step S34, according to the M*N block region being divided into, average gray matrix M is constructedmWith standard deviation matrix Ms, then root
According to average gray matrix MmWith standard deviation matrix MsCalculate background gray matrix Mb, calculation formula is as follows:
In the present embodiment, according to the M*N block regional structure average gray matrix M being divided intomWith standard deviation matrix Ms, specifically
It is as follows:
According to the M*N block regional structure average gray matrix M being divided intom, wherein average gray matrix MmThe i-th row jth
Column elementAre as follows:
According to the M*N block regional structure standard deviation matrix M being divided intos, wherein standard deviation matrix MsThe i-th row jth arrange member
ElementAre as follows:
Wherein: i indicates average gray matrix MmWith standard deviation matrix MsMatrix line number, i=1,2 ..., M;J indicates flat
Equal gray matrix MmWith standard deviation matrix MsMatrix columns, j=1,2 ..., N;Average gray matrix MmSize is (M+1) * (N
+1);Standard deviation matrix MsSize is (M+1) * (N+1);
Bi-1,j-1Indicate the average value of the (i-1)-th row j-1 column block region all pixels gray value in gray level image I8;
Bi-1,jIndicate the average value of the (i-1)-th row j column block region all pixels gray value in gray level image I8;
Bi,j-1Indicate the average value of the i-th row j-1 column block region all pixels gray value in gray level image I8;
Bi,jIndicate the average value of the i-th row j column block region all pixels gray value in gray level image I8;
Indicate B in gray level image I8 picturei-1,j-1, Bi-1,j, Bi,j-1And Bi,jCorresponding region all pixels gray value
Average value;
For B in gray level image I8i-1,j-1, Bi-1,j, Bi,j-1And Bi,jThe standard of corresponding region all pixels gray value
Difference.
Step S35, background gray matrix M is calculatedbAverage value and the sum of standard deviation as ideal background gray scale g, according to
Ideal background gray scale g and background gray matrix MbCalculate gray level ratio matrix Mr, calculation formula is as follows:
Step S36, using bicubic interpolation method, by gray level ratio matrix MrInterpolation is extended to and the second document areas image
Identical size obtains gray level ratio technology transform Me;In the present embodiment, the interpolating function of OpenCV is specifically utilized
Cv2.resize (src, dsize [, interpolation]) realizes bicubic interpolation, wherein the length of dsize value original image and
Width, type of difference interpolation value cv2.INTER_CUBIC.
Step S37, the second document areas image is transformed into YUV color space from rgb color space, by the second document area
The element of the Y-component of area image is multiplied by gray level ratio technology transform MeIn corresponding element, the Y-component after obtaining operation, judgement
Whether the value of the Y-component after operation exceeds the upper limit value of gray value, and the Y-component that will be greater than upper limit value is set to the upper limit of gray value
Value;Second document areas image is converted back into rgb color space from the YUV color space after correction Y-component, obtains completing brightness
The third document areas image I9 of correction.In the present embodiment, intensity value ranges are 0~255, and the upper limit value of gray value is 255.
Step S4, document background color is removed to third document areas image, exports destination document area image.Specifically:
Step S41, by the gray level image I8 that step S32 the is obtained and gray level ratio technology transform M that step S36 is obtainedePhase
Multiply, the gray level image I10 after obtaining gray scale multiplicative correction;
Step S42, construction size first background distributions matrix M identical with the second document areas image I6b2, initial value is complete
It is 0;
Step S43, all pixels in the gray level image I10 that traversal step S41 is obtained, if the gray value of pixel is big
In the background gray matrix M that gray threshold T2, gray threshold T2 obtain for step S34bMean value, then by the first background distributions square
Battle array Mb2Corresponding element be assigned a value of 1, the second background distributions matrix M is obtained with thisb3;
Step S44, the second background distributions matrix M is traversedb3In all elements, if value for 0 element adjacent element
It is all 1, then the element is assigned a value of 1, third background distributions matrix M is obtained with thisb4;
Step S45, third background distributions matrix M is traversedb4In all elements, if value for 1 element adjacent element
There are 3 or 3 or more 0, then the element is assigned a value of -1, the 4th background distributions matrix M is obtained with thisb5;
Step S46, the 4th background distributions matrix M is traversedb5In all elements, find value be 1 element position, and
The pixel of position corresponding to third document areas image I9 that step S37 is obtained is set to white, final output destination document area
Area image.
In the present embodiment, document image processing method claps document in camera or mobile device such as mobile phone in addition to applying
Scan process is taken the photograph, can also be and apply in scanning device.When applying in scanning device, former file and picture is swept for scanning device
The resulting RGB image of document in kind is retouched, document in kind specifically can be paper document, photo etc., for placement lack of standardization
Document in kind is scanned processing.Scanning device specifically can be sweep optical square, pen-touched tablet, portable scanner, glue
Piece scanner etc..
Embodiment 2
Present embodiment discloses a kind of document image processing methods, include the following steps:
(1) former file and picture is obtained;In the present embodiment, former file and picture is that camera shoots the resulting RGB figure of document
Picture, camera specifically can be the camera in the mobile devices such as mobile phone, be also possible to the camera of the other equipment such as camera.?
In the present embodiment, former file and picture is that the camera of mobile phone shoots gained, and the resolution ratio of former file and picture is 1440 × 1080.
(2) it is directed to former file and picture and carries out gamma correction;In the present embodiment, brightness school is carried out for former file and picture
Positive step is as follows:
Step S31, the i.e. former file and picture of the image to gamma correction is converted into gray level image I7 first;
Step S32, gaussian filtering is carried out to gray level image I7, obtains gray level image I8;In the present embodiment, specifically sharp
Gaussian filtering is carried out with Gaussian filter, the size of Gaussian filter is 3 × 3 here.
Step S33, gray level image I8 is equally divided into M*N block region;
Step S34, according to the M*N block region being divided into, average gray matrix M is constructedmWith standard deviation matrix Ms, then root
According to average gray matrix MmWith standard deviation matrix MsCalculate background gray matrix Mb, calculation formula is as follows:
In this step, according to the M*N block regional structure average gray matrix M being divided intomWith standard deviation matrix Ms, specifically
It is as follows:
According to the M*N block regional structure average gray matrix M being divided intom, wherein average gray matrix MmThe i-th row jth
Column elementAre as follows:
According to the M*N block regional structure standard deviation matrix M being divided intos, standard deviation matrix MsThe i-th row jth column element
Are as follows:
Wherein: i indicates average gray matrix MmWith standard deviation matrix MsMatrix line number, i=1,2 ..., M;J indicates flat
Equal gray matrix MmWith standard deviation matrix MsMatrix columns, j=1,2 ..., N;
Bi-1,j-1Indicate the average value of the (i-1)-th row j-1 column block region all pixels gray value in gray level image I8;
Bi-1,jIndicate the average value of the (i-1)-th row j column block region all pixels gray value in gray level image I8;
Bi,j-1Indicate the average value of the i-th row j-1 column block region all pixels gray value in gray level image I8;
Bi,jIndicate the average value of the i-th row j column block region all pixels gray value in gray level image I8;
Indicate B in gray level image I8 picturei-1,j-1, Bi-1,j, Bi,j-1And Bi,jCorresponding region all pixels gray value
Average value;
For B in gray level image I8i-1,j-1, Bi-1,j, Bi,j-1And Bi,jThe standard of corresponding region all pixels gray value
Difference.
Step S35, background gray matrix M is calculatedbAverage value and the sum of standard deviation as ideal background gray scale g, according to
Ideal background gray scale g and background gray matrix MbCalculate gray level ratio matrix Mr, calculation formula is as follows:
Step S36, using bicubic interpolation method, by gray level ratio matrix MrInterpolation is extended to and the image to gamma correction
Identical size obtains gray level ratio technology transform Me;
Step S37, it will be transformed into YUV color space from rgb color space to the image of gamma correction, it will be to gamma correction
Image Y-component element multiplied by gray level ratio technology transform MeIn corresponding element, the Y-component after obtaining operation, judgement
Whether the value of the Y-component after operation exceeds the upper limit value of gray value, and the Y-component that will be greater than upper limit value is set to the upper limit of gray value
Value;YUV color space after the image of gamma correction is from correction Y-component is converted back into rgb color space, obtains completing brightness
Image I9 after correction.
(3) for the image after gamma correction, document background color is removed, exports destination document area image.In this implementation
In example, document background color is removed for image, the specific steps of output destination document area image include the following:
Step S41, by the gray level image I8 that step S32 the is obtained and gray level ratio technology transform M that step S36 is obtainedePhase
Multiply, the gray level image I10 after obtaining gray scale multiplicative correction;
Step S42, construction size first background distributions matrix M identical with the image to gamma correctionb2, initial value is all
0;
Step S43, all pixels in the gray level image I10 that traversal step S41 is obtained, if the gray value of pixel is big
In the background gray matrix M that gray threshold T2, gray threshold T2 obtain for step S34bMean value, then by the first background distributions square
Battle array Mb2Corresponding element be assigned a value of 1, the second background distributions matrix M is obtained with thisb3;
Step S44, the second background distributions matrix M is traversedb3In all elements, if value for 0 element adjacent element
It is all 1, then the element is assigned a value of 1, third background distributions matrix M is obtained with thisb4;
Step S45, third background distributions matrix M is traversedb4In all elements, if value for 1 element adjacent element
There are 3 or 3 or more 0, then the element is assigned a value of -1, the 4th background distributions matrix M is obtained with thisb5;
Step S46, the 4th background distributions matrix M is traversedb5In all elements, find value be 1 element position, and
The pixel of position corresponding to image I9 that step S37 is obtained is set to white, final output destination document area image.
In the present embodiment, document image processing method claps document in camera or mobile device such as mobile phone in addition to applying
Scan process is taken the photograph, can also be and apply in scanning device.When applying in scanning device, former file and picture is swept for scanning device
The resulting RGB image of document in kind is retouched, document in kind specifically can be paper document, photo etc., for placement lack of standardization
Document in kind is scanned processing.Scanning device specifically can be sweep optical square, pen-touched tablet, portable scanner, glue
Piece scanner etc..
Embodiment 3
The present embodiment discloses a kind of document image processing method, includes the following steps:
(1) former file and picture is obtained;In the present embodiment, former file and picture is that camera shoots the resulting RGB figure of document
Picture, camera specifically can be the camera in the mobile devices such as mobile phone, be also possible to the camera of the other equipment such as camera.?
In the present embodiment, former file and picture is that the camera of mobile phone shoots gained, and the resolution ratio of former file and picture is 1440 × 1080.
(2) it is directed to former file and picture and carries out gamma correction, by the image after gamma correction directly as output target text
Shelves area image.In the present embodiment,
In the present embodiment, the step of carrying out gamma correction for former file and picture is as follows:
Step S31, the i.e. former file and picture of the image to gamma correction is converted into gray level image I7 first;
Step S32, gaussian filtering is carried out to gray level image I7, obtains gray level image I8;In the present embodiment, specifically sharp
Gaussian filtering is carried out with Gaussian filter, the size of Gaussian filter is 3 × 3 here.
Step S33, gray level image I8 is equally divided into M*N block region;
Step S34, according to the M*N block region being divided into, average gray matrix M is constructedmWith standard deviation matrix Ms, then root
According to average gray matrix MmWith standard deviation matrix MsCalculate background gray matrix Mb, calculation formula is as follows:
In this step, according to the M*N block regional structure average gray matrix M being divided intomWith standard deviation matrix Ms, specifically
It is as follows:
According to the M*N block regional structure average gray matrix M being divided intom, wherein average gray matrix MmThe i-th row jth
Column elementAre as follows:
According to the M*N block regional structure standard deviation matrix M being divided intos, standard deviation matrix MsThe i-th row jth column element
Are as follows:
Wherein: i indicates average gray matrix MmWith standard deviation matrix MsMatrix line number, i=1,2 ..., M;J indicates flat
Equal gray matrix MmWith standard deviation matrix MsMatrix columns, j=1,2 ..., N;
Bi-1,j-1Indicate the average value of the (i-1)-th row j-1 column block region all pixels gray value in gray level image I8;
Bi-1,jIndicate the average value of the (i-1)-th row j column block region all pixels gray value in gray level image I8;
Bi,j-1Indicate the average value of the i-th row j-1 column block region all pixels gray value in gray level image I8;
Bi,jIndicate the average value of the i-th row j column block region all pixels gray value in gray level image I8;
Indicate B in gray level image I8 picturei-1,j-1, Bi-1,j, Bi,j-1And Bi,jCorresponding region all pixels gray value
Average value;
For B in gray level image I8i-1,j-1, Bi-1,j, Bi,j-1And Bi,jThe standard of corresponding region all pixels gray value
Difference.
Step S35, background gray matrix M is calculatedbAverage value and the sum of standard deviation as ideal background gray scale g, according to
Ideal background gray scale g and background gray matrix MbCalculate gray level ratio matrix Mr, calculation formula is as follows:
Step S36, using bicubic interpolation method, by gray level ratio matrix MrInterpolation is extended to and the image to gamma correction
Identical size obtains gray level ratio technology transform Me;
Step S37, it will be transformed into YUV color space from rgb color space to the image of gamma correction, it will be to gamma correction
Image Y-component element multiplied by gray level ratio technology transform MeIn corresponding element, the Y-component after obtaining operation, judgement
Whether the value of the Y-component after operation exceeds the upper limit value of gray value, and the Y-component that will be greater than upper limit value is set to the upper limit of gray value
Value;YUV color space after the image of gamma correction is from correction Y-component is converted back into rgb color space, obtains completing brightness
Image I9 after correction, image I9 are as output destination document area image.
Embodiment 4
The invention discloses a kind of storage mediums, are stored with program, when described program is executed by processor, realize embodiment
1, document image processing method described in embodiment 2 or embodiment 3.
Storage medium in the present embodiment can be disk, CD, computer storage, read-only memory (ROM, Read-
Only Memory), random access memory (RAM, Random Access Memory), USB flash disk, the media such as mobile hard disk.
Embodiment 5
The invention discloses a kind of calculating equipment, including processor and for the storage of storage processor executable program
Device realizes the file and picture in embodiment 1, embodiment 2 or embodiment 3 when the processor executes the program of memory storage
Processing method.
It is hand-held eventually that calculating equipment described in the present embodiment can be desktop computer, laptop, smart phone, PDA
End, tablet computer or other terminal devices with processor function.
The above embodiment is a preferred embodiment of the present invention, but embodiments of the present invention are not by above-described embodiment
Limitation, other any changes, modifications, substitutions, combinations, simplifications made without departing from the spirit and principles of the present invention,
It should be equivalent substitute mode, be included within the scope of the present invention.
Claims (10)
1. a kind of document image processing method, which comprises the steps of:
Former file and picture is obtained, the document areas edge of former file and picture is extracted, obtains document areas image;
For document areas image, distortion correction is carried out;
For the image after distortion correction, gamma correction is carried out;
For the image after gamma correction, document background color is removed, exports destination document area image.
2. a kind of document image processing method, which comprises the steps of:
Obtain former file and picture;
It is directed to former file and picture and carries out gamma correction;
For the image after gamma correction, document background color is removed, exports destination document area image.
3. a kind of document image processing method, which comprises the steps of:
Obtain former file and picture;
It is directed to former file and picture and carries out gamma correction, by the image after gamma correction directly as output destination document administrative division map
Picture.
4. document image processing method according to claim 1, which is characterized in that carry out the specific of distortion correction to image
Step includes:
Step S21, the image for treating distortion correction first carries out the transformation of probability Hough line, obtains the end that all edges are straightway
Point coordinate;Wherein, every straightway has 2 extreme coordinates;
Step S22, whether the intersection point for judging every two straightways is useful cross, if two straightways are vertical or institute is at an acute angle
More than or equal to certain angle, then the intersection point of two straightways is useful cross, calculates the coordinate of the useful cross as effectively friendship
Point coordinate (x0,y0);
Step S23, all useful cross coordinates are obtained into practical intersecting point coordinate set multiplied by scaling multiplying power α;Wherein, scaling times
Rate α=m/T1, m are the maximum value in the wide and high the two of former file and picture, and T1 is default wide high threshold;
Step S24,4 angle points of document areas, respectively upper left angular coordinate, the right side are filtered out from practical intersecting point coordinate set
Upper angular coordinate, lower-left angular coordinate and bottom right angular coordinate;
Step S25, the upper side length that document areas is calculated according to upper left angular coordinate and upper right angular coordinate, sits according to lower-left angle point
Mark and bottom right angular coordinate calculate the lower side length of document areas, take maximum side length pre- as image in upper side length and lower side length
Phase width W;
The left side for calculating document areas according to upper left angular coordinate and lower-left angular coordinate is high, according to upper right angular coordinate and bottom right
The right that angular coordinate calculates document areas is high, and on the left side, height and the right senior middle school are maximized expected high as document areas image
Spend H;
S26,4 angular coordinates obtained using S24 as four apex coordinates of document areas quadrangle in former file and picture,
4 coordinates with (0,0), (0, W), (H, 0), (W, H) 4 coordinate points as rectangle in target image calculate perspective transform square
Then battle array sets the high respectively W and H of width of target image, image is obtained by perspective transformation matrix perspective transform, as deformation
Image I6 after correction.
5. document image processing method according to claim 4, which is characterized in that in step s 24, utilize 45 ° of centers
4 angle points that method filters out document areas from practical intersecting point coordinate set are extended out, specifically:
S241, using the upper left corner former file and picture I1 as origin, establish rectangular coordinate system, be straight down X-axis along left picture boundary
Positive direction is Y-axis positive direction along image coboundary horizontally to the right;
4 groups of S242, construction coordinates, initial value are the centre coordinate of former file and picture I1, the corresponding point of four groups of coordinates be denoted as p1,
P2, p3, p4 respectively correspond upper left angle point, upper right angle point, lower-left angle point and the lower right corner of document areas;
All intersection points in practical intersecting point coordinate set that S243, traversal step S23 are obtained remember that the intersection point currently traversed is P;
S244, the intercept for crossing point P and point p1, two straight lines that slope is -1 more respectively, if crossing the straight line of point P cutting in Y-axis
Away from intercept of the straight line of point p1 in Y-axis was less than, then replace the coordinate of p1 with P point coordinate;
Point P and point p2 is crossed more respectively, the intercept for two straight lines that slope is 1, be less than if crossing intercept of the straight line of point P in Y-axis
Intercept of the straight line of point p2 in Y-axis is crossed, then replaces the coordinate of p2 with P point coordinate;
Point P and point p3 is crossed more respectively, the intercept for two straight lines that slope is -1, be greater than if crossing intercept of the straight line of point P in Y-axis
Intercept of the straight line of point p3 in Y-axis is crossed, then replaces the coordinate of p3 with P point coordinate;
Point P and point p4 is crossed more respectively, the intercept for two straight lines that slope is 1, be greater than if crossing intercept of the straight line of point P in Y-axis
Intercept of the straight line of point p4 in Y-axis is crossed, then replaces the coordinate of p4 with P point coordinate;
Step S245, return step S243 continues to traverse intersection point and repeat step S244 to obtain until having traversed all intersection points
Document areas upper left angular coordinate p1, upper right angular coordinate p2, lower-left angular coordinate p3 and bottom right angular coordinate p4.
6. document image processing method according to any one of claim 1 to 3, which is characterized in that carried out to image bright
Spending the specific steps corrected includes:
Step S31, the image to gamma correction is converted into gray level image I7 first;
Step S32, gaussian filtering is carried out to gray level image I7, obtains gray level image I8;
Step S33, gray level image I8 is equally divided into M*N block region;
Step S34, according to the M*N block region being divided into, average gray matrix M is constructedmWith standard deviation matrix Ms, then according to flat
Equal gray matrix MmWith standard deviation matrix MsCalculate background gray matrix Mb, calculation formula is as follows:
Step S35, background gray matrix M is calculatedbAverage value and the sum of standard deviation as ideal background gray scale g, carried on the back according to ideal
Scape gray scale g and background gray matrix MbCalculate gray level ratio matrix Mr, calculation formula is as follows:
Step S36, using bicubic interpolation method, by gray level ratio matrix MrInterpolation is extended to identical as the image to gamma correction
Size, obtain gray level ratio technology transform Me;
Step S37, it will be transformed into YUV color space from rgb color space to the image of gamma correction, by the figure to gamma correction
The element of the Y-component of picture is multiplied by gray level ratio technology transform MeIn corresponding element, the Y-component after obtaining operation judges operation
Whether the value of Y-component afterwards exceeds the upper limit value of gray value, and the Y-component that will be greater than upper limit value is set to the upper limit value of gray value;It will
YUV color space after the image of gamma correction is from correction Y-component converts back rgb color space, obtains completing gamma correction
Image I9 afterwards.
7. document image processing method according to claim 6, which is characterized in that in step S34, according to what is be divided into
M*N block regional structure average gray matrix MmWith standard deviation matrix Ms, it is specific as follows:
According to the M*N block regional structure average gray matrix M being divided intom, wherein average gray matrix MmThe i-th row jth arrange member
ElementAre as follows:
According to the M*N block regional structure standard deviation matrix M being divided intos, standard deviation matrix MsThe i-th row jth column elementAre as follows:
Wherein: i indicates average gray matrix MmWith standard deviation matrix MsMatrix line number, i=1,2 ..., M;J indicates average ash
Spend matrix MmWith standard deviation matrix MsMatrix columns, j=1,2 ..., N;
Bi-1,j-1Indicate the average value of the (i-1)-th row j-1 column block region all pixels gray value in gray level image I8;
Bi-1,jIndicate the average value of the (i-1)-th row j column block region all pixels gray value in gray level image I8;
Bi,j-1Indicate the average value of the i-th row j-1 column block region all pixels gray value in gray level image I8;
Bi,jIndicate the average value of the i-th row j column block region all pixels gray value in gray level image I8;
Indicate B in gray level image I8 picturei-1,j-1, Bi-1,j, Bi,j-1And Bi,jCorresponding region all pixels gray value is averaged
Value;
For B in gray level image I8i-1,j-1, Bi-1,j, Bi,j-1And Bi,jThe standard deviation of corresponding region all pixels gray value.
8. document image processing method according to claim 6, which is characterized in that document background color is removed for image,
Output destination document area image specific steps include the following:
Step S41, by the gray level image I8 that step S32 the is obtained and gray level ratio technology transform M that step S36 is obtainedeIt is multiplied, obtains
Gray level image I10 after to gray scale multiplicative correction;
Step S42, construction size first background distributions matrix M identical with the image to gamma correctionb2, initial value is all 0;
Step S43, all pixels in the gray level image I10 that traversal step S41 is obtained, if the gray value of pixel is greater than ash
Threshold value T2 is spent, gray threshold T2 is the background gray matrix M that step S34 is obtainedbMean value, then by the first background distributions matrix Mb2
Corresponding element be assigned a value of 1, the second background distributions matrix M is obtained with thisb3;
Step S44, the second background distributions matrix M is traversedb3In all elements, if the adjacent element of element that value is 0 is all
1, then the element is assigned a value of 1, third background distributions matrix M is obtained with thisb4;
Step S45, third background distributions matrix M is traversedb4In all elements, if value is 1 adjacent element of element, there are 3
It is a or 3 or more 0, then the element is assigned a value of -1, the 4th background distributions matrix M is obtained with thisb5;
Step S46, the 4th background distributions matrix M is traversedb5In all elements, find value be 1 element position, and will step
The pixel of position corresponding to the image I9 that rapid S37 is obtained is set to white, final output destination document area image.
9. a kind of storage medium, is stored with program, which is characterized in that when described program is executed by processor, realize claim 1
To document image processing method described in any one of 8.
10. a kind of calculating equipment, including processor and for the memory of storage processor executable program, feature exists
In realizing at file and picture described in any item of the claim 1 to 8 when the processor executes the program of memory storage
Reason method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910541457.6A CN110298282B (en) | 2019-06-21 | 2019-06-21 | Document image processing method, storage medium and computing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910541457.6A CN110298282B (en) | 2019-06-21 | 2019-06-21 | Document image processing method, storage medium and computing device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110298282A true CN110298282A (en) | 2019-10-01 |
CN110298282B CN110298282B (en) | 2021-07-23 |
Family
ID=68028530
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910541457.6A Active CN110298282B (en) | 2019-06-21 | 2019-06-21 | Document image processing method, storage medium and computing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110298282B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110767292A (en) * | 2019-10-12 | 2020-02-07 | 腾讯科技(深圳)有限公司 | Pathological number identification method, information identification method, device and information identification system |
CN111079738A (en) * | 2019-11-23 | 2020-04-28 | 中国科学院长春光学精密机械与物理研究所 | Image processing method, system and terminal equipment |
CN111223065A (en) * | 2020-01-13 | 2020-06-02 | 中国科学院重庆绿色智能技术研究院 | Image correction method, irregular text recognition device, storage medium and equipment |
CN111369554A (en) * | 2020-03-18 | 2020-07-03 | 山西安数智能科技有限公司 | Optimization and pretreatment method of belt damage sample in low-brightness multi-angle environment |
CN111680690A (en) * | 2020-04-26 | 2020-09-18 | 泰康保险集团股份有限公司 | Character recognition method and device |
CN113450279A (en) * | 2021-07-01 | 2021-09-28 | 维柯基科技(上海)有限公司 | Fluorescence intensity detection method and device of porous fluorescence microarray image, computer equipment and computer readable storage medium |
CN113516584A (en) * | 2021-09-14 | 2021-10-19 | 风脉能源(武汉)股份有限公司 | Image gray processing method and system and computer storage medium |
CN114697464A (en) * | 2020-12-29 | 2022-07-01 | 深圳市汉森软件有限公司 | Image partition processing method, device, equipment and storage medium |
CN117351495A (en) * | 2023-09-21 | 2024-01-05 | 山东睿芯半导体科技有限公司 | Text image correction method, device, chip and terminal |
CN117351495B (en) * | 2023-09-21 | 2024-04-26 | 山东睿芯半导体科技有限公司 | Text image correction method, device, chip and terminal |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030174904A1 (en) * | 2002-01-16 | 2003-09-18 | Toshifumi Yamaai | Method and system for correcting direction or orientation of document image |
CN103761713A (en) * | 2014-01-21 | 2014-04-30 | 中国石油大学(华东) | Method for calibrating uneven brightness of microcosmic oil displacement experiment image |
CN104008359A (en) * | 2014-04-18 | 2014-08-27 | 杭州晟元芯片技术有限公司 | Accurate grid sampling method used for recognizing QR code |
CN104700362A (en) * | 2013-12-06 | 2015-06-10 | 富士通株式会社 | Document image processing device and method |
CN107480666A (en) * | 2017-08-10 | 2017-12-15 | 深圳市碧海扬帆科技有限公司 | Image capture device and its scanning target extraction method, device, storage medium |
CN107491730A (en) * | 2017-07-14 | 2017-12-19 | 浙江大学 | A kind of laboratory test report recognition methods based on image procossing |
-
2019
- 2019-06-21 CN CN201910541457.6A patent/CN110298282B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030174904A1 (en) * | 2002-01-16 | 2003-09-18 | Toshifumi Yamaai | Method and system for correcting direction or orientation of document image |
CN104700362A (en) * | 2013-12-06 | 2015-06-10 | 富士通株式会社 | Document image processing device and method |
CN103761713A (en) * | 2014-01-21 | 2014-04-30 | 中国石油大学(华东) | Method for calibrating uneven brightness of microcosmic oil displacement experiment image |
CN104008359A (en) * | 2014-04-18 | 2014-08-27 | 杭州晟元芯片技术有限公司 | Accurate grid sampling method used for recognizing QR code |
CN107491730A (en) * | 2017-07-14 | 2017-12-19 | 浙江大学 | A kind of laboratory test report recognition methods based on image procossing |
CN107480666A (en) * | 2017-08-10 | 2017-12-15 | 深圳市碧海扬帆科技有限公司 | Image capture device and its scanning target extraction method, device, storage medium |
Non-Patent Citations (3)
Title |
---|
CHIEN-HSINGCHOU 等: "A binarization method with learning-built rules for document images produced by cameras", 《PATTERN RECOGNITION》 * |
张全法: "帧差分智能视频监控系统图像亮度的校正", 《应用光学》 * |
范军: "成熟柑桔形状特征提取与空间定位", 《中国优秀硕士学位论文全文数据库工程科技Ⅰ辑》 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110767292A (en) * | 2019-10-12 | 2020-02-07 | 腾讯科技(深圳)有限公司 | Pathological number identification method, information identification method, device and information identification system |
CN111079738A (en) * | 2019-11-23 | 2020-04-28 | 中国科学院长春光学精密机械与物理研究所 | Image processing method, system and terminal equipment |
CN111079738B (en) * | 2019-11-23 | 2023-09-29 | 中国科学院长春光学精密机械与物理研究所 | Image processing method, system and terminal equipment |
CN111223065A (en) * | 2020-01-13 | 2020-06-02 | 中国科学院重庆绿色智能技术研究院 | Image correction method, irregular text recognition device, storage medium and equipment |
CN111369554A (en) * | 2020-03-18 | 2020-07-03 | 山西安数智能科技有限公司 | Optimization and pretreatment method of belt damage sample in low-brightness multi-angle environment |
CN111680690A (en) * | 2020-04-26 | 2020-09-18 | 泰康保险集团股份有限公司 | Character recognition method and device |
CN114697464A (en) * | 2020-12-29 | 2022-07-01 | 深圳市汉森软件有限公司 | Image partition processing method, device, equipment and storage medium |
CN113450279B (en) * | 2021-07-01 | 2023-03-14 | 维柯基科技(上海)有限公司 | Fluorescence intensity detection method and device for porous fluorescence microarray image, computer equipment and computer readable storage medium |
CN113450279A (en) * | 2021-07-01 | 2021-09-28 | 维柯基科技(上海)有限公司 | Fluorescence intensity detection method and device of porous fluorescence microarray image, computer equipment and computer readable storage medium |
CN113516584B (en) * | 2021-09-14 | 2021-11-30 | 风脉能源(武汉)股份有限公司 | Image gray processing method and system and computer storage medium |
CN113516584A (en) * | 2021-09-14 | 2021-10-19 | 风脉能源(武汉)股份有限公司 | Image gray processing method and system and computer storage medium |
CN117351495A (en) * | 2023-09-21 | 2024-01-05 | 山东睿芯半导体科技有限公司 | Text image correction method, device, chip and terminal |
CN117351495B (en) * | 2023-09-21 | 2024-04-26 | 山东睿芯半导体科技有限公司 | Text image correction method, device, chip and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN110298282B (en) | 2021-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110298282A (en) | Document image processing method, storage medium and calculating equipment | |
CN109409366B (en) | Distorted image correction method and device based on angular point detection | |
Wang et al. | Gladnet: Low-light enhancement network with global awareness | |
CN109977723B (en) | Large bill picture character recognition method | |
US9495587B2 (en) | Document unbending and recoloring systems and methods | |
US8000514B2 (en) | Methods for mobile image capture and processing of checks | |
US9495735B2 (en) | Document unbending systems and methods | |
WO2018040463A1 (en) | Data compression and decompression methods for demura table, and mura compensation method | |
CN102479379B (en) | Image rectification method and relevant image rectification system | |
US20130034299A1 (en) | Robust Patch Regression based on In-Place Self-similarity for Image Upscaling | |
RU2631765C1 (en) | Method and system of correcting perspective distortions in images occupying double-page spread | |
JP5488530B2 (en) | Image processing apparatus and image processing program | |
KR20070008652A (en) | Method for extracting raw data of a photographed image | |
CN109871841B (en) | Image processing method, device, terminal and storage medium | |
CN105339951A (en) | Method for detecting a document boundary | |
JP3005296B2 (en) | Rotate run-length coded images | |
Aliaga et al. | A virtual restoration stage for real-world objects | |
CN111160063B (en) | Internet of things IPC two-dimensional code distribution network image enhancement method and system | |
JP4020093B2 (en) | Edge detection method and apparatus, program, storage medium, and frame detection method, apparatus, program, and storage medium | |
CN107358138A (en) | Bearing calibration, mobile terminal and the storage device of nonlinear distortion EAN bar codes | |
CN109961393A (en) | Subpixel registration and splicing based on interpolation and iteration optimization algorithms | |
CN114820674A (en) | Arc contour extraction method, device, computer equipment and storage medium | |
CN115222935A (en) | Image correction method, image correction device, electronic apparatus, scanning pen, and storage medium | |
CN101364303B (en) | Edge pixel extracting and processing method | |
CN110097065A (en) | A kind of line detection method and terminal based on FreeMan chain code |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |