CN108961275B - Deviate the positioning of PCB core piece and character segmentation method of feature vector based on projection - Google Patents

Deviate the positioning of PCB core piece and character segmentation method of feature vector based on projection Download PDF

Info

Publication number
CN108961275B
CN108961275B CN201810811416.XA CN201810811416A CN108961275B CN 108961275 B CN108961275 B CN 108961275B CN 201810811416 A CN201810811416 A CN 201810811416A CN 108961275 B CN108961275 B CN 108961275B
Authority
CN
China
Prior art keywords
character
image
pixel
projection
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810811416.XA
Other languages
Chinese (zh)
Other versions
CN108961275A (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.)
Nanjing Normal University
Original Assignee
Nanjing Normal University
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 Nanjing Normal University filed Critical Nanjing Normal University
Priority to CN201810811416.XA priority Critical patent/CN108961275B/en
Publication of CN108961275A publication Critical patent/CN108961275A/en
Application granted granted Critical
Publication of CN108961275B publication Critical patent/CN108961275B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0014Image feed-back for automatic industrial control, e.g. robot with camera
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30148Semiconductor; IC; Wafer

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Robotics (AREA)
  • Character Input (AREA)

Abstract

The invention discloses the positioning of PCB core piece and character segmentation method, this method that deviate feature vector based on projection, and complete integrated circuit board color image is acquired on station using industrial camera;Extract the color characteristic in color image, obtain the bianry image of the black region in integrated circuit board color image, Morphological scale-space and connected domain analysis are carried out for this bianry image, integrated circuit chip on board is positioned using the rectangular degree of each connected domain, realizes the chip positioning on integrated circuit board;Character in the positioning image of chip position is positioned line by line, it finds out the position of each line character and splits the line character, projection differential characteristics vector is carried out to each line character region to extract, the distributed area of character zone is obtained according to the distribution coordinate vector of feature vector, realizes and the monocase of multirow character on chip is divided.

Description

Deviate the positioning of PCB core piece and character segmentation method of feature vector based on projection
Technical field
The invention belongs to the technical field of machine vision and image procossing, it is related to deviateing the PCB of feature vector based on projection Chip positioning and character segmentation method.
Background technique
Nowadays, electronic product is more intended to the state that volume is small, function is complicated, the integrated electricity of these interiors of products Road plate integrated level is high, circuit is complicated, circuit is densely distributed, and electronic device once meets with the extraneous influence such as dampness, collision, corrosion, Complicated circuit work is easily influenced, so it is essential to be packaged processing to integrated circuit board.Main stream approach can be divided into Encapsulating with two kinds of low-pressure injection molding.Encapsulating method, which exists, to need to carry out subsequent heat solidification, and packaging efficiency is lower, and can be to package material Material generates the problems such as more serious waste.Low-pressure injection molding, which exists, to be needed to make particular manufacturing craft to different integrated circuit boards in advance, preceding Phase larger workload, and make mold and need a large amount of raw material, it is no longer necessary to mold will become industrial refuse, waste of resource and The problems such as polluting environment.
PCB core piece vision-based detection and identification towards the encapsulation of digital micro-spray technique are by machine vision technique and digital micro-spray Printing technique combines, and obtains the vision positioning information that PCB encapsulates chip by machine vision and image processing method, and by this A little information are transmitted to computer, spray resin material in target localization region by UV photocuring digital micro-spray three-dimensional printer and consolidate Change, the digital micro-spray automatic packaging function of different classes of PCB core piece may be implemented.
Summary of the invention
Present invention aims at at present using core on digital micro-spray photocuring 3 D-printing system realization integrated circuit The automatic packaging of piece provides PCB (Printed Circuit Board, PCB) chip based on color characteristic and upright projection Positioning and character segmentation method, include the following steps:
Step 1, integrated circuit board color image is acquired;
Step 2, according to the integrated circuit board color image of acquisition, the black region in integrated circuit board color image is obtained Bianry image, Morphological scale-space and connected domain analysis are carried out for this bianry image, using the rectangular degree of each connected domain to collection It is positioned at chips on circuit boards, realizes the chip positioning on integrated circuit board;
Step 3, character in the positioning image of chip position is positioned line by line, find out the position of each line character and is incited somebody to action The line character is split, and is carried out projection differential characteristics vector to each line character region and is extracted, is sat according to the distribution of feature vector Mark vector obtains the distributed area of character zone, realizes and divides to the monocase of multirow character on chip.
Step 2 includes the following steps:
Step 2-1 obtains the bianry image of the black region in integrated circuit board color image;
Step 2-2, according to document (1), (Ma Changxia, Zhao Chunxia wait the pavement crack of combination NSCT and morphological image to examine Survey [J] CAD and graphics journal, 2009,21 (12): 1761-1767.) in morphological image, select 5* 5 structural element carries out Morphological scale-space to the bianry image of acquisition, successively carries out erosion operation to image respectively, then closed Operation;
Step 2-3, according to document (2), (Yu Xiaoyu, Guo Yubo, Chen Gang wait based on the real-time of point target connected component labeling Feature extraction and its distributed arithmetic [J] Acta Optica, 2015,02:104-114.) the connected component labeling technology in, to integrated Circuit board color image carries out connected component labeling and carries out connected domain analysis;
Step 2-4, is screened according to connected domain analysis, is retained chip area, is obtained the positioning image of chip position.
Step 2-1 includes: by integrated circuit board color image green component G component, blue component B component and red component The value differences degree of R component is as the standard for differentiating black region, as shown in formula (1):
In formula, mGFor G component pixel diversity factor, mBFor B component value differences degree, fGFor the G component pixel of pixel Value, fBFor the B component pixel value of pixel, fRFor the R component pixel value of pixel;
If the R component threshold value of integrated circuit board color image black region is that 0.3 pair of image carries out binaryzation, it is suitable to choose Decision threshold M, work as mG≤ M and mBWhen≤M, which is black region, is otherwise non-black region, obtains in PCB image The bianry image of black region.
Step 2-4 includes:
Step 2-4-1 calculates area features of the number of all pixels point in connected domain as the connected domain, extracts connection The Far Left in domain, rightmost, the top, nethermost pixel coordinate, the periphery of connected domain is obtained according to this four coordinates Rectangle frame, while the width and height of peripheral rectangle frame are acquired, as shown in formula (2):
W=xR-xLH=yD-yU (2)
In formula, W is the width of peripheral rectangle, and H is the height of peripheral rectangle, xR、xL、yD、yUIt is the most left of connected domain respectively The coordinate of the pixel on side, the coordinate of the pixel of rightmost, the coordinate of uppermost pixel, nethermost pixel seat Mark;
Step 2-4-2 acquires the area of peripheral rectangle, the area of connected domain itself according to the width of peripheral rectangle and height The ratio of A and peripheral rectangular area is the rectangular degree J of the connected domain, as shown in formula (3):
Step 2-4-3 chooses suitable size S (S desirable 2000~2500), deletes area in image and be less than S's Connected domain marks and calculates the rectangular degree of remaining each connected domain, chooses suitable decision threshold O (O desirable 0.7~1), works as J When >=O, otherwise it is non-chip area which, which is chip area,.
Step 3 includes the following steps:
Step 3-1 positions the character in the positioning image of chip position line by line, finds out the position of each line character And the line character is split;
Step 3-2 carries out projection differential characteristics to character in the character zone obtained in step 3-1 and extracts, root Character is individually divided according to projection differential characteristics;
Completion is normalized to multirow character on chip to the single character picture that segmentation obtains in step 3-3 Segmentation.
Step 3-1 includes the following steps:
Step 3-1-1, according to document (3) (Wang Zhangfeng edge detection method study and apply [D] Tianjin Polytechnic University, 2017) edge detecting technology in carries out edge detection to the positioning image of chip position and obtains marginal information image BW, passes through Edge detection is extracted to obtain the edge pixel point feature information of character, using first pixel in the image upper left corner as origin, It is downwards Y direction, is to the right X-direction, is projected the edge pixel point of every a line to obtain the row of Y-direction in Y-axis Pixel projection vector, as shown in formula (4), (5):
PY=[PY1 PY2 … PYi … PYm] (5)
Wherein, PYiRefer to projection value of the edge pixel point of the i-th row in Y-axis, m, n respectively refer to marginal information image BW's Total line number and total columns, i, j respectively refer to the i-th row of marginal information image BW and jth arranges, PYRefer to the row of marginal information image BW Pixel projection vector;
Step 3-1-2 extracts row pixel projection according to the following formula and deviates feature vector:
SY=[SY1 SY2 … SYi … SYm] (8)
Wherein, SYiDeviate characteristic value, S for the pixel projection of the i-th rowYDeviate feature vector for row pixel projection,It is each The average value of the Y-axis projection value of row pixel;
Step 3-1-3 deviates feature vector by row pixel projection and realizes positioning to the branch of character portion, by character by Row is split: choosing suitable threshold value Z (Z desirable 2.3~4.5) to SYiEvery a line pixel projection deviate characteristic value carry out Judge to work as S to obtain target area row coordinateYiWhen >=Z, retain the target area that the corresponding coordinate of row pixel is obtained with this Row coordinate, obtain target area number and each target area row coordinate section;To the siding-to-siding block lengths of all target areas into Row quantity statistics are chosen and record the most siding-to-siding block length L of frequency of occurrencem, to the siding-to-siding block length L of i-th of target areaiIt carries out Judgement: work as 0.8Lm≤Li≤1.2Lm, which is character zone and reservation line coordinate;Conversely, being then other interference ranges Domain;Segmentation line by line is carried out according to obtained character zone row coordinate and obtains the segmented image of every line character, is realizing branch's positioning On the basis of, the column pixel projection for extracting every line character segmented image respectively deviates feature vector, and column pixel projection deviates feature The extraction of vector is shown below:
SX=[SX1 SX2 … SXjs … SXN] (12)
Wherein, bw refers to obtained uniline character picture after positioning line by line, y, js respectively refer to the row of uniline character picture with Column, PXjsRefer to projection value of the edge pixel point in X-axis of jth s column, M, N respectively refer to total line number of uniline character picture and total Columns,For the average value of the X-axis projection value of each column pixel, SXjsRefer to that the pixel projection of jth s column deviates characteristic value, SX Refer to that column pixel projection deviates feature vector, the final positioning that feature vector realizes character is deviateed by column pixel projection, is chosen Suitable threshold value S ' (value range 3.7~5.2) deviates characteristic value to the pixel projection of each of these column and is judged to obtain Target area column coordinate is obtained, that is, works as SXiWhen >=S', retain the target area column coordinate that the corresponding coordinate of column pixel is obtained with this, The column coordinate section of target area is obtained, column direction is carried out and divides to obtain final line character segmented image.
Step 3-2 includes the following steps:
Step 3-2-1 constructs the projection discrete model P (x') of the bianry image of uniline character in a column direction:
Wherein, B refers to that the bianry image of uniline character, m ', n ' respectively refer to obtain line character segmentation figure by step 3-1-3 Total line number of the binary image of picture and total columns, y ', x ' respectively refer to the y ' row and xth ' column of marginal information image;
Step 3-2-2 extracts the discrete Distribution value abscissa value of projection discrete model, obtains the corresponding position of character zone It is distributed coordinate vector X:
X={ x'| P (x') >=p } (14)
Wherein, p is distribution coordinate extracting parameter, 0≤p≤5;
Step 3-2-3 carries out projection differential characteristics vector and extracts:
T=d (X) (15)
T=X (k+1) | t (k)=0 } (16)
Wherein, d (X) indicates that character zone projects differential characteristics vector, and T indicates that single character zone coordinate endpoint, k indicate Serial number in position distribution coordinate vector, X (k+1) indicate that the coordinate endpoint of+1 character zone of kth, t (k) indicate k-th of word Accord with each micro component of region projection differential characteristics vector;
Step 3-2-4, the distribution coordinate vector that differential characteristics vector is projected by extracting uniline character bianry image obtain The distributed area of character zone, choose suitable threshold value D (value range 170~220) to the column coordinate section of target area it Between distance Di judged: work as Di≤ D, then two sections in left and right, which are considered as, communicates with each other;Conversely, give up the section on the left side, from Continue to judge to the right in the section on the right.It is split according to the coordinate pair image of obtained connecting section, obtains character zone Segmented image realizes single Character segmentation, finally obtains the single character picture of arranged in sequence.
In step 1, complete integrated circuit board color image is obtained on station using CCD industrial camera.
The utility model has the advantages that the present invention overcome compared with prior art existing integrated circuit packaging method packaging efficiency it is lower, Early investment is big, and more serious waste can be led to the problem of to encapsulating material, construct it is a kind of based on color characteristic with it is vertical The PCB core piece of projection positions and character segmentation method.Firstly, extracting the color characteristic in color image, given threshold is to chip Carry out just positioning;Then, Morphological scale-space and connected domain analysis are carried out for the image just positioned, realized on integrated circuit board Chip positioning;Finally, edge projection feature and the projection differential for successively extracting character respectively are special according to multirow character distribution characteristics Sign realizes the independent segmentation to multirow character on chip.
Detailed description of the invention
The present invention is done with reference to the accompanying drawings and detailed description and is further illustrated, it is of the invention above-mentioned or Otherwise advantage will become apparent.
Fig. 1 is the method for the present invention flow chart;
Fig. 2 a is PCB image.
Fig. 2 b is chip positioning image.
Fig. 2 c is chip image.
Fig. 2 d is line character segmented image.
Fig. 2 e is single Character segmentation image.
Specific embodiment
The present invention will be further described with reference to the accompanying drawings and embodiments.
As shown in Figure 1, the principle of the present invention is: firstly, extracting the color characteristic in color image, given threshold is to chip Carry out just positioning;Then, Morphological scale-space and connected domain analysis are carried out for the image just positioned, realized on integrated circuit board Chip positioning;Finally, edge projection feature and the projection differential for successively extracting character respectively are special according to multirow character distribution characteristics Sign realizes the independent segmentation to multirow character on chip.Specific implementation method is as follows:
The method of chip positioning on integrated circuit board described in step (2) are as follows: the chip in integrated circuit board is mainly all It is black, so being exactly mainly special to the color of black region in integrated circuit board color image to the color feature extracted of chip Sign is extracted.
Black region in figure is positioned, it is necessary to seek suitable color threshold.Because being unable to judge accurately black The specific three-component threshold size in color region first carries out R component binary conversion treatment, and further according to each component, inherent relationship is sentenced each other Disconnected processing, is set as 0.3 for the R component color threshold of black region, carries out binary conversion treatment to image, since the color of black is special Property be that three-component pixel value is close or even equal, so according to the value differences degree of G component, B component and R component as differentiating The standard of black region, as shown in formula (1):
In formula, mGFor G component pixel diversity factor, mBFor B component value differences degree, fGFor the G component pixel of pixel Value, fBFor the B component pixel value of pixel, fRFor the R component pixel value of pixel;
According to R component threshold value to image carry out the available R component of binaryzation close to black R component pixel value all pictures Vegetarian refreshments rejudges pixel in obtained image according to value differences degree, available integrated circuit board image In black region bianry image.
Electronic chip is obtained according to the above method and positions image, in order to more preferably more accurately carry out subsequent connected domain analysis Work needs to handle interference present in image at this time.For the Pixel Information in reserved graph as much as possible, row Except extra interference information, different size of structural element is respectively set, erosion operation first is carried out to image, then carries out closed operation. In view of chip is smaller with respect to the area ratio of integrated circuit board, so lesser structural element is selected to carry out at morphology as far as possible Reason.
Connected component labeling analysis is carried out to the image after Morphological scale-space, due to the controllable degree of the collection process of image It is limited, it is mentioned there are still more nontarget area because electronic chip is mainly rectangle in the image after Morphological scale-space The rectangular degree feature and area features for taking each connected domain are as electronic chip localization criteria.All pictures in connected domain are calculated first Then area features of the number of vegetarian refreshments as the connected domain extract Far Left, the rightmost, the top, bottom of connected domain Pixel coordinate, the peripheral rectangle frame of connected domain is obtained according to this four coordinates, while can be in the hope of peripheral rectangle frame Width and height, as shown in formula (2):
W=xR-xLH=yD-yU (2)
In formula, W is the width of peripheral rectangle, and H is the height of peripheral rectangle, xR、xL、yD、yUIt is the most left of connected domain respectively The coordinate of the pixel on side, the coordinate of the pixel of rightmost, the coordinate of uppermost pixel, nethermost pixel seat Mark;
It can be in the hope of the area of peripheral rectangle, the area of connected domain itself and peripheral rectangular area according to width and height Ratio is the rectangular degree of the connected domain, as shown in formula (3):
Suitable size S (S desirable 2000~2500) is chosen, the connected domain that area in image is less than S, label are deleted And the rectangular degree of remaining each connected domain is calculated, choose suitable decision threshold O (O desirable 0.7~1), as J >=O, the connection Domain is chip area, is otherwise non-chip area.
The method of chip multirow Character segmentation described in step (3) are as follows: due to generally there is multirow character on electronic chip, first Character portion is positioned line by line, carries out column positioning again on the basis of realizing row positioning, so that the branch for completing character is fixed Position.It extracts to obtain the edge pixel point feature information of character by edge detection, the edge pixel point of every a line is enterprising in Y-axis Row projection obtains the row pixel projection vector of Y-direction, as shown in formula (4), (5):
PY=[PY1 PY2 … PYi … PYm] (5)
Wherein, PYiRefer to projection value of the edge pixel point of the i-th row in Y-axis, m, n respectively refer to marginal information image BW's Total line number and total columns, i, j respectively refer to the i-th row of marginal information image BW and jth arranges, PYRefer to the row of marginal information image BW Pixel projection vector;
There was only character edge pixel in ideal marginal information image, and have the characteristics that distribution is concentrated, due to electricity Sub- chip will receive the interference of the problems such as illumination, spot and acquisition equipment quality, other non-words can be detected in edge detection The marginal information of part is accorded with, this influences whether the positioning to character portion.In order to which character locating is better achieved, it is contemplated that word It accords with partial pixel point mostly and concentrates, extract pixel projection and deviate feature vector:
SY=[SY1 SY2 … SYi … SYm] (8)
Wherein, SYiDeviate characteristic value, S for the pixel projection of the i-th rowYDeviate feature vector for row pixel projection,It is each The average value of the Y-axis projection value of row pixel;
Deviateing feature vector by the row pixel projection extracted in edge pixel information image may be implemented to character portion Branch positioning, character is split line by line.On the basis of realizing that branch positions, every row is extracted respectively with identical method The column pixel projection of Character segmentation image, which deviates feature vector, may be implemented final character locating.Column pixel projection deviates feature The extraction of vector is as shown in formula:
SX=[SX1 SX2 … SXjs … SXN] (12)
Wherein, bw refers to obtained uniline character picture after positioning line by line, y, js respectively refer to the row of uniline character picture with Column, PXjsRefer to projection value of the edge pixel point in X-axis of jth s column, M, N respectively refer to total line number of uniline character picture and total Columns,For the average value of the X-axis projection value of each column pixel, SXjsRefer to that the pixel projection of jth s column deviates characteristic value, SXIt is Refer to that column pixel projection deviates feature vector, the final positioning that feature vector realizes character is deviateed by column pixel projection, chooses and closes Suitable threshold value S ' (value range 3.7~5.2) deviates characteristic value to the pixel projection of each of these column and is judged to obtain Target area column coordinate, that is, work as SXiWhen >=S', retains the target area column coordinate that the corresponding coordinate of column pixel is obtained with this, obtain To the column coordinate section of target area, carries out column direction and divide to obtain final line character segmented image.
By extract edge pixel information image row pixel projection deviate feature vector can to character portion realize by Row positions, and on the basis of completion row positioning obtains uniline character picture, extracting column pixel projection deviation feature vector can be most Character locating is realized eventually.
After completing chip surface character locating, every line character segmented image is successively obtained, these images are successively carried out Single Character segmentation may finally obtain the single character picture of a succession of arranged in sequence.
Binaryzation is carried out for uniline character picture that is located and splitting, it is contemplated that the row of chip surface character Column situation is random multiplicity, and it is discrete to construct the projection of the bianry image of uniline character in a column direction for ununified rule Model P (x'):
Wherein, B refers to that the bianry image of uniline character, m ', n ' respectively refer to obtain line character segmentation figure by step 3-1-3 Total line number of the binary image of picture and total columns, y ', x ' respectively refer to the y ' row and xth ' column of marginal information image;
On the basis of obtaining the projection discrete function of uniline character bianry image, the distribution abscissa value of discrete value is extracted The corresponding position distribution coordinate vector X of available character zone:
X={ x'| P (x') >=p } (14)
Wherein, p is distribution coordinate extracting parameter, 0≤p≤5.
Due to not knowing the number and distribution of character when carrying out single Character segmentation to uniline character bianry image, So needing to extract each character accurately divides coordinate, the basis of the corresponding position distribution coordinate vector of character zone is being obtained On, coordinate breakpoint is extracted according to differential vector:
T=d (X) (15)
T=X (k+1) | t (k)=0 } (16)
Wherein, d (X) indicates that character zone projects differential characteristics vector, and T indicates that single character zone coordinate endpoint, k indicate Serial number in position distribution coordinate vector, X (k+1) indicate that the coordinate endpoint of+1 character zone of kth, t (k) indicate k-th of word Accord with each micro component of region projection differential characteristics vector;
By the available word of distribution coordinate vector for extracting uniline character bianry image column vector pixel projection discrete value The distributed area for according with region, can extract the accurate segmentation of single character on the basis of obtaining distributed area according to differential vector Coordinate realizes accurately single Character segmentation in the case where unknown to character quantity and distribution, finally obtains and sequentially arrange The single character picture of column.
Embodiment
The present embodiment using be applied to wearable device integrated circuit board color image carry out based on color characteristic with The positioning of PCB core piece and the character segmentation method of upright projection are verified, firstly, extracting the color characteristic in color image, set threshold Value carries out just positioning to chip;Then, Morphological scale-space and connected domain analysis are carried out for the image just positioned, realizes integrated electricity Chip positioning on the plate of road;Finally, successively extracting the edge projection feature of character respectively according to multirow character distribution characteristics and throwing Shadow differential characteristics realize the independent segmentation to multirow character on chip.It is fixed to the PCB core piece based on color characteristic and upright projection Position is tested with character segmentation method, obtains beneficial conclusion, provides the dependence diagram of chip positioning and recognition methods such as Shown in Fig. 1, the experimental result of integrated circuit board chip package is as shown in Figure 2.
Fig. 1 be it is of the invention based on color characteristic and the PCB core piece of upright projection positioning with character segmentation method flow chart, It include chip positioning and chip Character segmentation;
Fig. 2 a~Fig. 2 e is that the present invention is corresponding based on color characteristic and the positioning of the PCB core piece of upright projection and Character segmentation Methods experiment result figure, wherein Fig. 2 a is PCB image, and Fig. 2 b is chip positioning image, i.e., the figure that step 2-4 of the present invention is obtained Picture, Fig. 2 c are chip image, and Fig. 2 d is line character segmented image, i.e., the image that step 3-1 of the present invention is obtained, Fig. 2 e is single word Accord with segmented image, i.e., the image that step 3-2 of the present invention is obtained.As can be seen from Figure, it is proposed in this paper based on color characteristic with The positioning of PCB core piece and the character segmentation method of upright projection can accurately realize chip positioning and character point in integrated circuit board It cuts.
The present invention provides the positioning of PCB core piece and character segmentation method that deviate feature vector based on projection, specific implementations There are many method and approach of the technical solution, the above is only a preferred embodiment of the present invention, it is noted that for this skill For the those of ordinary skill in art field, various improvements and modifications may be made without departing from the principle of the present invention, These modifications and embellishments should also be considered as the scope of protection of the present invention.Each component part being not known in the present embodiment can be used existing Technology is realized.

