Method and device for improving preparation efficiency of flexible PCB
By slicing the image of the PCB board and Euler path matching technology, the fault points are accurately identified and defects are repaired, and the problem of low detection efficiency in the existing technology is solved, which significantly improves the production efficiency of the PCB board.
Patent Information
- Application Number
- CN202411083914.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the defect detection efficiency of PCB boards is low and not accurate enough, resulting in low production process efficiency.
By obtaining the complete frontal image of the PCB board, segmenting the image and determining the fault point, forming an Euler path to generate a projected image, matching it with the preset image to determine the defect type, and then repairing the PCB board.
It improves the accuracy and efficiency of fault detection and improves the production efficiency of PCB boards.
Smart Images

Figure CN118890784A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent manufacturing technology, and in particular to a method and device for improving the efficiency of flexible PCB preparation. Background Art
[0002] PCB circuit boards are used in almost all electronic products, from watches and headphones to military and aerospace. In the production process of PCB boards, defect detection of PCB boards is a very important link. The detection process in the existing technology only uses image recognition technology to detect the image of the entire PCB board, which is inefficient and not accurate enough, making the overall efficiency of the PCB board production process low. Summary of the invention
[0003] The embodiments of the present invention provide a method and a device for improving the efficiency of manufacturing a flexible PCB, so as to improve the above-mentioned problems.
[0004] In a first aspect, an embodiment of the present application proposes a method for improving the efficiency of flexible PCB preparation, the method comprising:
[0005] Acquire a complete front image of the PCB board, and acquire multiple segmented images based on the complete front image of the PCB board;
[0006] Determine the fault point based on the segmented image, acquire an initial fault point image based on the fault point, and determine, based on the fault point image, a pixel forming the fault point image as a first target pixel;
[0007] Acquire pixels adjacent to the first target pixel in the fault point image and mark them as second target pixels;
[0008] Traversing the second target pixel to obtain an Euler path formed during the traversal process;
[0009] Acquire the Euler path, and generate a projection image based on the Euler path, wherein an edge contour of the projection image is the same as the Euler path;
[0010] Matching the projected image with a preset image and obtaining a matching result;
[0011] The defect type is determined according to the matching result, and the PCB board is repaired according to the defect type.
[0012] In combination with the first aspect, in some implementations, determining a fault point based on the segmented image, acquiring an initial fault point image based on the fault point, and determining a pixel forming the fault point image as a first target pixel based on the fault point image includes:
[0013] Acquire a preset PCB board image, and acquire a plurality of preset segmented images based on the preset PCB board image, wherein the preset segmented images correspond one to one with the segmented images;
[0014] Acquire a pixel arrangement of the segmented image, wherein each pixel has a different first optical score;
[0015] Acquire a pixel arrangement of the preset segmented image, wherein each pixel has a different second optical score;
[0016] Based on the first optical score and the second optical score of the corresponding position, determine the pixel with a larger score difference and mark it as a faulty pixel;
[0017] The fault pixels are combined to form the initial fault point image, the fault point is determined based on the fault point image, and the pixels forming the initial fault point image are determined to be the first target pixels.
[0018] In combination with the first aspect, in some implementations, determining a fault point based on the segmented image, acquiring the fault point image based on the fault point, and determining a pixel forming the fault point image as a first target pixel based on the fault point image further includes:
[0019] Acquire a partial front image of the PCB board, wherein the partial front image of the PCB board is an image of the location of the fault point area, wherein the size of the partial front image of the PCB board is the same as that of the fault point image;
[0020] The initial fault point image is fused with the partial front image of the PCB board to obtain the fault point image.
[0021] In combination with the first aspect, in some implementations, obtaining the Euler path, and generating a projection image based on the Euler path, wherein an edge contour of the projection image is the same as the Euler path, comprises:
[0022] Obtain the Euler path, and if the number of the Euler paths is greater than 1, determine whether there is one Euler path nested in another Euler path;
[0023] If it exists, a projection image is generated based on the Euler path of the outermost nesting layer.
[0024] In combination with the first aspect, in some implementations, matching the projected image with a preset image and obtaining a matching result includes:
[0025] scaling the projected image to form a plurality of adapted projected images;
[0026] The plurality of adapted projection images are matched with the preset projection image, and the matching result is obtained.
[0027] In combination with the first aspect, in some implementations, determining the defect type according to the matching result, and repairing the PCB board according to the defect type includes:
[0028] Acquire the matching result, wherein the matching result includes a notch feature or a concave feature;
[0029] Acquire the size feature of the notch feature or the concave feature based on the adapted projection image;
[0030] The PCB board is repaired based on the matching result and the size feature.
[0031] In a second aspect, the present application proposes a device for improving the efficiency of flexible PCB preparation, comprising:
[0032] A first acquisition module, the first acquisition module is used to acquire a complete front image of the PCB board, and acquire multiple segmented images based on the complete front image of the PCB board;
[0033] A first determination module, the first determination module is used to determine the fault point based on the segmented image, obtain an initial fault point image based on the fault point, and determine the pixel forming the fault point image as a first target pixel based on the fault point image;
[0034] A second acquisition module, the second acquisition module is used to acquire pixels adjacent to the first target pixel in the fault point image and mark them as second target pixels;
[0035] A first traversal module, the first traversal module is used to traverse the second target pixel and obtain an Euler path formed during the traversal process;
[0036] a third acquisition module, the third acquisition module being used to acquire the Euler path, and generate a projection image based on the Euler path, wherein an edge contour of the projection image is the same as the Euler path;
[0037] A first matching module, wherein the first matching module is used to match the projection image with a preset image and obtain a matching result;
[0038] A repair module is used to determine the defect type according to the matching result and repair the PCB board according to the defect type.
[0039] In conjunction with the second aspect, in some embodiments, the method further includes:
[0040] A fourth acquisition module, the fourth acquisition module is used to acquire a preset PCB board image, and acquire a plurality of preset segmented images based on the preset PCB board image, wherein the preset segmented images correspond to the segmented images one by one;
[0041] a fifth acquisition module, the fifth acquisition module being used to acquire a pixel arrangement of the segmented image, wherein each pixel has a different first optical score;
[0042] A sixth acquisition module, the sixth acquisition module is used to acquire a pixel arrangement of the preset segmented image, wherein each pixel has a different second optical score;
[0043] a second determination module, the second determination module being configured to determine the pixel having a larger score difference based on the first optical score and the second optical score at the corresponding position, and mark the pixel as a faulty pixel;
[0044] A combination module is used to combine the fault pixels to form the initial fault point image, determine the fault point based on the fault point image, and determine the pixel forming the initial fault point image as the first target pixel.
[0045] In conjunction with the second aspect, in some embodiments, the method further includes:
[0046] A seventh acquisition module, the seventh acquisition module is used to acquire a partial front image of the PCB board, the partial front image of the PCB board is an image of the location of the fault point area, wherein the size of the partial front image of the PCB board is the same as that of the fault point image;
[0047] A fusion module is used to fuse the initial fault point image with the partial front image of the PCB board to obtain the fault point image.
[0048] In conjunction with the second aspect, in some embodiments, the method comprises:
[0049] an eighth acquisition module, the eighth acquisition module being used to acquire the Euler paths, and if the number of the Euler paths is greater than 1, determining whether there is one Euler path nested in another Euler path;
[0050] If it exists, a projection image is generated based on the Euler path of the outermost nesting layer.
[0051] In conjunction with the second aspect, in some embodiments, the method comprises:
[0052] A scaling module, the scaling module is used to scale the projection image to form a plurality of adapted projection images;
[0053] The second matching module is used to match the multiple adapted projection images with the preset projection image and obtain the matching result.
[0054] A third aspect of an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0055] Memory, used to store computer programs;
[0056] The processor is used to implement the method steps proposed in the first aspect of the embodiment of the present invention when executing the program stored in the memory.
[0057] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in the first aspect of the embodiment of the present invention.
[0058] The embodiments of the present invention include the following advantages: a method for improving the efficiency of preparing flexible PCBs proposed in the embodiments of the present invention comprises: first, obtaining a complete front image of a PCB board, obtaining multiple segmented images based on the complete front image of the PCB board, then determining a fault point based on the segmented images, obtaining an initial fault point image based on the fault point, determining a pixel forming the fault point image as a first target pixel based on the fault point image, then obtaining pixels adjacent to the first target pixel in the fault point image and marking them as second target pixels, then traversing the second target pixel to obtain an Euler path formed during the traversal, then obtaining the Euler path, and generating a projection image based on the Euler path, wherein an edge contour of the projection image is the same as the Euler path, then matching the projection image with a preset image and obtaining a matching result, finally determining a defect type according to the matching result, and repairing the PCB board according to the defect type. The method proposed in the present application divides the acquired image into segments and determines the fault point through the segmented image. The image recognition process is more accurate. At the same time, the shape of the defect point is judged by whether an Euler path is formed, and the shape used for matching is more accurate, thereby improving the efficiency of fault detection and thus improving the production efficiency of PCB boards. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0060] Figure 1 It is a flow chart of a method for improving the efficiency of flexible PCB preparation proposed in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] The present application embodiment proposes a method for improving the efficiency of flexible PCB preparation. Figure 1 , including the following steps:
[0063] S101: Acquire a complete front image of a PCB board, and acquire multiple segmented images based on the complete front image of the PCB board.
[0064] It is understood that in this step, you can use a digital camera or scanner to take pictures or scan. Make sure to use a high-resolution device to obtain a clear image.
[0065] S102: determining a fault point based on the segmented image, acquiring an initial fault point image based on the fault point, and determining, based on the fault point image, pixels forming the fault point image as first target pixels.
[0066] As can be appreciated, image processing algorithms can be used to detect features or anomalies at the fault point. A common approach is to use computer vision techniques, such as edge detection, color analysis, or shape recognition, to obtain an initial fault point image from these fault points. This can be achieved by extracting the area where the fault point is located from the full front image. Image processing algorithms, such as cropping or extracting a region of interest (ROI) can be used to accomplish this task.
[0067] Specifically, as an implementation, step S102 may include the following steps:
[0068] S102-1: Acquire a preset PCB board image, and acquire a plurality of preset segmented images based on the preset PCB board image, wherein the preset segmented images correspond one to one to the segmented images.
[0069] It can be understood that the preset PCB board image is a PCB board image with good quality. By dividing the preset PCB board image, each part can be refined.
[0070] S102 - 2 : Obtain the segmented image pixel arrangement, wherein each pixel has a different first optical score.
[0071] Specifically, the position and color value of each pixel can be obtained by traversing the pixel matrix, and then, for each pixel, the first optical score can be calculated. The first optical score can be calculated based on factors such as brightness, contrast, and color saturation of the pixel.
[0072] S102 - 3 : Obtain a pixel arrangement of the preset segmented image, wherein each pixel has a different second optical score.
[0073] It can be understood that this process is the same as step S102-2 and will not be described in detail here.
[0074] S102 - 4 : Based on the first optical score and the second optical score of the corresponding position, determine the pixel with a larger score difference, and mark it as a faulty pixel.
[0075] Specifically, the image pixel arrangement of the first optical score and the second optical score are compared, and the score difference of each pixel is calculated, which can be calculated using an absolute value or other appropriate method. Specifically, a threshold can be set to determine whether the score difference is large enough to mark the pixel as a faulty pixel. The choice of the threshold can be adjusted according to the specific situation. All pixels are traversed, and if the score difference exceeds the threshold, the pixel is marked as a faulty pixel. If necessary, the faulty pixel can be marked with a different color or other visualization processing can be performed to facilitate subsequent fault detection and repair.
[0076] S102-5: Combining the fault pixels to form the initial fault point image, determining the fault point based on the fault point image, and determining the pixel forming the initial fault point image as the first target pixel.
[0077] It can be understood that, according to the combination of the fault pixels, an initial fault point image can be formed. By analyzing the fault point image, the position of the fault point can be determined. Specifically, the pixels forming the initial fault point image are marked as first target pixels, so as to accurately locate and process the fault point in the subsequent fault point identification and repair process.
[0078] S102-6: Obtain a partial front image of the PCB board, wherein the partial front image of the PCB board is an image of the fault point area, wherein the size of the partial front image of the PCB board is the same as that of the fault point image.
[0079] It is understandable that a clearer image can be obtained by zooming the camera and other means.
[0080] S102-7: Fusion the initial fault point image with the partial front image of the PCB board to obtain the fault point image.
[0081] It can be understood that the initial fault point image and the partial front image of the PCB board can be superimposed together to obtain a clearer image.
[0082] S103: Obtain pixels adjacent to the first target pixel in the fault point image and mark them as second target pixels.
[0083] It can be understood that the pixels adjacent to the first target pixel are edge pixels surrounding the defect position image.
[0084] S104: traverse the second target pixel and obtain the Euler path formed during the traversal process.
[0085] It can be understood that the second target pixel is traversed to obtain the Euler path formed in the traversal process, and the edge shape can be obtained by obtaining the Euler path formed in the traversal process.
[0086] S105: Acquire the Euler path, and generate a projection image based on the Euler path, wherein an edge contour of the projection image is the same as the Euler path.
[0087] Specifically, step S105 includes the following steps:
[0088] S105-1: Obtain the Euler paths, and if the number of the Euler paths is greater than 1, determine whether there is an Euler path nested in another Euler path.
[0089] S105-2: If it exists, generate a projection image based on the Euler path of the outermost nesting layer.
[0090] It is understandable that there is a nested situation in the Euler path, that is, there are other defects on the defects. Therefore, in order to eliminate this situation, combined with the characteristics of the PCB board, the largest Euler path is selected as the original image.
[0091] S106: Match the projected image with a preset image and obtain a matching result.
[0092] Specifically, step S106 includes the following steps:
[0093] S106-1: scaling the projection image to form a plurality of adapted projection images;
[0094] S106-2: Match the multiple adapted projection images with the preset projection image, and obtain the matching result.
[0095] S107: Determine the defect type according to the matching result, and repair the PCB board according to the defect type.
[0096] As an implementation method, step S107 includes:
[0097] Acquire the matching result, wherein the matching result includes a notch feature or a concave feature;
[0098] S107-1: Acquire a size feature of the notch feature or the concave feature based on the adapted projection image;
[0099] S107-2: Repair the PCB board based on the matching result and the size feature.
[0100] It is understandable that the repair process may be welding the gold wire to the notch or depression, etc., which is not limited here.
[0101] A method for improving the efficiency of preparing flexible PCBs proposed in an embodiment of the present invention comprises the following steps: first, obtaining a complete front image of a PCB board, obtaining a plurality of segmented images based on the complete front image of the PCB board, then determining a fault point based on the segmented images, obtaining an initial fault point image based on the fault point, determining a pixel forming the fault point image as a first target pixel based on the fault point image, then obtaining pixels adjacent to the first target pixel in the fault point image and marking them as second target pixels, then traversing the second target pixel to obtain an Euler path formed during the traversal, then obtaining the Euler path, and generating a projection image based on the Euler path, wherein an edge contour of the projection image is the same as the Euler path, then matching the projection image with a preset image, and obtaining a matching result, finally determining a defect type according to the matching result, and repairing the PCB board according to the defect type. The method proposed in the present application divides the acquired image into segments and determines the fault point through the segmented image. The image recognition process is more accurate. At the same time, the shape of the defect point is judged by whether an Euler path is formed, and the shape used for matching is more accurate, thereby improving the efficiency of fault detection and thus improving the production efficiency of PCB boards.
[0102] Based on the same inventive concept, the embodiment of the present application also proposes a device for improving the efficiency of flexible PCB preparation, including:
[0103] A first acquisition module, the first acquisition module is used to acquire a complete front image of the PCB board, and acquire multiple segmented images based on the complete front image of the PCB board;
[0104] A first determination module, the first determination module is used to determine the fault point based on the segmented image, obtain an initial fault point image based on the fault point, and determine the pixel forming the fault point image as a first target pixel based on the fault point image;
[0105] A second acquisition module, the second acquisition module is used to acquire pixels adjacent to the first target pixel in the fault point image and mark them as second target pixels;
[0106] A first traversal module, the first traversal module is used to traverse the second target pixel and obtain an Euler path formed during the traversal process;
[0107] a third acquisition module, the third acquisition module being used to acquire the Euler path, and generate a projection image based on the Euler path, wherein an edge contour of the projection image is the same as the Euler path;
[0108] A first matching module, wherein the first matching module is used to match the projection image with a preset image and obtain a matching result;
[0109] A repair module is used to determine the defect type according to the matching result and repair the PCB board according to the defect type.
[0110] In some embodiments, it further comprises:
[0111] A fourth acquisition module, the fourth acquisition module is used to acquire a preset PCB board image, and acquire a plurality of preset segmented images based on the preset PCB board image, wherein the preset segmented images correspond to the segmented images one by one;
[0112] a fifth acquisition module, the fifth acquisition module being used to acquire a pixel arrangement of the segmented image, wherein each pixel has a different first optical score;
[0113] A sixth acquisition module, the sixth acquisition module is used to acquire a pixel arrangement of the preset segmented image, wherein each pixel has a different second optical score;
[0114] a second determination module, the second determination module being configured to determine the pixel having a larger score difference based on the first optical score and the second optical score at the corresponding position, and mark the pixel as a faulty pixel;
[0115] A combination module is used to combine the fault pixels to form the initial fault point image, determine the fault point based on the fault point image, and determine the pixel forming the initial fault point image as the first target pixel.
[0116] In some embodiments, it further comprises:
[0117] A seventh acquisition module, the seventh acquisition module is used to acquire a partial front image of the PCB board, the partial front image of the PCB board is an image of the location of the fault point area, wherein the size of the partial front image of the PCB board is the same as that of the fault point image;
[0118] A fusion module is used to fuse the initial fault point image with the partial front image of the PCB board to obtain the fault point image.
[0119] In some embodiments, comprising:
[0120] an eighth acquisition module, the eighth acquisition module being used to acquire the Euler paths, and if the number of the Euler paths is greater than 1, determining whether there is one Euler path nested in another Euler path;
[0121] If it exists, a projection image is generated based on the Euler path of the outermost nesting layer.
[0122] In some embodiments, comprising:
[0123] A scaling module, the scaling module is used to scale the projection image to form a plurality of adapted projection images;
[0124] The second matching module is used to match the multiple adapted projection images with the preset projection image and obtain the matching result.
[0125] An embodiment of the present invention proposes a device for improving the efficiency of flexible PCB preparation. First, a complete front image of a PCB board is obtained, and multiple segmented images are obtained based on the complete front image of the PCB board. Then, a fault point is determined based on the segmented images, and an initial fault point image is obtained based on the fault point. Based on the fault point image, a pixel forming the fault point image is determined to be a first target pixel. Then, pixels adjacent to the first target pixel in the fault point image are obtained and marked as second target pixels. Then, the second target pixel is traversed to obtain an Euler path formed during the traversal process. Then, the Euler path is obtained, and a projection image is generated based on the Euler path, wherein the edge contour of the projection image is the same as the Euler path. Then, the projection image is matched with a preset image, and a matching result is obtained. Finally, the defect type is determined according to the matching result, and the PCB board is repaired according to the defect type. The device proposed in the present application divides the acquired image into segments and determines the fault point through the segmented image. The image recognition process is more accurate. At the same time, the shape of the defect point is judged by whether an Euler path is formed, and the shape used for matching is more accurate, thereby improving the efficiency of fault detection and thus improving the production efficiency of PCB boards.
[0126] Based on the same inventive concept, an embodiment of the present application further proposes an electronic device, the electronic device comprising:
[0127] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for improving the efficiency of flexible PCB preparation according to an embodiment of the present application.
[0128] In addition, to achieve the above-mentioned purpose, an embodiment of the present application also proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method for improving the efficiency of flexible PCB preparation according to the embodiment of the present application is implemented.
[0129] The following is a detailed introduction to the various components of electronic equipment:
[0130] The processor is the control center of the electronic device, which can be a processor or a general term for multiple processing elements. For example, the processor is one or more central processing units (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (field programmable gate arrays, FPGA).
[0131] Optionally, the processor can perform various functions of the electronic device by running or executing a software program stored in the memory, and calling data stored in the memory.
[0132] The memory is used to store the software program for executing the solution of the present invention, and the execution is controlled by the processor. The specific implementation method can refer to the above method embodiment, which will not be repeated here.
[0133] Optionally, the memory may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may be integrated with the processor, or may exist independently and be coupled to the processor through an interface circuit of the electronic device, and the embodiments of the present invention do not specifically limit this.
[0134] A transceiver is used to communicate with a network device or a terminal device.
[0135] Optionally, the transceiver may include a receiver and a transmitter, wherein the receiver is used to implement a receiving function, and the transmitter is used to implement a sending function.
[0136] Optionally, the transceiver may be integrated with the processor, or may exist independently and be coupled to the processor via an interface circuit of the router, which is not specifically limited in the embodiment of the present invention.
[0137] In addition, the technical effects of the electronic device can refer to the technical effects of the data transmission method described in the above method embodiment, and will not be repeated here.
[0138] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0139] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0140] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0141] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0142] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0143] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0144] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0146] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0148] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0149] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0150] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for improving the efficiency of flexible PCB preparation, characterized in that: The method comprises: Acquire a complete front image of the PCB board, and acquire multiple segmented images based on the complete front image of the PCB board; Determine the fault point based on the segmented image, acquire an initial fault point image based on the fault point, and determine, based on the fault point image, a pixel forming the fault point image as a first target pixel; Acquire pixels adjacent to the first target pixel in the fault point image and mark them as second target pixels; Traversing the second target pixel to obtain an Euler path formed during the traversal process; Acquire the Euler path, and generate a projection image based on the Euler path, wherein an edge contour of the projection image is the same as the Euler path; Matching the projected image with a preset image and obtaining a matching result; The defect type is determined according to the matching result, and the PCB board is repaired according to the defect type.
2. A method for improving the efficiency of flexible PCB preparation according to claim 1, characterized in that: Determining a fault point based on the segmented image, acquiring an initial fault point image based on the fault point, and determining a pixel forming the fault point image as a first target pixel based on the fault point image, including: Acquire a preset PCB board image, and acquire a plurality of preset segmented images based on the preset PCB board image, wherein the preset segmented images correspond one to one with the segmented images; Acquire a pixel arrangement of the segmented image, wherein each pixel has a different first optical score; Acquire a pixel arrangement of the preset segmented image, wherein each pixel has a different second optical score; Based on the first optical score and the second optical score of the corresponding position, determine the pixel with a larger score difference and mark it as a faulty pixel; The fault pixels are combined to form the initial fault point image, the fault point is determined based on the fault point image, and the pixels forming the initial fault point image are determined to be the first target pixels.
3. A method for improving the efficiency of flexible PCB preparation according to claim 2, characterized in that: The method further includes: determining a fault point based on the segmented image, acquiring the fault point image based on the fault point, and determining a pixel forming the fault point image as a first target pixel based on the fault point image. Acquire a partial front image of the PCB board, wherein the partial front image of the PCB board is an image of the location of the fault point area, wherein the size of the partial front image of the PCB board is the same as that of the fault point image; The initial fault point image is fused with the partial front image of the PCB board to obtain the fault point image.
4. A method for improving the efficiency of preparing a flexible PCB according to claim 3, characterized in that: Acquiring the Euler path, and generating a projection image based on the Euler path, wherein an edge contour of the projection image is the same as the Euler path, comprising: Obtain the Euler path, and if the number of the Euler paths is greater than 1, determine whether there is one Euler path nested in another Euler path; If it exists, a projection image is generated based on the Euler path of the outermost nesting layer.
5. A method for improving the efficiency of preparing flexible PCB according to claim 4, characterized in that: The step of matching the projected image with a preset image and obtaining a matching result includes: scaling the projected image to form a plurality of adapted projected images; The plurality of adapted projection images are matched with the preset projection image, and the matching result is obtained.
6. A method for improving the efficiency of preparing a flexible PCB according to claim 5, characterized in that: The method of determining the defect type according to the matching result and repairing the PCB board according to the defect type includes: Acquire the matching result, wherein the matching result includes a notch feature or a concave feature; Acquire the size feature of the notch feature or the concave feature based on the adapted projection image; The PCB board is repaired based on the matching result and the size feature.
7. A device for improving the efficiency of flexible PCB preparation, characterized in that: The device comprises: A first acquisition module, the first acquisition module is used to acquire a complete front image of the PCB board, and acquire multiple segmented images based on the complete front image of the PCB board; A first determination module, the first determination module is used to determine the fault point based on the segmented image, obtain an initial fault point image based on the fault point, and determine the pixel forming the fault point image as a first target pixel based on the fault point image; A second acquisition module, the second acquisition module is used to acquire pixels adjacent to the first target pixel in the fault point image and mark them as second target pixels; A first traversal module, the first traversal module is used to traverse the second target pixel and obtain an Euler path formed during the traversal process; a third acquisition module, the third acquisition module being used to acquire the Euler path, and generate a projection image based on the Euler path, wherein an edge contour of the projection image is the same as the Euler path; A first matching module, wherein the first matching module is used to match the projection image with a preset image and obtain a matching result; A repair module is used to determine the defect type according to the matching result and repair the PCB board according to the defect type.
8. The device for improving the efficiency of preparing flexible PCB according to claim 7, characterized in that: Also includes: A fourth acquisition module, the fourth acquisition module is used to acquire a preset PCB board image, and acquire a plurality of preset segmented images based on the preset PCB board image, wherein the preset segmented images correspond to the segmented images one by one; a fifth acquisition module, the fifth acquisition module being used to acquire a pixel arrangement of the segmented image, wherein each pixel has a different first optical score; A sixth acquisition module, the sixth acquisition module is used to acquire a pixel arrangement of the preset segmented image, wherein each pixel has a different second optical score; a second determination module, the second determination module being configured to determine the pixel having a larger score difference based on the first optical score and the second optical score at the corresponding position, and mark the pixel as a faulty pixel; A combination module is used to combine the fault pixels to form the initial fault point image, determine the fault point based on the fault point image, and determine the pixel forming the initial fault point image as the first target pixel.
9. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, the communication interface, and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to implement the method set forth in claims 1-6 when executing the program stored in the memory.
10. A computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method set forth in claims 1-6.
Citation Information
Patent Citations
Circuit board defect detection method and device, electronic equipment and storage medium
CN112669267A
PCB defect detection method and system based on image data
CN117333441A
Apparatus and Method for Discriminating Defects in Auto Repair System
KR101975816B1
Identifying markers associated with it components in an image
US8989513B1
