CN107688807B - Image processing method and image processing apparatus - Google Patents
Image processing method and image processing apparatus Download PDFInfo
- Publication number
- CN107688807B CN107688807B CN201610639485.8A CN201610639485A CN107688807B CN 107688807 B CN107688807 B CN 107688807B CN 201610639485 A CN201610639485 A CN 201610639485A CN 107688807 B CN107688807 B CN 107688807B
- Authority
- CN
- China
- Prior art keywords
- region
- occurrence
- frequency
- amplitude
- pixels
- 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.)
- Active
Links
- 238000012545 processing Methods 0.000 title claims abstract description 88
- 238000003672 processing method Methods 0.000 title claims abstract description 48
- 238000004422 calculation algorithm Methods 0.000 claims description 9
- 238000010606 normalization Methods 0.000 claims description 8
- 238000009499 grossing Methods 0.000 claims description 6
- 238000000034 method Methods 0.000 abstract description 36
- 230000008569 process Effects 0.000 abstract description 26
- 238000010586 diagram Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 11
- 230000008859 change Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 6
- 238000009795 derivation Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000036541 health Effects 0.000 description 3
- 235000002918 Fraxinus excelsior Nutrition 0.000 description 2
- 239000002956 ash Substances 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 239000004744 fabric Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/62—Text, e.g. of license plates, overlay texts or captions on TV images
-
- 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/10—Character recognition
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Facsimile Image Signal Circuits (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The present invention provides a kind of image processing method comprising: the variable quantity based on pixel grey scale in image divides an image into multiple identification regions;According to the gray value of all pixels of identification region, the integral gradient amplitude of all pixels in identification region is calculated;According to the frequency of occurrence of the integral gradient amplitude of all pixels in identification region, at least one frequency of occurrence extremal region of the integral gradient amplitude of all pixels of each identification region is obtained;According to the frequency of occurrence extremal region of identification region, the character area boundary of image is determined, to carry out Text region processing to image.The present invention also provides a kind of image processing apparatus, image processing method and image processing apparatus of the invention determines the character area boundary of image by the frequency of occurrence extremal region of identification region, accurately the text in image can be identified, and the calculating process of frequency of occurrence extremal region is simple.
Description
Technical field
The present invention relates to field of image processings, more particularly to a kind of image processing method and image processing apparatus.
Background technique
In present image process field, character recognition technology and method are more mature, such as using gradient image information into
Row identification is identified by the way of deep learning, and it is fine that above-mentioned identification technology can be used to the accurate character block of cutting
Carry out identify.But becoming increasingly complex with the background information of application scenarios, it can not be into the character blocks of application scenarios
The accurate slicing operation of row, to cause the difficulty of the text in identification image larger.
In face of above situation, MSER (Maximally Stable Extremal Regions, maximum usually will use
Stability region) method or SWT (stroke width transform, stroke width transformation) method based on character width carry out
Text region in image.
Wherein MSER method carries out binaryzation to image by using different gray thresholds and obtains gray scale stability region, but
It is that the text in image can not be accurately distinguished when the character stability region for sheet mutually nested with background.SWT method
The character width information in background can be calculated, but calculating process is complex, and the false alarm rate in complex background picture
It is higher, certain pressure is brought to identification.
Summary of the invention
The embodiment of the present invention provides a kind of can be accurately distinguished to the text in image and calculating process is relatively simple
Image processing method and image processing apparatus;With solve existing image processing method and image processing apparatus in image
Text can not be accurately distinguished or be identified the complex technical problem of calculating process.
The embodiment of the present invention provides a kind of image processing method comprising:
Based on the variable quantity of pixel grey scale in image, described image is divided into multiple identification regions;
According to the gray value of all pixels of the identification region, the whole ladder of all pixels in the identification region is calculated
Spend amplitude;
According to the frequency of occurrence of the integral gradient amplitude of all pixels in the identification region, the identification region is obtained
All pixels integral gradient amplitude at least one frequency of occurrence extremal region;And
According to the frequency of occurrence extremal region of the identification region, the character area boundary of described image is determined, with
Just Text region processing is carried out to described image.
The embodiment of the present invention also provides a kind of image processing apparatus comprising:
Described image is divided into multiple identification regions for the variable quantity based on pixel grey scale in image by division module;
Computing module calculates institute in the identification region for the gray value according to all pixels of the identification region
There is the integral gradient amplitude of pixel;
Extremal region obtains module, for the appearance according to the integral gradient amplitudes of all pixels in the identification region
Number obtains at least one frequency of occurrence extremal region of the integral gradient amplitude of all pixels of the identification region;And
Identification module determines the text of described image for the frequency of occurrence extremal region according to the identification region
Word zone boundary, to carry out Text region processing to described image.
Compared to the prior art, the occurrence out that image processing method of the invention and image processing apparatus pass through identification region
Extremal region is counted to determine the character area boundary of image, accurately the text in image can be identified, and frequency of occurrence
The calculating process of extremal region is simple;Solve existing image processing method and image processing apparatus to the text in image
It can not be accurately distinguished or be identified the complex technical problem of calculating process.
Detailed description of the invention
Fig. 1 is the flow chart of the first preferred embodiment of image processing method of the invention;
Fig. 2 is the flow chart of the second preferred embodiment of image processing method of the invention;
Fig. 3 is the flow chart of the step S204 of the second preferred embodiment of image processing method of the invention;
Fig. 4 is the signal of the pixel gradient amplitude coordinate system in the second preferred embodiment of image processing method of the invention
Figure;
Fig. 5 is that the frequency of occurrence of the integral gradient amplitude in the second preferred embodiment of image processing method of the invention is bent
The schematic diagram of line;
Fig. 6 is the structural schematic diagram of the first preferred embodiment of image processing apparatus of the invention;
Fig. 7 is the structural schematic diagram of the second preferred embodiment of image processing apparatus of the invention;
Fig. 8 is the structural schematic diagram of the computing module of the second preferred embodiment of image processing apparatus of the invention;
Fig. 9 is that the extremal region of the second preferred embodiment of image processing apparatus of the invention obtains the structural representation of module
Figure;
Figure 10 is that the extremal region of the second preferred embodiment of image processing apparatus of the invention obtains the maximum of module
The structural schematic diagram of area acquisition unit;
Figure 11 is the processing image schematic diagram of the specific embodiment of image processing method and image processing apparatus of the invention;
Figure 12 is being turned using MSER algorithm for the specific embodiment of image processing method and image processing apparatus of the invention
Processing image schematic diagram after changing;
Figure 13 is the character area boundary of the specific embodiment of image processing method and image processing apparatus of the invention
Image schematic diagram;
Figure 14 is the working environment structural schematic diagram of the electronic equipment where image processing apparatus of the invention.
Specific embodiment
Schema is please referred to, wherein identical component symbol represents identical component, the principle of the present invention is to implement one
It is illustrated in computing environment appropriate.The following description be based on illustrated by the specific embodiment of the invention, should not be by
It is considered as the limitation present invention other specific embodiments not detailed herein.
In the following description, specific embodiments of the present invention will refer to the operation as performed by one or multi-section computer
The step of and symbol illustrate, unless otherwise stating clearly.Therefore, these steps and operation be will appreciate that, mentioned for several times wherein having
It include by representing with the computer disposal list of the electronic signal of the data in a structuring pattern to be executed by computer
Member is manipulated.At this manipulation transforms data or the position being maintained in the memory system of the computer, it can match again
Set or in addition change in a manner familiar to those skilled in the art the running of the computer.The maintained data knot of the data
Structure is the provider location of the memory, has the specific feature as defined in the data format.But the principle of the invention is with above-mentioned
Text illustrates, is not represented as a kind of limitation, those skilled in the art will appreciate that plurality of step as described below and
Operation also may be implemented in hardware.
Image processing method and image processing apparatus of the invention can be used for the various movements for carrying out pictograph identification
Electronic equipment, stationary electronic devices, wearable device, helmet or medical treatment & health platform.User is set using the mobile electron
Standby, stationary electronic devices, wearable device, helmet or medical treatment & health platform can accurately distinguish the text in image
And Text region process is relatively simple.
Fig. 1 is please referred to, Fig. 1 is the flow chart of the first preferred embodiment of image processing method of the invention.This is preferred real
Above-mentioned mobile electronic device or stationary electronic devices can be used to be implemented for the image processing method for applying example, this preferred embodiment
Image processing method include:
Step S101 divides an image into multiple identification regions based on the variable quantity of pixel grey scale in image;
Step S102 calculates the entirety of all pixels in identification region according to the gray value of all pixels of identification region
Gradient magnitude;
Step S103 obtains cog region according to the frequency of occurrence of the integral gradient amplitude of all pixels in identification region
At least one frequency of occurrence extremal region of the integral gradient amplitude of all pixels in domain;
Step S104 determines the character area boundary of image, according to the frequency of occurrence extremal region of identification region so as to right
Image carries out Text region processing.
The following detailed description of the detailed process of each step of the image processing method of this preferred embodiment.
In step s101, variable quantity of the image processing apparatus based on pixel grey scale in image divides an image into multiple
Identification region.Here image refers to the image for carrying out Text region, which includes background and text, due to background
Color and text color have certain display gray difference, i.e. the variable quantity of the pixel grey scale of text and background intersection can be compared with
Greatly, the variable quantity of the pixel grey scale of simple background area is smaller.Therefore it can be divided an image by above-mentioned variable quantity more
A identification region with text, and the pure background area of not text is removed, it is effective to be carried out to each identification region
Text region.Then pass to step S102.
In step s 102, image processing apparatus is according to the ashes of all pixels of the step S101 each identification region obtained
Angle value calculates the integral gradient amplitude of all pixels in each identification region.Due in identification region also include background area with
And character area, therefore in this step obtain identification region in each pixel with respect to adjacent pixel grey scale change amount, as
The integral gradient amplitude of the pixel grey scale, so as to by identification region character area and background area demarcate come.With
After go to step S103.
In step s 103, as the difference of the pixel grey scale of the pixel grey scale and character area of background area be it is fixed,
Then the integral gradient amplitude of the pixel grey scale of the intersection of background area and character area is also fixed, the picture of these intersections
The frequency of occurrence of the integral gradient amplitude of plain gray scale is directly proportional to the size of character area, i.e., character area is bigger, intersection
The frequency of occurrence of the integral gradient amplitude of pixel grey scale is bigger.
In this step, it needs to identify main character area, and main character area is in identification region
Area is larger, the frequency of occurrence of the integral gradient amplitude of the junction in main character area and neighboring background region also just compared with
It is more, therefore image processing apparatus is done by the frequency of occurrence of the integral gradient amplitude of all pixels in identification region to some here
The background area grey scale change disturbed is filtered, such as by the corresponding region of pixel of the less integral gradient amplitude of frequency of occurrence
Without Text region.
In this way according to the frequency of occurrence of the integral gradient amplitude of all pixels in filtered identification region, identification is obtained
At least one frequency of occurrence extremal region of the integral gradient amplitude of all pixels in region.Here frequency of occurrence extremal region
Refer to the more region of the frequency of occurrence of integral gradient amplitude in identification region, should include but is not limited to the whole ladder of all pixels
Spend the most region of the frequency of occurrence of amplitude.Then pass to step S104.
In step S104, image processing apparatus is according to the frequency of occurrence extreme value area of the step S103 identification region obtained
Domain determines the character area boundary of image.Subsequent picture processing unit carries out text to image according to the character area boundary of image
Word identifying processing.
Text region process in the image for the image processing method for completing this preferred embodiment in this way.
The image processing method of this preferred embodiment determines image by the frequency of occurrence extremal region of identification region
Character area boundary can accurately identify the text in image, and the calculating process of frequency of occurrence extremal region is simple.
Referring to figure 2., Fig. 2 is the flow chart of the second preferred embodiment of image processing method of the invention.This is preferred real
Above-mentioned mobile electronic device or stationary electronic devices can be used to be implemented for the image processing method for applying example, this preferred embodiment
Image processing method include:
Step S201 is drawn image using maximum stability region algorithm based on the changing value of the pixel grey scale in image
It is divided into multiple identification regions;
Step S202 calculates the entirety of all pixels in identification region according to the gray value of all pixels of identification region
Gradient magnitude;
Step S203 is set based on preset normalization, is carried out to the integral gradient amplitude of all pixels in identification region
Normalized;
Step S204 obtains cog region according to the frequency of occurrence of the integral gradient amplitude of all pixels in identification region
At least one frequency of occurrence extremal region of the integral gradient amplitude of all pixels in domain;
Step S205 determines the character area boundary of image according to the frequency of occurrence extremal region of identification region;
Step S206 is filled operation to the region in character area boundary, so as to the image after padding into
Row text identifying processing.
The following detailed description of the detailed process of each step of the image processing method of this preferred embodiment.
In step s 201, variable quantity of the image processing apparatus based on pixel grey scale in image, uses MSER
(Maximally Stable Extremal Regions, maximum stability region algorithm) divides an image into multiple cog regions
Domain.Here image refers to the image for carrying out Text region, which includes background and text.
MSER algorithm carries out the setting of multiple gray thresholds to the grayscale image of image, and to each gray threshold in image district
Pixel quantity in domain is counted, and gray threshold is changed the smallest region and is set as maximum stability region.Due to background
Color and text color have certain display gray difference, i.e. the variable quantity of the pixel grey scale of text and background intersection can be compared with
Greatly, the variable quantity of the pixel grey scale of simple background area is smaller.Therefore above-mentioned maximum stability region can divide image
It, here can be by maximum stability region (pure background area) for multiple identification regions (non-maximum stability region) with text
Removal, to carry out effective Text region to each identification region.
Here the available identification region information of the pixel in each identification region and zone position information indicate, know
Other area information refers to the information of the identification region where pixel, and zone position information refers to pixel in corresponding identification region
In location information.Then pass to step S202.
In step S202, image processing apparatus is according to the ashes of all pixels of the step S101 each identification region obtained
Angle value calculates the integral gradient amplitude of all pixels in each identification region.
Here each pixel horizontal shade of gray amplitude in the horizontal direction in identification region is calculated using sobel operator
GradientXImage, and it is terraced in the vertical gray scale of vertical direction using each pixel in sobel operator calculating identification region
Spend amplitude GradientYImage.
For each pixel image_n_gray (x, y) in identification region, wherein n is that the identification region of pixel is believed
Breath, x, y are position coordinates of the pixel in corresponding identification region.The horizontal gray scale ladder of pixel image_n_gray (x, y)
Spending amplitude is GradientXImage_n (x, y), and the vertical shade of gray amplitude of pixel image_n_gray (x, y) is
GradientYImage_n(x,y)。
The integral gradient amplitude of pixel image_n_gray (x, y) is GradientAllImage_n (x, y),
Then pass to step S203.
In step S203, the specified region [0, m] of image processing apparatus setting one is used as normalized setting regions, and m can
It is 255 etc..
Image processing apparatus traverses all values of GradientAllImage_n (x, y), obtains all
Maximum value GradientAllImage_n_max in GradientAllImage_n (x, y).
It is normalized using following formula.The entirety of pixel image_n_gray (x, y) after normalization
Gradient magnitude are as follows: GradientAllImageNormalize_n (x, y).
GradientAllImageNormalize_n (x, y)=
m*GradientAllImage_n(x,y)/GradientAllImage_n_max。
The integral gradient amplitude of each pixel in this way after normalized is respectively positioned on 0 between m.Then pass to step
S204。
In step S204, image processing apparatus is according to the entirety of all pixels in the identification region after normalized
The frequency of occurrence of gradient magnitude obtains at least one frequency of occurrence extreme value of the integral gradient amplitude of all pixels of identification region
Region.
If the difference of the pixel grey scale of the pixel grey scale and character area of background area is fixed, then background area and text
The integral gradient amplitude of the pixel grey scale of the intersection in block domain is also fixed, the whole ladder of the pixel grey scale of these intersections
The frequency of occurrence for spending amplitude is directly proportional to the size of character area, i.e., character area is bigger, the entirety of the pixel grey scale of intersection
The frequency of occurrence of gradient magnitude is bigger.
In this step, it needs to identify main character area, and main character area is in identification region
Area is larger, the frequency of occurrence of the integral gradient amplitude of the junction in main character area and neighboring background region also just compared with
It is more, therefore image processing apparatus is done by the frequency of occurrence of the integral gradient amplitude of all pixels in identification region to some here
The background area grey scale change disturbed is filtered, such as by the corresponding region of pixel of the less integral gradient amplitude of frequency of occurrence
It filters out.
Specifically referring to figure 3., Fig. 3 is the stream of the step S204 of the second preferred embodiment of image processing method of the invention
Cheng Tu.Step S204 includes:
Step S2041, image processing apparatus is using the integral gradient amplitude of all pixels of identification region as abscissa, identification
The frequency of occurrence of the integral gradient amplitude of all pixels in region is ordinate, establishes the pixel gradient amplitude coordinate of identification region
System.Specifically as shown in figure 4, Fig. 4 is the pixel gradient amplitude seat in the second preferred embodiment of image processing method of the invention
Mark the schematic diagram of system.
Step S2042, image processing apparatus then mark institute on the pixel gradient amplitude coordinate system that step S2041 is established
There is the frequency of occurrence point of integral gradient amplitude.It here is counted to the integral gradient amplitude of all pixels of identification region,
Thus frequency of occurrence of each integral gradient amplitude obtained in identification region, then by above-mentioned integral gradient amplitude and correspondence
Frequency of occurrence be labeled on pixel gradient amplitude coordinate system.As the mark point in Fig. 4 can occur 40 for integral gradient amplitude A
Secondary, integral gradient amplitude B occurs 50 times, and integral gradient amplitude C occurs 80 times, and integral gradient amplitude D occurs 90 times, integral gradient
Amplitude E occurs 100 times, and integral gradient amplitude F occurs 120 times, and integral gradient amplitude G occurs 95 times, and integral gradient amplitude H occurs
85 times, integral gradient amplitude I occurs 50 times, and integral gradient amplitude J occurs 55 times, and integral gradient amplitude K occurs 50 times.Wherein A >
B>C>D>E>F>G>H>I>J>K.Here the integral gradient amplitude of too small (essentially 0) is deleted.
Step S2043, image processing apparatus carry out the frequency of occurrence point of the step S2042 integral gradient amplitude marked high
This smoothing processing, the frequency of occurrence curve for obtaining integral gradient amplitude (are counted these frequency of occurrence points with Gaussian function
It calculates and obtains one group of new point distribution).Specifically as shown in figure 5, Fig. 5 is the second preferred embodiment of image processing method of the invention
In integral gradient amplitude frequency of occurrence curve schematic diagram.
Step S2044, image processing apparatus carry out a derivation and secondary derivation to the point in frequency of occurrence curve, can
To obtain the maximum point and minimum point of frequency of occurrence curve.Such as the integral gradient amplitude F in Fig. 4, integral gradient amplitude B
And integral gradient amplitude J be maximum point, between integral gradient amplitude B and integral gradient amplitude C, integral gradient amplitude H with
And there is minimum point between integral gradient amplitude I.
By analyzing the maximum point between two minimum points, the non-zero obtained around the maximum goes out occurrence
It is several integral gradient amplitudes, i.e. integral gradient amplitude C, integral gradient amplitude D, integral gradient amplitude E, integral gradient amplitude F, whole
Body gradient magnitude G and integral gradient amplitude H.
Maximum F is set by the region of the integral gradient amplitude of the non-zero frequency of occurrence around the maximum of above-mentioned acquisition
Corresponding maximum region, i.e. integral gradient amplitude H are to the corresponding region integral gradient amplitude C.Certainly through the above way may be used
With obtain frequency of occurrence curve multiple maximum points and corresponding maximum region.
Step S2045 will be greater than the maximum point and the corresponding integral gradient width of corresponding maximum region of setting value
It is worth region, is set as frequency of occurrence extremal region.
Occurrence is gone out according to the integral gradient amplitude for using all pixels in the filtered identification region of setting value in this way
Number, obtains at least one frequency of occurrence extremal region of the integral gradient amplitude of all pixels of identification region.Here appearance
Number extremal region refers to the more region of the frequency of occurrence of integral gradient amplitude in identification region, should include but is not limited to all
The most region of the frequency of occurrence of the integral gradient amplitude of pixel.Then pass to step S205.
In step S205, image processing apparatus is according to the frequency of occurrence extreme value area of the step S204 identification region obtained
Domain determines the character area boundary of image.Then pass to step S206.
In step S206, the region in character area boundary that image processing apparatus obtains step S205 is filled
Operation, can preferably distinguish character area and background area in this way, to accurately obtain the position of the character area of image
It sets, background area can be removed well by Text region.
Text region process in the image for the image processing method for completing this preferred embodiment in this way.
On the basis of first preferred embodiment, the image processing method of this preferred embodiment carries out integral gradient amplitude
Normalized further improves the accuracy of Text region operation;Appearance is obtained by establishing frequency of occurrence curve
Number extremal region simplifies the calculating process of frequency of occurrence extremal region acquisition;Region in character area boundary is carried out
Padding is easier to for background area to be removed operation so that the difference of character area and background area is bigger.
The present invention also provides a kind of image processing apparatus, Fig. 6 is please referred to, Fig. 6 is the of image processing apparatus of the invention
The structural schematic diagram of one preferred embodiment.Above-mentioned image processing method can be used in the image processing apparatus of this preferred embodiment
First preferred embodiment is implemented, the image processing apparatus 60 of this preferred embodiment include division module 61, computing module 62,
Extremal region obtains module 63 and identification module 64.
Division module 61 is used for the variable quantity based on pixel grey scale in image, divides an image into multiple identification regions;Meter
The gray value for all pixels that module 62 is used for according to identification region is calculated, the integral gradient width of all pixels in identification region is calculated
Value;Extremal region obtains the frequency of occurrence for the integral gradient amplitude that module 63 is used for according to all pixels in identification region, obtains
Take at least one frequency of occurrence extremal region of the integral gradient amplitude of all pixels of identification region;Identification module 64 is used for root
According to the frequency of occurrence extremal region of identification region, the character area boundary of image is determined, to carry out text knowledge to image
Other places reason.
The image processing apparatus 60 of this preferred embodiment is in use, division module 61 is based on pixel grey scale in image first
Variable quantity divides an image into multiple identification regions.Here image refers to the image for carrying out Text region, the image packet
Background and text are included, since background color and text color have certain display gray difference, i.e. text and background has a common boundary
The variable quantity of the pixel grey scale at place can be larger, and the variable quantity of the pixel grey scale of simple background area is smaller.Therefore by upper
Multiple identification regions with text can be divided an image by stating variable quantity, and the pure background area of not text is removed, with
Just effective Text region is carried out to each identification region.
The gray value of all pixels for each identification region that subsequent computing module 62 is obtained according to division module 61, calculates
The integral gradient amplitude of all pixels in each identification region.Due to also including background area and literal field in identification region
Domain, therefore computing module 62 obtains the grey scale change amount of each pixel in identification region with respect to adjacent pixel, it is grey as the pixel
The integral gradient amplitude of degree, so as to by identification region character area and background area demarcate come.
If the difference of the pixel grey scale of the pixel grey scale and character area of background area is fixed, then background area and text
The integral gradient amplitude of the pixel grey scale of the intersection in block domain is also fixed, the whole ladder of the pixel grey scale of these intersections
The frequency of occurrence for spending amplitude is directly proportional to the size of character area, i.e., character area is bigger, the entirety of the pixel grey scale of intersection
The frequency of occurrence of gradient magnitude is bigger.
Due to needing to identify to main character area, and main character area identification region area compared with
Greatly, main character area and the frequency of occurrence of the integral gradient amplitude of the junction in neighboring background region are also just more, therefore
Here extremal region obtains module 63 by the frequency of occurrence of the integral gradient amplitude of all pixels in identification region to some dry
The background area grey scale change disturbed is filtered, such as by the corresponding region of pixel of the less integral gradient amplitude of frequency of occurrence
Without Text region,
Extremal region obtains module 63 according to the integral gradient amplitude of all pixels in filtered identification region in this way
Frequency of occurrence, obtain at least one frequency of occurrence extremal region of the integral gradient amplitude of all pixels of identification region.This
In frequency of occurrence extremal region refer to the more region of the frequency of occurrence of integral gradient amplitude in identification region, should include but not
It is limited to the most region of the frequency of occurrence of the integral gradient amplitude of all pixels.
Last identification module 64 obtains the frequency of occurrence extremal region for the identification region that module 63 obtains according to extremal region,
Determine the character area boundary of image.Subsequent identification module 64 carries out Text region to image according to the character area boundary of image
Processing.
Text region process in the image for the image processing apparatus 60 for completing this preferred embodiment in this way.
The image processing apparatus of this preferred embodiment determines image by the frequency of occurrence extremal region of identification region
Character area boundary can accurately identify the text in image, and the calculating process of frequency of occurrence extremal region is simple.
Fig. 7 is please referred to, Fig. 7 is the structural schematic diagram of the second preferred embodiment of image processing apparatus of the invention.This is excellent
The second preferred embodiment for selecting the image processing apparatus of embodiment that above-mentioned image processing method can be used is implemented, this is preferably
The image processing apparatus 70 of embodiment includes division module 71, computing module 72, normalization module 73, extremal region acquisition module
74, identification module 75 and filling module 76.
Division module 71 is used for the variable quantity based on pixel grey scale in image, divides an image into multiple identification regions;Meter
The gray value for all pixels that module 72 is used for according to identification region is calculated, the integral gradient width of all pixels in identification region is calculated
Value;Module 73 is normalized to be used for based on preset normalization setting, to the integral gradient amplitudes of all pixels in identification region into
Row normalized;Extremal region obtains module 74 and is used for going out according to the integral gradient amplitudes of all pixels in identification region
Occurrence number obtains at least one frequency of occurrence extremal region of the integral gradient amplitude of all pixels of identification region;Identify mould
Block 75 is used for the frequency of occurrence extremal region according to identification region, determines the character area boundary of image;Filling module 76 is used for
Operation is filled to the region in character area boundary, to carry out Text region processing to the image after padding.
Fig. 8 is please referred to, Fig. 8 is that the structure of the computing module of the second preferred embodiment of image processing apparatus of the invention is shown
It is intended to.The computing module 72 includes horizontal vertical shade of gray amplitude computing unit 81 and integral gradient amplitude computing unit
82。
Horizontal vertical shade of gray amplitude computing unit 81 is used for the gray value of all pixels according to identification region, calculates
The horizontal shade of gray amplitude and vertical shade of gray amplitude of all pixels of identification region;Integral gradient amplitude computing unit
The 82 horizontal shade of gray amplitude and vertical shade of gray amplitude for all pixels using identification region calculates cog region
The integral gradient amplitude of all pixels in domain.
Fig. 9 is please referred to, Fig. 9 is that the extremal region of the second preferred embodiment of image processing apparatus of the invention obtains module
Structural schematic diagram.It includes establishment of coordinate system unit 91, mark unit 92, curve acquisition unit that extremal region, which obtains module 74,
93, maximum region acquiring unit 94 and extremal region acquiring unit 95.
Establishment of coordinate system unit 91 is used for using the integral gradient amplitude of all pixels of identification region as abscissa, cog region
The frequency of occurrence of the integral gradient amplitude of all pixels in domain is ordinate, establishes the pixel gradient amplitude coordinate of identification region
System;Mark unit 92 is used to mark the frequency of occurrence point of all integral gradient amplitudes on pixel gradient amplitude coordinate system;Curve
Acquiring unit 93 is used to carry out Gaussian smoothing to the frequency of occurrence point of integral gradient amplitude, obtains going out for integral gradient amplitude
Occurrence number curve;Maximum region acquiring unit 94 is used to obtain at least one maximum point and correspondence of frequency of occurrence curve
Maximum region;Extremal region acquiring unit 95 be used for will be greater than setting value maximum point and corresponding maximum region
Corresponding integral gradient amplitude region, is set as frequency of occurrence extremal region.
Figure 10 is please referred to, Figure 10 is that the extremal region of the second preferred embodiment of image processing apparatus of the invention obtains mould
The structural schematic diagram of the maximum region acquiring unit of block.The maximum acquiring unit 94 include maximum obtain subelement 941,
Integral gradient amplitude obtains subelement 942 and maximum region obtains subelement 943.
Maximum obtains at least one maximum that subelement 941 is used to obtain the frequency of occurrence curve;Integral gradient
Amplitude obtains the integral gradient amplitude that subelement 942 is used to obtain the non-zero frequency of occurrence around maximum;Maximum region obtains
Take subelement 943 corresponding for setting maximum for the region of the integral gradient amplitude of the non-zero frequency of occurrence around maximum
Maximum region.
The image processing apparatus 70 of this preferred embodiment is in use, division module 71 is based on pixel grey scale in image first
Variable quantity is drawn image using MSER (Maximally Stable Extremal Regions, maximum stability region algorithm)
It is divided into multiple identification regions.Here image refers to the image for carrying out Text region, which includes background and text.
MSER algorithm carries out the setting of multiple gray thresholds to the grayscale image of image, and to each gray threshold in image district
Pixel quantity in domain is counted, and gray threshold is changed the smallest region and is set as maximum stability region.Due to background
Color and text color have certain display gray difference, i.e. the variable quantity of the pixel grey scale of text and background intersection can be compared with
Greatly, the variable quantity of the pixel grey scale of simple background area is smaller.Therefore above-mentioned maximum stability region can divide image
It, here can be by maximum stability region (pure background area) for multiple identification regions (non-maximum stability region) with text
Removal, to carry out effective Text region to each identification region.
Here the available identification region information of the pixel in each identification region and zone position information indicate, know
Other area information refers to the information of the identification region where pixel, and zone position information refers to pixel in corresponding identification region
In location information.
The gray value of all pixels for each identification region that subsequent computing module 72 is obtained according to division module calculates every
The integral gradient amplitude of all pixels in a identification region.
Here the horizontal vertical shade of gray amplitude computing unit 81 of computing module 72 can calculate identification using sobel operator
Each pixel horizontal shade of gray amplitude GradientXImage in the horizontal direction in region, and utilize sobel operator meter
Vertical shade of gray amplitude GradientYImage of each pixel in vertical direction in calculation identification region.
For each pixel image_n_gray (x, y) in identification region, wherein n is that the identification region of pixel is believed
Breath, x, y are position coordinates of the pixel in corresponding identification region.The horizontal gray scale ladder of pixel image_n_gray (x, y)
Spending amplitude is GradientXImage_n (x, y), and the vertical shade of gray amplitude of pixel image_n_gray (x, y) is
GradientYImage_n(x,y)。
Then the integral gradient amplitude computing unit 82 of computing module 72 calculates each pixel image_n_gray (x, y)
Integral gradient amplitude GradientAllImage_n (x, y);
Then the specified region [0, m] of normalization module 73 setting one is used as normalized setting regions, and m can be 255 etc..
The all values that module 73 traverses GradientAllImage_n (x, y) are normalized, are obtained all
Maximum value GradientAllImage_n_max in GradientAllImage_n (x, y).
It is normalized using following formula.The entirety of pixel image_n_gray (x, y) after normalization
Gradient magnitude are as follows: GradientAllImageNormalize_n (x, y).
GradientAllImageNormalize_n (x, y)=m*GradientAllImage_n (x, y)/
GradientAllImage_n_max。
The integral gradient amplitude of each pixel in this way after normalized is respectively positioned on 0 between m.
Then extremal region obtains module 74 according to the whole ladder of all pixels in the identification region after normalized
The frequency of occurrence for spending amplitude, obtains at least one frequency of occurrence extreme value area of the integral gradient amplitude of all pixels of identification region
Domain.
If the difference of the pixel grey scale of the pixel grey scale and character area of background area is fixed, then background area and text
The integral gradient amplitude of the pixel grey scale of the intersection in block domain is also fixed, the whole ladder of the pixel grey scale of these intersections
The frequency of occurrence for spending amplitude is directly proportional to the size of character area, i.e., character area is bigger, the entirety of the pixel grey scale of intersection
The frequency of occurrence of gradient magnitude is bigger.
In this step, extremal region obtains module 74 and needs to identify main character area, and main text
Block domain is larger in the area of identification region, the integral gradient amplitude of the junction in main character area and neighboring background region
Frequency of occurrence it is also just more, therefore extremal region obtains module 74 and passes through the integral gradient of all pixels in identification region here
The frequency of occurrence of amplitude is filtered the background area grey scale change of some interference, such as that frequency of occurrence is less integral gradient
The corresponding region of the pixel of amplitude without Text region,
Specifically the process of acquisition frequency of occurrence extremal region includes:
Extremal region obtains the establishment of coordinate system unit 91 of module 74 with the integral gradient width of all pixels of identification region
Value is abscissa, and the frequency of occurrence of the integral gradient amplitude of all pixels of identification region is ordinate, establishes identification region
Pixel gradient amplitude coordinate system.It is specific as shown in Figure 4.
Extremal region obtains the pixel gradient width that the mark unit 92 of module 74 is then established in establishment of coordinate system unit 91
The frequency of occurrence point of all integral gradient amplitudes is marked on value coordinate system.It here is the whole ladder to all pixels of identification region
Degree amplitude is counted, thus frequency of occurrence of each integral gradient amplitude obtained in identification region, then by above-mentioned entirety
Gradient magnitude and corresponding frequency of occurrence are labeled on pixel gradient amplitude coordinate system.If the mark point in Fig. 4 can be whole
Gradient magnitude A occurs 40 times, and integral gradient amplitude B occurs 50 times, and integral gradient amplitude C occurs 80 times, and integral gradient amplitude D goes out
90 times existing, integral gradient amplitude E occurs 100 times, and integral gradient amplitude F occurs 120 times, and integral gradient amplitude G occurs 95 times, whole
Body gradient magnitude H occurs 85 times, and integral gradient amplitude I occurs 50 times, and integral gradient amplitude J occurs 55 times, integral gradient amplitude K
Occur 50 times.Wherein A > B > C > D > E > F > G > H > I > J > K.Here the integral gradient amplitude of too small (essentially 0) is deleted.
Extremal region obtains the appearance of the integral gradient amplitude of 93 pairs of curve acquisition unit mark unit marks of module 74
Number point carries out Gaussian smoothing, obtains the frequency of occurrence curve of integral gradient amplitude (i.e. with Gaussian function to these appearance
Number point carries out that one group of new point distribution is calculated).It is specific as shown in Figure 5.
The maximum that extremal region obtains the maximum region acquiring unit 94 of module 74 obtains subelement 941 to occurrence out
Point in number curve carries out a derivation and secondary derivation, the maximum point and minimum of available frequency of occurrence curve
Point.If integral gradient the amplitude F, integral gradient amplitude B and integral gradient amplitude J in Fig. 4 are maximum point, integral gradient width
Between value B and integral gradient amplitude C, there is minimum point between integral gradient amplitude H and integral gradient amplitude I.
The integral gradient amplitude of maximum acquiring unit 94 obtains subelement 942 and passes through to the pole between two minimum points
Big value point is analyzed, and obtains the integral gradient amplitude of the non-zero frequency of occurrence around the maximum, i.e. integral gradient amplitude C,
Integral gradient amplitude D, integral gradient amplitude E, integral gradient amplitude F, integral gradient amplitude G and integral gradient amplitude H.
The maximum region of maximum acquiring unit 94 obtains subelement 943 for the non-zero around the maximum of above-mentioned acquisition
The region of the integral gradient amplitude of frequency of occurrence is set as the corresponding maximum region of maximum F.Certainly through the above way may be used
With obtain frequency of occurrence curve multiple maximum points and corresponding maximum region.
The extremal region acquiring unit 95 that extremal region obtains module 74 will be greater than the maximum point and correspondence of setting value
Maximum region corresponding integral gradient amplitude region, be set as frequency of occurrence extremal region.
Extremal region acquiring unit 95 is according to the whole of all pixels used in the filtered identification region of setting value in this way
The frequency of occurrence of body gradient magnitude obtains at least one frequency of occurrence pole of the integral gradient amplitude of all pixels of identification region
It is worth region.Here frequency of occurrence extremal region refers to the more region of the frequency of occurrence of integral gradient amplitude in identification region,
It should include but is not limited to the most region of the frequency of occurrence of the integral gradient amplitude of all pixels.
Subsequent identification module 75 obtains the frequency of occurrence extremal region for the identification region that module 74 obtains according to extremal region,
Determine the character area boundary of image.
The region in character area boundary that finally filling module 76 obtains identification module 75 is filled operation, in this way
Character area and background area can be preferably distinguished, to accurately obtain the position of the character area of image, passes through text
Background area can be removed well by word identification.
Text region process in the image for the image processing apparatus 70 for completing this preferred embodiment in this way.
On the basis of first preferred embodiment, the image processing apparatus of this preferred embodiment carries out integral gradient amplitude
Normalized further improves the accuracy of Text region operation;Appearance is obtained by establishing frequency of occurrence curve
Number extremal region simplifies the calculating process of frequency of occurrence extremal region acquisition;Region in character area boundary is carried out
Padding is easier to for background area to be removed operation so that the difference of character area and background area is bigger.
Illustrate the specific works of image processing method and image processing apparatus of the invention below by a specific embodiment
Principle.Text region processing is carried out to image shown in Figure 11 in this specific embodiment.Its Text region process includes:
One, image is subjected to region conversion to image using MSER algorithm, the image after conversion is as shown in figure 12, therein
Black region is maximum stability region, and white area is the identification region with text.
Two, using sobel operator calculate identification region in each pixel horizontal shade of gray amplitude in the horizontal direction with
And the vertical shade of gray amplitude in vertical direction.
Three, it using the horizontal shade of gray amplitude of pixel each in identification region and vertical shade of gray amplitude, obtains
The integral gradient amplitude of all pixels in each identification region.
Four, the integral gradient amplitude of all pixels in identification region is normalized, so that all pixels is whole
The distribution of body gradient magnitude is in specified section [0,255], i.e. the maximum value of integral gradient amplitude is set as 255.
Five, by the frequency of occurrence of the integral gradient amplitude of all pixels in the identification region after normalized in pixel
It is labeled in gradient magnitude coordinate system, and Gaussian smoothing is carried out to above-mentioned frequency of occurrence point, to obtain integral gradient
The frequency of occurrence curve of amplitude.
Six, according to the maximum and minimum of frequency of occurrence curve, maximum corresponding integral gradient amplitude area is determined
Domain, and the maximum corresponding integral gradient amplitude region that will be greater than setting value is set as frequency of occurrence extremal region.
Seven, the character area boundary of image is determined according to the frequency of occurrence extremal region of identification region, specifically such as Figure 13 institute
Show.Can then operation be filled to the region in character area boundary, so as to accurately obtain the character area of image
Position.
The knowledge of text in the image processing method of this specific embodiment and the image of image processing apparatus is completed in this way
Other process.
Image processing method and image processing apparatus of the invention is by the frequency of occurrence extremal region of identification region come really
Determine the character area boundary of image, accurately the text in image can be identified, and the calculating of frequency of occurrence extremal region
Process is simple;Solve existing image processing method and image processing apparatus can not carry out accurate area to the text in image
Divide or identify the complex technical problem of calculating process.
" component ", " module ", " system ", " interface ", " process " etc. are generally intended to as used herein the term
Refer to computer related entity: hardware, the combination of hardware and software, software or software in execution.For example, component can be but not
It is limited to be the process on a processor of running, processor, object, executable application, thread, program and/or the computer executed.
By diagram, both the application and the controller run on the controller can be component.One or more components can have
It is in the process executed and/or thread, and component can be located on a computer and/or be distributed in two or more meters
Between calculation machine.
Figure 14 and the discussion below are provided to the electronic equipment where realization image processing apparatus of the present invention
Brief, summary the description of working environment.The working environment of Figure 14 is only an example of working environment appropriate and not
Suggestion is intended to about the purposes of working environment or any restrictions of the range of function.Example electronic equipment 1412 includes but is not limited to
Wearable device, helmet, medical treatment & health platform, personal computer, server computer, hand-held or laptop devices,
Mobile device (such as mobile phone, personal digital assistant (PDA), media player etc.), multicomputer system, consumption-orientation electricity
Sub- equipment, minicomputer, mainframe computer, distributed computing environment including above-mentioned arbitrary system or equipment, etc..
Although not requiring, in the common background that " computer-readable instruction " is executed by one or more electronic equipments
Lower description embodiment.Computer-readable instruction can be distributed via computer-readable medium and (be discussed below).It is computer-readable
Instruction can be implemented as program module, for example executes particular task or realize the function of particular abstract data type, object, application
Programming interface (API), data structure etc..Typically, the function of the computer-readable instruction can be in various environment arbitrarily
Combination or distribution.
Figure 14 illustrates the electronic equipment 1412 of one or more embodiments including image processing apparatus of the invention
Example.In one configuration, electronic equipment 1412 includes at least one processing unit 1416 and memory 1418.It is set according to electronics
Standby exact configuration and type, memory 1418 can be (such as the RAM) of volatibility, non-volatile (such as ROM, flash memory
Deng) or both certain combination.The configuration is illustrated in Figure 14 by dotted line 1414.
In other embodiments, electronic equipment 1412 may include supplementary features and/or function.For example, equipment 1412 is also
It may include additional storage device (such as removable and/or non-removable) comprising but it is not limited to magnetic memory apparatus, light
Storage device etc..This additional memory devices are illustrated in Figure 14 by storage device 1420.In one embodiment, for real
The computer-readable instruction of existing one or more embodiments provided in this article can be in storage device 1420.Storage device
1420 other computer-readable instructions that can also be stored for realizing operating system, application program etc..Computer-readable instruction
It can be loaded into memory 1418 and be executed by such as processing unit 1416.
Term as used herein " computer-readable medium " includes computer storage medium.Computer storage medium includes
The volatibility that any method or technique of the information of such as computer-readable instruction or other data etc is realized for storage
With non-volatile, removable and nonremovable medium.Memory 1418 and storage device 1420 are the realities of computer storage medium
Example.Computer storage medium includes but is not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, number
Universal disc (DVD) or other light storage devices, cassette tape, tape, disk storage device or other magnetic storage apparatus can be with
Any other medium for storing expectation information and can be accessed by electronic equipment 1412.Any such computer storage is situated between
Matter can be a part of electronic equipment 1412.
Electronic equipment 1412 can also include the communication connection 1426 for allowing electronic equipment 1412 to communicate with other equipment.It is logical
Letter connection 1426 can include but is not limited to modem, network interface card (NIC), integrated network interface, radiofrequency launcher/
Receiver, infrared port, USB connection or other interfaces for electronic equipment 1412 to be connected to other electronic equipments.Communication
Connection 1426 may include wired connection or wireless connection.Communication connection 1426 can emit and/or receive communication medium.
Term " computer-readable medium " may include communication media.Communication media typically comprises computer-readable instruction
Or other data in " the own modulated data signal " of such as carrier wave or other transmission mechanisms etc, and passed including any information
Send medium.Term " own modulated data signal " may include such signal: one or more of the characteristics of signals is according to general
Mode of the information coding into signal is set or changed.
Electronic equipment 1412 may include input equipment 1424, for example, keyboard, mouse, pen, voice-input device, touch it is defeated
Enter equipment, infrared camera, video input apparatus and/or any other input equipment.It also may include that output is set in equipment 1412
Standby 1422, such as one or more displays, loudspeaker, printer and/or other any output equipments.1424 He of input equipment
Output equipment 1422 can be connected to electronic equipment 1412 via wired connection, wireless connection or any combination thereof.In a reality
It applies in example, input equipment or output equipment from another electronic equipment are used as the input equipment of electronic equipment 1412
1424 or output equipment 1422.
The component of electronic equipment 1412 can be connected by various interconnection (such as bus).Such interconnection may include outer
Enclose component interconnection (PCI) (such as quick PCI), universal serial bus (USB), firewire (IEEE1394), optical bus structure etc.
Deng.In another embodiment, the component of electronic equipment 1412 can pass through network interconnection.For example, memory 1418 can be by
Multiple physical memory cells arcs composition in different physical locations, by network interconnection.
It would be recognized by those skilled in the art that the storage equipment for storing computer-readable instruction can be across network point
Cloth.For example, can store via the electronic equipment 1430 that network 1428 accesses for realizing one provided by the present invention or
The computer-readable instruction of multiple embodiments.The accessible electronic equipment 1430 of electronic equipment 1412 and downloading computer is readable
What is instructed is part or all of for execution.Alternatively, electronic equipment 1412 can be downloaded a plurality of computer-readable as needed
It instructs or some instruction can execute at electronic equipment 1412 and some instructions can be held at electronic equipment 1430
Row.
There is provided herein the various operations of embodiment.In one embodiment, one or more operations can be with structure
At the computer-readable instruction stored on one or more computer-readable mediums, will make to succeed in one's scheme when being executed by electronic equipment
It calculates equipment and executes the operation.Describing the sequences of some or all of operations, to should not be construed as to imply that these operations necessarily suitable
Sequence is relevant.It will be appreciated by those skilled in the art that the alternative sequence of the benefit with this specification.Furthermore, it is to be understood that
Not all operation must exist in each embodiment provided in this article.
Moreover, although the disclosure, this field skill has shown and described relative to one or more implementations
Art personnel will be appreciated that equivalent variations and modification based on the reading and understanding to the specification and drawings.The disclosure include it is all this
The modifications and variations of sample, and be limited only by the scope of the following claims.In particular, to by said modules (such as element,
Resource etc.) the various functions that execute, term for describing such components is intended to correspond to the specified function for executing the component
The random component (unless otherwise instructed) of energy (such as it is functionally of equal value), even if illustrated herein with execution in structure
The disclosure exemplary implementations in function open structure it is not equivalent.In addition, although the special characteristic of the disclosure
Through being disclosed relative to the only one in several implementations, but this feature can with such as can be to given or specific application
For be expectation and one or more other features combinations of other advantageous implementations.Moreover, with regard to term " includes ", " tool
Have ", " containing " or its deformation be used in specific embodiments or claims for, such term be intended to with term
The similar mode of "comprising" includes.
Each functional unit in the embodiment of the present invention can integrate in a processing module, be also possible to each unit list
It is solely physically present, can also be integrated in two or more units in a module.Above-mentioned integrated module can both use
Formal implementation of hardware can also be realized in the form of software function module.If the integrated module is with software function
The form of module is realized and when sold or used as an independent product, also can store in computer-readable storage Jie
In matter.Storage medium mentioned above can be read-only memory, disk or CD etc..Above-mentioned each device or system, can be with
Execute the method in correlation method embodiment.
In conclusion although the present invention is disclosed above with embodiment, the serial number before embodiment, such as " first ", " second "
Deng only using for convenience of description, the sequence of various embodiments of the present invention is not caused to limit.Also, above-described embodiment not to
Limitation the present invention, those skilled in the art, without departing from the spirit and scope of the present invention, can make it is various change with
Retouching, therefore protection scope of the present invention subjects to the scope of the claims.
Claims (14)
1. a kind of image processing method characterized by comprising
Based on the variable quantity of pixel grey scale in image, described image is divided into multiple identification regions;
According to the gray value of all pixels of the identification region, the integral gradient width of all pixels in the identification region is calculated
Value;Wherein the integral gradient amplitude of the pixel is the amplitude variable quantity of the corresponding adjacent pixel of each pixel, so as to by cog region
Character area and background area in domain demarcate;
According to the frequency of occurrence of the integral gradient amplitude of all pixels in the identification region, the institute of the identification region is obtained
There is at least one frequency of occurrence extremal region of the integral gradient amplitude of pixel;And
By the frequency of occurrence extremal region of the identification region, it is determined as the character area boundary of described image, so as to right
Described image carries out Text region processing.
2. image processing method according to claim 1, which is characterized in that the variation based on pixel grey scale in image
Amount, the step of described image is divided into multiple identification regions include:
Based on the changing value of the pixel grey scale in described image, described image is divided into using maximum stability region algorithm more
A identification region.
3. image processing method according to claim 1, which is characterized in that all pictures according to the identification region
The gray value of element, the step of calculating the integral gradient amplitude of all pixels in the identification region include:
According to the gray value of all pixels of the identification region, the horizontal gray scale ladder of all pixels of the identification region is calculated
Spend amplitude and vertical shade of gray amplitude;And
Using the horizontal shade of gray amplitude and vertical shade of gray amplitude of all pixels of the identification region, described in calculating
The integral gradient amplitude of all pixels of identification region.
4. image processing method according to claim 1, which is characterized in that described to calculate all pictures in the identification region
After the step of integral gradient amplitude of element, the integral gradient amplitude of all pixels for obtaining the identification region is at least
Before the step of one frequency of occurrence extremal region further include:
It is set based on preset normalization, place is normalized to the integral gradient amplitude of all pixels in the identification region
Reason.
5. image processing method according to claim 1, which is characterized in that described according to all in the identification region
The frequency of occurrence of the integral gradient amplitude of pixel obtains at least the one of the integral gradient amplitude of all pixels of the identification region
A frequency of occurrence extremal region step includes:
Using the integral gradient amplitude of all pixels of the identification region as abscissa, all pixels of the identification region it is whole
The frequency of occurrence of body gradient magnitude is ordinate, establishes the pixel gradient amplitude coordinate system of the identification region;
The frequency of occurrence point of all integral gradient amplitudes is marked on the pixel gradient amplitude coordinate system;
Gaussian smoothing is carried out to the frequency of occurrence point of the integral gradient amplitude, obtains the appearance of the integral gradient amplitude
Frequency curve;
Obtain the frequency of occurrence curve at least one maximum point and corresponding maximum region;And
Maximum point and the corresponding maximum region corresponding integral gradient amplitude region that will be greater than setting value, are set as institute
State frequency of occurrence extremal region.
6. image processing method according to claim 5, which is characterized in that described to obtain the frequency of occurrence curve extremely
The step of few maximum point and corresponding maximum region includes:
Obtain at least one maximum of the frequency of occurrence curve;
Obtain the integral gradient amplitude of the non-zero frequency of occurrence around the maximum;And
It is corresponding that the maximum is set by the region of the integral gradient amplitude of the non-zero frequency of occurrence around the maximum
Maximum region.
7. image processing method according to claim 1, which is characterized in that described image processing method further comprises the steps of:
Operation is filled to the region in the character area boundary, to carry out Text region to the image after padding
Processing.
8. a kind of image processing apparatus characterized by comprising
Described image is divided into multiple identification regions for the variable quantity based on pixel grey scale in image by division module;
Computing module calculates all pictures in the identification region for the gray value according to all pixels of the identification region
The integral gradient amplitude of element;Wherein the integral gradient amplitude of the pixel is that the amplitude of the corresponding adjacent pixel of each pixel changes
Amount, so as to by identification region character area and background area demarcate;
Extremal region obtains module, for going out occurrence according to the integral gradient amplitudes of all pixels in the identification region
Number, obtains at least one frequency of occurrence extremal region of the integral gradient amplitude of all pixels of the identification region;And
Identification module, for being determined as the literal field of described image for the frequency of occurrence extremal region of the identification region
Domain boundary, to carry out Text region processing to described image.
9. image processing apparatus according to claim 8, which is characterized in that the division module is specifically used for based on described
Described image is divided into multiple identification regions using maximum stability region algorithm by the changing value of the pixel grey scale in image.
10. image processing apparatus according to claim 8, which is characterized in that the computing module includes:
Horizontal vertical shade of gray amplitude computing unit is calculated for the gray value according to all pixels of the identification region
The horizontal shade of gray amplitude and vertical shade of gray amplitude of all pixels of the identification region;And
Integral gradient amplitude computing unit, for use all pixels of the identification region horizontal shade of gray amplitude and
Vertical shade of gray amplitude, calculates the integral gradient amplitude of all pixels of the identification region.
11. image processing apparatus according to claim 8, which is characterized in that described image processing unit further include:
Module is normalized, for setting based on preset normalization, to the integral gradient width of all pixels in the identification region
Value is normalized.
12. image processing apparatus according to claim 8, which is characterized in that the extremal region obtains module and includes:
Establishment of coordinate system unit, for the integral gradient amplitude using all pixels of the identification region as abscissa, the knowledge
The frequency of occurrence of the integral gradient amplitude of all pixels in other region is ordinate, establishes the pixel gradient width of the identification region
It is worth coordinate system;
Unit is marked, for marking the frequency of occurrence of all integral gradient amplitudes on the pixel gradient amplitude coordinate system
Point;
Curve acquisition unit carries out Gaussian smoothing for the frequency of occurrence point to the integral gradient amplitude, described in acquisition
The frequency of occurrence curve of integral gradient amplitude;
Maximum region acquiring unit, for obtain the frequency of occurrence curve at least one maximum point and corresponding pole
Big value region;And
Extremal region acquiring unit, for will be greater than the maximum point and the corresponding entirety of corresponding maximum region of setting value
Gradient magnitude region is set as the frequency of occurrence extremal region.
13. image processing apparatus according to claim 12, which is characterized in that the maximum region acquiring unit packet
It includes:
Maximum obtains subelement, for obtaining at least one maximum of the frequency of occurrence curve;
Integral gradient amplitude obtains subelement, for obtaining the integral gradient width of the non-zero frequency of occurrence around the maximum
Value;And
Maximum region obtains subelement, for by the area of the integral gradient amplitude of the non-zero frequency of occurrence around the maximum
Domain is set as the corresponding maximum region of the maximum.
14. image processing apparatus according to claim 8, which is characterized in that described image processing unit further include:
Module is filled, for being filled operation to the region in the character area boundary, so as to the figure after padding
As carrying out Text region processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610639485.8A CN107688807B (en) | 2016-08-05 | 2016-08-05 | Image processing method and image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610639485.8A CN107688807B (en) | 2016-08-05 | 2016-08-05 | Image processing method and image processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107688807A CN107688807A (en) | 2018-02-13 |
CN107688807B true CN107688807B (en) | 2019-10-25 |
Family
ID=61151180
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610639485.8A Active CN107688807B (en) | 2016-08-05 | 2016-08-05 | Image processing method and image processing apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107688807B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108564076B (en) * | 2018-04-03 | 2022-01-18 | 中建二局安装工程有限公司 | Visual control system in electric power wiring in intelligent building |
CN115331119B (en) * | 2022-10-13 | 2023-01-31 | 山东爱福地生物股份有限公司 | Solid waste identification method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101140624A (en) * | 2007-10-18 | 2008-03-12 | 清华大学 | Image matching method |
CN104809433A (en) * | 2015-04-21 | 2015-07-29 | 电子科技大学 | Zebra stripe detection method based on maximum stable region and random sampling |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101859382B (en) * | 2010-06-03 | 2013-07-31 | 复旦大学 | License plate detection and identification method based on maximum stable extremal region |
JP5801598B2 (en) * | 2011-05-09 | 2015-10-28 | キヤノン株式会社 | Image processing apparatus, image processing method, and program |
CN102663382B (en) * | 2012-04-25 | 2014-02-12 | 重庆邮电大学 | Video image character recognition method based on submesh characteristic adaptive weighting |
CN102750540B (en) * | 2012-06-12 | 2015-03-11 | 大连理工大学 | Morphological filtering enhancement-based maximally stable extremal region (MSER) video text detection method |
CN103136523B (en) * | 2012-11-29 | 2016-06-29 | 浙江大学 | Any direction text line detection method in a kind of natural image |
CN104077773A (en) * | 2014-06-23 | 2014-10-01 | 北京京东方视讯科技有限公司 | Image edge detection method, and image target identification method and device |
CN105447859A (en) * | 2015-11-18 | 2016-03-30 | 扬州大学 | Field wheat aphid counting method |
-
2016
- 2016-08-05 CN CN201610639485.8A patent/CN107688807B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101140624A (en) * | 2007-10-18 | 2008-03-12 | 清华大学 | Image matching method |
CN104809433A (en) * | 2015-04-21 | 2015-07-29 | 电子科技大学 | Zebra stripe detection method based on maximum stable region and random sampling |
Non-Patent Citations (2)
Title |
---|
Detecting text in natural scenes with stroke width transform;Boris Epshtein 等;《2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition》;20100805;第2963-2970页 * |
基于聚类的视频字幕提取方法;宋砚 等;《通信学报》;20090228;第30卷(第2期);第136-140页 * |
Also Published As
Publication number | Publication date |
---|---|
CN107688807A (en) | 2018-02-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210342990A1 (en) | Image coordinate system transformation method and apparatus, device, and storage medium | |
CN102831386B (en) | Object identification method and recognition device | |
CN106650740B (en) | A kind of licence plate recognition method and terminal | |
JP6812086B2 (en) | Training method for reticulated pattern removal system, reticulated pattern removal method, equipment, equipment and media | |
CN111275784B (en) | Method and device for generating image | |
CN107368820B (en) | Refined gesture recognition method, device and equipment | |
CN109214385A (en) | Collecting method, data acquisition device and storage medium | |
CN109815865A (en) | A kind of water level recognition methods and system based on virtual water gauge | |
CN111739016B (en) | Target detection model training method and device, electronic equipment and storage medium | |
US20160042525A1 (en) | Apparatus and method for visualization of region of interest | |
CN104318562A (en) | Method and device for confirming quality of internet images | |
CN112597495B (en) | Malicious code detection method, system, equipment and storage medium | |
CN110363837B (en) | Method and device for processing texture image in game, electronic equipment and storage medium | |
CN107688807B (en) | Image processing method and image processing apparatus | |
CN108647264A (en) | A kind of image automatic annotation method and device based on support vector machines | |
CN107330009A (en) | Descriptor disaggregated model creation method, creating device and storage medium | |
KR20170009917A (en) | Detecting conformance of graphical output data from an application to a convention | |
CN110867243B (en) | Image annotation method, device, computer system and readable storage medium | |
CN110163095B (en) | Loop detection method, loop detection device and terminal equipment | |
CN114297665A (en) | Intelligent contract vulnerability detection method and device based on deep learning | |
CN108520532B (en) | Method and device for identifying motion direction of object in video | |
CN109615620A (en) | The recognition methods of compression of images degree, device, equipment and computer readable storage medium | |
CN110390224A (en) | A kind of recognition methods of traffic sign and device | |
CN113516697A (en) | Image registration method and device, electronic equipment and computer-readable storage medium | |
CN112507903A (en) | False face detection method and device, electronic equipment and computer readable storage medium |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20231221 Address after: 518057 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 floors Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. Patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd. Address before: 2, 518000, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |