Synthetic method and apparatus for circuit board image sample, and computer device
Patent Information
- Application Number
- PCT/CN2023/085630
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-10-03
Smart Images

Figure CN2023085630_03102024_PF_FP_ABST
Abstract
Description
SYNTHETIC METHOD AND APPARATUS FOR CIRCUIT BOARD IMAGE SAMPLE, AND COMPUTER DEVICETECHNICAL FIELD
[0001] This application relates to the field of circuit boards, in particular to a synthetic method and apparatus for a circuit board image sample, a computer device and a storage medium.BACKGROUND
[0002] Manually inserting through hole components into a printed circuit board (PCB) is an important step in a manufacturing process of PCB assembly (PCBA) . Visual inspection of component placement is performed to detect errors in a manual insertion process to avoid costly rework. In order to reduce manual effort in visual inspection, technologies based on computer vision and artificial intelligence have been developed to assist in a component placement inspection process. A computer vision technology based on deep learning for PCBA detection requires a large quantity of annotated images for artificial intelligence model training. In addition, PCBA image collection and image annotation are both labor intensive and time consuming, especially for those defective PCBA with component placement errors. At present, there is an urgent need to develop an automatic technology to reduce manual workload of PCBA image acquisition and image annotation, and improve training efficiency of artificial intelligence models for PCBA quality detection.
[0003] SUMMARY
[0004] The Summary is provided to introduce some selected concepts in a simplified form, which will be further described in the Detailed Description below. The Summary is not intended to identify any key or necessary features of a subject matter claimed for protection, nor is it intended to be used to help determine the scope of the subject matter claimed for protection.
[0005] Based on this, this application provides a synthetic method for a circuit board image sample, including: obtaining an image of a first circuit board and an image of a standard circuit board; selecting a first component of the first circuit board, and replacing an image of the first component on the standard circuit board with an image of the first component on the first circuit board to obtain an image of a second circuit board; and outputting the image of the second circuit board.
[0006] Through the above implementations, a large quantity of circuit board image samples with error cases may be generated, which facilitates artificial intelligence or machine learning, and may also enrich the quantity of circuit boards with respect to error samples.
[0007] Further, before selecting a first component of the first circuit board, the method further includes: establishing a mapping relationship between physical coordinates and pixel coordinates; and matching and overlapping the image of the first circuit board and the image of the standard circuit board.
[0008] Through the above implementations, matching may be completed between the images, and matching and comparing between an actual component and the components in the images are facilitated. In addition, an image of the first component may further be conveniently and effectively extracted from the images of the first circuit board and the standard circuit board.
[0009] Further, the selecting a first component of the first circuit board, includes: selecting the first component from a drawing file of the first circuit board.
[0010] Through the above implementations, any component in the circuit board may be conveniently selected, so as to synthesize a circuit board image with a related component.
[0011] Further, the replacing an image of the first component on the standard circuit board with an image of the first component on the first circuit board, includes: choosing the image of the first component on the first circuit board and the image of the first component on the standard circuit board; and performing tone unification processing on the image of the first circuit board according to the image of the standard circuit board.
[0012] Through the above implementations, the image of the first circuit board may be processed, so that a synthesized photo is more natural and coordinated, and artificial intelligence, and algorithm learning and usage are facilitated.
[0013] This application further provides a synthetic apparatus for a circuit board image sample, including: an image capturing module, configured to obtain an image of a first circuit board and an image of a standard circuit board; an image synthesizing module, configured to select a first component of the first circuit board, and replace an image of the first component on the standard circuit board with an image of the first component on the first circuit board to obtain an image of a second circuit board; and an image outputting module, configured to output the image of the second circuit board.
[0014] This application further provides a computer device, including a memory and a processor, the memory storing a computer program, and the processor, when executing the computer program, implementing the above method.
[0015] This application further provides a computer readable storage medium, storing a computer program thereupon, the computer program, when executed by a processor, implementing the above method.
[0016] This application further provides a computer program product, tangibly stored on a computer-readable medium and including a computer executable instruction, the computer executable instruction, when executed, enabling at least one processor to execute the above method.BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The implementation of the present disclosure is illustrated in a form of examples rather than limitations in accompanying drawings, and similar reference numerals in the accompanying drawings indicate identical or similar components.
[0018] FIG. 1 is a schematic diagram of an application scenario according to an implementation of this application.
[0019] FIG. 2 is a schematic flowchart of a synthetic method for a circuit board image sample according to an implementation of this application.
[0020] FIG. 3 is a schematic diagram of a synthetic apparatus for a circuit board image sample according to an implementation of this application.
[0021] FIG. 4 is a schematic diagram of a computer device for synthesis of a circuit board image sample according to an implementation of this application.
[0022] FIG. 5 is a schematic diagram of an apparatus for circuit board detection according to an implementation of this application.
[0023] Reference numerals are as follows:
[0024] 101-103 Module
[0025] S201-S203 Step
[0026] 300: Apparatus
[0027] 301: Module
[0028] 302: Module
[0029] 303: Module
[0030] 400: Computer device
[0031] 402: Processor
[0032] 404: Memory
[0033] 500: Apparatus
[0034] 501: Module
[0035] 502: Module
[0036] 503: ModuleDETAILED DESCRIPTION
[0037] In the following specification, a large quantity of specific details are set forth for explanatory purposes. However, it can be understood that the implementation of the present disclosure may be implemented without these specific details. In other examples, well-known circuits, structures and techniques are not shown in detail to avoid affecting the understanding of the specification.
[0038] The references throughout the specification to “an implementation” , “implementation” , “exemplary implementation” , “some implementations” , “various implementations” and the like indicate that the described implementation of the present disclosure may include specific features, structures or characteristics. However, it is not necessary to say that each implementation needs to contain these specific features, structures or characteristics. In addition, some implementations may have some or all of the features described for other implementations, or may not have features described for other implementations.
[0039] In the following description, terms “coupling” and “connection” and their derivatives may be used. It needs to be understood that these terms are not intended to be synonymous with each other. On the contrary, in a specific implementation, “connection” is used for indicating that two or more components are in direct physical or electrical contact with each other, while “coupling” is used for indicating that two or more components collaborate or interact with each other, but they may or may not be in direct physical or electrical contact. FIG. 1 is a flowchart of a method generated according to an implementation of this application.
[0040] Images of PCBA with through hole components inserted are usually manually collected by operators after manually inspecting the PCBA. In production practice, the quantity of the images of PCBA with component placement errors is limited, which means that it is difficult to collect a large quantity of defective PCBA images with the component placement errors. In order to solve this problem, people have developed a synthetic defect PCBA image generation technology. A synthetic image of defective PCBA is generated by slightly moving or rotating components of interest in correctly assembled PCBA images. The components of interest are automatically detected in the images through their corner points. The disadvantage of this method is that when there are a plurality of components in a PCBA image, it may be difficult to locate the components of interest.
[0041] An application scenario of the implementation of this application may be as follows: a method and system for generating a synthetic defective PCBA image may be used not only for artificial intelligence model training, but also for computer vision and PCBA component placement detection based on artificial intelligence, so as to ensure that PCBA components meet installation quality requirements. The synthetic defective PCBA image may be used for training intelligent algorithms in a processing and display device, or the corresponding synthetic defective PCBA image may be stored in the processing and display device and used for being compared with images captured by a camera, so that insertion errors of the components are detected. FIG. 1 shows a schematic diagram of such a PCBA component placement detection system. A PCBA 103 is placed on a work bench, a camera or photographing device 101 with a 90-degree angle of view is used to observe the component downward to obtain its image, and then, an algorithm of an implementation of this application in, for example, a detection and recognition module 102 is utilized to inspect for missing or misaligned components on a PCB, thereby correspondingly classifying the PCBA as qualified or unqualified. Further, the processing and display device may include the detection and recognition module 102. The above implementation may be that the processing and display device transmits a signal, such as a capturing signal, to the camera, and feeds back an image to the processing and display device after capturing of the camera. The processing and display device may display whether there are component insertion errors in the PCBA after comparing and judging.
[0042] In view of the above problems, this application provides a solution, which is to provide a more accurate and flexible method and system for generating a synthetic defective PCBA image for computer vision and PCBA quality detection based on artificial intelligence. A synthetic method for a circuit board image sample, as shown in FIG. 2, includes:
[0043] S201. Obtain an image of a first circuit board and an image of a standard circuit board.
[0044] In some implementations, the first circuit board may be a blank printed circuit board without inserted components, or all the components may be inserted into the first circuit board, but all the components are installed in a direction opposite to a correct component installation angle, or the first circuit board is correctly installed, but through a 180-degree transition during capturing or through some angle transition, an image of a disguised or incorrect component insertion mode is indirectly formed. The first circuit board may be understood as a background board that requires extracting a photo of a component from an image of the background board and then replacing it to a corresponding location on the image of another circuit board.
[0045] The standard circuit board is a circuit board that is completely installed correctly, and its role is to provide a template-type and standard-type circuit board with all components correctly installed. During capturing, in order to obtain an image when the components are completely installed correctly, it also serves as a template and standard, and prepares for subsequent synthesis of the image of another circuit board and the image of the standard circuit board.
[0046] The above obtaining behavior may include capturing currently or retrieving images previously captured and stored to obtain the image of the first circuit board and the image of the standard circuit board.
[0047] S202. Select a first component of the first circuit board, and replace an image of the first component on the standard circuit board with an image of the first component on the first circuit board to obtain an image of a second circuit board.
[0048] In some implementations, selecting the first component of the first circuit board is to select some components of interest, or some components for generating synthetic image samples. The first component has a corresponding insertion location or design location both on the first circuit board and the standard circuit board. Since the image of the first circuit board is different from the image of the standard circuit board, images of the first component in two different insertion states may be found in the image of the first circuit board and the image of the standard circuit board.
[0049] After selecting the first component, the image of the first component on the first circuit board and the image of the first component on the standard circuit board are extracted respectively. In some implementations, since there is a vacant location without inserted components in the first circuit board, the image of the first component on the first circuit board may be a vacant printed circuit board body; or it may be a first component inserted in the opposite direction in the first circuit board, that is, the image of the first component on the first circuit board is an insertion pattern with an opposite direction. Because the images of the standard circuit board are all inserted and captured correctly, the image of the first component on the standard circuit board is also a correct insertion pattern of the first component.
[0050] Subsequently, in the image of the standard circuit board, the image of the first component on the standard circuit board is replaced with the image of the first component on the first circuit board to obtain the image of the second circuit board containing insertion errors of the first component and synthesized based on the image of the standard circuit board. Through the above mode, circuit board images of different types of installation errors may be manually designed or synthesized for the same first component.
[0051] Further, the second circuit board is not a real circuit board, but the image of the second circuit board synthesized through the image of the first circuit board and the image of the standard circuit board. For ease of calling and understanding, the synthesized image is called as the image of the second circuit board. Further, the implementation of this application is based on the image of the standard circuit board to synthesize the image of the circuit board containing components with insertion errors by replacing the image containing the components with the insertion errors.
[0052] S203. Output the image of the second circuit board.
[0053] Subsequently, the above replaced image of the standard circuit board, namely the image of the second circuit board, serves as a synthesized circuit board image containing insertion errors of the first component to be output for storage or for use in artificial intelligence or algorithm learning.
[0054] Through the above mode, circuit board images with different types of installation errors may be obtained for the same first component through manual design or synthesis, thereby enriching the quantity of circuit board insertion error images, more samples and comparisons are provided for error detection, and it is conducive to detecting insertion errors of the components during machine inspection of the circuit boards.
[0055] Further, before selecting a first component of the first circuit board, the method further includes: a mapping relationship between physical coordinates and pixel coordinates is established.
[0056] In some implementations, it is necessary to establish the relationship and a contact between the real physical coordinates and the image pixel coordinates, such as, in real physical plane coordinates, circuit boards and components are both measured in millimeters, while in images, the circuit boards and the components are measured in pixels. Therefore, it is necessary to determine a certain conversion relationship or proportional relationship between the physical coordinates and the pixel coordinates, that is, there is a certain conversion proportional relationship between the millimeters and the pixels, for example, 1 millimeter corresponds to 2 pixels in the image, so that a conversion relationship between a reference length and a unit of measurement may be provided after the first component is selected from other design files and then extracted from the images subsequently.
[0057] The image of the first circuit board and the image of the standard circuit board are matched and overlapped.
[0058] In some implementations, it is necessary to overlap the image of the first circuit board with the image of the standard circuit board. Due to size and dimension errors caused by a capturing focal length and a device itself, it is necessary to overlap and match the entire first circuit board with the entire standard circuit board. For example, it may be to overlap a though hole at a component insertion location of the first circuit board with a through hole at a component insertion location of the standard circuit board. In some implementations, the first circuit board and the standard circuit board are circuit boards of the same dimension, or circuit boards of the same scale and model. Apertures, locations and the like of components on the first circuit board and the standard circuit board are the same. Therefore, overlapping the image of the first circuit board with the image of the standard circuit board is to overlap locations, angles and dimension parameters of each component in the first circuit board and the standard circuit board, thereby facilitating image extraction and replacement of the first component in the later stage.
[0059] Further, the selecting a first component of the first circuit board includes: the first component is selected from a drawing file of the first circuit board.
[0060] In some implementations, the first component is selected from the drawing file of the first circuit board, such as a computer aided drafting (CAD) file. The CAD file is a software simulation file about the first circuit board, depicts a specific situation of each component on the first circuit board, and records the location, dimension and orientation of the first component in detail. For example, in the drawing file, the related components are all measured in units of length, such as millimeters. After selecting the first component, detailed information such as corresponding location, dimension or orientation may be obtained, so as to facilitate subsequent corresponding extraction from the image of the first circuit board and the image of the standard circuit board. The drawing file only needs to be a drawing file of a circuit board of the same model as the first circuit board and the standard circuit board. Because the circuit board of this model, including the first circuit board and a drawing circuit board, is produced and molded based on the drawing file, so parameters of the unified drawing file are taken as standards in terms of component insertion locations and related parameters.
[0061] Further, the replacing an image of the first component on the standard circuit board with an image of the first component on the first circuit board, includes:
[0062] the image of the first component on the first circuit board and the image of the first component on the standard circuit board are chosen. In some implementations, the first component is selected from the CAD file, after obtaining corresponding parameters of the first component, images corresponding to the first component are searched and extracted from the image of the first circuit board and the image of the standard circuit board respectively, then the image of the first component on the first circuit board is replaced to the location of the image of the first component on the standard circuit board, and the images at other locations of the standard circuit board are kept unchanged.
[0063] Further, tone unification processing is performed on the image of the first circuit board according to the image of the standard circuit board.
[0064] In some implementations, tone unification processing is performed on the image of the first component on the first circuit board according to the image of the standard circuit board, in order to achieve that when the image of the first circuit board is merged and placed on the image of the standard circuit board, there is no distortion or significant image difference, during artificial intelligence or algorithm learning, learning may be performed as for the insertion errors of the components themselves, and it may not be affected by other factors such as tones of the images.
[0065] In some implementations, the implementation of this application includes three main parts, namely a real PCBA image acquisition module (module 1) , a synthetic defective PCBA image generation module (module 2) and a result output module (module 3) . Real PCBA images are acquired by a camera firstly. Next, a synthetic PCBA image with simulated component placement errors is generated by using PCBA CAD design data and the real PCBA images. Finally, a synthetic defective PCBA image is displayed on a computer display of the result output module.
[0066] In some implementations, the real PCBA image acquisition module has five processing steps, described as follows.
[0067] 1.1 Camera set and calibration.
[0068] A camera is set for image acquisition, and camera calibration is executed by using a chess board to obtain conversion between world coordinates and image coordinates.
[0069] 1.2 Background PCBA image acquisition.
[0070] Images of PCBA with no through hole component placed are obtained by using the camera, and the images will be used as background images.
[0071] 1.3 Golden sample PCBA image acquisition.
[0072] Images of the same PCBA with all through hole components inserted correctly are obtained by using the same camera, and taken as golden sample images.
[0073] 1.4 Image distortion correction of background images and golden sample PCBA images.
[0074] An image processing technology is applied to correct lens distortion of the background images and the golden sample images.
[0075] 1.5 Image registration between background and golden sample PCBA images.
[0076] An image processing technology is applied to align the background images and the golden sample images.
[0077] In some implementations, the synthetic PCBA image generation module has five processing steps, described as follows.
[0078] 2.1 Load CAD data for PCBA design.
[0079] A CAD design file is loaded to PCB design software, such as a Gerber file for PCBA design.
[0080] 2.2 Specify a component of interest.
[0081] The component of interest is manually specified, and physical information of the component of interest, such as the location, dimension and orientation, is obtained from the CAD design file of PCBA.
[0082] 2.3 Obtain a region of interest (ROI) image of the component of interest from the background images and the golden sample images.
[0083] Conversion between the world coordinates and the image coordinates is used to obtain the ROI image of the component of interest from the background and golden sample images, and these images are obtained from camera calibration in 1.1 above.
[0084] 2.4 Apply an image operation to the ROI image of the golden sample images to simulate component placement errors, such as a missing component and a rotation component.
[0085] Different operations are applied to the ROI image of the golden sample images to simulate simulation errors of different types. For example, for the missing component, the ROI image of the golden sample images will be replaced with a corresponding ROI image of the background images. For a component with 180-degree rotation, the ROI image of the golden sample images may also be rotated by 180 degrees, or be replaced with the ROI image of the background images.
[0086] 2.5 Perform post processing to obtain the synthetic defective PCBA image.
[0087] An image processing technology is applied, such as image blending, to blend the ROI images in the background images or the golden sample images and remove ROI from the golden sample images. The generated image is a PCBA image that is more consistent with photo authenticity, and simulates placement errors of the components.
[0088] Technical characteristics
[0089] The method and system for generating the synthetic PCBA image of this application use a computer vision and an image processing technology to automatically generate a PCBA image with simulated component placement errors. The advantages of the technical characteristics are as follows: compared with a traditional method of manually collecting and labeling real defective PCBA images, the implementation of this application can help overcome limitations of the real defective PCBA in terms of data volume and error types. The implementation of this application can efficiently and flexibly generate a large quantity of defective PCBA images with simulated placement errors of different types, such as missing, rotation and misaligned components. It may also be applied to any component on a PCB.
[0090] Specifically, the commercial impact of the advantages: the method and system for generating automatic synthetic defective PCBA images of the implementation of this application can help reduce the time, effort and cost of image collection and labeling in artificial intelligence model training, so as to develop computer vision and artificial-intelligence-based PCBA component placement detection solutions. At the same time, the implementation of this application allows the use of annotated mixtures of real and synthetic images to train artificial intelligence models for PCBA component placement, so as to better generate new test cases.
[0091] It is to be understood that although the steps in the flowchart of FIG. 2 are displayed sequentially as indicated by arrows, these steps are not necessarily executed sequentially in the sequence indicated by the arrows. Unless explicitly stated in this article, there are no strict sequence restrictions for the execution of these steps, and these steps may be executed in other sequences. Moreover, at least part of steps in FIG. 1 may include a plurality of steps or a plurality of stages, these steps or stages are not necessarily completed at the same moment, but may be executed at different moments, and the execution sequence of these steps or stages is not necessarily sequential, but may be executed alternately or alternatively with other steps or at least part of the steps or stages in other steps.
[0092] FIG. 3 provides a synthetic apparatus 300 for a circuit board image sample. The apparatus 300 includes: an image capturing module (301) , configured to obtain an image of a first circuit board and an image of a standard circuit board; an image synthesizing module (302) , configured to select a first component of the first circuit board, and replace an image of the first component on the standard circuit board with an image of the first component on the first circuit board to obtain an image of a second circuit board; and an image outputting module (303) , configured to output the image of the second circuit board.
[0093] Further, the image capturing module (301) is further configured to establish a mapping relationship between physical coordinates and pixel coordinates, and
[0094] match and overlap the image of the first circuit board and the image of the standard circuit board.
[0095] Further, the image synthesizing module (302) is configured to select the first component from a drawing file of the first circuit board.
[0096] Further, the image synthesizing module (302) is configured to choose the image of the first component on the first circuit board and the image of the first component on the standard circuit board, and perform tone unification processing on the image of the first circuit board according to the image of the standard circuit board.
[0097] The apparatus may contain more or less modules to realize the described functions. For example, at least one module in FIG. 3 may be further divided into a plurality of different submodules, and each submodule is configured to execute at least part of operations described herein in conjunction with the corresponding modules. In addition, in some examples, the apparatus 300 may further include additional modules for executing other operations already described in the specification. In addition, a person skilled in the art may understand that the exemplary apparatus 300 may be implemented in software, hardware, firmware or any combination thereof.
[0098] FIG. 4 provides a computer device. According to an implementation, the computer device 400 may include a processor 402, and the processor 402 executes a computer program stored on a memory 404. The computer program, when executed by a processor, implements the above method.
[0099] A person skilled in the art may understand that a structure shown in FIG. 3 is only a block diagram of part of structures related to the solution of this application, and constitutes no limitation to the computer device to which this application applies, and the computer device specifically may include more or less components than those shown in the figure, or may combine some components, or have different component arrangements.
[0100] A person of ordinarily skilled in the art may understand that all or part of flows in the method of the above implementations may be completed by instructing related hardware through a computer program that may be stored in a nonvolatile computer readable storage medium. The computer program, when executed, may include the flows of each implementation of the above method. Any reference to a memory, storage, a database or other media used in each implementation provided by this application may include at least one of nonvolatile or volatile memories. The nonvolatile memory may include a read-only memory (ROM) , a magnetic tape, a floppy disk, a flash memory, an optical memory or the like. The volatile memory may include a random access memory (RAM) or an external cache memory. As an illustration, rather than a limitation, the RAM may take various forms, such as a static random access memory (SRAM) , a dynamic random access memory (DRAM) or the like.
[0101] This application further provides a computer-readable storage medium, storing a computer program thereupon, the computer program, when executed by a processor, implementing the above steps.
[0102] This application further provides a computer program product, tangibly stored on a computer-readable medium and including a computer executable instruction, the computer executable instruction, when executed, enabling at least one processor to execute the above method.
[0103] Further, the computer program may be stored and run in a cloud to execute the method. Further, components of the program may be distributed on a plurality of devices and clouds, or may also be distributed and run on the local computer. For example, corresponding steps may be distributed and run on a local computer, or run on different cloud devices to transmit signals through communication connections. This application does not limit the modes or methods, may flexibly layout and deploy corresponding technologies, and make full use of devices and technologies such as clouds, big data and supercomputing capabilities to execute and complete the methods.
[0104] This application further provides a method for circuit board detection, including: a circuit board image is captured; and the circuit board image is compared with a circuit board image synthesized by the above method to judge whether the circuit board image has defects.
[0105] Through the implementation of this application, a fault of a circuit board may be judged, so as to judge whether the quality of the circuit board is good or bad.
[0106] As shown in FIG. 5, this application further provides an apparatus (500) for circuit board detection, including: a detection capturing module (501) , configured to capture a circuit board image; and a detection recognizing module (502) , configured to compare the circuit board image with a synthetic circuit board image of any apparatus above, to judge whether the circuit board image has defects. 503 represents a work bench and a PCB placed on the work bench.
[0107] Further, an application scenario of the apparatus for circuit board detection may be as follows: a method and system for generating a synthetic defective PCBA image may be used not only for artificial intelligence model training, but also for computer vision and PCBA component placement detection based on artificial intelligence, so as to ensure that PCBA components meet installation quality requirements. FIG. 5 shows a schematic diagram of such a PCBA component placement detection system. A PCBA is placed on a work bench, a camera with a 90-degree angle of view is used to observe the component downward to obtain its image, and then, an algorithm of the implementation of this application in a processing and display device is used to inspect a location of the component. Missing or misaligned components on the PCB may be recognized by the algorithm, and the PCBA is classified as qualified or unqualified correspondingly. In the above implementation, the synthetic defective PCBA image may be used for training intelligent algorithms in the processing and display device, or the corresponding synthetic defective PCBA image may be stored in the processing and display device and used for being compared with images captured by a camera, so that insertion errors of the components are detected. Specifically, the processing and display device transmits a signal, such as a capturing signal, to the camera, and feeds back an image to the processing and display device after capturing of the camera. The processing and display device may display whether there are component insertion errors in the PCBA after comparing and judging.
[0108] Some implementations of the present disclosure may include products. The products may include a storage medium, which is used for storing logics. Examples of the storage medium may include one or more types of computer-readable storage media capable of storing electronic data, including volatile or nonvolatile memories, removable or non removable memories, erasable or non erasable memories, writable or rewritable memories, and the like. Examples of the logics may include various software units, such as software components, programs, applications, computer programs, application programs, system programs, machine programs, operating system software, middleware, firmware, software modules, routines, subroutines, functions, methods, procedures, software interfaces, application program interfaces (APIs) , instruction sets, computational codes, computer codes, code segments, computer code segments, words, values, symbols, or any combination thereof. In some implementations, for example, the products may store an executable computer program instruction that, when executed by a processor, enables the processor to execute the methods and / or operations described herein. The executable computer program instruction may include any suitable type of codes, such as source codes, compiled codes, interpreted codes, executable codes, static codes, dynamic codes, and the like. The executable computer program instruction may be implemented according to predefined computer languages, modes, or syntax used to command a computer to execute specific functions. The instruction may be implemented by using any appropriate high-level, low-level, object-oriented, visual, compiled, and / or interpreted programming language.
[0109] The above description includes the examples of disclosed architectures. Of course, it is not possible to describe every conceivable combination of the components and / or the methods, but a person skilled in the art may understand that many other combinations and arrangements are also feasible. Therefore, the novel architecture is intended to cover all such substitutions, modifications and variations that fall within the spirit and scope of the appended claims.
Claims
1.A synthetic method for a circuit board image sample, comprising:obtaining an image of a first circuit board and an image of a standard circuit board;selecting a first component of the first circuit board, and replacing an image of the first component on the standard circuit board with an image of the first component on the first circuit board to obtain an image of a second circuit board; andoutputting the image of the second circuit board.2.The method according to claim 1, before selecting a first component of the first circuit board, further comprising:establishing a mapping relationship between physical coordinates and pixel coordinates; andmatching and overlapping the image of the first circuit board and the image of the standard circuit board.3.The method according to claim 1, wherein the selecting a first component of the first circuit board, comprises:selecting the first component from a drawing file of the first circuit board.4.The method according to claim 1, wherein the replacing an image of the first component on the standard circuit board with an image of the first component on the first circuit board, comprises:choosing the image of the first component on the first circuit board and the image of the first component on the standard circuit board; andperforming tone unification processing on the image of the first circuit board according to the image of the standard circuit board.5.A synthetic apparatus (300) for a circuit board image sample, comprising:an image capturing module (301) , configured to obtain an image of a first circuit board and an image of a standard circuit board;an image synthesizing module (302) , configured to select a first component of the first circuit board, and replace an image of the first component on the standard circuit board with an image of the first component on the first circuit board to obtain an image of a second circuit board; andan image outputting module (303) , configured to output the image of the second circuit board.6.The apparatus (300) according to claim 5, wherein the image capturing module (301) is further configured to:establish a mapping relationship between physical coordinates and pixel coordinates; andmatch and overlap the image of the first circuit board and the image of the standard circuit board.7.The apparatus (300) according to claim 5, wherein the image synthesizing module (302) is configured to:select the first component from a drawing file of the first circuit board.8.The apparatus (300) according to claim 5, wherein the image synthesizing module (302) is configured to:choose the image of the first component on the first circuit board and the image of the first component on the standard circuit board; andperform tone unification processing on the image of the first circuit board according to the image of the standard circuit board.9.A computer device, comprising a memory and a processor, the memory storing a computer program, and the processor, when executing the computer program, implementing steps of the method according to any one of claims 1 to 4.10.A computer-readable storage medium, storing a computer program thereupon, the computer program, when executed by a processor, implementing steps of the method according to any one of claims 1 to 4.11.A computer program product, tangibly stored on a computer-readable medium and comprising a computer executable instruction, the computer executable instruction, when executed, enabling at least one processor to execute the method according to any one of claims 1 to 4.12.A method for circuit board detection, comprising:capturing a circuit board image; andcomparing the circuit board image with a circuit board image outputted by the method according to any one of claims 1 to 4, to judge whether the circuit board image has defects.13.An apparatus (500) for circuit board detection, comprising:a detection capturing module (501) , configured to capture a circuit board image; and a detection recognizing module (502) , configured to compare the circuit board image with a circuit board image outputted by the apparatus according to any one of claims 5 to 8, to judge whether the circuit board image has defects.
Citation Information
Patent Citations
Defect sample generation method and device, electronic equipment and storage medium
CN111681162A
Image defect sample augmentation method for power transmission and transformation equipment based on CycleGAN
CN112906769A
Defect sample generation method and device, automatic optical detector and storage medium
CN115294419A
Defect detection model construction method and device, equipment and storage medium
CN115661155A
Defect sample image generation method and device, equipment and storage medium
CN115690090A
