CN114882520A - Method, system and equipment for detecting circuit diagram and readable storage medium - Google Patents

Method, system and equipment for detecting circuit diagram and readable storage medium Download PDF

Info

Publication number
CN114882520A
CN114882520A CN202210799761.2A CN202210799761A CN114882520A CN 114882520 A CN114882520 A CN 114882520A CN 202210799761 A CN202210799761 A CN 202210799761A CN 114882520 A CN114882520 A CN 114882520A
Authority
CN
China
Prior art keywords
information
wire
electrical component
circuit diagram
connection relation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210799761.2A
Other languages
Chinese (zh)
Other versions
CN114882520B (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.)
Chengdu Xijiao Zhihui Big Data Technology Co ltd
Original Assignee
Chengdu Xijiao Zhihui Big Data Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Xijiao Zhihui Big Data Technology Co ltd filed Critical Chengdu Xijiao Zhihui Big Data Technology Co ltd
Priority to CN202210799761.2A priority Critical patent/CN114882520B/en
Publication of CN114882520A publication Critical patent/CN114882520A/en
Application granted granted Critical
Publication of CN114882520B publication Critical patent/CN114882520B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/40Document-oriented image-based pattern recognition
    • G06V30/42Document-oriented image-based pattern recognition based on the type of document
    • G06V30/422Technical drawings; Geographical maps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • 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/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/15Cutting or merging image elements, e.g. region growing, watershed or clustering-based techniques
    • 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/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/19107Clustering techniques

Abstract

The invention provides a method, a system, equipment and a readable storage medium for detecting a circuit diagram, wherein the method comprises the steps of obtaining image information, wherein the image information comprises a circuit image of at least one lead and at least two electrical components; extracting first information according to the image information, wherein the first information comprises position information of each wire and coordinate information of a boundary frame of the position of each electrical component; determining effective connection linearity between the wires and the electric components corresponding to the wires according to the position information of each wire and the coordinate information of the boundary box of the position of each electric component to obtain effective connection information of the wires; the connection relation matrix of the electrical components is generated according to the effective connection information of each wire, whether the circuit diagram is connected correctly or not is judged according to the connection relation matrix of the electrical components, and whether the circuit diagram is connected correctly or not is judged by generating the connection relation matrix of the electrical components, so that automatic judgment is realized, and manpower and material resources are reduced.

Description

Method, system and equipment for detecting circuit diagram and readable storage medium
Technical Field
The present invention relates to the field of circuit detection technologies, and in particular, to a method, a system, a device, and a readable storage medium for detecting a circuit diagram.
Background
In the prior art, when students take junior high school physics experimental examinations, a plurality of teachers are often needed to judge and grade the circuit connection conditions of a large number of students, a large amount of manpower physics is wasted, in addition, manual grading has high subjectivity, and the fairness and justness of examination grading can not be effectively guaranteed, so that a method for detecting a circuit diagram connected with the students is needed, and the purpose of improving the accuracy of student grading is achieved by guaranteeing the objectivity of student grading.
Disclosure of Invention
It is an object of the present invention to provide a method, system, device and readable storage medium for detecting a circuit diagram to improve the above-mentioned problems. In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
in a first aspect, the present application provides a method of detecting a circuit diagram, the method comprising:
acquiring image information, wherein the image information comprises circuit images of at least one lead and at least two electrical components;
extracting first information according to the image information, wherein the first information comprises position information of each wire and coordinate information of a boundary box of the position of each electrical component;
determining effective connection lines between the wires and the electric components corresponding to the wires according to the position information of each wire and the coordinate information of the boundary box of the position of each electric component to obtain effective connection information of the wires;
and generating an electrical component connection relation matrix according to the effective connection information of each wire, and judging whether the circuit diagram connection is correct or not according to the electrical component connection relation matrix.
In a second aspect, the present application also provides a system for detecting a circuit diagram, the system comprising:
the acquisition module is used for acquiring image information, wherein the image information comprises circuit images of at least one lead and at least two electrical components;
the extraction module is used for extracting first information according to the image information, wherein the first information comprises position information of each wire and coordinate information of a boundary frame of the position of each electrical component;
the determining module is used for determining the effective connection line between the lead and the electric component corresponding to the lead according to the position information of each lead and the coordinate information of the boundary box of the position of each electric component to obtain the effective connection information of the lead;
and the judging module is used for generating an electrical component connection relation matrix according to the effective connection information of each wire and judging whether the circuit diagram connection is correct or not according to the electrical component connection relation matrix.
In a third aspect, the present application further provides a system for detecting a circuit diagram, including:
a memory for storing a computer program;
a processor for implementing the steps of the method of detecting a circuit diagram when executing the computer program.
In a fourth aspect, the present application further provides a readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the above-mentioned method based on detecting a circuit diagram.
The invention has the beneficial effects that:
1. the invention collects the image of the circuit diagram connected by the student, detects the electrical component in the image information through the target detection model to determine the coordinate information of the boundary frame of the position of the electrical component, obtaining all pixel points of the wire in the image information through an image segmentation model, filtering and guiding interference pixel points in all the pixel points through a clustering model to obtain a set of wire pixel points, ensuring the accuracy of the detection circuit image, and finally determining the connection relation between the wire and the component according to the set of the wire pixel points and the coordinate information of the boundary frame of the position of the electrical component, whether the physical experiment connection of the middle school students is correct or not is detected through the algorithm, compared with the prior art, the objectivity of scoring the students is guaranteed, the purpose of improving the scoring accuracy of the students is achieved, and meanwhile, a large amount of manpower and material resources are saved.
2. The invention can judge whether the connection relation between the electrical component and the lead is correct or not through the working state information of the electrical component, provides a standby detection method for the inevitable prediction error after the lead is sent into the segmentation model, and improves the fault tolerance rate of the method.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a schematic flow chart of a method for detecting a circuit diagram according to an embodiment of the present invention;
FIG. 2 is a system diagram of a detection circuit according to an embodiment of the present invention;
fig. 3 is a system structure diagram of the detection circuit diagram according to the embodiment of the present invention.
The labels in the figure are: 701. an acquisition module; 702. an extraction module; 703. a determination module; 704. a judgment module; 7021. a first transmitting unit; 7022. a second transmitting unit; 7023. a first determination unit; 7031. a comparison unit; 7032. a second determination unit; 7033. a first judgment unit; 7041. a first generation unit; 7042. an adjustment unit; 7043. a second generation unit; 7044. a second judgment unit; 70221. a first processing unit; 70222. a second processing unit; 70223. a third processing unit; 800. a device for detecting a circuit diagram; 801. A processor; 802. a memory; 803. a multimedia component; 804. an I/O interface; 805. a communication component.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not construed as indicating or implying relative importance.
Example 1:
the embodiment provides a method for detecting a circuit diagram, which is used for detecting a scene of a junior middle school physics experiment circuit diagram of a student.
Referring to FIG. 1, the method is shown to include step S1, step S2, step S3, and step S4.
S1, acquiring image information, wherein the image information comprises circuit images of at least one lead and at least two electrical components;
it can be understood that the operating desktop of the student is shot by overlooking the camera from top to bottom, so that the circuit diagrams connected by the student are all shown in the shot picture of the camera, a frame of image information acquired by the camera contains the requirement that the image of the lead to be detected is clear enough, if the lead image is blurred and deformed due to lens shaking or other factors, or the lead cannot be identified by human eyes due to dim shooting conditions, or the state between the lead and the lead is not consistent with the actual state due to serious inclination of the lens, the frame of image needs to be discarded, and whether the image meets the detection requirement or not is judged by means of total brightness, blurring degree, chromatic aberration and the like of the image, so that the frame of image information is selected to be used or discarded.
S2, extracting first information according to the image information, wherein the first information comprises position information of each lead and coordinate information of a boundary box of the position of each electrical component;
it can be understood that the target detection is performed on the connected circuit diagram through the target detection model Yolov4, and position coordinates of all the components are obtained. And if the target detection model cannot detect all the components, discarding the frame of image, and acquiring another frame of image containing all the components from the camera, wherein the Yolo (you Only Look one) is a neural network target detection algorithm based on anchor, and the method of CutMix, Mosaic, Self-adaptive and the like is adopted for training. Specifically, the picture may be adjusted to a preset size, for example, 416 × 416 pixels, and then the trained Yolov4 target detection model is input, so as to obtain a rectangular frame with boundaries of each component being x1, y1, x2, and y2, that is, coordinate information of a boundary frame of the position where the electrical component is located, so that the coordinate information of the boundary frame of the position where each electrical component is located is obtained.
It should be understood that Yolov4 used in one embodiment of the present invention is only one of the target detection models, and the target detection algorithm can be classified into one-stage algorithm, such as Yolo algorithm, SSD algorithm, etc., and two-stage algorithm, such as R-CNN algorithm, etc. In multiple tests of an actual environment, Yolov4 is enough to cope with complex scene detection in a physical experiment, and specific parameters such as selection of a feature extraction backbone network, a threshold value of non-maximum suppression, a prior frame and the like in Yolov4 can be adjusted to an ideal value by an experimenter, and no specific requirement is made here.
S3, determining effective connection linearity between the lead and the electric component corresponding to the lead according to the position information of each lead and the coordinate information of the boundary box of the position of each electric component to obtain effective connection information of the lead;
it can be understood that whether the conducting wire intersects with the boundary frame of the position of the electrical component or not can be judged according to the position information of each conducting wire and the coordinate information of the boundary frame of the position of each electrical component, if the intersection point exists, the conducting wire is cut at the boundary frame of the position of the electrical component, the intersection point of the conducting wire and the boundary frame is used as an end point, when two end points of one conducting wire are respectively located at the boundary frames of the positions of two different electrical components, the two end points are judged to be effective end points, and therefore effective connection linearity between the conducting wire and the electrical component is determined.
And S4, generating an electrical component connection relation matrix according to the effective connection information of each lead, and judging whether the circuit diagram connection is correct or not according to the electrical component connection relation matrix.
It can be understood that the wires with effective linearity are screened out according to the effective end points after all the effective end points are screened out, the connection relation between the wires and the components can be obtained through the wires with effective linearity, the connection relation is abstracted to obtain an electrical component connection relation matrix, the relation between each electrical component can be visually judged through the electrical component connection relation matrix, and therefore the technical scheme that a teacher needs to subjectively judge to obtain the student experiment scores in the prior art is replaced.
According to the characteristics, the embodiment can realize automatic detection of the junior middle school physical experiment circuit diagram connected by the student, and judges whether the circuit diagram is correctly connected to serve as the basis for scoring by the teacher, so that the problem that the teacher judges whether the circuit diagram is correctly connected to have inevitable subjectivity is effectively avoided.
In a specific embodiment of the present disclosure, the step S2 may further include a step S21, a step S22, and a step S23.
Step S21, inputting the image information into an image segmentation model to obtain a first pixel point set, wherein the first pixel point set comprises a pixel point set of each wire and an interference point pixel set;
step S22, sending the first pixel point set to a clustering model to filter the interference point pixel set, and obtaining a second pixel point set;
and step S23, obtaining the position information corresponding to each wire based on the second pixel point set.
In this embodiment, all pixel points of a wire in an image are acquired through an image segmentation model Unet, specifically, the image segmentation model Unet predicts a background pixel point as 0 and a guide pixel point as 1, and then segmentation of the pixel points of the wire in a circuit diagram can be realized, wherein Unet is a U-shaped structure image segmentation model using skip-connection, is mainly used for medical image segmentation, and is good in image performance with simple image semantics and a fixed structure, and the circuit diagram wire to be segmented just conforms to the applicable scene of Unet.
It should be understood that the Unet used in one embodiment of the present invention is only one of the image segmentation models, and that other image segmentation models such as pspnet, ocrnet, etc. may be adopted by the experimenter depending on the scene complexity and the number and state of the leads to be detected. Specific parameters such as selection of a backbone network, selection of segmentation categories and selection of the number in the Unet are automatically adjusted to ideal values by experimenters, and no specific requirements are made here.
In a specific embodiment of the present disclosure, the step S22 may further include a step S221, a step S222, and a step S223.
Step S221, performing binarization on the circuit image before the image segmentation model is input;
step S222, inputting the binarized circuit diagram into a clustering model for clustering to obtain clustering information, wherein the clustering information comprises first cluster information and second cluster information, the first cluster information is pixel points with the same numerical values and more quantity, and the second cluster information is pixel points with the same numerical values and less quantity;
step S223, filtering second cluster information included in the cluster information to obtain the second pixel set.
In this embodiment, since the image segmentation model Unet predicts the background pixel point as 0 and the conducting wire pixel point as 1, all the pixel points of the conducting wire need to be set to 255 first, and the background pixel point is set to 0, that is, the binarization of the circuit diagram is performed; and judging the category with the largest quantity as a wire through a DBSCAN clustering model, judging the other categories as noise points, and setting the pixel points of the noise points as 0, namely filtering the noise points.
It is understood that DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a Density-Based Clustering algorithm, i.e., points with close distances are classified into one cluster, points with too far distances are classified into another cluster, and points that are not classified into any cluster are isolated points and Noise points.
In this embodiment, when the wire to be detected is located on the paper surface, the Unet image segmentation model predicts that the pixel points of the wire may be the edge of the paper surface, and false detection of impurities on the table, but since the false pixel points are distributed sparsely, the dbss clustering model can be used as noise points to filter out the noise points, and if objects such as pencils are summarized into a cluster of categories by the dbss, which type of wire is determined and which type of false detection is determined according to the number of pixel points in each cluster of categories.
In a specific embodiment of the present disclosure, the step S3 may further include a step S31, a step S32, and a step S33.
Step S31, comparing the position information of each lead with the coordinate information of the bounding box of the position of each electrical component to obtain a comparison result;
step S32, obtaining the end point information of the boundary frame where the lead and the electrical component corresponding to the lead are located according to the comparison result;
and step S33, judging whether two end points of the lead are positioned in the boundary frames of the positions of the different electrical components according to the end point information to obtain effective connection information of the lead.
In this embodiment, the circuit image convolution kernel is expanded, then eroded, and refined to obtain a continuous and slender wire, so that the comparison between each pixel point of the wire and the coordinate information of the bounding box of the position of the electrical component is performed by traversing, and the position of the endpoint is searched to obtain the endpoint information, in addition, when a student has a condition of cross-connecting the wires, for example: there are two electrical components A, B; two wires M, N, two wires are cross-connected between the electrical component A, B, the coordinate information of the boundary box of the position of the electrical component A, B is not affected, but after the wires are divided, all the pixels of the obtained wires are distributed in a cross and connected manner, therefore, after the division, actually the two wires are identified as one wire due to clustering, and therefore, the effective endpoints M1, M2, N1, N2 are determined as N1, N2, N3, N4 at this time. The interpretation as readable language is: the component A is connected with the component A once through N, the component B is connected with the component B once through B, and the component A is connected with the component B twice through N. If the result is output, the wiring diagram matrix of the electrical component is invalid in practice, when one wire has two effective end points and is positioned on different components, the wire can be screened as a wire with effective wiring, and therefore the crossing condition can be filtered out logically; when students have the condition of connecting wires across electrical components, the wires are divided into two types of conditions, and 1, the long wires are divided and clustered to be judged as two wires; 2. the long wires are divided and clustered to be judged as one wire, and no matter which type of the long wires meets the conditions that only two effective end points exist and the long wires are located on two different components, the long wires can be logically filtered.
In a specific embodiment of the present disclosure, the step S4 may further include a step S41, a step S42, and a step S43.
Step S41, generating a connection relation series chart of the electrical components according to the electrical components;
step S42, adjusting the connection relation table diagram of the electrical components according to the effective connection information of each lead;
and step S43, generating an electrical component connection relation matrix according to the adjusted electrical component connection relation list chart.
In this embodiment, the first row and the first column of the electrical component connection relation list chart are names corresponding to the electrical components, and the arrangement sequence of the electrical components in the first row is the same as the arrangement sequence of the electrical components in the first column, and according to the effective connection information of each wire, whether a connection relation exists between the electrical components and the electrical components can be obtained, wherein if the connection relation exists once, 1 is added to the corresponding position, and if the connection relation exists twice, 2 is added, after the electrical component connection relation list chart is filled, the connection relation can be abstracted into an electrical component connection relation matrix, the connection relation between the electrical components and the electrical components is displayed through the form of the electrical component connection relation matrix, and whether the circuit diagram of the student is correctly connected can be judged visually and quickly.
In a specific embodiment of the present disclosure, the step S4 may further include a step S44.
Step S44, judging whether the connection relation matrix of the electrical components is a symmetric matrix, wherein if the connection relation matrix of the electrical components is the symmetric matrix, judging whether the connection relation matrix of the electrical components is correct, and judging whether the circuit image connection is correct according to the connection relation matrix of the electrical components; and if the connection relation matrix of the electrical components is not a symmetric matrix, acquiring the state information of the electrical components, and judging whether the circuit image is correctly connected or not according to the working state information of the electrical components.
In this embodiment, the electrical component image set may be obtained by cutting the circuit image according to the coordinate information of the bounding box of the position where each electrical component is located, and then sending the electrical component image set to the classification model, to obtain the operating state information of each electrical component, and determining whether the circuit image is correctly connected according to the operating state information, where the classification model is a Resnet18 classification model, specifically: the current meter is obtained with the position frames x1, x2, y1 and y2, and is cut from the original image and sent to an image recognition Resnet18 classifier to extract the current value information displayed on the LED screen. All components have position coordinate information and working state information, wherein the working state information comprises the on-off state of a bulb, the closing state of a switch, voltage value reading information of a voltmeter and current value information of an ammeter.
It can be understood that, because the model has unavoidable prediction error after the wires are sent into the segmentation, and the model also has the influence of illumination, wire crossing or other linear objects in the lens, the effective segmentation result that we can not obtain all the wires is not eliminated, but under the condition, we can not directly obtain the connection condition of the electrical components in place, so a standby method is needed to prove the middle school physics experiment circuit diagram connected by students, the invention judges whether the key connection in the circuit image is correct or not according to the working state information of the electrical components, specifically, the known power specification and bulb specification are prepared in advance, thereby calculating the ideal current value and voltage value after the bulb is connected with the power supply in advance, then continuously reading the readings of the electronic LED ammeter and voltmeter, because the classification model still has errors on the readings of the LED, the reading will "jump" and therefore the condition for determining the ammeter in series with the bulb is: in the case that the bulb is turned on and the switch is closed, the reading of the ammeter in more than half of the given opportunity frame is within the previously calculated error interval of the ideal current value left and right floating, and the bulb is considered to be in a series state. The conditions for judging the parallel connection of the voltmeter and the bulb are as follows: in the case where the bulb is on and the switch is closed, the voltmeter reading in more than half of the given opportunity frame is within the previously calculated tolerance interval around the ideal voltage value, and it is considered as a parallel state. Therefore, whether key connection in the circuit image is correct or not can be judged according to the working state information of the electrical component, the circuit image which cannot be effectively segmented by the lead can be judged through the method, and the fault tolerance rate of the detection circuit diagram is effectively improved.
Example 2:
as shown in fig. 2, the present embodiment provides a system for detecting a circuit diagram, where the system includes an obtaining module 701, an extracting module 702, a determining module 703, and a determining module 704.
The obtaining module 701 is configured to obtain image information, where the image information includes a circuit image of at least one conducting wire and at least two electrical components;
the extracting module 702 is configured to extract first information according to the image information, where the first information includes position information of each wire and coordinate information of a bounding box where each electrical component is located;
the determining module 703 is configured to determine, according to the position information of each wire and the coordinate information of the boundary box of the position where each electrical component is located, an effective connection line between the wire and the electrical component corresponding to the wire, so as to obtain effective connection information of the wire;
the determining module 704 is configured to generate an electrical component connection relation matrix according to the effective connection information of each wire, and determine whether the circuit diagram connection is correct according to the electrical component connection relation matrix.
In a specific embodiment of the present disclosure, the extracting module 702 includes a first sending unit 7021, a second sending unit 7022, and a first determining unit 7023.
The first sending unit 7021 is configured to input the image information into an image segmentation model to obtain a first pixel point set, where the first pixel point set includes a pixel point set of each wire and an interference point pixel set;
the second sending unit 7022 is configured to send the first pixel point set to a clustering model to filter the interference point pixel set, so as to obtain a second pixel point set;
the first determining unit 7023 is configured to obtain, based on the second pixel point set, position information corresponding to each conducting wire.
In a specific embodiment of the present disclosure, the second sending unit 7022 includes a first processing unit 70221, a second processing unit 70222, and a third processing unit 70223.
The first processing unit 70221 is configured to binarize the circuit image to which the image segmentation model is input;
the second processing unit 70222 is configured to input the binarized circuit diagram into a clustering model for clustering, so as to obtain clustering information, where the clustering information includes first cluster information and second cluster information, the first cluster information is pixels with the same numerical values and a large number, and the second cluster information is pixels with the same numerical values and a small number;
the third processing unit 70223 is configured to filter second cluster information included in the clustering information to obtain the second pixel set.
In a specific embodiment of the present disclosure, the determining module 703 includes a comparing unit 7031, a second determining unit 7032, and a first determining unit 7033.
The comparison unit 7031 is configured to compare the position information of each wire with the coordinate information of the bounding box of the position where each electrical component is located, so as to obtain a comparison result;
the second determining unit 7032 is configured to obtain, according to the comparison result, end point information of the boundary frame where the lead and the electrical component corresponding to the lead are located;
the first determining unit 7033 is configured to determine, according to the endpoint information, whether two endpoints of the wire are located in a boundary frame of a location where the different electrical component is located, so as to obtain effective connection information of the wire.
In a specific embodiment of the present disclosure, the determining module 704 includes a first generating unit 7041, an adjusting unit 7042, and a second generating unit 7043.
The first generating unit 7041 is configured to generate an electrical component connection relation table diagram according to an electrical component;
the adjusting unit 7042 is configured to adjust the electrical component connection relation table diagram according to the effective connection information of each of the wires;
the second generating unit 7043 is configured to generate an electrical component connection relationship matrix according to the adjusted electrical component connection relationship tabulation.
In a specific embodiment of the present disclosure, the determining module 704 further includes a second determining unit 7044.
The second determining unit 7044 is configured to determine whether the electrical component connection relationship matrix is a symmetric matrix, where if the electrical component connection relationship matrix is a symmetric matrix, the electrical component connection relationship matrix is determined to be correct, and whether circuit image connection is correct is determined according to the electrical component connection relationship matrix; and if the connection relation matrix of the electrical components is not a symmetric matrix, acquiring the state information of the electrical components, and judging whether the circuit image is correctly connected or not according to the working state information of the electrical components.
It should be noted that, regarding the system in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Example 3:
corresponding to the above method embodiment, an apparatus for detecting a circuit diagram is also provided in this embodiment, and the apparatus for detecting a circuit diagram described below and the method for detecting a circuit diagram described above may be referred to correspondingly.
Fig. 3 is a block diagram of an apparatus 800 illustrating a detection circuit diagram according to an exemplary embodiment. As shown in fig. 3, the apparatus 800 of the detection circuit diagram may include: a processor 801, a memory 802. The device 800 of the detection circuit diagram may further include one or more of a multimedia component 803, an I/O interface 804, and a communication component 805.
The processor 801 is configured to control the overall operation of the apparatus 800 for detecting a circuit diagram, so as to complete all or part of the steps in the method for detecting a circuit diagram. The memory 802 is used to store various types of data to support the operation of the device 800 of the detection circuit diagram, which data may include, for example, instructions for any application or method operating on the device 800 of the detection circuit diagram, as well as application-related data, such as contact data, transceived messages, pictures, audio, video, and so forth. The Memory 802 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia components 803 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving an external audio signal. The received audio signal may further be stored in the memory 802 or transmitted through the communication component 805. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 804 provides an interface between the processor 801 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the device 800 of the detection circuit diagram and other devices. Wireless communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding communication component 805 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the apparatus 800 for detecting a Circuit diagram may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components for performing the above method for detecting a Circuit diagram.
In another exemplary embodiment, a computer readable storage medium comprising program instructions is also provided, which when executed by a processor implement the steps of the method of detecting a circuit diagram described above. For example, the computer readable storage medium may be the memory 802 described above comprising program instructions executable by the processor 801 of the apparatus 800 for detecting circuit diagrams to perform the method for detecting circuit diagrams described above.
Example 4:
corresponding to the above method embodiment, a readable storage medium is also provided in this embodiment, and a readable storage medium described below and a method for detecting a circuit diagram described above may be referred to correspondingly.
A readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of the method of detecting a circuit diagram of the above method embodiment.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method of detecting a circuit diagram, comprising:
acquiring image information, wherein the image information comprises circuit images of at least one lead and at least two electrical components;
extracting first information according to the image information, wherein the first information comprises position information of each wire and coordinate information of a boundary box of the position of each electrical component;
determining effective connection lines between the wires and the electric components corresponding to the wires according to the position information of each wire and the coordinate information of the boundary box of the position of each electric component to obtain effective connection information of the wires;
and generating an electrical component connection relation matrix according to the effective connection information of each wire, and judging whether the circuit diagram connection is correct or not according to the electrical component connection relation matrix.
2. The method of claim 1, wherein generating a matrix of electrical component connections from the active connection information for each of the conductive lines comprises:
generating a connection relation series table diagram of the electrical components according to the electrical components;
adjusting the connection relation series table diagram of the electrical components according to the effective connection information of each wire;
and generating an electrical component connection relation matrix according to the adjusted electrical component connection relation list diagram.
3. The method of claim 1, wherein said extracting first information from said image information comprises:
inputting the image information into an image segmentation model to obtain a first pixel point set, wherein the first pixel point set comprises a pixel point set of each wire and an interference point pixel set;
sending the first pixel point set to a clustering model to filter the interference point pixel set, and obtaining a second pixel point set;
and obtaining the position information corresponding to each wire based on the second pixel point set.
4. The method for detecting a circuit diagram according to claim 1, wherein the determining effective connection between the conducting wire and the electrical component corresponding to the conducting wire according to the position information of each conducting wire and the coordinate information of the bounding box of the position of each electrical component to obtain the effective connection information of the conducting wire comprises:
comparing the position information of each wire with the coordinate information of the boundary frame of the position of each electrical component to obtain a comparison result;
obtaining the end point information of the position of the lead and the position of the electrical component corresponding to the lead at the boundary frame according to the comparison result;
and judging whether two end points of the wire are positioned in the boundary frames of the positions of the different electrical components according to the end point information to obtain effective connection information of the wire.
5. A system for detecting a circuit diagram, comprising:
the acquisition module is used for acquiring image information, wherein the image information comprises circuit images of at least one lead and at least two electrical components;
the extraction module is used for extracting first information according to the image information, wherein the first information comprises position information of each wire and coordinate information of a boundary frame of the position of each electrical component;
the determining module is used for determining the effective connection line between the lead and the electric component corresponding to the lead according to the position information of each lead and the coordinate information of the boundary box of the position of each electric component to obtain the effective connection information of the lead;
and the judging module is used for generating an electrical component connection relation matrix according to the effective connection information of each wire and judging whether the circuit diagram connection is correct or not according to the electrical component connection relation matrix.
6. The system for detecting circuit diagrams according to claim 5, wherein the judging module comprises:
the first generation unit is used for generating an electrical component connection relation series table diagram according to the electrical components;
the adjusting unit is used for adjusting the connection relation table diagram of the electrical component according to the effective connection information of each wire;
and the second generating unit is used for generating an electrical component connection relation matrix according to the adjusted electrical component connection relation list chart.
7. The system for detecting a circuit diagram according to claim 5, wherein the extracting module comprises:
the first sending unit is used for inputting the image information into an image segmentation model to obtain a first pixel point set, and the first pixel point set comprises a pixel point set of each wire and an interference point pixel set;
the second sending unit is used for sending the first pixel point set to a clustering model to filter the interference point pixel set, so as to obtain a second pixel point set;
and the first determining unit is used for obtaining the position information corresponding to each wire based on the second pixel point set.
8. The system for detecting a circuit diagram according to claim 5, wherein said determining module comprises:
the comparison unit is used for comparing the position information of each wire with the coordinate information of the boundary frame of the position of each electrical component to obtain a comparison result;
the second determining unit is used for obtaining the end point information of the position of the lead and the position of the electrical component corresponding to the lead at the boundary frame according to the comparison result;
and the first judgment unit is used for judging whether two end points of the wire are positioned in the boundary frames of the positions of the different electrical components according to the end point information to obtain the effective connection information of the wire.
9. A detection circuit diagram device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method of detecting a circuit diagram as claimed in any one of claims 1 to 4 when executing the computer program.
10. A readable storage medium, characterized by: the readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of detecting a circuit diagram according to any one of claims 1 to 4.
CN202210799761.2A 2022-07-08 2022-07-08 Method, system and equipment for detecting circuit diagram and readable storage medium Active CN114882520B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210799761.2A CN114882520B (en) 2022-07-08 2022-07-08 Method, system and equipment for detecting circuit diagram and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210799761.2A CN114882520B (en) 2022-07-08 2022-07-08 Method, system and equipment for detecting circuit diagram and readable storage medium

Publications (2)

Publication Number Publication Date
CN114882520A true CN114882520A (en) 2022-08-09
CN114882520B CN114882520B (en) 2022-11-11

Family

ID=82683519

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210799761.2A Active CN114882520B (en) 2022-07-08 2022-07-08 Method, system and equipment for detecting circuit diagram and readable storage medium

Country Status (1)

Country Link
CN (1) CN114882520B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106355592A (en) * 2016-08-19 2017-01-25 上海葡萄纬度科技有限公司 Educational toy suite and its circuit elements and electric wires identifying method thereof
US20200005468A1 (en) * 2019-09-09 2020-01-02 Intel Corporation Method and system of event-driven object segmentation for image processing
CN111312023A (en) * 2020-03-20 2020-06-19 上海中科教育装备集团有限公司 Device and method for automatically drawing middle school physics circuit experiment circuit diagram
CN111833353A (en) * 2020-07-16 2020-10-27 四川九洲电器集团有限责任公司 Hyperspectral target detection method based on image segmentation
CN112651984A (en) * 2020-12-31 2021-04-13 深圳开立生物医疗科技股份有限公司 Blood vessel lumen intimal contour extraction method and device, ultrasonic equipment and storage medium
US20210319242A1 (en) * 2020-04-10 2021-10-14 Inception Institute of Artificial Intelligence, Ltd. Dense and Discriminative Neural Network Architectures for Improved Object Detection and Instance Segmentation
CN114004267A (en) * 2020-07-28 2022-02-01 重庆邮电大学 Medical image segmentation algorithm based on level set and fuzzy clustering
CN114240928A (en) * 2021-12-29 2022-03-25 湖南云箭智能科技有限公司 Board quality partition detection method, device and equipment and readable storage medium
CN114549993A (en) * 2022-02-28 2022-05-27 成都西交智汇大数据科技有限公司 Method, system and device for scoring line segment image in experiment and readable storage medium
CN114594520A (en) * 2022-03-21 2022-06-07 深圳市迈测科技股份有限公司 Foreign matter detection device and method
CN114677586A (en) * 2022-03-15 2022-06-28 南京邮电大学 Automatic identification method for physical circuit experiment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106355592A (en) * 2016-08-19 2017-01-25 上海葡萄纬度科技有限公司 Educational toy suite and its circuit elements and electric wires identifying method thereof
WO2018032631A1 (en) * 2016-08-19 2018-02-22 上海葡萄纬度科技有限公司 Teaching toy kit and circuit element and electric wire identification method thereof
US20200005468A1 (en) * 2019-09-09 2020-01-02 Intel Corporation Method and system of event-driven object segmentation for image processing
CN111312023A (en) * 2020-03-20 2020-06-19 上海中科教育装备集团有限公司 Device and method for automatically drawing middle school physics circuit experiment circuit diagram
US20210319242A1 (en) * 2020-04-10 2021-10-14 Inception Institute of Artificial Intelligence, Ltd. Dense and Discriminative Neural Network Architectures for Improved Object Detection and Instance Segmentation
CN111833353A (en) * 2020-07-16 2020-10-27 四川九洲电器集团有限责任公司 Hyperspectral target detection method based on image segmentation
CN114004267A (en) * 2020-07-28 2022-02-01 重庆邮电大学 Medical image segmentation algorithm based on level set and fuzzy clustering
CN112651984A (en) * 2020-12-31 2021-04-13 深圳开立生物医疗科技股份有限公司 Blood vessel lumen intimal contour extraction method and device, ultrasonic equipment and storage medium
CN114240928A (en) * 2021-12-29 2022-03-25 湖南云箭智能科技有限公司 Board quality partition detection method, device and equipment and readable storage medium
CN114549993A (en) * 2022-02-28 2022-05-27 成都西交智汇大数据科技有限公司 Method, system and device for scoring line segment image in experiment and readable storage medium
CN114677586A (en) * 2022-03-15 2022-06-28 南京邮电大学 Automatic identification method for physical circuit experiment
CN114594520A (en) * 2022-03-21 2022-06-07 深圳市迈测科技股份有限公司 Foreign matter detection device and method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
刘见昕等: "视频中运动电车电线的实时自动检测跟踪算法", 《纳米技术与精密工程》 *
张矿等: "基于超像素融合的文本分割", 《计算机应用》 *
邸馨瑶等: "基于优选傅里叶描述子的粘连条锈病孢子图像分割方法研究", 《计算机应用与软件》 *
陈泓宇等: "基于电磁导航的智能车信号检测技术研究", 《电脑与信息技术》 *

