CN109685070A - A kind of image pre-processing method - Google Patents

A kind of image pre-processing method Download PDF

Info

Publication number
CN109685070A
CN109685070A CN201910028733.9A CN201910028733A CN109685070A CN 109685070 A CN109685070 A CN 109685070A CN 201910028733 A CN201910028733 A CN 201910028733A CN 109685070 A CN109685070 A CN 109685070A
Authority
CN
China
Prior art keywords
image
character
parameter
obtains
classification
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
CN201910028733.9A
Other languages
Chinese (zh)
Other versions
CN109685070B (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.)
Institute Of Emerging Industries Shanghai University (zhejiang Jiaxing)
Original Assignee
Institute Of Emerging Industries Shanghai University (zhejiang Jiaxing)
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 Institute Of Emerging Industries Shanghai University (zhejiang Jiaxing) filed Critical Institute Of Emerging Industries Shanghai University (zhejiang Jiaxing)
Priority to CN201910028733.9A priority Critical patent/CN109685070B/en
Publication of CN109685070A publication Critical patent/CN109685070A/en
Application granted granted Critical
Publication of CN109685070B publication Critical patent/CN109685070B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification 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

Landscapes

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

Abstract

The invention discloses a kind of image pre-processing methods, by obtaining source images, carry out classification according to the picture quality of the source images and obtain the first classification image;Pretreatment process is determined according to the first classification image, and configures multiple groups parameter for the pretreatment process;Character information and the maximum first monocase image of background separation degree in the first classification image according to gain of parameter described in the pretreatment process and multiple groups;It identifies the first monocase image, obtains the first recognition result and the second recognition result, will be compared with the corresponding legitimate reading of the first classification image and first recognition result and second recognition result;When the legitimate reading is identical as first recognition result and/or second recognition result, determine that the source images detection is qualified.It examines IC envelope to survey the character of link using image recognition, has reached raising working efficiency, recognition accuracy is high, reduces cost of labor, technical effect easy to operate.

Description

