CN117523577A - Pin name upper scribing detection method and equipment based on longest horizontal straight line - Google Patents

Pin name upper scribing detection method and equipment based on longest horizontal straight line Download PDF

Info

Publication number
CN117523577A
CN117523577A CN202311573272.6A CN202311573272A CN117523577A CN 117523577 A CN117523577 A CN 117523577A CN 202311573272 A CN202311573272 A CN 202311573272A CN 117523577 A CN117523577 A CN 117523577A
Authority
CN
China
Prior art keywords
line
information
straight line
pin name
pin
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.)
Pending
Application number
CN202311573272.6A
Other languages
Chinese (zh)
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.)
Guangdong Hong Kong Macao Greater Bay Area Guangdong National Innovation Center
Original Assignee
Guangdong Hong Kong Macao Greater Bay Area Guangdong National Innovation Center
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 Guangdong Hong Kong Macao Greater Bay Area Guangdong National Innovation Center filed Critical Guangdong Hong Kong Macao Greater Bay Area Guangdong National Innovation Center
Priority to CN202311573272.6A priority Critical patent/CN117523577A/en
Publication of CN117523577A publication Critical patent/CN117523577A/en
Pending legal-status Critical Current

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
    • 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/1444Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method and equipment for detecting name top scribing of pins based on a longest horizontal straight line. The identification method comprises the following steps: acquiring a pin picture, and preprocessing the pin picture to obtain a picture to be detected; identifying pin name information and digital information of the picture to be tested through an OCR tool; establishing a first target list to record pin name information and digital information; detecting the picture to be detected in a row again according to the pin name information to obtain straight line information; confirming that the straight line information is an upper scribing line of the pin name; and updating the straight line information to the pin name information corresponding to the first target list to obtain the pin name with the scribing line. The secondary identification of the picture to be detected is used for supplementing the upper scribing of the pin name to solve the problem that the upper scribing cannot be identified in the PDF database of the electronic component in the prior art.

Description

Pin name upper scribing detection method and equipment based on longest horizontal straight line
Technical Field
The invention belongs to the technical field of machine vision, and particularly relates to a method and equipment for detecting scribing on a pin name based on a longest horizontal straight line.
Background
The PCB (Printed Circuit Board ) is a carrier for connecting various electronic components, and the electronic component library is a data base of the PCB EDA. The use of PDF data handbooks to help PCB EDA manufacturers build a rich library of components is one of the problems currently being solved by the domestic PCB EDA tools.
It is known that scribing the pin name on a PCB generally has two main roles: first differential pin function: pin name scribe-line may be used to distinguish between different pin functions, particularly on Integrated Circuits (ICs) or other components. By adding a line or other identification to the pin name, the role of the pin, such as power pins, ground pins, data pins, control pins, etc., can be clearly represented. This is important for proper connection of components to the circuit board and for maintaining the functionality of the circuit board. Second, confusion can be prevented: on complex circuit boards, many pins may be very close together, easily causing confusion. By scribing or otherwise identifying the pin name, the likelihood of misconnection or misunderstanding the pin function may be reduced. This helps ensure proper operation of the circuit board and improves the efficiency of repair and maintenance.
These scribe lines typically take different marks and patterns so that engineers, technicians, and repair personnel can easily recognize and understand the pin functions. These marks and lines can be found in the design file and manufacturing specifications of the circuit board to ensure proper routing and connection elements.
Because the existing PDF data manual database creation technology has the problem that the scribing on the names of pins cannot be solved through machine identification, the scribing can only be added by manual secondary checking.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a method and equipment for detecting the name upper scribing of a pin based on the longest horizontal straight line, which are used for solving the problem that the upper scribing cannot be identified in the PDF database construction of electronic components in the prior art.
In one aspect, one embodiment of the present invention provides a method for detecting a scribe line on a pin name based on a longest horizontal straight line, including:
acquiring a pin picture, and preprocessing the pin picture to obtain a picture to be detected;
identifying pin name information and digital information of the picture to be tested through an OCR tool;
establishing a first target list to record pin name information and digital information;
detecting the picture to be detected in a row again according to the pin name information to obtain straight line information;
confirming that the straight line information is an upper scribing line of the pin name;
and updating the straight line information to the pin name information corresponding to the first target list to obtain the pin name with the scribing line.
In one embodiment, the detecting the image to be detected in a line again according to the pin name information to obtain the straight line information includes:
intercepting a detection area of each row of pin names from the picture to be detected;
detecting all horizontal lines in the detection area;
calculating the coordinates of each horizontal line to obtain linear information;
and establishing a coordinate system for the upper left corner of the detection area, taking the upper left corner of the detection area as an original point, taking the vertical direction Y axis of the detection area as an X axis, and calculating the coordinate of each horizontal line according to the coordinate system.
In one embodiment, the identifying, by the OCR tool, the pin name information and the digital information of the picture to be tested includes:
marking a detection frame for each row in the picture to be detected, wherein the detection frame intercepts the serial numbers of pins in the picture to be detected and pin names corresponding to the pins in the horizontal direction;
and obtaining digital information according to the serial numbers of the pins, and obtaining pin name information by the pin names.
In one embodiment:
the detection area is selected as an area of the upper third of the marking frame.
In one embodiment, the calculating the coordinates of each horizontal line, calculating the length of the horizontal line, and obtaining the straight line information includes:
detecting straight line information, and skipping over the straight line information if the Y coordinate of the straight line information is 0;
and calculating the length of the straight line information according to the coordinates of the straight line information, wherein the length of the straight line information is displayed as the measured length as the length of the horizontal line.
In one embodiment, the method further comprises:
calculating the length of all the linear information to obtain all the measured lengths;
screening resulted in the longest measured length.
In one embodiment, the screening results in the longest measured length, including:
calculating the horizontal length of the detection frame to obtain a reference length;
comparing the reference length with a longest measured length;
and when the ratio of the reference length to the measured length is greater than or equal to a preset value, confirming that the straight line information is an upper scribing line of the pin name.
In one embodiment, the method further comprises:
performing graph conversion on the detection area to obtain a binarization graph;
performing edge detection on the binarized graph to obtain a contour graph;
performing bit operation threshold processing on the outline graph, and inverting the outline graph according to the bit to obtain a line graph;
acquiring a transverse line structural element in the line graph, and performing an opening operation on the transverse line structural element to obtain the transverse line graph;
the horizontal line pattern is inverted by bit.
In another aspect, one embodiment of the present invention provides an electronic device, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein the memory has stored thereon at least one computer program, the instructions being executable by the at least one processor to enable the at least one processor to perform the steps of the longest horizontal straight line based pin name scribe-up detection method.
In yet another aspect, one embodiment of the present invention provides a computer storage medium comprising: the computer readable storage medium stores a flow measurement program of an open channel, and when the flow measurement program of the open channel is executed by a processor, the method realizes the steps of the method for detecting the top mark of the pin name based on the longest horizontal straight line.
The embodiment of the invention has the following beneficial effects:
the pin name and the number thereof are obtained through first identification, and input of the first target list to the pin name information and the digital information, namely the pin code, is made. Then, carrying out second identification, and judging whether the pin name is marked with an upper line or not; the method comprises the steps of detecting the area of the pin name in a line to obtain straight line information, and judging and confirming the straight line information as an upper line of the pin name; updating the pin name information in the first target list, and adding a scribing line to the pin name to enable the identified information to be consistent with the information of the picture; thus, a first target list with the upper score matched with the pin picture is obtained, and the problem that the upper score cannot be identified in the PDF data manual database building technology by the existing OCR tool is solved. The method has the advantages that the line drawing detection function is realized on the basis of the original OCR, and the line drawing detection function is applied to the establishment of a component library by using a PDF data manual, so that the help is provided for PCB EDA manufacturers.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of scribe-lane classification on pin names;
FIG. 2 is an overall idea of the invention;
fig. 3 is a flowchart of a method for detecting a scribe line on a pin name based on a longest horizontal straight line according to an embodiment of the present invention;
FIG. 4 is a logic diagram of an identification method according to an embodiment of the present invention;
FIG. 5 is a flow chart of a secondary detection;
FIG. 6 is a schematic diagram of the detection area in FIG. 5;
FIG. 7 is a flow chart of detection zone processing;
FIG. 8 is a schematic diagram of the detection zone processing of FIG. 7;
fig. 9 is a schematic hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, if a directional indication (such as up, down, left, right, front, and rear … …) is involved in the embodiment of the present invention, the directional indication is merely used to explain the relative positional relationship, movement condition, etc. between the components in a specific posture, and if the specific posture is changed, the directional indication is correspondingly changed.
Referring to fig. 1-2, the idea of the present invention is: creating an instance of PaddleOCR, running OCR (optical character recognition) on a pin picture, creating an empty list to store the target, traversing each line in the OCR results, and determining whether the OCR result is a pin name is required because the pin picture contains digital information and pin name information. And if the judging result is the name of the pin, calling an upper scribing detection method, and judging whether an upper scribing exists in the detection frame. If the pin name result is marked with the upper line, adding the upper line mark on the pin name result of OCR recognition, and returning the OCR result added with the upper line mark. Note that the top scribe line in this patent refers to a long top scribe line that completely covers the start point to the end point of the pin name, i.e., the type of long top scribe line in fig. 1. It is further understood that the test results in this patent are only one continuous or no scribe line on the pin name, respectively.
Referring to fig. 3-4, the invention provides a method for detecting a scribe line on a pin name based on a longest horizontal straight line, comprising the following steps:
s100: acquiring a pin picture, and preprocessing the pin picture to obtain a picture to be detected;
s200: identifying pin name information and digital information of the picture to be tested through an OCR tool;
s300: establishing a first target list to record pin name information and digital information;
s400: detecting the picture to be detected in a row again according to the pin name information to obtain straight line information;
s500: confirming that the straight line information is an upper scribing line of the pin name;
s600: and updating the straight line information to the pin name information corresponding to the first target list to obtain the pin name with the scribing line.
The source of the pin picture can be a circuit board of the electronic device or other pin related images. It should be noted that, preprocessing the pin picture refers to cutting out the content part of the chip and deleting the rest of the background, and stretching the pin picture to make the chip to be identified forward in the middle of the picture, and the pins and the numbers thereof in the chip are displayed in a corresponding horizontal manner so as to perform subsequent identification.
The pin name and the number thereof are obtained through first identification, and input of the first target list to the pin name information and the digital information, namely the pin code, is made. Then, carrying out second identification, and judging whether the pin name is marked with an upper line or not; the method comprises the steps of detecting the area of the pin name in a line to obtain straight line information, and judging and confirming the straight line information as an upper line of the pin name; updating the pin name information in the first target list, and adding a scribing line to the pin name to enable the identified information to be consistent with the information of the picture; thus, a first target list with the upper score matched with the pin picture is obtained, and the problem that the upper score cannot be identified in the PDF data manual database building technology by the existing OCR tool is solved.
Referring to fig. 5-6, in one embodiment, the detecting the image to be detected again according to the pin name information to obtain the line information includes:
s410: intercepting a detection area of each row of pin names from the picture to be detected;
s420: detecting all horizontal lines in the detection area;
s430: calculating the coordinates of each horizontal line, and calculating the length of the horizontal line to obtain linear information;
and establishing a coordinate system for the upper left corner of the detection area, taking the upper left corner of the detection area as an original point, taking the vertical direction Y axis of the detection area as an X axis, and calculating the coordinate of each horizontal line according to the coordinate system. The coordinate system is specifically established by taking the upper left corner of the picture as an origin, taking the horizontal right direction as the positive X-axis direction and taking the vertical downward direction as the positive Y-axis direction, and describing the coordinate values by representing the pixel positions of points on the X-axis and the Y-axis.
In one embodiment:
the detection area is selected as an area of the upper third of the marking frame.
And establishing a coordinate system for the intercepted detection area, so as to calculate and obtain the coordinates of the horizontal line. For calculation of the length of the horizontal line.
Specifically, a horizontal line is obtained from a detection area, then the horizontal line is processed by Canny edge detection to obtain an edge result, the coordinates and the length of the detected horizontal line are obtained by Hough line detection, and the length and the coordinates of a line are used.
In one embodiment, the identifying, by the OCR tool, the pin name information and the digital information of the picture to be tested includes:
s201: marking a detection frame for each row in the picture to be detected, wherein the detection frame intercepts the serial numbers of pins in the picture to be detected and pin names corresponding to the pins in the horizontal direction;
s202: and obtaining digital information according to the serial numbers of the pins, and obtaining pin name information by the pin names.
By labeling a specific detection frame, according to the content identification in the detection frame, the identification range is reduced, the identification is accurate, and the identification accuracy is improved.
In one embodiment, the calculating the coordinates of each horizontal line, calculating the length of the horizontal line, and obtaining the straight line information includes:
s431: detecting straight line information, and skipping over the straight line information if the coordinates of the straight line information are located on a Y axis;
s432: and calculating the length of the straight line information according to the coordinates of the straight line information, wherein the length of the straight line information is displayed as the measured length as the length of the horizontal line.
It can be known that, since the upper scribe line is located above the pin name, when the Y-axis coordinate of the line information is 0, the line information can be determined as the upper boundary of the detection frame, instead of the original content of the chip, so that the calculation of the line information is skipped, the possibility of upper scribe line is eliminated, and unnecessary calculation is reduced. When the Y-axis coordinate of the line information is not 0, the line information may be an upper scribe line or a line in the pin name, so that the length of the line information needs to be calculated, and the measured length is obtained to further compare and determine whether the line information is an upper scribe line of the pin name.Specifically, coordinates of two end points of the horizontal line are obtained, and coordinates (x) of the left end point are set 1 ,y 1 ) Coordinates of right end point (x 2 ,y 2 ) The calculation formula is as follows:
in one embodiment, the method further comprises:
s433: calculating the length of all the linear information to obtain all the measured lengths;
s434: screening resulted in the longest measured length.
Similarly, excluding the line which can be confirmed as the upper boundary of the detection frame, the rest horizontal lines have the possibility of being marked up, and the longest line is selected from a plurality of horizontal lines to have the highest possibility of being marked up; the longest measured length obtained by screening a plurality of horizontal lines can be further compared to judge whether the measured length is the upper scribing of the pin name.
In one embodiment, the screening results in the longest measured length, including:
s435: calculating the horizontal length of the detection frame to obtain a reference length;
s436: comparing the reference length with a longest measured length;
s437: and when the ratio of the reference length to the measured length is greater than or equal to a preset value, confirming that the straight line information is an upper scribing line of the pin name.
Since the top scribe line of the pin name is the length containing the entire pin name, the inspection frame frames the entire pin name and has a certain margin gap. Therefore, when the ratio of the reference length to the measured length reaches a preset value, the upper scribe line of the pin name can be confirmed.
Further, the predetermined value is at least 0.6 or more, and when the ratio of the reference length to the measured length is 0.6 or more, it can be confirmed that the horizontal line is an upper scribe line.
Further, when the reference length is equal to the measured length, the straight line information is skipped.
Similarly, the inspection box frames the entire pin name and has a margin gap, and in a typical label, the length of the pin name is longer than the length of the scribe line. If the reference length is equal to the measured length, the horizontal line is not the upper scribing line of the pin name, but the upper frame in the chip, and the frame content of the chip is contained in the area selected by the detection frame.
Referring to fig. 7-8, in one embodiment, the method further includes:
s411: performing graph conversion on the detection area to obtain a binarization graph;
s412: performing edge detection on the binarized graph to obtain a contour graph;
s413: performing bit operation threshold processing on the outline graph, and inverting the outline graph according to the bit to obtain a line graph;
s414: acquiring a transverse line structural element in the line graph, and performing an opening operation on the transverse line structural element to obtain the transverse line graph;
s415: and then inverting the transverse line graph according to the position.
The opening operation of the transverse line structural element is to remove the vertical line in the line graph and reserve the line segment in the horizontal direction.
Specifically, an original image to be detected is converted into a gray level image from an rgb image, after binarization, an edge result is obtained by using Canny edge detection, after bit operation, the image is inverted according to bits, then a Gaussian filter is used for carrying out threshold processing on the image, and then the image is inverted according to bits. And acquiring structural elements of the horizontal line, performing opening operation on the image subjected to threshold processing, inverting the image subjected to opening operation according to the position, and returning to a horizontal line detection result.
By extracting edges and lines from the image. Bit operation thresholding typically separates the background from the lines, then inverts by bit to preserve the lines, while removing background information; and the background information is removed, so that the interference can be reduced, and the accuracy of subsequent image analysis is improved. And by separating and reversing the cross-line structure from the background, the OCR tool can be more easily performed. Which helps to improve the image quality and makes the image more suitable for subsequent processing and analysis.
Canny edge detection is a widely used technique for image processing and computer vision to detect edge structures in images. It was proposed by John Canny in 1986 as a multi-step algorithm for extracting edge features in images. The following are the main steps and features of Canny edge detection: gaussian filtering: first, canny edge detection performs gaussian smoothing filtering on an input image to reduce noise in the image. Gaussian filtering helps to smooth the image and makes subsequent edge detection more accurate. Calculating an image gradient: the Canny algorithm uses Sobel, prewitt or other gradient operators to calculate the gradient and direction of each pixel in the image. This step helps to identify intensity variations in the image. Non-maximum suppression: canny edge detection performs non-maximum suppression of gradient magnitudes in images. This step will remove pixels that are not true edges, leaving only the pixels with the greatest local gradients to get finer edge lines. Dual threshold edge tracking: the Canny algorithm uses two thresholds to identify edge pixels. Pixels having a gradient magnitude exceeding a high threshold are considered strong edges, while pixels having a gradient magnitude between a low threshold and a high threshold are considered weak edges. Then, by connecting the strong edge pixels, a continuous edge line is formed. Edge line thinning: finally, the Canny algorithm refines the edge lines to obtain more accurate edge lines. The main advantages of Canny edge detection include: detail edges can be identified. The true edges in the image can be accurately detected without interference from noise. High quality edge lines are provided, particularly suitable for computer vision applications such as object detection and image segmentation.
Referring to fig. 9, another embodiment of the present invention further provides an electronic device 200, including:
at least one processor 210; the method comprises the steps of,
a memory 220 communicatively coupled to the at least one processor 210 via an electrical bus 230; the memory 220 has stored thereon at least one computer program 240 executable by the at least one processor 210 to enable the at least one processor 210 to perform the steps of the longest horizontal straight line based pin name scribe-up detection method.
It can be understood that the content of the embodiment of the method for detecting the scribe line on the pin name based on the longest horizontal straight line shown in fig. 2 is applicable to the embodiment of the computer device, and the functions of the embodiment of the computer device are the same as those of the embodiment of the method for detecting the scribe line on the pin name based on the longest horizontal straight line shown in fig. 2, and the advantages achieved by the embodiment of the method for detecting the scribe line on the pin name based on the longest horizontal straight line shown in fig. 2 are the same as those achieved by the embodiment of the method for detecting the scribe line on the pin name based on the longest horizontal straight line shown in fig. 2.
The computer-readable storage media of embodiments of the present invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer storage medium, comprising: the computer readable storage medium stores a flow measurement program of an open channel, and when the flow measurement program of the open channel is executed by a processor, the method realizes the steps of the method for detecting the top mark of the pin name based on the longest horizontal straight line. Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider). Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, if "and/or" and/or "are used throughout, the meaning includes three parallel schemes, for example," a and/or B "including a scheme, or B scheme, or a scheme where a and B are satisfied simultaneously. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the invention, and all equivalent structural changes made by the description of the present invention and the accompanying drawings or direct/indirect application in other related technical fields are included in the scope of the invention.