Also Published As

Publication number Publication date
CN114882520B (en) 2022-11-11

Similar Documents

Publication Publication Date Title
CN110517246B (en) Image processing method and device, electronic equipment and storage medium
CN114549993B (en) Method, system and device for grading line segment image in experiment and readable storage medium
CN111598164B (en) Method, device, electronic equipment and storage medium for identifying attribute of target object
JP6059486B2 (en) Teacher data verification device, teacher data creation device, image classification device, teacher data verification method, teacher data creation method, and image classification method
CN110348522A (en) A kind of image detection recognition methods and system, electronic equipment, image classification network optimized approach and system
CN109951635A (en) It takes pictures processing method, device, mobile terminal and storage medium
CN110796069B (en) Behavior detection method, system, equipment and machine readable medium
JP2016191589A (en) Defect classification device defect classification method
CN113222913A (en) Circuit board defect detection positioning method and device and storage medium
CN109241962A (en) A kind of character identifying method and device
CN112052730A (en) 3D dynamic portrait recognition monitoring device and method
CN108229281A (en) The generation method and method for detecting human face of neural network, device and electronic equipment
CN114882520B (en) Method, system and equipment for detecting circuit diagram and readable storage medium
CN113033346A (en) Text detection method and device and electronic equipment
CN110796071A (en) Behavior detection method, system, machine-readable medium and device
CN115578739A (en) Training method and device for realizing IA classification model by combining RPA and AI
CN113596354B (en) Image processing method, image processing device, computer equipment and storage medium
CN110827261B (en) Image quality detection method and device, storage medium and electronic equipment
CN111062377B (en) Question number detection method, system, storage medium and electronic equipment
CN114730487A (en) Target detection method, device, equipment and computer readable storage medium
CN113298122A (en) Target detection method and device and electronic equipment
CN115393846B (en) Blood cell identification method, device, equipment and readable storage medium
CN113627430B (en) Cable number detection method and device and electronic equipment
CN113542866B (en) Video processing method, device, equipment and computer readable storage medium
CN113220397B (en) Dynamic change display system based on AOD information screen display

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