Claims (6)

1. a kind of positioning of PCB core piece and character segmentation method based on projection differential characteristics vector, which is characterized in that including as follows Step:
Step 1, complete integrated circuit board color image is acquired;
Step 2, according to the integrated circuit board color image of acquisition, two of the black region in integrated circuit board color image are obtained It is worth image, Morphological scale-space and connected domain analysis is carried out for this bianry image, using the rectangular degree of each connected domain to integrated electricity Road chip on board is positioned, and realizes the chip positioning on integrated circuit board;
Step 3, character in the positioning image of chip position is positioned line by line, finds out the position of each line character and by the row Character segmentation comes out, to each line character region carry out projection differential characteristics vector extract, according to the distribution coordinate of feature vector to The distributed area of character zone is measured, realizes and the monocase of multirow character on chip is divided;
Step 2 includes the following steps:
Step 2-1 obtains the bianry image of the black region in integrated circuit board color image;
Step 2-2 selects the structural element of 5*5 to carry out Morphological scale-space to the bianry image of acquisition, successively respectively to image into Row erosion operation, then carry out closed operation;
Step 2-3 carries out connected component labeling to integrated circuit board color image and carries out connected domain analysis;
Step 2-4, is screened according to connected domain analysis, is retained chip area, is obtained the positioning image of chip position;
Step 2-1 includes: by integrated circuit board color image green component G component, blue component B component and red component R points The value differences degree of amount is as the standard for differentiating black region, as shown in formula (1):
In formula, mGFor G component pixel diversity factor, mBFor B component value differences degree, fGFor the G component pixel of pixel, fB For the B component pixel value of pixel, fRFor the R component pixel value of pixel;
If the R component threshold value of integrated circuit board color image black region is that 0.3 pair of image carries out binaryzation, selection is suitably sentenced Determine threshold value M, m is worked as in 0≤M≤1G≤ M and mBWhen≤M, otherwise it is non-black region which, which is black region, obtains PCB figure The bianry image of black region as in.
2. the method according to claim 1, wherein step 2-4 includes:
Step 2-4-1 calculates area features of the number of all pixels point in connected domain as the connected domain, extracts connected domain Far Left, rightmost, the top, nethermost pixel coordinate, the peripheral rectangle of connected domain is obtained according to this four coordinates Frame, while the width and height of peripheral rectangle frame are acquired, as shown in formula (2):
W=xR-xLH=yD-yU (2)
In formula, W is the width of peripheral rectangle, and H is the height of peripheral rectangle, xR、xL、yD、yUIt is the leftmost of connected domain respectively The coordinate of pixel, the coordinate of the pixel of rightmost, the coordinate of uppermost pixel, nethermost pixel coordinate;
Step 2-4-2 acquires the area of peripheral rectangle according to the width of peripheral rectangle and height, the area A of connected domain itself with The ratio of peripheral rectangular area is the rectangular degree J of the connected domain, as shown in formula (3):
Step 2-4-3 chooses suitable size S, deletes the connected domain that area in image is less than S, marks and calculate remaining Each connected domain rectangular degree, choose suitable decision threshold O, as J >=O, the connected domain be chip area, be otherwise non-core Panel region.
3. according to the method described in claim 2, it is characterized in that, step 3 includes the following steps:
Step 3-1 positions the character in the positioning image of chip position line by line, finds out the position of each line character and incites somebody to action The line character is split;
Step 3-2 carries out projection differential characteristics to character in the character zone obtained in step 3-1 and extracts, according to throwing Shadow differential characteristics individually divide character;
Step 3-3 obtains single character picture to segmentation and is normalized, and completes multirow Character segmentation on chip.
4. according to the method described in claim 3, it is characterized in that, step 3-1 includes the following steps:
Step 3-1-1 carries out edge detection to the positioning image of chip position and obtains marginal information image BW, passes through edge detection Extraction obtains the edge pixel point feature information of character, is downwards Y-axis using first pixel in the image upper left corner as origin Direction is to the right X-direction, the edge pixel point of every a line is projected obtain in Y-axis the row pixel projection of Y-direction to Amount, as shown in formula (4), (5):
PY=[PY1 PY2 … PYi … PYm] (5)
Wherein, PYiRefer to projection value of the edge pixel point of the i-th row in Y-axis, m, n respectively refer to the head office of marginal information image BW Several and total columns, i, j respectively refer to the i-th row of marginal information image BW and jth arranges, PYRefer to the row pixel of marginal information image BW Projection vector;
Step 3-1-2 extracts row pixel projection according to the following formula and deviates feature vector:
SY=[SY1 SY2 … SYi … SYm] (8)
Wherein, SYiDeviate characteristic value, S for the pixel projection of the i-th rowYDeviate feature vector for row pixel projection,For each row picture The average value of the Y-axis projection value of vegetarian refreshments;
Step 3-1-3 deviates feature vector realization by row pixel projection and positions to the branch of character portion, character is divided line by line It cuts out: choosing suitable threshold value Z to SYiEvery a line pixel projection deviate characteristic value judged to obtain target area Row coordinate, that is, work as SYiWhen >=Z, retains the target area row coordinate that the corresponding coordinate of row pixel is obtained with this, obtain target area The number in domain and each target area row coordinate section;Quantity statistics are carried out to the siding-to-siding block length of all target areas, are chosen simultaneously Record the most siding-to-siding block length L of frequency of occurrencem, to the siding-to-siding block length L of i-th of target areaiJudged: working as 0.8Lm≤Li≤ 1.2Lm, which is character zone and reservation line coordinate;Conversely, being then other interference regions;According to obtained character area Domain row coordinate carries out segmentation line by line and obtains the segmented image of every line character, on the basis of realizing that branch positions, extracts respectively every The column pixel projection of line character segmented image deviates feature vector, and column pixel projection deviates the extraction such as following formula institute of feature vector Show:
SX=[SX1 SX2 … SXjs … SXN] (12)
Wherein, bw refers to that the uniline character picture obtained after positioning line by line, y, js respectively refer to the row and column of uniline character picture, PXjsRefer to that projection value of the edge pixel point of jth s column in X-axis, M, N respectively refer to total line number of uniline character picture and always arrange Number,For the average value of the X-axis projection value of each column pixel, SXjsRefer to that the pixel projection of jth s column deviates characteristic value, SXRefer to Column pixel projection deviates feature vector, deviates the final positioning that feature vector realizes character by column pixel projection, and it is suitable to choose Threshold value S ' characteristic value deviateed to the pixel projections of each of these column judged to work as S to obtain target area column coordinateXi When >=S', retains the target area column coordinate that the corresponding coordinate of column pixel is obtained with this, obtain the column coordinate area of target area Between, it carries out column direction and divides to obtain final line character segmented image.
5. according to the method described in claim 4, it is characterized in that, step 3-2 includes the following steps:
Step 3-2-1 constructs the projection discrete model P (x') of the bianry image of uniline character in a column direction:
Wherein, B refers to that the bianry image of uniline character, m ', n ' respectively refer to obtain line character segmented image by step 3-1-3 Total line number of binary image and total columns, y ', x ' respectively refer to the y ' row and xth ' column of marginal information image;
Step 3-2-2 extracts the discrete Distribution value abscissa value of projection discrete model, obtains the corresponding position distribution of character zone Coordinate vector X:
X={ x'| P (x') >=p } (14)
Wherein, p is distribution coordinate extracting parameter, 0≤p≤5;
Step 3-2-3 carries out projection differential characteristics vector and extracts:
T=d (X) (15)
T=X (k+1) | t (k)=0 } (16)
Wherein, d (X) indicates that character zone projects differential characteristics vector, and T indicates that single character zone coordinate endpoint, k indicate position The serial number being distributed in coordinate vector, X (k+1) indicate that the coordinate endpoint of+1 character zone of kth, t (k) indicate k-th of character area Each micro component of domain projection differential characteristics vector;
Step 3-2-4, the distribution coordinate vector that differential characteristics vector is projected by extracting uniline character bianry image obtain character The distributed area in region is chosen suitable threshold value D and is judged the distance between the column coordinate section of target area Di: working as Di ≤ D, then two sections in left and right, which are considered as, communicates with each other;Conversely, giving up the section on the left side, continue to judge to the right from the section on the right, It is split according to the coordinate pair image of obtained connecting section, obtains the segmented image of character zone, realize single character point It cuts, finally obtains the single character picture of arranged in sequence.
6. according to the method described in claim 5, it is characterized in that, having been acquired on station in step 1 using industrial camera Whole integrated circuit board color image.
CN201810811416.XA 2018-07-23 2018-07-23 Deviate the positioning of PCB core piece and character segmentation method of feature vector based on projection Active CN108961275B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810811416.XA CN108961275B (en) 2018-07-23 2018-07-23 Deviate the positioning of PCB core piece and character segmentation method of feature vector based on projection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810811416.XA CN108961275B (en) 2018-07-23 2018-07-23 Deviate the positioning of PCB core piece and character segmentation method of feature vector based on projection

Publications (2)

Publication Number Publication Date
CN108961275A CN108961275A (en) 2018-12-07
CN108961275B true CN108961275B (en) 2019-06-21

Family

ID=64464462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810811416.XA Active CN108961275B (en) 2018-07-23 2018-07-23 Deviate the positioning of PCB core piece and character segmentation method of feature vector based on projection

Country Status (1)

Country Link
CN (1) CN108961275B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111709937A (en) * 2020-06-18 2020-09-25 上海网钜信息科技有限公司 Method for detecting pin of circuit board based on machine vision
CN111985508B (en) * 2020-09-01 2023-09-19 安徽萤瞳科技有限公司 Target connected domain shape analysis method suitable for linear array CCD
CN112802029B (en) * 2020-12-28 2024-06-28 无锡奥特维科技股份有限公司 Welding spot positioning method and device
CN113159054A (en) * 2021-04-29 2021-07-23 苏州弘皓光电科技有限公司 Character recognition method based on neural network, computing device and readable medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5978503A (en) * 1996-05-30 1999-11-02 Daewoo Electronics Co., Ltd. Method for recognizing corners of an angular component
US7519888B2 (en) * 2005-09-12 2009-04-14 Virage Logic Corporation Input-output device testing
CN105653013A (en) * 2014-11-10 2016-06-08 安徽华米信息科技有限公司 Multimedia play control method, device and system
CN104463209B (en) * 2014-12-08 2017-05-24 福建坤华仪自动化仪器仪表有限公司 Method for recognizing digital code on PCB based on BP neural network
CN106780440B (en) * 2016-11-29 2019-05-31 北京邮电大学 Destruction circuit plate relic image automatic comparison recognition methods