Claims (10)

1. The method for detecting the name upper scribing of the pin based on the longest horizontal straight line is characterized by comprising the following steps of:
acquiring a pin picture, and preprocessing the pin picture to obtain a picture to be detected;
identifying pin name information and digital information of the picture to be tested through an OCR tool;
establishing a first target list to record pin name information and digital information;
detecting the picture to be detected in a row again according to the pin name information to obtain straight line information;
confirming that the straight line information is an upper scribing line of the pin name;
and updating the straight line information to the pin name information corresponding to the first target list to obtain the pin name with the scribing line.
2. The method for detecting the top line of the pin name based on the longest horizontal straight line according to claim 1, wherein the detecting the picture to be detected again in the line according to the pin name information to obtain the straight line information comprises the following steps:
intercepting a detection area of each row of pin names from the picture to be detected;
detecting all horizontal lines in the detection area;
calculating the coordinates of each horizontal line, and calculating the length of the horizontal line to obtain linear information;
and establishing a coordinate system for the upper left corner of the detection area, taking the upper left corner of the detection area as an original point, taking the vertical direction Y axis of the detection area as an X axis, and calculating the coordinate of each horizontal line according to the coordinate system.
3. The method for detecting pin name top line based on longest horizontal straight line according to claim 2, wherein the identifying pin name information and digital information of the picture to be detected by the OCR tool comprises:
marking a detection frame for each row in the picture to be detected, wherein the detection frame intercepts the serial numbers of pins in the picture to be detected and pin names corresponding to the pins in the horizontal direction;
and obtaining digital information according to the serial numbers of the pins, and obtaining pin name information by the pin names.
4. The method for detecting pin name top-line based on longest horizontal straight line according to claim 3, wherein:
the detection area is selected as an area of the upper third of the marking frame.
5. The method for detecting pin name top-line based on longest horizontal straight line according to claim 2, wherein the calculating coordinates of each horizontal line, calculating length of the horizontal line, and obtaining straight line information comprises:
detecting straight line information, and skipping over the straight line information if the Y coordinate of the straight line information is 0;
and calculating the length of the straight line information according to the coordinates of the straight line information, wherein the length of the straight line information is displayed as the measured length as the length of the horizontal line.
6. The method for pin name top-line detection based on longest horizontal straight line according to claim 5, further comprising:
calculating the length of all the linear information to obtain all the measured lengths;
screening resulted in the longest measured length.
7. The method for pin name top-line detection based on longest horizontal straight line according to claim 6, wherein the screening to obtain the longest measurement length comprises:
calculating the horizontal length of the detection frame to obtain a reference length;
comparing the reference length with a longest measured length;
and when the ratio of the reference length to the measured length is greater than or equal to a preset value, confirming that the straight line information is an upper scribing line of the pin name.
8. The method for pin name top-line detection based on longest horizontal straight line according to claim 2, further comprising:
performing graph conversion on the detection area to obtain a binarization graph;
performing edge detection on the binarized graph to obtain a contour graph;
performing bit operation threshold processing on the outline graph, and inverting the outline graph according to the bit to obtain a line graph;
acquiring a transverse line structural element in the line graph, and performing an opening operation on the transverse line structural element to obtain the transverse line graph;
the horizontal line pattern is inverted by bit.
9. An electronic device, comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein the memory has stored thereon at least one computer program executable by the at least one processor to enable the at least one processor to perform the steps of the longest horizontal straight line based pin name scribe-up detection method of any one of claims 1 to 8.
10. A computer storage medium, comprising: the computer-readable storage medium has stored thereon a longest horizontal straight line-based pin name scribe-lane detection program, which when executed by a processor, implements the steps of the longest horizontal straight line-based pin name scribe-lane detection method according to any one of claims 1 to 8.
CN202311573272.6A 2023-11-22 2023-11-22 Pin name upper scribing detection method and equipment based on longest horizontal straight line Pending CN117523577A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311573272.6A CN117523577A (en) 2023-11-22 2023-11-22 Pin name upper scribing detection method and equipment based on longest horizontal straight line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311573272.6A CN117523577A (en) 2023-11-22 2023-11-22 Pin name upper scribing detection method and equipment based on longest horizontal straight line

