CN110222694A - Image processing method, device, electronic equipment and computer-readable medium - Google Patents

Image processing method, device, electronic equipment and computer-readable medium Download PDF

Info

Publication number
CN110222694A
CN110222694A CN201910504970.8A CN201910504970A CN110222694A CN 110222694 A CN110222694 A CN 110222694A CN 201910504970 A CN201910504970 A CN 201910504970A CN 110222694 A CN110222694 A CN 110222694A
Authority
CN
China
Prior art keywords
image
processing
gray
gray level
clustering
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
Application number
CN201910504970.8A
Other languages
Chinese (zh)
Other versions
CN110222694B (en
Inventor
张秋晖
刘岩
朱兴杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Taikang Insurance Group Co Ltd
Original Assignee
Taikang Insurance Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taikang Insurance Group Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201910504970.8A priority Critical patent/CN110222694B/en
Publication of CN110222694A publication Critical patent/CN110222694A/en
Application granted granted Critical
Publication of CN110222694B publication Critical patent/CN110222694B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Character Input (AREA)
  • Image Processing (AREA)

Abstract

This disclosure relates to a kind of image processing method, device, electronic equipment and computer-readable medium.This method comprises: carrying out gray processing processing to image, gray level image is generated;Gray scale clustering processing is carried out to the gray level image, generates multiple bianry images;The multiple bianry image is subjected to image superposition processing, generates target image;And Text region processing is carried out based on the target image.This disclosure relates to image processing method, device, electronic equipment and computer-readable medium, can image carry out Text region when improve Text region accuracy rate and resolution ratio.

Description

Image processing method, device, electronic equipment and computer-readable medium
Technical field
This disclosure relates to computer information processing field, in particular to a kind of image processing method, device, electronics Equipment and computer-readable medium.
Background technique
With the arrival of information age, digital picture is able to satisfy increasingly increased existing as a kind of important information carrier Generationization business.Text conversion in image is computer by optics and computer technology by optical character identification, OCR technique The text that can be edited.Currently, the development of performance and mobile phone photograph technology with computer, the application scenarios of OCR technique become It obtains more extensive.
For insurance industry, the typing and verification of insurance document are the huge work of workload, traditional people Work typing and check and correction often have low efficiency, the higher feature of error rate, and utilize OCR technique, carry out the identification of insurance document, It being capable of promotion working efficiency by a relatively large margin.But in prior art processing, Major Difficulties that insurance document is identified Be: the photographed scene of insurance document is complicated, and if ambient noise is larger, uneven illumination is even, and shooting angle disunity etc. is this Shooting environmental causes in insurance document image containing a large amount of " noise " data.There has been no methods at present carries out document image Effective processing, so that the text information in document image is prominent, scene Noise Elimination.And in current technology, often The Preprocessing Technique seen is mostly edge detection and filtering etc., can not also be fully solved above-mentioned technical problem, Text region Effect is undesirable.
Summary of the invention
In view of this, the disclosure provides a kind of image processing method, device, electronic equipment and computer-readable medium, energy Enough accuracys rate and resolution ratio that Text region is improved when image carries out Text region.
Other characteristics and advantages of the disclosure will be apparent from by the following detailed description, or partially by the disclosure Practice and acquistion.
According to the one side of the disclosure, a kind of image processing method is proposed, this method comprises: carrying out at gray processing to image Reason generates gray level image;Gray scale clustering processing is carried out to the gray level image, generates multiple bianry images;It will be the multiple poly- Class image carries out image superposition processing, generates target image;And Text region processing is carried out based on the target image.
In a kind of exemplary embodiment of the disclosure, gray scale clustering processing is carried out to the gray level image, is generated multiple Bianry image includes: the gray scale point that the gray level image is determined based on the gray value of each of gray level image pixel Cloth;Clustering parameter is determined based on the intensity profile;And gray level image progress gray scale is gathered based on the clustering parameter Class processing is to generate the multiple bianry image.
In a kind of exemplary embodiment of the disclosure, the gray value based on each of gray level image pixel is true The intensity profile of the fixed gray level image comprises determining that kernel function;The intensity profile formula is constructed by the kernel function;With And the intensity profile of the gray level image is determined by the gray value of each pixel and the intensity profile formula.
In a kind of exemplary embodiment of the disclosure, determine that clustering parameter comprises determining that institute based on the intensity profile It states the extreme value in intensity profile and determines the clustering parameter.
In a kind of exemplary embodiment of the disclosure, gray level image progress gray scale is gathered based on the clustering parameter Class processing includes: to be carried out the gray level image at gray scale cluster based on the clustering parameter to generate the multiple bianry image Reason generates multiple cluster images;And binary conversion treatment is carried out to the multiple cluster image, generate the multiple bianry image.
In a kind of exemplary embodiment of the disclosure, the multiple cluster image is subjected to image superposition processing, is generated Target image includes: that the multiple cluster image is carried out image superposition, generates superimposed image;It determines in the superimposed image Key area image;And the key area image and the superimposed image are subjected to image co-registration processing to generate the mesh Logo image.
In a kind of exemplary embodiment of the disclosure, determine that the key area image in the superimposed image includes: true Connected region in the fixed superimposed image;And according to the multiple cluster image pixel binarization result in connected region Accounting determine the key area image.
In a kind of exemplary embodiment of the disclosure, the key area image and the superimposed image are subjected to image Fusion treatment is to generate the first weight that the target image comprises determining that the key area image;Determine the stacking chart Second weight of picture;And according to first weight and the second weight to the key area image and the superimposed image into The processing of row image co-registration is to generate the target image.
According to the one side of the disclosure, a kind of image processing apparatus is proposed, which includes: gray scale module, for figure As carrying out gray processing processing, gray level image is generated;Cluster module, it is raw for carrying out gray scale clustering processing to the gray level image At multiple bianry images;Laminating module generates target image for the multiple cluster image to be carried out image superposition processing; And identification module, for carrying out Text region processing based on the target image.
According to the one side of the disclosure, a kind of electronic equipment is proposed, which includes: one or more processors; Storage device, for storing one or more programs;When one or more programs are executed by one or more processors, so that one A or multiple processors realize such as methodology above.
According to the one side of the disclosure, it proposes a kind of computer-readable medium, is stored thereon with computer program, the program Method as mentioned in the above is realized when being executed by processor.
According to the image processing method of the disclosure, device, electronic equipment and computer-readable medium, pass through gray scale cluster side Formula pre-processes image, the image after processing is then carried out image superposition, to generate target image to be identified Mode, can image carry out Text region when improve Text region accuracy rate and resolution ratio.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited It is open.
Detailed description of the invention
Its example embodiment is described in detail by referring to accompanying drawing, above and other target, feature and the advantage of the disclosure will It becomes more fully apparent.Drawings discussed below is only some embodiments of the present disclosure, for the ordinary skill of this field For personnel, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the system scenarios block diagram of a kind of image processing method and device shown according to an exemplary embodiment.
Fig. 2 is a kind of flow chart of image processing method shown according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of the image processing method shown according to another exemplary embodiment.
Fig. 4 is a kind of flow chart of the image processing method shown according to another exemplary embodiment.
Fig. 5 is a kind of flow chart of the image processing method shown according to another exemplary embodiment.
Fig. 6 is a kind of block diagram of image processing apparatus shown according to an exemplary embodiment.
Fig. 7 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Fig. 8 is that a kind of computer readable storage medium schematic diagram is shown according to an exemplary embodiment.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be real in a variety of forms It applies, and is not understood as limited to embodiment set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will be comprehensively and complete It is whole, and the design of example embodiment is comprehensively communicated to those skilled in the art.Identical appended drawing reference indicates in figure Same or similar part, thus repetition thereof will be omitted.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner In example.In the following description, many details are provided to provide and fully understand to embodiment of the disclosure.However, It will be appreciated by persons skilled in the art that can with technical solution of the disclosure without one or more in specific detail, Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side Method, device, realization or operation are to avoid fuzzy all aspects of this disclosure.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity. I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step, It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
It should be understood that although herein various assemblies may be described using term first, second, third, etc., these groups Part should not be limited by these terms.These terms are to distinguish a component and another component.Therefore, first group be discussed herein below Part can be described as the second component without departing from the teaching of disclosure concept.As used herein, term " and/or " include associated All combinations for listing any of project and one or more.
It will be understood by those skilled in the art that attached drawing is the schematic diagram of example embodiment, module or process in attached drawing Necessary to not necessarily implementing the disclosure, therefore it cannot be used for the protection scope of the limitation disclosure.
In traditional OCR technique, the identification for improving text is mainly to be realized by binaryzation or edge detection.Often The binaryzation technology of rule sets a gray threshold T aiming at a secondary gray scale picture, will be big then according to the gray scale of image 0 or 255 are set as in the pixel of T (depending in order to protrude low ash degree or high gray scale), while the pixel less than T being arranged For 255 or 0 (different from the value that the pixel greater than T is arranged), such whole image only has two pixels of black and white, so that in picture Different objects be able to it is a degree of highlight, but its disadvantage is also obvious, i.e., the overall situation can will be some using the same T value The pixel of noise amplifies, and therefore, this method is insufficient for the detail description power of part.And the side of another binaryzation Method is using the average value K for calculating pixel, and then the pixel value by pixel value in image greater than K is set as 255, is less than or equal to K picture Plain value is set as 0, and this method has certain advantage, but can lose some local pictures compared with conventional binarization method Plain catastrophe point cannot really reflect the content of original image so that picture thickens.
It is insensitive to smooth variation in the noise problem and edge detection of binaryzation to ask in image preprocessing Topic, the present disclosure proposes a kind of image processing methods, and the pretreatment of picture is carried out by clustering, according to the figure after gray processing The gray value of piece carries out automanual clustering, to obtain text and the obvious picture of other discriminations.The disclosure Image processing method can largely improve the pretreated effect of picture.
It is described below with reference to detailed content of the specific embodiment to the disclosure:
Fig. 1 is the system scenarios block diagram of a kind of image processing method and device shown according to an exemplary embodiment.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 101,102,103 The application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform software etc..
Terminal device 101,102,103 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
User can carry out gray processing processing by 101,102,103 pairs of images of terminal device, generate gray level image, terminal is set Standby 101,102,103 for example can carry out gray scale clustering processing to the gray level image, generate multiple bianry images;Terminal device 101,102,103 the multiple bianry image for example can be subjected to image superposition processing, generates target image;Terminal device 101, 102,103 Text region processing for example can be carried out based on the target image.
Server 105 can be to provide the server of various services, such as utilize terminal device 101,102,103 to user Acquired picture provides the background server supported.Server 105 can carry out Text region to the image data received Deng processing, and processing result is fed back into terminal device.
User can shoot picture by terminal device 101,102,103, and terminal device 101,102,103 can be for example by picture It is forwarded in server 105, server 105 for example can carry out gray processing processing to image, generate gray level image;Server 105 Gray scale clustering processing for example can be carried out to the gray level image, generate multiple bianry images;Server 105 can for example will be described more A bianry image carries out image superposition processing, generates target image;And server 105 can for example based on the target image into Row text identifying processing.
Server 105 can be the server of an entity, also may be, for example, multiple server compositions, needs to illustrate It is that image processing method provided by the embodiment of the present disclosure can be held by server 105 and/or terminal device 101,102,103 Row, correspondingly, image processing apparatus can be set in server 105 and/or terminal device 101,102,103.And it is supplied to User carries out the request end that picture enters and is normally in terminal device 101,102,103.
In one embodiment, the method in the disclosure can be applicable to insurance field, and client needs after buying Related product Declaration form is uploaded, is saved in background data base, and need manually checked, and image data acquisition, transmit and There may be the fuzzy phenomenon of certain distortion during storage, therefore that there is efficiency is slow for artificial cross-check information, it is wrong The accidentally high feature of rate.The pretreatment of image has been carried out by this method, can be improved the resolution ratio of image, treated by the present method It carries out OCR identification again afterwards, the accuracy of identification can be effectively improved, to reduce the time of artificial nucleus couple, improve verification Efficiency, reduce artificial nucleus couple workload, save a large amount of cost.
According to the image processing method and device of the disclosure, image is pre-processed by way of gray scale cluster, then Image after processing is subjected to image superposition, to generate the mode of target image to be identified, text can be carried out in image The accuracy rate and resolution ratio of Text region are improved when word identifies.
Fig. 2 is a kind of flow chart of image processing method shown according to an exemplary embodiment.Image processing method 20 Including at least step S202 to S208.
As shown in Fig. 2, carrying out gray processing processing in S202 to image, generating gray level image.In view of bright and dark light with And there may be the case where noise to inscribe in background, first has to do preprocessing process to original image.Pretreatment may include gray processing Processing.
Gray level image compared with the original image of rgb format, do not lose by the information of text, and can reduce data volume, mentions The conversion formula of Computationally efficient, picture gray processing can are as follows:
Wherein, rgb color mode is a kind of color standard of industry, is by red (R), green (G), three, indigo plant (B) The variation of Color Channel and their mutual superpositions obtain miscellaneous color, RGB be represent it is red, green, The color in blue three channels, it is that current utilization is most wide that this standard, which almost includes all colours that human eyesight can perceive, One of color system.R, G, B respectively indicate the value of obstructed Color Channel on RGB color.
Wherein, gray level image is the image of each only one sample color of pixel.This kind of image is typically shown as from most Furvous is to most bright white gray scale, although theoretically this sampling can be with the different depths of any color, it might even be possible to be Different colours in different brightness.Gray level image is different from black white image, and black white image only has black in computer picture field White two kinds of colors, there are many more the color depths of grade between black and white for gray level image.The complete image of one width, is by red Three color, green, blue channels form.Figure is look in the contractings of red, green, blue three channels to be shown with gray scale.With Different gray scales indicates the specific gravity of " red, green, blue " in the picture.It is pure white in channel, represent the coloured light here For maximum brightness, gray scale is 255.
In S204, gray scale clustering processing is carried out to the gray level image, generates multiple bianry images.
In one embodiment, it may include: described in the gray value determination based on each of gray level image pixel The intensity profile of gray level image;Clustering parameter is determined based on the intensity profile;And the clustering parameter is based on by the ash It spends image and carries out gray scale clustering processing to generate the multiple bianry image.The step of traditional OCR is to carry out two-value to grayscale image Change, but there is the shortcomings that sharpening partial noise, therefore its resolution ratio may be lower.The application uses the side based on cluster Method carries out cuclear density clustering to gray level image, and the resolution ratio excessive for gray value or too small according to human eye is too low Feature has the gray value to different sections to take different classification policies.
Gray scale clustering processing is carried out about to the gray level image, generates the detailed content of multiple bianry images see Fig. 3 Corresponding embodiment.
In S206, the multiple bianry image is subjected to image superposition processing, generates target image.Can for example, by institute It states multiple bianry images and carries out image superposition, generate superimposed image;Determine the key area image in the superimposed image;And The key area image and the superimposed image are subjected to image co-registration processing to generate the target image.
Wherein, superposition is a kind of mixed mode in image procossing, is present in color blend mode, channel mixed mode, figure In " superposition " modal sets of layer mixed mode." superposition " model function causes image anti-between image pixel and surrounding pixel Difference increases or reduces, and is the mode that a primary colours determine mixed effect, the hybrid mode of secondary colour is determined by the light and shade of primary colours. Color range spilling will not be generally generated after use " superposition " mixed mode, not will lead to image detail loss, when exchange primary colours and mixed The position of color is closed, as a result color is not identical.
Wherein, image co-registration refer to by multi-source channel the collected image data about same target by image Reason and computer technology etc., extract the advantageous information in each self-channel to greatest extent, finally integrate the image at high quality, with It improves the utilization rate of image information, improve computer interpretation precision and reliability, the spatial resolution and light that promote original image Spectral resolution is conducive to monitoring.
The detailed content of image superposition processing is carried out see the corresponding embodiment of Fig. 4 about by the multiple cluster image.
In S208, Text region processing is carried out based on the target image.Text region processing can include: optical character Identify OCR processing etc..
Wherein, OCR (Optical Character Recognition, optical character identification) refers to electronic equipment inspection The character printed on paper determines its shape by the mode for detecting dark, bright, shape is then translated into meter with character identifying method The process of calculation machine text;That is, being directed to printed character, the text conversion in paper document is become by black and white using optical mode The image file of dot matrix, and by identification software by the text conversion in image at text formatting, for word processor into one Walk the technology edited and processed.
According to the image processing method of the disclosure, the gray value of picture is classified using the thought of cluster, with biography The method of the binaryzation of system is compared, and has higher resolution ratio when OCR character recognition.
According to the image processing method of the disclosure, by having carried out partial stack to the gray value in image, can protect Part details is highlighted while staying picture integrality, can be improved the accuracy rate of OCR.
It will be clearly understood that the present disclosure describes how to form and use particular example, but the principle of the disclosure is not limited to These exemplary any details.On the contrary, the introduction based on disclosure disclosure, these principles can be applied to many other Embodiment.
Fig. 3 is a kind of flow chart of the image processing method shown according to another exemplary embodiment.Process shown in Fig. 3 It is to the detailed of S204 in process shown in Fig. 2 " carrying out gray scale clustering processing to the gray level image, generate multiple bianry images " Thin description.
As shown in figure 3, determining the gray scale based on the gray value of each of gray level image pixel in S302 The intensity profile of image.It can be for example, determining kernel function;The intensity profile formula is constructed by the kernel function;And pass through The gray value of each pixel and the intensity profile formula determine the intensity profile of the gray level image.
In S304, clustering parameter is determined based on the intensity profile.The extreme value in the determination intensity profile can be passed through Determine the clustering parameter.
It is based on the clustering parameter that gray level image progress gray scale clustering processing is the multiple to generate in S306 Bianry image.It can be for example, the gray level image, which is carried out gray scale clustering processing, based on the clustering parameter generates multiple dendrograms Picture;And binary conversion treatment is carried out to the multiple cluster image, generate the multiple bianry image.
A probability distribution of gray value can be obtained based on the method for Density Estimator, and to it first to the gray scale of image Distribution carry out a clustering.
Wherein, the formula of Density Estimator are as follows:
Wherein, k is kernel function, and n is the number of gray value, is here a smoothing parameter greater than 0 for 256, h.In general, Kernel function is chosen for gaussian kernel function.
Intensity profile after density estimation can be seen that the distribution trend of an entirety of image grayscale.By to whole Body cuclear density distribution situation is analyzed, and is determined classification number appropriate, is classified to choose suitable gray value point, so Extreme point is chosen according to trend afterwards to classify.
In practical applications, the mankind are the middle area of gray value for the sensitivity interval of gray scale, therefore can be joined by changing The value of number h, by the range restraint of gray scale at 4-6.It then, can be respectively to each respectively to binarization operation is done in each section Binarization operation is done in section, i.e., to whole image, the gray value in section is set as 1, other regions are set as 0.To each The above operation is done in section, is obtained and the same number of binary image of classifying.
Wherein, g (x) be binaryzation after as a result, x represents the gray value of original image, piOriginal image is represented to estimate through cuclear density I-th of gray value interval after meter.
The above operation is done to each section, can be obtained the different binaryzations of 4-6 as a result, i.e. 4-6 binary image.
Fig. 4 is a kind of flow chart of the image processing method shown according to another exemplary embodiment.Process shown in Fig. 4 It is to the detailed of S206 in process shown in Fig. 2 " the multiple bianry image being carried out image superposition processing, generate target image " Thin description.
As shown in figure 4, the multiple bianry image is carried out image superposition, generates superimposed image in S402.
In S404, the key area image in the superimposed image is determined.It can be for example, determining in the superimposed image Connected region;And the key is determined according to the multiple cluster image accounting of pixel binarization result in connected region Area image.
In S406, the key area image and the superimposed image are subjected to image co-registration processing to generate the mesh Logo image.
Wherein, specific processing mode can be carries out image co-registration processing by way of Weighted Fusion:
It can be for example, determining the first weight of the key area image;Determine the second weight of the superimposed image;And According to first weight and the second weight to the key area image and the superimposed image carry out image co-registration processing with Generate the target image.
By the statistical analysis of early period, the feature on text and document boundary often in some specific gray value interval, Therefore a feasible method be only retain a binaryzation as a result, but its may lost part information, therefore can be used Following steps:
(1), directly each image is overlapped, it may be assumed that
(2) determine that the main contribution image of the connected region of superimposed image marks off that is, on the image being entirely superimposed Connected region, then in each connected region, the result of the binaryzation of the image of each superposition in the area after statistics Accounting finally retains the maximum binarization result of accounting.Such purpose not only can be as big as possible by all features guarantor It stays, and the influence of noise can be inhibited to a certain extent.
(3) main contributions image result is weighted with the image being directly superimposed and is merged, can both retained so complete Pictorial information, moreover it is possible to protrusion boundary characteristic.
In this way, picture after treatment is compared with the picture that traditional process is handled, noise is lower, and the text in picture Word feature and edge attributes are more obvious, lay a good foundation for subsequent correction with edge detection.
Fig. 5 is a kind of flow chart of the image processing method shown according to another exemplary embodiment.Process shown in fig. 5 By a specific embodiment, the overall process of the process image procossing by disclosure image processing method is described.
As shown in figure 5, carrying out gray processing processing in S502.
In S504, clustering parameter is determined.
In S506, gray scale clustering.
In S508, image superposition processing, image superposition processing may include the step in S5082 and S5084, S5086.
In S5082, direct superposition processing.
In S5084, connected region is detected.
In S5086, retains and contribute maximum image.
In S510, pretreatment terminates.
The image processing method of the disclosure carries out the pretreatment of picture by clustering, according to the picture after gray processing Gray value, automanual clustering is carried out, to obtain text and the obvious picture of other discriminations.The figure of the disclosure As processing method, it can largely improve the pretreated effect of picture.
It will be appreciated by those skilled in the art that realizing that all or part of the steps of above-described embodiment is implemented as being executed by CPU Computer program.When the computer program is executed by CPU, above-mentioned function defined by the above method that the disclosure provides is executed Energy.The program can store in a kind of computer readable storage medium, which can be read-only memory, magnetic Disk or CD etc..
Further, it should be noted that above-mentioned attached drawing is only the place according to included by the method for disclosure exemplary embodiment Reason schematically illustrates, rather than limits purpose.It can be readily appreciated that above-mentioned processing shown in the drawings is not indicated or is limited at these The time sequencing of reason.In addition, be also easy to understand, these processing, which can be, for example either synchronously or asynchronously to be executed in multiple modules.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.It is real for disclosure device Undisclosed details in example is applied, embodiments of the present disclosure is please referred to.
Fig. 6 is a kind of block diagram of image processing apparatus shown according to an exemplary embodiment.Image processing apparatus 60 wraps It includes: gray scale module 602, cluster module 604, laminating module 606 and identification module 608.
Gray scale module 602 is used to carry out gray processing processing to image, generates gray level image;In view of bright and dark light and back There may be the case where noise in scape to inscribe, and first has to do preprocessing process to original image.Pretreatment may include gray processing processing.
Cluster module 604 is used to carry out gray scale clustering processing to the gray level image, generates multiple bianry images;It can wrap It includes: determining the intensity profile of the gray level image based on the gray value of each of gray level image pixel;Based on described Intensity profile determines clustering parameter;And the gray level image is carried out to generate by gray scale clustering processing based on the clustering parameter The multiple bianry image.
Laminating module 606 is used to the multiple cluster image carrying out image superposition processing, generates target image;It can example Such as, the multiple cluster image is subjected to image superposition, generates superimposed image;Determine the key area figure in the superimposed image Picture;And the key area image and the superimposed image are subjected to image co-registration processing to generate the target image.
Identification module 608 is used to carry out Text region processing based on the target image.Text region processing can include: light Learn character recognition OCR processing etc..
According to the image processing apparatus of the disclosure, the gray value of picture is classified using the thought of cluster, with biography The method of the binaryzation of system is compared, and has higher resolution ratio when OCR character recognition.
According to the image processing apparatus of the disclosure, by having carried out partial stack to the gray value in image, can protect Part details is highlighted while staying picture integrality, can be improved the accuracy rate of OCR.
Fig. 7 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
The electronic equipment 200 of this embodiment according to the disclosure is described referring to Fig. 7.The electronics that Fig. 7 is shown Equipment 200 is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in fig. 7, electronic equipment 200 is showed in the form of universal computing device.The component of electronic equipment 200 can wrap It includes but is not limited to: at least one processing unit 210, at least one storage unit 220, (including the storage of the different system components of connection Unit 220 and processing unit 210) bus 230, display unit 240 etc..
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 210 Row, so that the processing unit 210 executes described in this specification above-mentioned electronic prescription circulation processing method part according to this The step of disclosing various illustrative embodiments.For example, the processing unit 210 can be executed such as Fig. 2, Fig. 3, Fig. 4, in Fig. 5 Shown step.
The storage unit 220 may include the readable medium of volatile memory cell form, such as random access memory Unit (RAM) 2201 and/or cache memory unit 2202 can further include read-only memory unit (ROM) 2203.
The storage unit 220 can also include program/practical work with one group of (at least one) program module 2205 Tool 2204, such program module 2205 includes but is not limited to: operating system, one or more application program, other programs It may include the realization of network environment in module and program data, each of these examples or certain combination.
Bus 230 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures Local bus.
Electronic equipment 200 can also be with one or more external equipments 300 (such as keyboard, sensing equipment, bluetooth equipment Deng) communication, can also be enabled a user to one or more equipment interact with the electronic equipment 200 communicate, and/or with make Any equipment (such as the router, modulation /demodulation that the electronic equipment 200 can be communicated with one or more of the other calculating equipment Device etc.) communication.This communication can be carried out by input/output (I/O) interface 250.Also, electronic equipment 200 can be with By network adapter 260 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, Such as internet) communication.Network adapter 260 can be communicated by bus 230 with other modules of electronic equipment 200.It should Understand, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 200, including but unlimited In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number According to backup storage system etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the disclosure The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server or network equipment etc.) executes the above method according to disclosure embodiment.
Fig. 8 schematically shows a kind of computer readable storage medium schematic diagram in disclosure exemplary embodiment.
Refering to what is shown in Fig. 8, describing the program product for realizing the above method according to embodiment of the present disclosure 400, can using portable compact disc read only memory (CD-ROM) and including program code, and can in terminal device, Such as it is run on PC.However, the program product of the disclosure is without being limited thereto, in this document, readable storage medium storing program for executing can be with To be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or It is in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
The computer readable storage medium may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetism Signal, optical signal or above-mentioned any appropriate combination.Readable storage medium storing program for executing can also be any other than readable storage medium storing program for executing Readable medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or Person's program in connection.The program code for including on readable storage medium storing program for executing can transmit with any suitable medium, packet Include but be not limited to wireless, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with any combination of one or more programming languages come write for execute the disclosure operation program Code, described program design language include object oriented program language-Java, C++ etc., further include conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user It calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculating Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network (WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP To be connected by internet).
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by one When the equipment executes, so that the computer-readable medium implements function such as: carrying out gray processing processing to image, generate grayscale image Picture;Gray scale clustering processing is carried out to the gray level image, generates multiple bianry images;The multiple bianry image is subjected to image Superposition processing generates target image;And Text region processing is carried out based on the target image.
It will be appreciated by those skilled in the art that above-mentioned each module can be distributed in device according to the description of embodiment, it can also Uniquely it is different from one or more devices of the present embodiment with carrying out corresponding change.The module of above-described embodiment can be merged into One module, can also be further split into multiple submodule.
By the description of above embodiment, those skilled in the art is it can be readily appreciated that example embodiment described herein It can also be realized in such a way that software is in conjunction with necessary hardware by software realization.Therefore, implemented according to the disclosure The technical solution of example can be embodied in the form of software products, which can store in a non-volatile memories In medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) or on network, including some instructions are so that a calculating equipment (can To be personal computer, server, mobile terminal or network equipment etc.) it executes according to the method for the embodiment of the present disclosure.
It is particularly shown and described the exemplary embodiment of the disclosure above.It should be appreciated that the present disclosure is not limited to Detailed construction, set-up mode or implementation method described herein;On the contrary, disclosure intention covers included in appended claims Various modifications and equivalence setting in spirit and scope.
In addition, structure shown by this specification Figure of description, ratio, size etc., only to cooperate specification institute Disclosure, for skilled in the art realises that be not limited to the enforceable qualifications of the disclosure with reading, therefore Do not have technical essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size are not influencing the disclosure Under the technical effect and achieved purpose that can be generated, it should all still fall in technology contents disclosed in the disclosure and obtain and can cover In the range of.Meanwhile cited such as "upper" in this specification, " first ", " second " and " one " term, be also only and be convenient for Narration is illustrated, rather than to limit the enforceable range of the disclosure, relativeness is altered or modified, without substantive change Under technology contents, when being also considered as the enforceable scope of the disclosure.