A kind of image pre-processing method
Technical field
This application involves industrial detection technical field more particularly to a kind of image pre-processing methods.
Background technique
OCR (Optical Character Recognition, optical character identification) refers to that electronic equipment (such as scans Instrument or digital camera) check the character printed on paper, its shape is determined by the mode for detecting dark, bright, then uses character recognition Shape is translated into the process of computword by method.The application field of OCR is very extensive at present, such as identity card, business card letter Breath identification, banker's check Handwritten Digits Recognition, industrial circle relevant batch Number Reorganization etc..Detection based on OCR is usually answered For industrial scene, for large-scale production, to prevent current production batch from mistake occurs, can to product batches number on line into Row identification, recognition result compares with true batch result, if they are the same, then it is assumed that currently production batch is correct, on the contrary then recognize For current production batch mistake.According to investigation, the character machining that IC envelope surveys link in industry at present is mostly artificially examined by operating staff It tests, that is examined using image recognition is relatively fewer, therefore, finds suitable chip image preprocess method for based on OCR Detection identification be of great significance.
But present inventor has found that the above-mentioned prior art at least has the following technical problems:
The character machining that IC envelope surveys link in the prior art is mostly artificially to examine, and working efficiency is low, and inspection result is accurate The low technical problem of rate.
Summary of the invention
The embodiment of the present application surveys link by providing a kind of image pre-processing method, to solve IC envelope in the prior art Character machining is mostly artificially to examine, and working efficiency is low, and the technical problem that inspection result accuracy rate is low, is examined using image recognition IC envelope surveys the character of link, has reached raising working efficiency, and recognition accuracy is high, reduces cost of labor, technology easy to operate Effect.
To solve the above-mentioned problems, the embodiment of the present application provides a kind of image pre-processing method, which comprises obtains Source images are taken, classification is carried out according to the picture quality of the source images and obtains the first classification image;According to first classification chart Multiple groups parameter is configured as determining pretreatment process, and for the pretreatment process;According to the pretreatment process and multiple groups Character information and the maximum first monocase image of background separation degree in first classification image described in gain of parameter;Described in identification First monocase image obtains the first recognition result and the second recognition result, will be corresponding true with the first classification image As a result it is compared with first recognition result and second recognition result;When the legitimate reading and first recognition result And/or second recognition result is identical, determines that the source images detection is qualified.
Preferably, the picture quality according to the source images carries out classification and obtains the first classification image, comprising: according to The brightness of the source images, noise carry out classification and obtain the first classification image.
Preferably, character in the first classification image described in the gain of parameter according to the pretreatment process and multiple groups Information and the maximum first monocase image of background separation degree, comprising: the first classification image is enhanced by gamma transformation In character grey information, obtain the first character picture;By adjusting the brightness and/or contrast of first character picture, The interference information in first character picture is removed, the second character picture is obtained;According to binaryzation and morphological image process Second character picture obtains binary image, and selects an expansion factor to carry out expansion to the binary image and obtain the Three character pictures;Edge detection is carried out to the third character picture, obtains the profile of the third character figure, and to described the The profile of three character pictures makees boundary rectangle frame and obtains the 4th character picture;Projection cutting is carried out to the 4th character picture to obtain Obtain the first monocase image.
Preferably, second character picture according to binaryzation and morphological image process obtains binary image, It include: to choose different binarization thresholds to handle the second character picture acquisition binary image.
Preferably, the projection cutting includes: to carry out floor projection to the 4th character picture, obtains the white of every a line Color pixel histogram;Define the first parameter minoffset1=sum [i]/average, wherein sum [i] is the white of the i-th row Pixel number, average are that white pixel histogram is averaged the white pixel number of every row;It determines in the 4th character picture Pixel number to be less than the value of first parameter be cut-boundary reference point, and determine picture in the 4th character picture The continuum that vegetarian refreshments number is greater than first parameter is character effective coverage;According to the height of the character effective coverage, Obtain character maximum effective coverage height;The second parameter is defined, by character maximum effective coverage height and second ginseng Several products is determined as character minimum effective coverage;According to first parameter, second parameter and white pixel histogram Every a line determine the first cut point, the first effective coverage and the first inactive area are obtained according to first cut point.
Preferably, the projection cutting includes: to carry out upright projection to first effective coverage, obtains the white of each column Color pixel histogram;Define third parameter minoffset2=sum [i]/average, wherein sum [i] is the white of the i-th column Pixel number, average are that white pixel histogram is averaged the white pixel number of each column;It determines in first effective coverage Pixel number to be less than the value of the third parameter be cut-boundary reference point, and determine picture in first effective coverage The continuum that vegetarian refreshments number is greater than the third parameter is character effective coverage;According to the effective district of the character effective coverage Width obtains the maximum effective sector width of character;The 4th parameter is defined, by character maximum effective coverage width and the 4th parameter Product be determined as character minimum effective coverage;According to the third parameter, the 4th parameter and white pixel histogram Each column determine the second cut point, obtain the second effective coverage and the second inactive area according to second cut point.
Preferably, the method also includes: when the legitimate reading and first recognition result and/or described second are known When other result is not identical, warning message is sent.
Said one or multiple technical solutions in the embodiment of the present application at least have following one or more technology effects Fruit:
The embodiment of the present application is by providing a kind of image pre-processing method, which comprises source images is obtained, according to institute The picture quality for stating source images carries out classification and obtains the first classification image;Pretreated stream is determined according to the first classification image Journey, and multiple groups parameter is configured for the pretreatment process;The described in the gain of parameter according to the pretreatment process and multiple groups Character information and the maximum first monocase image of background separation degree in one classification image;Identify the first monocase figure Picture obtains the first recognition result and the second recognition result, will legitimate reading corresponding with the first classification image and described the One recognition result and second recognition result comparison;When the legitimate reading and first recognition result and/or described the Two recognition results are identical, determine that the source images detection is qualified.The character machining of link is surveyed to solve IC envelope in the prior art It is mostly artificially to examine, working efficiency is low, and the technical problem that inspection result accuracy rate is low.By to source images according to picture quality Classify, and scheduled pretreatment process is carried out to sorted image and uses multiple groups parameter processing classification image and obtains Character information and the maximum first monocase image of background separation degree, and using the word of image recognition inspection IC envelope survey link Symbol has reached raising working efficiency, and recognition accuracy is high, reduces cost of labor, technical effect easy to operate.
Above description is only the general introduction of technical scheme, in order to better understand the technological means of the application, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects, features and advantages of the application can It is clearer and more comprehensible, below the special specific embodiment for lifting the application.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of image pre-processing method in the embodiment of the present invention;
Fig. 2 is that IC chip pallet model detects general frame figure in the embodiment of the present invention;
Fig. 3 is IC chip pallet source images classification schematic diagram in the embodiment of the present invention;
Fig. 4 is 2 source images pretreatment process figure of period after IC chip pallet classification in the embodiment of the present invention;
Fig. 5 is the Character segmentation schematic diagram based on upright projection fluctuation ratio in the embodiment of the present invention;
Fig. 6 is 3 source images pretreatment process figure of period after IC chip pallet classification in the embodiment of the present invention;
Fig. 7 is a kind of operational flowchart of image pre-processing method in the embodiment of the present invention.
Description of symbols: IC seals survey machine 1, industrial camera 2, secondary light source 3, IC chip pallet 4, the end PC 5.
Specific embodiment
The embodiment of the present application provides a kind of image pre-processing method, and the word of link is surveyed to solve IC envelope in the prior art Mostly symbol detection is artificially to examine, and working efficiency is low, and the technical problem that inspection result accuracy rate is low.
In order to solve the above-mentioned technical problem, technical solution general thought provided by the present application is as follows: source images are obtained, according to The picture quality of the source images carries out classification and obtains the first classification image;Pretreated stream is determined according to the first classification image Journey and the pretreatment process configure multiple groups parameter;First point according to the pretreatment process and multiple gain of parameter Character information and the maximum first monocase image of background separation degree in class image;It identifies the first monocase image, obtains The first recognition result and the second recognition result are obtained, by first recognition result and second recognition result and legitimate reading pair Than;When there are first recognition result and/or second recognition result are identical with legitimate reading, determining the source images inspection It is qualified to survey.It is mostly artificially to examine to solve the character machining that IC envelope surveys link in the prior art, working efficiency is low, and examines knot The low technical problem of fruit accuracy rate examines IC envelope to survey the character of link, has reached raising working efficiency, identified using image recognition Accuracy rate is high, reduces cost of labor, technical effect easy to operate.
Technical scheme is described in detail below by attached drawing and specific embodiment, it should be understood that the application Specific features in embodiment and embodiment are the detailed description to technical scheme, rather than to present techniques The restriction of scheme, in the absence of conflict, the technical characteristic in the embodiment of the present application and embodiment can be combined with each other.
Embodiment one
The embodiment of the invention provides a kind of image pre-processing methods, referring to FIG. 1, the method includes the steps 110- steps Rapid 150:
Step 110: obtaining source images, classification is carried out according to the picture quality of the source images and obtains the first classification image.
Further, the picture quality according to the source images carries out classification and obtains the first classification image, comprising: root Classification, which is carried out, according to the brightness of the source images, noise obtains the first classification image.
Specifically, the image pre-processing method based on OCR detection used in the embodiment of the present application is for strong noise Under adhesion character propose based on projection fluctuation ratio cutting mode, obtained for source images quality in varying situations OCR image pre-processing method.Pretreatment for image is handled source images for character letter by certain pretreatment process Breath and the more bianry image of background separation, later separate character zone, obtain monocase image.Firstly, obtaining Source images are taken, if the source images that will acquire are divided into Ganlei according to picture quality, one kind, i.e., first point are divided into similar in picture quality Class image, the first classification image herein includes a variety of classification images.Wherein picture quality is mainly for two o'clock: first, image Bright-dark degree, refer mainly to brightness and contrast;Second, the noise level of image refers mainly to dividing for image character and background From degree.
Step 120: pretreatment process being determined according to the first classification image, and configures multiple groups for the pretreatment process Parameter.
Step 130: character is believed in the first classification image according to gain of parameter described in the pretreatment process and multiple groups Breath and the maximum first monocase image of background separation degree.
Further, word in the first classification image described in the gain of parameter according to the pretreatment process and multiple groups Accord with information and the maximum first monocase image of background separation degree, comprising:
Step 131: the character grey information in the first classification image being enhanced by gamma transformation, obtains the first character Image;
Step 132: brightness and/or contrast by adjusting first character picture remove the first character figure Interference information as in obtains the second character picture;
Step 133: binary image being obtained according to the second character picture described in binaryzation and morphological image process, and is selected It selects an expansion factor and expansion acquisition third character picture is carried out to the binary image;
Step 134: edge detection being carried out to the third character picture, obtains the profile of the third character figure, and right The profile of the third character picture makees boundary rectangle frame and obtains the 4th character picture;
Step 135: projection cutting being carried out to the 4th character picture and obtains the first monocase image.
Further, second character picture according to binaryzation and morphological image process obtains binary picture Picture, comprising: choose different binarization thresholds and handle the second character picture acquisition binary image.
Specifically, determining pretreatment process according to the first classification image, and more for pretreatment process configuration Group parameter obtains the pretreatment process of different parameters.The main flow of OCR includes the acquisition of image, image preprocessing work and word Symbol identification work.The acquisition of image determines the quality of source images, and the pretreatment of image has very big shadow to the identification of character It rings.Common image pre-processing method mainly has gray processing, binaryzation, enhancing, filtering, edge detection, dilation erosion, cutting etc. Method, according to different process collocation and the available monocase for being conducive to identification of parameter selection.The application implements main use Image enhancement, image adjustment, filtering mode, edge detection, dilation erosion, projection cutting.Wherein, in image procossing, image Enhancing can effectively solve the problems, such as the overexposure or under-exposure of source images.The first step, image enhancement processing.It makes an uproar for height The source images obtained under acoustic environment, image is sometimes excessively bright or dim, is enhanced using gamma transformation image, can be with So that character effective information is differed bigger with the gray value of background, obtains the image conducive to processing.Second step, image adjustment.Due to It is gradually dull that the character abrasion of industrial circle is mainly rendered as image on the image, and background and character become more to be difficult to point From so separating the background information of image with effective information by the brightness of adjusting image, contrast value, elimination is more More interference.Third step, binaryzation and morphological image process.Choose two of suitable threshold value by image procossing for black matrix wrongly written or mispronounced character Value image directly can be such that character loses serious, therefore select since there may be loss and discrete points for the inside of character using filtering Suitable expansion factor is selected to expand image.Such as in image after character zone positions, binarization threshold is set as 100 In the case where, white pixel (effective information) accounting is calculated to enhanced image, brightness and contrast are obtained according to accounting situation Collocation empirical value are as follows: when boundary value be 0 and 200, it is more bright for image, enhance image after inverse binaryzation white Pixel accounting about 20%;When boundary value is 30 and 250, placed in the middle for image light and shade, enhancing image is white after inverse binaryzation Color pixel accounting about 40%;When boundary value is 50 and 300, more dim for image, enhancing image is after inverse binaryzation White pixel accounting about 70%.Common image filtering mode has the modes such as median filtering, gaussian filtering, bilateral filtering, but right Character under certain strong noises directly can lose many effective informations using filtering.Therefore image is expanded, this makes Character inner region is more substantial, but simultaneously, and the noise of image is also amplified.4th step, edge detection and rectangle frame extract.It is right Image carries out edge detection using cannny detective operators, obtains all profiles in image.These profiles mainly include two Aspect: character main outline and noise profile.For the image after character locating, character outline is much larger than noise profile, to all Profile makees boundary rectangle frame, chooses the maximum n rectangle frame of area, general n > 2* character number, due to character perhaps exist it is interior Portion disconnect the case where, choose more rectangle frames be in order to guarantee character completely removal noise profile between it is preferably.5th Step, projection cutting.For the strong noise image of industrial circle, after above-mentioned process flow, it includes perhaps that obtained image, which remains unchanged, More noises, and it is likely that there are the adhesion of noise and character, settable suitable parameters, are cut using projection pattern at this time, Obtain the first monocase image.
Further, the projection cutting includes: to carry out floor projection to the 4th character picture, obtains every a line White pixel histogram;Define the first parameter minoffset1=sum [i]/average, wherein sum [i] is the white of the i-th row Color pixel points, average are that white pixel histogram is averaged the white pixel number of every row;Determine the 4th character picture In pixel number to be less than the value of first parameter be cut-boundary reference point, and determine in the 4th character picture The continuum that pixel number is greater than first parameter is character effective coverage;According to the height of the character effective coverage Degree obtains character maximum effective coverage height;The second parameter is defined, by character maximum effective coverage height and described second The product of parameter is determined as character minimum effective coverage;According to first parameter, second parameter and white pixel column Every a line of figure determines the first cut point, obtains the first effective coverage and the first inactive area according to first cut point.
Further, the projection cutting includes: to carry out upright projection to first effective coverage, obtains each column White pixel histogram;Define third parameter minoffset2=sum [i]/average, wherein sum [i] is the white of the i-th column Color pixel points, average are that the be averaged white pixel number of each column of white pixel histogram determines first effective coverage In pixel number to be less than the value of the third parameter be cut-boundary reference point, and determine in first effective coverage The continuum that pixel number is greater than the third parameter is character effective coverage;According to the effective of the character effective coverage Sector width obtains the maximum effective sector width of character;The 4th parameter is defined, by character maximum effective coverage width and the 4th ginseng Several products is determined as character minimum effective coverage;According to the third parameter, the 4th parameter and white pixel histogram Each column determine the second cut point, the second effective coverage and the second inactive area are obtained according to second cut point.
Specifically, the projection cutting includes: floor projection and upright projection.It is optional to floor projection and upright projection It selects different parameters to be cut, obtains effective coverage and inactive area, wherein retain effective coverage, inactive area is set to 0 (black picture element).Concrete operations are to carry out floor projection to the 4th character picture, obtain the white pixel column of every a line Figure;Defining the first parameter minoffset1=sum [i]/average, wherein sum [i] is that the white pixel of the i-th row is counted, Average is that white pixel histogram is averaged the white pixel number of every row;Determine the pixel in the 4th character picture The value that number is less than first parameter is cut-boundary reference point, and determines pixel number in the 4th character picture Continuum greater than first parameter is character effective coverage;According to the height of the character effective coverage, character is obtained Maximum effective coverage height;The second parameter is defined, by the product of character maximum effective coverage height and second parameter It is determined as character minimum effective coverage;According to first parameter, every a line of second parameter and white pixel histogram The first cut point is determined, wherein first cut point cannot be less than character minimum effective coverage.It is cut according to described first Cutpoint obtains the first effective coverage and the first inactive area.Upright projection is carried out to first effective coverage, obtains each column White pixel histogram;Define third parameter minoffset2=sum [i]/average, wherein sum [i] is the i-th column White pixel points, average are that the be averaged white pixel number of each column of white pixel histogram determines first effective district It is cut-boundary reference point that pixel number in domain, which is less than the value of the third parameter, and determines first effective coverage The continuum that middle pixel number is greater than the third parameter is character effective coverage;According to having for the character effective coverage Sector width is imitated, the maximum effective sector width of character is obtained;The 4th parameter is defined, by character maximum effective coverage width and the described 4th The product of parameter is determined as character minimum effective coverage;According to the third parameter, the 4th parameter and white pixel column Each column of figure determine the second cut point, obtain the second effective coverage and the second inactive area according to second cut point, will Second effective coverage retains, i.e. acquisition character information and the maximum first monocase image of background separation degree.
Step 140: identification the first monocase image obtains the first recognition result and the second recognition result, will be with institute It states the corresponding legitimate reading of the first classification image and first recognition result and second recognition result compares;
Step 150: when the legitimate reading is identical as first recognition result and/or second recognition result, really The fixed source images detection is qualified.
Further, the method also includes: when the legitimate reading and first recognition result and/or described second When recognition result is not identical, warning message is sent.
Specifically, image preprocessing process and different projection cutting parameters are combined, multiple and different parameters are obtained Pretreatment process P1, P2 ... Pn, and source images are pre-processed, and by the first monocase image obtained after pretreatment into Line character identification, obtains multiple recognition result R1, R2 ... Rn, will access in advance in computer obtained in database and really tie Fruit compares, if legitimate reading there are in recognition result, i.e. R (R ∈ { R1, R2 ... Rn }) and legitimate reading successful match, then Think that detection passes through.If legitimate reading is not present in recognition result, warning message is sent.
Embodiment two
The embodiment of the invention provides a kind of image pre-processing methods, please refer to Fig. 2 to Fig. 7, and the method is applied to one IC chip pallet 4 (charging tray) model under kind industrial environment is detected as preferred embodiment, uses the industrial camera 3 in IC envelope survey machine 1 IC chip pallet 4 (charging tray) model character source images are shot, in use due to charging tray, are constantly worn, so that source images Quality constantly change, charging tray source images are divided into several major class according to the period used, are found according to different period A kind of image preprocessing process, and different parameters is configured to the pretreatment process, then press the pretreatment process of different parameters Concurrent mode identify and be compared with legitimate reading, reaches testing goal.Specific steps are as follows:
As shown in Fig. 2, obtaining the true type of the current practical charging tray of production machine by the database that the end PC 5 accesses commercial manufacturer Number, the acquisition of source images is designed using industrial camera 3 and secondary light source 2, and the source images taken are reached the end PC 5 and are handled And identification, the true model of charging tray is compared with recognition result by the end PC 5, reaches testing goal.
The life cycle of charging tray can be divided into four classes in the present embodiment, as shown in figure 3, period 1 to 4, respectively period 1: new charging tray is designed through secondary light source, and image character is obvious with background separation;Period 2: charging tray is used by the short time, out Information is now interfered less with, can be eliminated by conventional filtering;Period 3: charging tray is by hand multiple-contact, and partial region color becomes and word It accords with very close, it is difficult to divide;Period 4: background color is more close with character color, and character defect occurs, at this time charging tray report It is useless.The quality of source images is gradually deteriorated, and background gradually becomes more to be difficult to separate with character, and gradually adhesion is tight with character for noise Weight, the parameter for not being available identical pretreatment process obtain preferable images to be recognized.
The image preprocessing process in each period, and the parameter of appropriate mix are determined, as shown in Fig. 4,6, respectively to material The pretreatment process in disk period 2,3 enhances image grayscale information by gamma transformation, prevents the loss of subsequent adjustment character serious, The separation for reaching a certain level character and background by the brightness of image, contrast adjustment again is selected for different cycles later Suitable parameters are taken to carry out the processing such as two-value, expansion.Such as the period 3, it is available after being handled according to above-mentioned pretreatment process There is the point of many mutually adhesions, be such as directly filtered in the biggish character picture of noise since character inner does not enrich, The point of these character inners can be filtered out, cause excessive loss.Therefore edge detection is used, rectangle is made to all profiles detected Frame traverses all rectangle frame areas later, chooses maximum 20 rectangle frame regions, is projected again later, can be effectively Save character zone from damage and filters out disturbing factor.
For the image under strong noise, includes mostly noise after rectangle frame selection, choose suitable first parameter at this time Minoffset1, the second parameter minheight, third parameter minoffset2, the 4th parameter minwidth carry out projection cutting, Cutting mode based on upright projection fluctuation ratio is as shown in Figure 4.Wherein the first parameter minoffset1 and third parameter Minoffset2 refers mainly to every row, and column white pixel is averaged accounting, chooses empirical value 0.6,0.3, the second parameter respectively Minheight and the 4th parameter minwidth is primarily to guarantee the minimum height and width of character, such as character " 1, I " etc., difference It chooses empirical value and is generally 0.8,0.5.After projection cutting, available isolated monocase.
An independent process flow will be encapsulated for the pretreatment process in period 1,2,3,4 and parameter selection, such as Fig. 7 institute Show, by the pretreatment process of different parameters, treated that monocase image identifies, obtain different recognition results, with from The practical charging tray model that database obtains compares, if it exists identical charging tray model result, then it is assumed that the IC chip currently produced Batch is correct, otherwise it is assumed that there are problems for current production batch, generates alarm.
Said one or multiple technical solutions in the embodiment of the present application at least have following one or more technology effects Fruit:
The embodiment of the present application is by providing a kind of image pre-processing method, which comprises source images is obtained, according to institute The picture quality for stating source images carries out classification and obtains the first classification image;Pretreated stream is determined according to the first classification image Journey, and multiple groups parameter is configured for the pretreatment process;The described in the gain of parameter according to the pretreatment process and multiple groups Character information and the maximum first monocase image of background separation degree in one classification image;Identify the first monocase figure Picture obtains the first recognition result and the second recognition result, will legitimate reading corresponding with the first classification image and described the One recognition result and second recognition result comparison;When the legitimate reading and first recognition result and/or described the Two recognition results are identical, determine that the source images detection is qualified.The character machining of link is surveyed to solve IC envelope in the prior art It is mostly artificially to examine, working efficiency is low, and the technical problem that inspection result accuracy rate is low, examines IC envelope to survey ring using image recognition The character of section has reached raising working efficiency, and recognition accuracy is high, reduces cost of labor, technical effect easy to operate.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications can be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, those skilled in the art can carry out various modification and variations without departing from this hair to the embodiment of the present invention The spirit and scope of bright embodiment.In this way, if these modifications and variations of the embodiment of the present invention belong to the claims in the present invention And its within the scope of equivalent technologies, then the present invention is also intended to include these modifications and variations.