Also Published As

Publication number Publication date
CN108961275A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
CN108961275B (en) Deviate the positioning of PCB core piece and character segmentation method of feature vector based on projection
CN101358836B (en) Method for recognizing weld spot central position based on computer vision
CN112964724B (en) Multi-target multi-region visual detection method and detection system
CN109726717B (en) Vehicle comprehensive information detection system
CN112766291B (en) Matching method for specific target object in scene image
TW201120806A (en) Method of locating license plate of moving vehicle
CN104331695B (en) A kind of circle marker symbol shape quality detection method of robust
CN105184770B (en) A kind of soldered ball positioning and its parameter identification method for ball grid array pin chip
CN104881665A (en) Chip character identification and verification method and apparatus
CN106485749A (en) A kind of rectangular pins element rough localization method based on angle point
CN106778779A (en) A kind of electric injection molding machine mould detection method
CN107031033A (en) It is a kind of can 3D printing hollow out Quick Response Code model generating method and system
CN108364675A (en) A kind of identification method of food weight and nutrient content based on image recognition
CN102663366A (en) Method and system for identifying pedestrian target
CN104182728A (en) Vehicle logo automatic location and recognition method based on pattern recognition
CN103544489A (en) Device and method for locating automobile logo
CN106874913A (en) A kind of vegetable detection method
CN108709500B (en) Circuit board element positioning and matching method
CN106295491A (en) Track line detection method and device
CN110633635A (en) ROI-based traffic sign board real-time detection method and system
CN104021546B (en) The workpiece online method for rapidly positioning of label based on image procossing
CN104281851A (en) Extraction method and device of car logo information
CN110046618B (en) License plate recognition method based on machine learning and maximum extremum stable region
CN107945190A (en) Bianry image high-speed communication region computational methods
CN106933069B (en) A kind of wafer pre-alignment method

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
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20181207

Assignee: NANJING ZHONGKE RAYCHAM TECHNOLOGY Co.,Ltd.

Assignor: NANJING NORMAL University

Contract record no.: X2020980000689

Denomination of invention: PCB chip positioning and character segmentation method based on projection deviation feature vector

Granted publication date: 20190621

License type: Common License

Record date: 20200313