Automatic plate separating method and device based on digital image processing
By using digital image processing technology, copper-clad laminates can be automatically identified and segmented, solving the problems of low efficiency and high cost of manual board separation, and achieving efficient and low-cost copper-clad laminate separation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies for manual board separation are inefficient and costly, and cannot meet the market demands for large-scale customized production and rapid production.
A digital image processing-based method is adopted to preprocess the copper-clad laminate image, perform edge detection, extract the adhesive flow contour image, determine the separation line, and use the separation line to perform automatic separation.
It improved board separation efficiency, reduced costs, and met the market requirements for large-scale customized production and rapid production.
Smart Images

Figure CN116823721B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronics, and more particularly to an automatic board separation method, apparatus, and terminal based on digital image processing. Background Technology
[0002] Printed Circuit Boards (PCBs), a product that has been developed for nearly a century, are now used in everything from small devices like mobile phones and watches to large-scale applications like automobiles and aerospace. Wherever integrated circuits and other electronic components are involved, PCBs are used for electrical interconnection, resulting in a huge market demand. The first step in the PCB manufacturing process is cutting and separating the raw copper-clad laminate along the seams. Traditionally, this was done manually, but manual separation is inefficient and costly, making it unsuitable for today's large-scale customized and rapid production demands.
[0003] Therefore, existing technologies still need improvement and development. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide an automatic board separation method, device and terminal based on digital image processing to address the above-mentioned defects of the prior art. The aim is to solve the problem that the manual board separation in the prior art is inefficient and costly, and cannot meet the current market requirements of large-scale customized production and rapid production.
[0005] The technical solution adopted by this invention to solve the problem is as follows:
[0006] In a first aspect, embodiments of the present invention provide an automatic board separation method based on digital image processing, wherein the method includes: acquiring a copper clad laminate image corresponding to the copper clad laminate to be separated, and preprocessing the copper clad laminate image to obtain a preprocessed copper clad laminate image;
[0007] Edge detection is performed on the preprocessed copper-clad laminate image to obtain the adhesive flow contour image;
[0008] Extract the target copper-clad laminate image based on the adhesive flow contour image;
[0009] Obtain the single copper clad laminate image size information corresponding to the single copper clad laminate image, and determine the board splitting line corresponding to the target copper clad laminate image based on the single copper clad laminate image size information and the target copper clad laminate image, wherein the target copper clad laminate image is an image of one or more copper clad laminates spliced in one direction;
[0010] Based on the separation line and the target copper-clad laminate image, the copper-clad laminate to be separated is separated.
[0011] In one implementation, extracting the target copper-clad laminate image based on the adhesive flow profile image includes:
[0012] Perform an opening operation on the adhesive flow profile image to determine the initial target copper-clad laminate image;
[0013] Obtain the minimum bounding rectangle of the initial target copper-clad laminate image, and use the image region corresponding to the minimum bounding rectangle as the target copper-clad laminate image.
[0014] In one implementation method, determining the board separation line corresponding to the target copper clad laminate image based on the size information of the single copper clad laminate image and the target copper clad laminate image includes:
[0015] Based on the size information of the single copper clad laminate image and the target copper clad laminate image, determine the bonding edge and bonding direction of each copper clad laminate in the target copper clad laminate image;
[0016] Based on the adhesion edge and the adhesion direction, the separation line corresponding to the target copper-clad laminate image is determined.
[0017] In one implementation method, determining the adhesion edges of each copper clad laminate in the target copper clad laminate image based on the size information of the single copper clad laminate image and the target copper clad laminate image includes:
[0018] Detect the target copper-clad laminate image size information corresponding to the target copper-clad laminate image;
[0019] Based on the target copper clad laminate image size information and the single copper clad laminate image size information, calculate several first differences between each side length of the target copper clad laminate image and each side length of the single copper clad laminate image;
[0020] Obtain the first preset threshold;
[0021] Based on several of the first differences and the first preset threshold, the adhesion edges of each copper clad laminate in the target copper clad laminate image are determined.
[0022] In one implementation method, determining the adhesion direction of each copper clad laminate in the target copper clad laminate image based on the size information of the single copper clad laminate image and the target copper clad laminate image includes:
[0023] The width and height of the target copper-clad laminate image are detected, wherein the width is the length corresponding to the top or bottom edge of the target copper-clad laminate image, and the height is the length corresponding to the left or right edge of the target copper-clad laminate image;
[0024] Calculate the second difference between the width and the height of either side and the adhesive side;
[0025] Obtain the second preset threshold;
[0026] Based on the second difference and the second preset threshold, the adhesion direction of each copper clad laminate in the target copper clad laminate image is determined.
[0027] In one implementation method, determining the separation line corresponding to the target copper-clad laminate image based on the adhesion edge and the adhesion direction includes:
[0028] Based on the adhesive edge, the size information of the single copper clad laminate image, and the size information of the target copper clad laminate image, determine the number of board separation lines corresponding to the target copper clad laminate image;
[0029] The separation lines corresponding to the target copper-clad laminate image are determined based on the adhesion edge, the adhesion direction, and the number of separation lines.
[0030] In one implementation method, the step of separating the copper-clad laminate to be separated according to the separation line and the target copper-clad laminate image includes:
[0031] The target copper-clad laminate image is calibrated using the nine-point calibration method to obtain the calibrated copper-clad laminate image;
[0032] The copper clad laminate to be separated is separated according to the separation line and the calibration copper clad laminate image.
[0033] Secondly, embodiments of the present invention also provide an automatic board separation device based on digital image processing, wherein the automatic board separation device based on digital image processing includes:
[0034] The preprocessing module is used to acquire the copper clad laminate image corresponding to the copper clad laminate to be separated, and to preprocess the copper clad laminate image to obtain a preprocessed copper clad laminate image.
[0035] The edge detection module is used to perform edge detection on the preprocessed copper-clad laminate image to obtain the adhesive flow contour image;
[0036] The extraction module is used to extract the target copper-clad laminate image based on the adhesive flow contour image;
[0037] The board separation line determination module is used to obtain the single copper clad laminate image size information corresponding to the single copper clad laminate image, and determine the board separation line corresponding to the target copper clad laminate image based on the single copper clad laminate image size information and the target copper clad laminate image, wherein the target copper clad laminate image is an image of one or more copper clad laminates spliced in one direction;
[0038] The board separation module is used to separate the copper-clad laminate to be separated according to the board separation line and the target copper-clad laminate image.
[0039] Thirdly, embodiments of the present invention also provide a terminal, characterized in that the terminal includes a memory and one or more processors; the memory stores one or more programs; the programs include instructions for executing the automatic board separation method based on digital image processing as described above; and the processor is used to execute the programs.
[0040] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a plurality of instructions, wherein the instructions are adapted to be loaded and executed by a processor to implement any of the above-described automatic board separation methods based on digital image processing.
[0041] The beneficial effects of this invention are as follows: In this embodiment, the invention acquires an image of the copper-clad laminate (CCL) corresponding to the CCL to be separated, and preprocesses the CCL image to obtain a preprocessed CCL image; edge detection is performed on the preprocessed CCL image to obtain a flow contour image; the target CCL image is extracted based on the flow contour image; the size information of a single CCL image corresponding to a single CCL image is acquired; the separation line is determined based on the size information of the single CCL image and the target CCL image; and the CCL to be separated is separated based on the separation line and the target CCL image. Because this invention processes the CCL image of the CCL to be separated to determine the target CCL image and the separation line, and then separates the CCL to be separated based on the target CCL image and the separation line, it effectively solves the problem that existing manual separation methods are inefficient and costly, failing to meet the current market requirements for large-scale customized production and rapid production. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart illustrating the automatic plate-splitting method based on digital image processing provided in an embodiment of the present invention.
[0044] Figure 2 This is a schematic diagram of image capture by a line scan camera provided in an embodiment of the present invention.
[0045] Figure 3 This is a filtering effect diagram provided by an embodiment of the present invention.
[0046] Figure 4 This is a flow profile diagram provided in an embodiment of the present invention.
[0047] Figure 5This is a target copper-clad laminate image determination diagram provided in an embodiment of the present invention.
[0048] Figure 6 This is a schematic diagram of the disappearance of adhesive flow provided in an embodiment of the present invention.
[0049] Figure 7 This is a schematic diagram of the segmentation assumption provided in the embodiments of the present invention.
[0050] Figure 8 This is a schematic diagram of the indivisible dimensions provided in an embodiment of the present invention.
[0051] Figure 9 This is a schematic diagram of the adhesive edge provided in an embodiment of the present invention.
[0052] Figure 10 This is a schematic diagram of the adhesion direction provided in an embodiment of the present invention.
[0053] Figure 11 This is an affine transformation effect diagram provided in an embodiment of the present invention.
[0054] Figure 12 This is a schematic diagram of the internal modules of the automatic board splitting device based on digital image processing provided in an embodiment of the present invention.
[0055] Figure 13 This is a schematic diagram of the terminal provided in an embodiment of the present invention. Detailed Implementation
[0056] This invention discloses an automatic plate-splitting method, apparatus, and terminal based on digital image processing. To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention.
[0057] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0058] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0059] Printed Circuit Boards (PCBs), a product that has been developed for nearly a century, are now used in everything from small devices like mobile phones and watches to large-scale applications like automobiles and aerospace. Wherever integrated circuits and other electronic components are involved, PCBs are used for electrical interconnection, resulting in a huge market demand. The first step in the PCB manufacturing process is cutting and separating the raw copper-clad laminate along the seams. Traditionally, this was done manually, but manual separation is inefficient and costly, making it unsuitable for today's large-scale customized and rapid production demands.
[0060] To address the aforementioned shortcomings of existing technologies, this invention provides an automatic board separation method, apparatus, and terminal based on digital image processing. The method involves acquiring an image of the copper-clad laminate (CCL) to be separated, preprocessing the CCL image to obtain a preprocessed CCL image, performing edge detection on the preprocessed CCL image to obtain a flow contour image, extracting a target CCL image from the flow contour image, acquiring the size information of a single CCL image corresponding to the single CCL image, determining the separation line based on the single CCL image size information and the target CCL image, and separating the board to be separated according to the separation line and the target CCL image. Because this invention processes the CCL image of the board to be separated to determine the target CCL image and the separation line, and then separates the board to be separated according to the target CCL image and the separation line, it effectively solves the problem that existing manual board separation methods are inefficient and costly, failing to meet the current market demands for large-scale customized production and rapid manufacturing.
[0061] Exemplary methods
[0062] like Figure 1 As shown, the method includes:
[0063] Step S100: Obtain the copper clad laminate image corresponding to the copper clad laminate to be separated, and preprocess the copper clad laminate image to obtain a preprocessed copper clad laminate image.
[0064] Specifically, the copper-clad laminate to be separated is the copper-clad laminate that needs to be separated. In this embodiment, the image of the copper-clad laminate corresponding to the copper-clad laminate to be separated is acquired through an image acquisition module, which typically consists of a camera, a lens, and an image acquisition card. Currently, commonly used industrial cameras can be divided into two types: CCD (Charge Coupled Devices) and CMOS (Complementary Metal-Oxide-Semiconductor). The photoelectric working principle of CMOS and CCD is the same. The biggest difference between the two is that CCD has better signal consistency, while CMOS has relatively poor consistency. However, because CCD needs to read the signal of the entire image, its output amplifier signal bandwidth is much longer, which leads to a problem of high chip power consumption. From a manufacturing perspective, the manufacturing process of CCD is more complex and has lower integration, and fewer companies have mastered the manufacturing technology, so the price is relatively expensive. On the other hand, CMOS has high integration, lower cost, and lower manufacturing requirements, so the price is lower than that of CCD. This embodiment takes into account factors such as accuracy requirements, transmission speed, price, and power consumption, and adopts a CMOS camera as the image acquisition device for copper-clad laminates, thereby reducing the cost of image acquisition while ensuring image accuracy and image acquisition speed.
[0065] Furthermore, CMOS cameras can be divided into area scan cameras and line scan cameras. Line scan cameras are called line scan cameras because their image sensors are elongated lines; they are also known as line scanning cameras. Area scan cameras have image sensors composed of multiple rows of lines forming a surface. Their application scenarios also differ. Line scan cameras are generally used for products with large areas or curved surfaces, such as roller defect detection, PCB copper-clad laminate positioning, or color and position detection of rubber color lines on assembly lines. Area scan cameras are generally used for the detection of small items, such as bottle cap recognition and gasket defect detection. This embodiment, considering the large size of the copper-clad laminate, uses a line scan camera for image acquisition, such as... Figure 2 As shown, this can avoid problems such as small field of view and low efficiency of area scan cameras.
[0066] During the acquisition of copper-clad laminate (CCL) images, black contaminants may appear on the copper foil surface due to the CCL manufacturing process and environmental factors, resulting in noise in the CCL image after acquisition. Since edge detection is subsequently required on the CCL image, this embodiment preprocesses the CCL image to obtain a preprocessed CCL image, primarily using image smoothing techniques. This embodiment effectively suppresses image noise and preserves more of the image's valuable information by employing image smoothing as a preprocessing technique.
[0067] Currently, commonly used image smoothing algorithms both domestically and internationally are divided into spatial domain methods and frequency domain methods. Since copper-clad laminate images are relatively large, and frequency domain methods involve too much computation and are slow, this embodiment uses spatial domain methods to achieve image smoothing, employing median filtering to remove black contaminants. Figure 3 The images show the noise reduction effects of median filtering and mean filtering. It can be seen from the images that median filtering is significantly better than mean filtering.
[0068] like Figure 1 As shown, the method further includes the following steps:
[0069] Step S200: Perform edge detection on the preprocessed copper-clad laminate image to obtain the adhesive flow contour image.
[0070] Specifically, edge detection is performed on the preprocessed copper-clad laminate image to obtain the adhesive flow contour image, thereby locating the copper-clad laminate. Common edge detection operators include Roberts operator, Prewitt operator, Sobel operator, Log operator, and Canny operator. Among them, the Sobel operator has good edge detection performance and a certain degree of noise filtering effect; it also has advantages such as simple algorithm, easy implementation, and short processing time. This embodiment uses the Sobel operator to implement edge detection on the preprocessed copper-clad laminate image. The algorithm principle of Sobel is as follows:
[0071] The Soble operator is a first-order discrete differential operator that achieves edge detection by obtaining first-order derivative information. The Soble operator achieves first-order differentiation by convolving the image with two edge detection templates: a horizontal edge detection template and a vertical edge detection template. The specific convolution formula is as follows:
[0072]
[0073]
[0074]
[0075] Where A represents the preprocessed copper-clad laminate image, and * represents the convolution symbol. G(x,y) is the calculated gradient value, which is the result of combining the horizontal and vertical directions. In this embodiment, edge detection is performed on the preprocessed copper-clad laminate image to obtain the resulting adhesive flow contour image, as shown below. Figure 4 As shown.
[0076] like Figure 1 As shown, the method further includes the following steps:
[0077] Step S300: Extract the target copper-clad laminate image based on the adhesive flow contour image.
[0078] In simple terms, based on the adhesive flow profile image, the copper foil and other materials surrounding the copper-clad laminate to be separated can be clearly identified. Therefore, after removing the copper foil at the edges, the target copper-clad laminate image can be obtained. Thus, this embodiment extracts the target copper-clad laminate image based on the adhesive flow profile image.
[0079] In one implementation, extracting the target copper-clad laminate image from the adhesive flow contour image includes:
[0080] Step S301: Perform an opening operation on the adhesive flow profile image to determine the initial target copper-clad laminate image;
[0081] Step S302: Obtain the minimum bounding rectangle of the initial target copper-clad laminate image, and use the image region corresponding to the minimum bounding rectangle as the target copper-clad laminate image.
[0082] Specifically, first, all regions with grayscale values less than 255 in the adhesive flow contour image are extracted. Then, an opening operation is performed on the image using a structuring element larger than the adhesive flow size to remove edge copper foil regions and protruding adhesive flow regions. Finally, a minimum bounding rectangle is constructed for the remaining regions. The image region corresponding to this minimum bounding rectangle is the target copper-clad laminate image. Figure 5 As shown.
[0083] like Figure 1 As shown, the method further includes the following steps:
[0084] Step S400: Obtain the single copper clad laminate image size information corresponding to the single copper clad laminate image, and determine the board splitting line corresponding to the target copper clad laminate image based on the single copper clad laminate image size information and the target copper clad laminate image, wherein the target copper clad laminate image is an image of one or more copper clad laminates spliced in one direction.
[0085] Specifically, during the lamination process, the adhesive often flows too close together due to insufficient spacing between the boards and excessive adhesive flow, causing the adhesive flow outline to disappear. This results in copper-clad laminates sticking together, making direct identification and separation impossible. The disappearance of the adhesive flow outline is like... Figure 6 As shown.
[0086] To address the above issues, this embodiment obtains the size information of a single copper-clad laminate (CCL) image corresponding to a single CCL image. By comparing this single CCL image size information with the target CCL image, the delimiter lines in the target CCL image are determined. This eliminates the need for manual determination of the delimiter lines, improving CCL delimiter efficiency and reducing delimiter costs. It is important to note that in this embodiment, the CCL to be delimited consists of one or more single CCLs bonded together in a unidirectional manner. Unidirectional bonding means that each subsequent CCL is bonded to the same direction as the preceding CCL; for example, the second CCL is bonded to the right side of the first CCL, the third CCL is bonded to the right side of the second CCL, and so on.
[0087] In one implementation, determining the board separation line corresponding to the target copper clad laminate image based on the size information of the single copper clad laminate image and the target copper clad laminate image includes:
[0088] Step S401: Based on the size information of the single copper clad laminate image and the target copper clad laminate image, determine the bonding edge and bonding direction of each copper clad laminate in the target copper clad laminate image;
[0089] Step S402: Determine the board separation line corresponding to the target copper-clad laminate image based on the adhesive edge and the adhesive direction.
[0090] Specifically, such as Figure 7 As shown, since the copper clad laminate to be separated consists of several individual copper clad laminates bonded together in one direction, in order to determine the direction and length of the separation line in the copper clad laminate to be separated, it is first necessary to obtain the size information of the individual copper clad laminate images corresponding to the individual copper clad laminate images. Using the size information of the individual copper clad laminate images and the target copper clad laminate image, the bonding edges and bonding directions of the copper clad laminates in the target copper clad laminate image can be determined. For example, is the copper clad laminate bonded along its long side or short side, or is it bonded horizontally (left-right) or vertically (up-down), etc. After determining the bonding edges and bonding directions, the separation line corresponding to the target copper clad laminate image can be obtained based on the bonding edges and bonding directions.
[0091] Furthermore, in this embodiment, the copper-clad laminate to be separated is rectangular, not square. Before determining the separation line corresponding to the target copper-clad laminate image based on the size information of a single copper-clad laminate image and the target copper-clad laminate image, the method further includes: detecting the size information of the target copper-clad laminate image corresponding to the target copper-clad laminate image; if the side lengths of the target copper-clad laminate image are the same, then the separation operation of the copper-clad laminate to be separated ends. Taking a two-panel board as an example, if the ratio of the long side to the short side of a single copper-clad laminate is 1:2, the size of the copper-clad laminate to be separated obtained under certain different bonding and splicing methods is 2*2. For such spliced boards with the same side dimensions, they are copper-clad laminates that cannot be identified for separation, such as... Figure 8 As shown. Before determining the adhesion edges and adhesion direction, the copper-clad boards to be separated that cannot be divided should be screened out to avoid incorrect board separation.
[0092] In one implementation, determining the adhesion edges of each copper clad laminate in the target copper clad laminate image based on the size information of the individual copper clad laminate image and the target copper clad laminate image includes:
[0093] Step S4011: Detect the target copper-clad laminate image size information corresponding to the target copper-clad laminate image;
[0094] Step S4012: Based on the target copper clad laminate image size information and the single copper clad laminate image size information, calculate several first differences between each side length of the target copper clad laminate image and each side length of the single copper clad laminate image;
[0095] Step S4013: Obtain the first preset threshold;
[0096] Step S4014: Determine the adhesion edges of each copper clad laminate in the target copper clad laminate image based on several first differences and the first preset threshold.
[0097] Specifically, such as Figure 9 As shown, determining the adhesion edges mainly involves identifying whether the individual copper-clad laminates in the target copper-clad laminate image are adhered via their long sides or their short sides. The method for determining adhesion edges is as follows: The target copper-clad laminate image size information is detected, including the long side size and short side size of the target copper-clad laminate image. Furthermore, the individual copper-clad laminate image size information includes the long side size and short side size of the individual copper-clad laminate image. Based on the target copper-clad laminate image size information and the individual copper-clad laminate image size information, several first differences are calculated between the side lengths of the target copper-clad laminate and the side lengths of the individual copper-clad laminate images. These first differences include: the difference between the long side size of the target copper-clad laminate and the long side size of the individual copper-clad laminate image; the difference between the long side size of the target copper-clad laminate and the short side size of the individual copper-clad laminate image; and the difference between the short side size of the target copper-clad laminate and the short side size of the individual copper-clad laminate image. The differences between the long side dimensions of the copper clad laminate images, the differences between the short side dimensions of the target copper clad laminate and the short side dimensions of a single copper clad laminate image; obtaining a first preset threshold, which represents the allowable error range during the detection process, and the value of the first preset threshold is very small; based on the above-mentioned first differences and the first preset threshold, determining the adhesion edges of each copper clad laminate in the target copper clad laminate image, if the absolute value of one of the above-mentioned first differences is less than the first preset threshold, then the edge corresponding to the single copper clad laminate image with that difference is the adhesion edge.
[0098] For example, the difference between the short side dimension of the target copper-clad laminate image and the long side dimension of a single copper-clad laminate image is calculated, and this difference is one of several first differences. Assuming that the absolute value of the first difference is less than a first preset threshold, the adhered edge is the long side of the single copper-clad laminate.
[0099] The formula for determining adhered edges is:
[0100] delta=absWidth_Dec-Length_Stand|
[0101] delta < T
[0102] Where delta is the first preset threshold, which represents the allowable error range; Width_Dec is the short side dimension of the target copper-clad laminate image; and Length_Stand is the long side dimension of a single copper-clad laminate image.
[0103] If the first difference between the short side dimension of the target copper clad laminate image and the long side dimension of the single copper clad laminate image is less than the first preset threshold, then the adhered edge is the long side of the single copper clad laminate; if the first difference between the short side dimension of the target copper clad laminate image and the short side dimension of the single copper clad laminate image is less than the first preset threshold, then the adhered edge is the short side of the single copper clad laminate.
[0104] In one implementation, determining the adhesion direction of each copper clad laminate in the target copper clad laminate image based on the size information of the single copper clad laminate image and the target copper clad laminate image includes:
[0105] Step S4015: Detect the width and height of the target copper-clad laminate image, wherein the width is the length corresponding to the top or bottom edge of the target copper-clad laminate image, and the height is the length corresponding to the left or right edge of the target copper-clad laminate image.
[0106] Step S4016: Calculate the second difference between either the width or the height of the middle section and the adhesive edge;
[0107] Step S4017: Obtain the second preset threshold;
[0108] Step S4018: Determine the adhesion direction of each copper clad laminate in the target copper clad laminate image based on the second difference and the second preset threshold.
[0109] Specifically, the adhesion direction varies depending on the placement of the copper-clad laminate to be separated. Adhesion directions are divided into horizontal adhesion and vertical adhesion. The method for determining the adhesion direction is as follows: Detect the width and height of the target copper-clad laminate image, where the width is the length corresponding to the top or bottom edge of the target copper-clad laminate image, and the height is the length corresponding to the left or right edge of the target copper-clad laminate image. Calculate a second difference between either the width or the height and the adhesion edge, and compare the second difference with a second preset threshold to determine the adhesion direction. Determining the adhesion direction by comparing the second difference with the second preset threshold includes: if the second difference between the width and the adhesion edge is less than the second preset threshold, the adhesion direction is vertical adhesion; otherwise, it is horizontal adhesion. Similarly, if the second difference between the height and the adhesion edge is less than the second preset threshold, the adhesion direction is horizontal adhesion; otherwise, it is vertical adhesion. Figure 10 As shown.
[0110] In one implementation, determining the separation line corresponding to the target copper-clad laminate image based on the adhesion edge and the adhesion direction includes:
[0111] Step S4021: Determine the number of board separation lines corresponding to the target copper clad laminate image based on the adhesive edge, the size information of the single copper clad laminate image, and the size information of the target copper clad laminate image;
[0112] Step S4022: Determine the partition line corresponding to the target copper clad laminate image based on the adhesive edge, the adhesive direction, and the number of partition lines.
[0113] Specifically, after determining the adhesion edges, the number of delimiter lines corresponding to the target copper clad laminate image can be calculated based on the adhesion edges, the size information of the single copper clad laminate image, and the size information of the target copper clad laminate image. For example, the size of the non-adhesion edges of the target copper clad laminate image is divided by the size of the non-adhesion edges of the single copper clad laminate image. If the result is an integer or the decimal part of the result is less than a third preset threshold (allowable error range), then the result is used as the number of delimiter lines. If the result is not an integer or the decimal part of the result is greater than or equal to the third preset threshold, then the delimiter line output fails.
[0114] Based on the number of separation lines, adhesion edges, and adhesion directions obtained, the separation lines are fitted in the target copper-clad laminate image to facilitate subsequent separation operations based on the separation lines.
[0115] like Figure 1 As shown, the method further includes the following steps:
[0116] Step S500: Based on the separation line and the target copper-clad laminate image, separate the copper-clad laminate to be separated.
[0117] In one implementation, the step of separating the copper-clad laminate to be separated according to the separation line and the target copper-clad laminate image includes:
[0118] Step S501: The target copper-clad laminate image is calibrated using the nine-point calibration method to obtain the calibrated copper-clad laminate image;
[0119] Step S502: Separate the copper clad laminate to be separated according to the separation line and the calibration copper clad laminate image.
[0120] Specifically, the board separation operation can be performed based on the separation lines and the target copper-clad laminate pattern. Since the separation operation is based on an image, and images use pixel coordinates, the size of the image differs from the size of the actual object. Therefore, before performing the separation operation, it is necessary to know the actual size, angle offset, and position offset of the copper-clad laminate to be separated, and establish a mapping relationship between pixel coordinates and physical coordinates. In this embodiment, a nine-point calibration method is used to calibrate the target copper-clad laminate image, obtaining a calibrated copper-clad laminate image; based on the separation lines and the calibrated copper-clad laminate image, the separation operation is performed on the copper-clad laminate to be separated.
[0121] Generally, there are only four relationships between pixel coordinates and cropping module coordinates: translation, scaling, rotation, and shearing, such as... Figure 11 As shown, the matrices corresponding to these four relationships are as follows:
[0122]
[0123] The four matrices mentioned above are: translation matrix, scaling matrix, rotation matrix, and shear matrix. Multiplying these four matrices together yields the affine transformation matrix.
[0124]
[0125] Where (c1, c2) represents the translation amount, while the parameters a1, a2, b1, b2 reflect changes such as image rotation and scaling. Calculating the six parameters a1, a2, b1, b2, c1, c2 yields the mapping relationship between pixel coordinates and cropping module coordinates. To obtain the six parameters tx, ty, sx, sy, θ, and Theta in the translation, scaling, rotation, and shear matrices, at least six different equations are needed. Since each point contains (x, y) coordinates, each point can generate two different equations. Therefore, the final affine transformation matrix can be derived with at least three points. To improve accuracy, this embodiment uses nine points for the solution.
[0126] The nine-point calibration process is as follows: Take a piece of white paper, covering as much of the camera's field of view as possible, and mark nine points on the paper. Obtain the pixel coordinates of these nine points through image detection. Hang a needle tip at the center of the cropping module, and guide the module to each of the nine points on the paper, ensuring each point coincides with the needle tip. Record the coordinates of the cropping module. Use the matrix operations described above to obtain the mapping relationship between the pixel coordinate system and the cropping module coordinate system.
[0127] Based on the above embodiments, the present invention also provides an automatic plate-separating device based on digital image processing, such as... Figure 12 As shown, the device includes:
[0128] Preprocessing module 01 is used to acquire the copper clad laminate image corresponding to the copper clad laminate to be separated, and to preprocess the copper clad laminate image to obtain a preprocessed copper clad laminate image.
[0129] Edge detection module 02 is used to perform edge detection on the preprocessed copper-clad laminate image to obtain the adhesive flow contour image;
[0130] Extraction module 03 is used to extract the target copper-clad laminate image based on the adhesive flow contour image;
[0131] The board separation line determination module 04 is used to obtain the single copper clad laminate image size information corresponding to the single copper clad laminate image, and determine the board separation line corresponding to the target copper clad laminate image based on the single copper clad laminate image size information and the target copper clad laminate image, wherein the target copper clad laminate image is an image of one or more copper clad laminates spliced in one direction;
[0132] The board separation module 05 is used to separate the copper-clad laminate to be separated according to the board separation line and the target copper-clad laminate image.
[0133] Based on the above embodiments, the present invention also provides a terminal, the principle block diagram of which can be as follows: Figure 13 As shown, the terminal includes a processor, memory, network interface, and display screen connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an automatic board separation method based on digital image processing. The display screen can be a liquid crystal display (LCD) or an e-ink display.
[0134] Those skilled in the art will understand that Figure 13 The schematic diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal to which the present invention is applied. A specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0135] In one implementation, the terminal's memory stores one or more programs, and these programs are configured to be executed by one or more processors, and the programs contain instructions for performing an automatic board-separation method based on digital image processing.
[0136] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0137] In summary, this invention discloses an automatic board separation method, apparatus, and terminal based on digital image processing. The method involves acquiring an image of the copper-clad laminate (CCL) to be separated, preprocessing the CCL image to obtain a preprocessed CCL image, performing edge detection on the preprocessed CCL image to obtain a flow contour image, extracting a target CCL image from the flow contour image, acquiring the size information of a single CCL image corresponding to the single CCL image, determining the separation line based on the single CCL image size information and the target CCL image, and separating the board to be separated according to the separation line and the target CCL image. Because this invention processes the CCL image of the board to be separated to determine the target CCL image and the separation line, and then separates the board to be separated according to the target CCL image and the separation line, it effectively solves the problem that existing manual board separation methods are inefficient and costly, failing to meet the current market demands for large-scale customized and rapid production.
[0138] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. An automatic plate-splitting method based on digital image processing, characterized in that, The method includes: Obtain the copper clad laminate image corresponding to the copper clad laminate to be separated, and preprocess the copper clad laminate image to obtain a preprocessed copper clad laminate image; Edge detection is performed on the preprocessed copper-clad laminate image to obtain the adhesive flow contour image; Extract the target copper-clad laminate image based on the adhesive flow contour image; Obtain the single copper clad laminate image size information corresponding to the single copper clad laminate image, and determine the board splitting line corresponding to the target copper clad laminate image based on the single copper clad laminate image size information and the target copper clad laminate image, wherein the target copper clad laminate image is an image of one or more copper clad laminates spliced in one direction; Based on the separation line and the target copper-clad laminate image, the copper-clad laminate to be separated is separated; The step of determining the board separation line corresponding to the target copper clad laminate image based on the size information of the single copper clad laminate image and the target copper clad laminate image includes: Detect the target copper-clad laminate image size information corresponding to the target copper-clad laminate image; Based on the target copper clad laminate image size information and the single copper clad laminate image size information, calculate several first differences between each side length of the target copper clad laminate image and each side length of the single copper clad laminate image; Obtain the first preset threshold; Based on several first differences and the first preset threshold, the adhesion edges of each copper clad laminate in the target copper clad laminate image are determined; The width and height of the target copper-clad laminate image are detected, wherein the width is the length corresponding to the top or bottom edge of the target copper-clad laminate image, and the height is the length corresponding to the left or right edge of the target copper-clad laminate image; Calculate the second difference between the width and the height of either side and the adhesive side; Obtain the second preset threshold; Based on the second difference and the second preset threshold, the adhesion direction of each copper clad laminate in the target copper clad laminate image is determined; Based on the adhesion edge and the adhesion direction, determine the board separation line corresponding to the target copper-clad laminate image; The method further includes: detecting the target copper-clad laminate image size information corresponding to the target copper-clad laminate image; if the side lengths of the target copper-clad laminate image are the same, then the separation operation of the copper-clad laminate to be separated is ended.
2. The automatic plate-splitting method based on digital image processing according to claim 1, characterized in that, The step of extracting the target copper-clad laminate image based on the adhesive flow contour image includes: Perform an opening operation on the adhesive flow profile image to determine the initial target copper-clad laminate image; Obtain the minimum bounding rectangle of the initial target copper-clad laminate image, and use the image region corresponding to the minimum bounding rectangle as the target copper-clad laminate image.
3. The automatic plate-splitting method based on digital image processing according to claim 1, characterized in that, Determining the board separation line corresponding to the target copper-clad laminate image based on the adhesion edge and the adhesion direction includes: Based on the adhesive edge, the size information of the single copper clad laminate image, and the size information of the target copper clad laminate image, determine the number of board separation lines corresponding to the target copper clad laminate image; The separation lines corresponding to the target copper-clad laminate image are determined based on the adhesion edge, the adhesion direction, and the number of separation lines.
4. The automatic plate-splitting method based on digital image processing according to claim 1, characterized in that, The step of separating the copper-clad laminate to be separated according to the separation line and the target copper-clad laminate image includes: The target copper-clad laminate image is calibrated using the nine-point calibration method to obtain the calibrated copper-clad laminate image; The copper clad laminate to be separated is separated according to the separation line and the calibration copper clad laminate image.
5. An automatic plate-separating device based on digital image processing, characterized in that, The device includes: The preprocessing module is used to acquire the copper clad laminate image corresponding to the copper clad laminate to be separated, and to preprocess the copper clad laminate image to obtain a preprocessed copper clad laminate image. The edge detection module is used to perform edge detection on the preprocessed copper-clad laminate image to obtain the adhesive flow contour image; The extraction module is used to extract the target copper-clad laminate image based on the adhesive flow contour image; The board separation line determination module is used to obtain the single copper clad laminate image size information corresponding to the single copper clad laminate image, and determine the board separation line corresponding to the target copper clad laminate image based on the single copper clad laminate image size information and the target copper clad laminate image, wherein the target copper clad laminate image is an image of one or more copper clad laminates spliced in one direction; The board separation module is used to separate the copper-clad laminate to be separated according to the board separation line and the target copper-clad laminate image; The step of determining the board separation line corresponding to the target copper clad laminate image based on the size information of the single copper clad laminate image and the target copper clad laminate image includes: Detect the target copper-clad laminate image size information corresponding to the target copper-clad laminate image; Based on the target copper clad laminate image size information and the single copper clad laminate image size information, calculate several first differences between each side length of the target copper clad laminate image and each side length of the single copper clad laminate image; Obtain the first preset threshold; Based on several first differences and the first preset threshold, the adhesion edges of each copper clad laminate in the target copper clad laminate image are determined; The width and height of the target copper-clad laminate image are detected, wherein the width is the length corresponding to the top or bottom edge of the target copper-clad laminate image, and the height is the length corresponding to the left or right edge of the target copper-clad laminate image; Calculate the second difference between the width and the height of either side and the adhesive side; Obtain the second preset threshold; Based on the second difference and the second preset threshold, the adhesion direction of each copper clad laminate in the target copper clad laminate image is determined; Based on the adhesion edge and the adhesion direction, the separation line corresponding to the target copper-clad laminate image is determined.
6. A terminal, characterized in that, The terminal includes a memory and one or more processors; the memory stores one or more programs; the programs contain instructions for executing the automatic board separation method based on digital image processing as described in any one of claims 1-4; the processors are used to execute the programs.
7. A computer-readable storage medium storing a plurality of instructions thereon, characterized in that, The instructions are applicable to be loaded and executed by a processor to implement the steps of the automatic plate-separating method based on digital image processing as described in any one of claims 1-4.
Citation Information
Patent Citations
PCB copper foil side cutting and board separating integrated equipment and PCB process line
CN110815376A
PCB cutting route determination method and related equipment
CN111311579A