Claims (7)

1. a kind of image pre-processing method, which is characterized in that the described method includes:
Source images are obtained, classification is carried out according to the picture quality of the source images and obtains the first classification image;
Pretreatment process is determined according to the first classification image, and configures multiple groups parameter for the pretreatment process;
Character information and background separation in the first classification image according to gain of parameter described in the pretreatment process and multiple groups The maximum first monocase image of degree;
It identifies the first monocase image, obtains the first recognition result and the second recognition result, it will be with first classification chart As corresponding legitimate reading and first recognition result and second recognition result compare;
When the legitimate reading is identical as first recognition result and/or second recognition result, the source images are determined Detection is qualified.
2. image pre-processing method as described in claim 1, which is characterized in that the picture quality according to the source images It carries out classification and obtains the first classification image, comprising:
Classification, which is carried out, according to the brightness of the source images, noise obtains the first classification image.
3. image pre-processing method as described in claim 1, which is characterized in that described according to the pretreatment process and multiple groups Character information and the maximum first monocase image of background separation degree in first classification image described in the gain of parameter, packet It includes:
Enhance the character grey information in the first classification image by gamma transformation, obtains the first character picture;
By adjusting the brightness and/or contrast of first character picture, the interference letter in first character picture is removed Breath obtains the second character picture;
Binary image is obtained according to the second character picture described in binaryzation and morphological image process, and selects an expansion factor Expansion is carried out to the binary image and obtains third character picture;
Edge detection is carried out to the third character picture, obtains the profile of the third character figure, and to the third character The profile of image makees boundary rectangle frame and obtains the 4th character picture;
Projection cutting is carried out to the 4th character picture and obtains the first monocase image.
4. image pre-processing method as claimed in claim 3, which is characterized in that described according at binaryzation and morphological image It manages second character picture and obtains binary image, comprising:
It chooses different binarization thresholds and handles the second character picture acquisition binary image.
5. image pre-processing method as claimed in claim 3, which is characterized in that the projection, which is cut, includes:
Floor projection is carried out to the 4th character picture, obtains the white pixel histogram of every a line;
Defining the first parameter minoffset1=sum [i]/average, wherein sum [i] is that the white pixel of the i-th row is counted, Average is that white pixel histogram is averaged the white pixel number of every row;
Determining that the pixel number in the 4th character picture is less than the value of first parameter is cut-boundary reference point, with And the continuum for determining that pixel number is greater than first parameter in the 4th character picture is character effective coverage;
According to the height of the character effective coverage, character maximum effective coverage height is obtained;
The second parameter is defined, the product of character maximum effective coverage height and second parameter is determined as character minimum Effective coverage;
The first cut point is determined according to every a line of first parameter, second parameter and the white pixel histogram, The first effective coverage and the first inactive area are obtained according to first cut point.
6. image pre-processing method as claimed in claim 5, which is characterized in that the projection, which is cut, includes:
Upright projection is carried out to first effective coverage, obtains the white pixel histogram of each column;
Defining third parameter minoffset2=sum [i]/average, wherein sum [i] is the white pixel points of the i-th column, Average is that white pixel histogram is averaged the white pixel number of each column;
Determining that the pixel number in first effective coverage is less than the value of the third parameter is cut-boundary reference point, with And the continuum for determining that pixel number is greater than the third parameter in first effective coverage is character effective coverage;
According to effective sector width of the character effective coverage, the maximum effective sector width of character is obtained;
The 4th parameter is defined, it is minimum effectively that the product of character maximum effective coverage width and the 4th parameter is determined as character Region;
The second cut point is determined according to each column of the third parameter, the 4th parameter and the white pixel histogram, The second effective coverage and the second inactive area are obtained according to second cut point.
7. image pre-processing method as described in claim 1, which is characterized in that the method also includes:
When the legitimate reading and first recognition result and/or not identical second recognition result, alarm signal is sent Breath.
CN201910028733.9A 2019-01-11 2019-01-11 Image preprocessing method Active CN109685070B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910028733.9A CN109685070B (en) 2019-01-11 2019-01-11 Image preprocessing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910028733.9A CN109685070B (en) 2019-01-11 2019-01-11 Image preprocessing method

Publications (2)

Publication Number Publication Date
CN109685070A true CN109685070A (en) 2019-04-26
CN109685070B CN109685070B (en) 2023-01-24

Family

ID=66192133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910028733.9A Active CN109685070B (en) 2019-01-11 2019-01-11 Image preprocessing method

Country Status (1)

Country Link
CN (1) CN109685070B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5062141A (en) * 1988-06-02 1991-10-29 Ricoh Company, Ltd. Method of segmenting characters in lines which may be skewed, for allowing improved optical character recognition
US5680478A (en) * 1992-04-24 1997-10-21 Canon Kabushiki Kaisha Method and apparatus for character recognition
CN104239853A (en) * 2014-08-27 2014-12-24 北京捷通华声语音技术有限公司 Method and device for processing images
CN105675626A (en) * 2016-02-26 2016-06-15 广东工业大学 Character defect detecting method of tire mold
US20160180163A1 (en) * 2014-12-19 2016-06-23 Konica Minolta Laboratory U.S.A., Inc. Method for segmenting text words in document images using vertical projections of center zones of characters
CN205644589U (en) * 2016-04-29 2016-10-12 钟彩 License plate classification device
CN106650721A (en) * 2016-12-28 2017-05-10 吴晓军 Industrial character identification method based on convolution neural network
CN106709530A (en) * 2017-01-17 2017-05-24 中国科学院上海高等研究院 License plate recognition method based on video
EP3258422A1 (en) * 2015-02-13 2017-12-20 GRG Banking Equipment Co., Ltd. Character segmentation and recognition method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5062141A (en) * 1988-06-02 1991-10-29 Ricoh Company, Ltd. Method of segmenting characters in lines which may be skewed, for allowing improved optical character recognition
US5680478A (en) * 1992-04-24 1997-10-21 Canon Kabushiki Kaisha Method and apparatus for character recognition
CN104239853A (en) * 2014-08-27 2014-12-24 北京捷通华声语音技术有限公司 Method and device for processing images
US20160180163A1 (en) * 2014-12-19 2016-06-23 Konica Minolta Laboratory U.S.A., Inc. Method for segmenting text words in document images using vertical projections of center zones of characters
EP3258422A1 (en) * 2015-02-13 2017-12-20 GRG Banking Equipment Co., Ltd. Character segmentation and recognition method
CN105675626A (en) * 2016-02-26 2016-06-15 广东工业大学 Character defect detecting method of tire mold
CN205644589U (en) * 2016-04-29 2016-10-12 钟彩 License plate classification device
CN106650721A (en) * 2016-12-28 2017-05-10 吴晓军 Industrial character identification method based on convolution neural network
CN106709530A (en) * 2017-01-17 2017-05-24 中国科学院上海高等研究院 License plate recognition method based on video

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
严曲: "身份证识别***的原理及算法研究", 《中国优秀博硕士学位论文全文数据库 (硕士) 信息科技辑》 *
李蕊: "中文印刷体文档数学公式识别***", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
赵娟等: "车牌识别***中的图像预处理研究", 《华北水利水电学院学报》 *
陈兆学等: "一类特殊印刷体字符的分割和识别方法", 《微型电脑应用》 *
陈强: "非限定手写体汉字分割与多类别票据处理研究", 《中国博士学位论文全文数据库 信息科技辑》 *

Also Published As

Publication number Publication date
CN109685070B (en) 2023-01-24

Similar Documents

Publication Publication Date Title
US8520892B2 (en) Method and apparatus for detecting objects
CN108596166A (en) A kind of container number identification method based on convolutional neural networks classification
CN109255344A (en) A kind of digital display instrument positioning and Recognition of Reading method based on machine vision
CN106846316A (en) A kind of GIS inside typical defect automatic distinguishing method for image
CN110766017B (en) Mobile terminal text recognition method and system based on deep learning
CN108090494A (en) Based on Gabor filter and support vector machines textile flaw recognition methods
US7333656B2 (en) Image processing method and image processing apparatus
CN106157303A (en) A kind of method based on machine vision to Surface testing
JP7198922B2 (en) Tire/Sidewall Imaging Method
CN106331746B (en) Method and apparatus for identifying watermark location in video file
CN115330795B (en) Cloth burr defect detection method
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
CN113392819B (en) Batch academic image automatic segmentation and labeling device and method
Ranjitha et al. A hybrid Ostu based niblack binarization for degraded image documents
CN108205678A (en) A kind of nameplate Text region processing method containing speck interference
JPH11213090A (en) Method and device for discriminating character graphic from background area and recording medium recording its method
CN108171705A (en) The foreign bodies detection algorithm of liquid in a kind of Clear glass bottles and jars
CN109685070A (en) A kind of image pre-processing method
JP4132822B2 (en) Find objects in images
JP3906221B2 (en) Image processing method and image processing apparatus
CN107909075A (en) A kind of Binarization of License Plate Images based on Laplacian enlargement oprators
Lin et al. Locating license plate based on edge features of intensity and saturation subimages
CN114937003A (en) Multi-type defect detection system and method for glass panel
Yahya et al. Image enhancement background for high damage Malay manuscripts using adaptive threshold binarization
Vu et al. Automatic extraction of text regions from document images by multilevel thresholding and k-means clustering

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