Claims (10)

1. a kind of image processing method characterized by comprising
Gray processing processing is carried out to image, generates gray level image;
Gray scale clustering processing is carried out to the gray level image, generates multiple bianry images;
The multiple bianry image is subjected to image superposition processing, generates target image;And
Text region processing is carried out based on the target image.
2. the method as described in claim 1, which is characterized in that carry out gray scale clustering processing to the gray level image, generate more A bianry image includes:
The intensity profile of the gray level image is determined based on the gray value of each of gray level image pixel;
Clustering parameter is determined based on the intensity profile;And
The gray level image is subjected to gray scale clustering processing to generate the multiple bianry image based on the clustering parameter.
3. method according to claim 2, which is characterized in that the gray value based on each of gray level image pixel The intensity profile for determining the gray level image includes:
Determine kernel function;
The intensity profile formula is constructed by the kernel function;And
The intensity profile of the gray level image is determined by the gray value and the intensity profile formula of each pixel.
4. method according to claim 2, which is characterized in that determine that clustering parameter includes: based on the intensity profile
Determine that the extreme value in the intensity profile determines the clustering parameter.
5. method according to claim 2, which is characterized in that the gray level image is carried out gray scale based on the clustering parameter Clustering processing includes: to generate the multiple bianry image
The gray level image is subjected to gray scale clustering processing based on the clustering parameter and generates multiple cluster images;And
Binary conversion treatment is carried out to the multiple cluster image, generates the multiple bianry image.
6. the method as described in claim 1, which is characterized in that the multiple bianry image is subjected to image superposition processing, it is raw Include: at target image
The multiple bianry image is subjected to image superposition, generates superimposed image;
Determine the key area image in the superimposed image;And
The key area image and the superimposed image are subjected to image co-registration processing to generate the target image.
7. method as claimed in claim 6, which is characterized in that determine that the key area image in the superimposed image includes:
Determine the connected region in the superimposed image;And
According to the multiple superimposed image, the accounting of pixel binarization result determines the key area image in connected region.
8. a kind of image processing apparatus characterized by comprising
Gray scale module generates gray level image for carrying out gray processing processing to image;
Cluster module generates multiple bianry images for carrying out gray scale clustering processing to the gray level image;
Laminating module generates target image for the multiple bianry image to be carried out image superposition processing;And
Identification module, for carrying out Text region processing based on the target image.
9. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-7.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor The method as described in any in claim 1-7 is realized when row.
CN201910504970.8A 2019-06-12 2019-06-12 Image processing method, image processing device, electronic equipment and computer readable medium Active CN110222694B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910504970.8A CN110222694B (en) 2019-06-12 2019-06-12 Image processing method, image processing device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910504970.8A CN110222694B (en) 2019-06-12 2019-06-12 Image processing method, image processing device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN110222694A true CN110222694A (en) 2019-09-10
CN110222694B CN110222694B (en) 2021-06-18

Family

ID=67816538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910504970.8A Active CN110222694B (en) 2019-06-12 2019-06-12 Image processing method, image processing device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN110222694B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111191651A (en) * 2019-12-06 2020-05-22 中国平安财产保险股份有限公司 Document image identification method and device, computer equipment and storage medium
CN112488311A (en) * 2020-11-30 2021-03-12 泰康保险集团股份有限公司 Image processing method, device, medium and electronic equipment
CN112784825A (en) * 2019-11-01 2021-05-11 株式会社理光 Method for identifying characters in picture, method, device and equipment for searching keywords
WO2021179751A1 (en) * 2020-03-13 2021-09-16 上海哔哩哔哩科技有限公司 Image processing method and system
CN113902830A (en) * 2021-12-08 2022-01-07 腾讯科技(深圳)有限公司 Method for generating track road network
CN114219946A (en) * 2021-12-29 2022-03-22 北京百度网讯科技有限公司 Text image binarization method and device, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1395220A (en) * 2001-06-26 2003-02-05 诺基亚有限公司 Character locating method and device in picture of digital camera
US20050031220A1 (en) * 2003-08-08 2005-02-10 Hirobumi Nishida Method, apparatus, system, and program for image processing capable of recognizing, reproducing, and enhancing an image, and a medium storing the program
CN107844740A (en) * 2017-09-05 2018-03-27 中国地质调查局西安地质调查中心 A kind of offline handwriting, printing Chinese character recognition methods and system
CN109063706A (en) * 2018-06-04 2018-12-21 平安科技(深圳)有限公司 Verbal model training method, character recognition method, device, equipment and medium
CN109685052A (en) * 2018-12-06 2019-04-26 泰康保险集团股份有限公司 Method for processing text images, device, electronic equipment and computer-readable medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1395220A (en) * 2001-06-26 2003-02-05 诺基亚有限公司 Character locating method and device in picture of digital camera
US20050031220A1 (en) * 2003-08-08 2005-02-10 Hirobumi Nishida Method, apparatus, system, and program for image processing capable of recognizing, reproducing, and enhancing an image, and a medium storing the program
CN107844740A (en) * 2017-09-05 2018-03-27 中国地质调查局西安地质调查中心 A kind of offline handwriting, printing Chinese character recognition methods and system
CN109063706A (en) * 2018-06-04 2018-12-21 平安科技(深圳)有限公司 Verbal model training method, character recognition method, device, equipment and medium
CN109685052A (en) * 2018-12-06 2019-04-26 泰康保险集团股份有限公司 Method for processing text images, device, electronic equipment and computer-readable medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WEIJUAN WEN ETAL.: "An Efficient Method for Text Location and Segmentation", 《2009 WRI WORLD CONGRESS ON SOFTWARE ENGINEERING》 *
艾斯卡尔·艾木都拉等: "基于着色处理的维吾尔文手写文本行分割", 《清华大学学报(自然科学版)》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112784825A (en) * 2019-11-01 2021-05-11 株式会社理光 Method for identifying characters in picture, method, device and equipment for searching keywords
CN112784825B (en) * 2019-11-01 2024-04-30 株式会社理光 Method for identifying characters in picture, method, device and equipment for retrieving keywords
CN111191651A (en) * 2019-12-06 2020-05-22 中国平安财产保险股份有限公司 Document image identification method and device, computer equipment and storage medium
WO2021179751A1 (en) * 2020-03-13 2021-09-16 上海哔哩哔哩科技有限公司 Image processing method and system
CN112488311A (en) * 2020-11-30 2021-03-12 泰康保险集团股份有限公司 Image processing method, device, medium and electronic equipment
CN113902830A (en) * 2021-12-08 2022-01-07 腾讯科技(深圳)有限公司 Method for generating track road network
CN114219946A (en) * 2021-12-29 2022-03-22 北京百度网讯科技有限公司 Text image binarization method and device, electronic equipment and medium

Also Published As

Publication number Publication date
CN110222694B (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN110222694A (en) Image processing method, device, electronic equipment and computer-readable medium
JP6503081B2 (en) Four-dimensional code, image identification system based on four-dimensional code, image identification method, four-dimensional code search system, and four-dimensional code search method
CN109410215A (en) Image processing method, device, electronic equipment and computer-readable medium
KR101710050B1 (en) Image identification systems and method
US20230401828A1 (en) Method for training image recognition model, electronic device and storage medium
CN109871845B (en) Certificate image extraction method and terminal equipment
CN108875602A (en) Monitor the face identification method based on deep learning under environment
Huo et al. Research on QR image code recognition system based on artificial intelligence algorithm
CN108446675A (en) Face-image recognition methods, device electronic equipment and computer-readable medium
CN112307886A (en) Pedestrian re-identification method and device
CN110866900A (en) Water body color identification method and device
CN106845312A (en) A kind of pre- determination methods of image in 2 D code quality
CN114170482A (en) Model training method, device, equipment and medium
CN111274946B (en) Face recognition method, system and equipment
CN111898544B (en) Text image matching method, device and equipment and computer storage medium
CN114332993A (en) Face recognition method and device, electronic equipment and computer readable storage medium
CN109635810A (en) A kind of method, apparatus, equipment and the storage medium of determining text information
Lv et al. A color distance model based on visual recognition
Gao et al. A Multitask Sign Language Recognition System Using Commodity Wi‐Fi
CN112396060A (en) Identity card identification method based on identity card segmentation model and related equipment thereof
Li et al. [Retracted] Image Processing and Recognition Algorithm Design in Intelligent Imaging Device System
US20230048495A1 (en) Method and platform of generating document, electronic device and storage medium
CN113449808B (en) Multi-source image-text information classification method and corresponding device, equipment and medium
CN114359931A (en) Express bill identification method and device, computer equipment and storage medium
CN113378723A (en) Automatic safety identification system for hidden danger of power transmission and transformation line based on depth residual error network

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