Publications (1)

Publication Number Publication Date
CN117523577A true CN117523577A (en) 2024-02-06

Family

ID=89749149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311573272.6A Pending CN117523577A (en) 2023-11-22 2023-11-22 Pin name upper scribing detection method and equipment based on longest horizontal straight line

Country Status (1)

Country Link
CN (1) CN117523577A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4500202A (en) * 1982-05-24 1985-02-19 Itek Corporation Printed circuit board defect detection of detecting maximum line width violations
JP2000322463A (en) * 1999-05-13 2000-11-24 Zuken:Kk Automatic circuit symbol generation system
CN102147259A (en) * 2011-01-14 2011-08-10 南京航空航天大学 Ring array magnetic guidance device and method for identifying guidance magnetic label thereof
CN109508676A (en) * 2018-11-14 2019-03-22 武汉万安智能技术有限公司 A kind of Machine Vision Detection algorithm of logical circuitry information extraction
CN110334433A (en) * 2019-07-03 2019-10-15 电子科技大学 A kind of PCB package file automatic generation method
CN111553885A (en) * 2020-04-08 2020-08-18 哈尔滨工业大学 SOT type chip pin parameter detection method based on rollback tree
US20230021319A1 (en) * 2021-11-04 2023-01-26 Beijing Baidu Netcom Science Technology Co., Ltd. Method and apparatus for routing wires on chain quantum chip, and storage medium
CN115656226A (en) * 2022-09-27 2023-01-31 广东粤港澳大湾区国家纳米科技创新研究院 Device and method for detecting defects of insulating layer of conductive copper bar
CN116341478A (en) * 2023-02-16 2023-06-27 北京百度网讯科技有限公司 Quantum chip wiring method, device, equipment and storage medium
CN116468680A (en) * 2023-03-31 2023-07-21 成都数之联科技股份有限公司 Component reverse pole defect detection method, system, equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4500202A (en) * 1982-05-24 1985-02-19 Itek Corporation Printed circuit board defect detection of detecting maximum line width violations
JP2000322463A (en) * 1999-05-13 2000-11-24 Zuken:Kk Automatic circuit symbol generation system
CN102147259A (en) * 2011-01-14 2011-08-10 南京航空航天大学 Ring array magnetic guidance device and method for identifying guidance magnetic label thereof
CN109508676A (en) * 2018-11-14 2019-03-22 武汉万安智能技术有限公司 A kind of Machine Vision Detection algorithm of logical circuitry information extraction
CN110334433A (en) * 2019-07-03 2019-10-15 电子科技大学 A kind of PCB package file automatic generation method
CN111553885A (en) * 2020-04-08 2020-08-18 哈尔滨工业大学 SOT type chip pin parameter detection method based on rollback tree
US20230021319A1 (en) * 2021-11-04 2023-01-26 Beijing Baidu Netcom Science Technology Co., Ltd. Method and apparatus for routing wires on chain quantum chip, and storage medium
CN115656226A (en) * 2022-09-27 2023-01-31 广东粤港澳大湾区国家纳米科技创新研究院 Device and method for detecting defects of insulating layer of conductive copper bar
CN116341478A (en) * 2023-02-16 2023-06-27 北京百度网讯科技有限公司 Quantum chip wiring method, device, equipment and storage medium
CN116468680A (en) * 2023-03-31 2023-07-21 成都数之联科技股份有限公司 Component reverse pole defect detection method, system, equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DELONG ZHAO等: "Vision-based adaptive stereo measurement of pins on multi-type electrical connectors", 《MEASUREMENT SCIENCE AND TECHNOLOGY》, vol. 30, no. 10, 8 August 2019 (2019-08-08), pages 1 - 19, XP020343391, DOI: 10.1088/1361-6501/ab198f *
汪帮富: "嵌入式PCB钻床数控系统的研究和开发", 《中国优秀硕士学位论文全文数据库 工程科技I辑》, no. 12, 15 December 2005 (2005-12-15), pages 022 - 203 *
谢聪: "基于统一数据定义的PCBA三维模型快速构建技术研究与软件开发", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 5, 15 May 2021 (2021-05-15), pages 135 - 251 *

Similar Documents

Publication Publication Date Title
WO2018068415A1 (en) Detection method and system for wrong part
JP5699788B2 (en) Screen area detection method and system
CN104718428B (en) Inspection, measurement apparatus and the program of pattern
CN111179243A (en) Small-size chip crack detection method and system based on computer vision
US8577124B2 (en) Method and apparatus of pattern inspection and semiconductor inspection system using the same
TWI480967B (en) Method for building rule of thumb of defect classification, and methods for classifying defect and judging killer defect based on rule of thumb and critical area analysis
CN109472271B (en) Printed circuit board image contour extraction method and device
US20080205769A1 (en) Apparatus, method and program product for matching with a template
CN113344857B (en) Defect detection network training method, defect detection method and storage medium
JP2007114828A (en) Image processing apparatus and image processing method
CN110135225B (en) Sample labeling method and computer storage medium
CN107016394B (en) Cross fiber feature point matching method
JP2009223414A (en) Matching degree computing device and method, program
CN115880520A (en) Defect grade classification method and system based on template matching and defect segmentation
CN105354816B (en) A kind of electronic units fix method and device
CN112419260A (en) PCB character area defect detection method
CN116168218A (en) Circuit board fault diagnosis method based on image recognition technology
CN115690670A (en) Intelligent identification method and system for wafer defects
CN106530273B (en) High-precision FPC (Flexible printed Circuit) linear line detection and defect positioning method
CN113705564B (en) Pointer type instrument identification reading method
CN113744252A (en) Method, apparatus, storage medium and program product for marking and detecting defects
CN114627113B (en) Method, system, device and medium for detecting defects of printed circuit board
CN113822836A (en) Method of marking an image
CN117523577A (en) Pin name upper scribing detection method and equipment based on longest horizontal straight line
CN116559177A (en) Defect detection method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination