PCB board detection device and image recognition method based on image recognition
By using image recognition technology to automatically analyze PCB board defects and control transportation, the problem of low efficiency in existing PCB board inspection is solved, and automated and efficient defect detection and classification are achieved.
Patent Information
- Application Number
- CN202210937799.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-05
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-08-05
AI Technical Summary
Existing PCB board inspection devices have low inspection efficiency and require manual identification of defects and manual classification and storage, which consumes a lot of manpower.
A PCB board inspection device based on image recognition is used. The image acquisition device collects PCB board images, and the controller analyzes the circuit line contours and discontinuous areas. Defects are automatically identified and the transfer device is controlled to classify and transfer the PCB boards.
It realizes the automation and efficient classification of PCB board detection, reduces manual intervention, and improves detection efficiency and storage efficiency.
Smart Images

Figure CN115184381B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a PCB board detection device and an image recognition method based on image recognition. Background Art
[0002] PCB inspection devices can be used to inspect various types of PCBs to determine if they contain defects. Existing PCB inspection devices capture images of the PCBs using an image acquisition device and store them for inspection by personnel. Inspectors then examine each image to determine if the PCBs are qualified, and unqualified PCBs are stored separately based on their determinations. However, this method requires inspectors to carefully examine each high-definition image and manually sort and store the PCBs based on their determinations. This results in low inspection efficiency and PCB transport and storage, and requires significant manpower. Consequently, existing PCB inspection devices suffer from low efficiency when performing PCB inspections. Summary of the Invention
[0003] The embodiments of the present invention provide a PCB board detection device and an image recognition method based on image recognition, aiming to solve the problem of low efficiency of PCB board detection devices in the prior art when performing PCB board detection.
[0004] In a first aspect, an embodiment of the present invention provides a PCB board detection device based on image recognition, the detection device comprising an image acquisition device mounted on a mounting bracket, a bracket slide rail provided on the mounting bracket, and a transfer device mounted on the bracket slide rail;
[0005] The transfer device includes a transfer driver mounted on the support rail, and a magnetic transfer plate fixedly connected to the lower end of the transfer driver via a connecting plate; the transfer driver drives the magnetic transfer plate to slide along the support rail via the connecting plate;
[0006] The lower end surface of the magnetic transfer plate is provided with a plurality of suction cups, and the top of each suction cup is provided with a magnetic attraction component, and the suction cup is fixed to the lower end surface of the magnetic transfer plate by the magnetic attraction force between the magnetic attraction component and the magnetic transfer plate;
[0007] The image acquisition device and the transfer driver are both electrically connected to the controller of the detection device; the controller receives the PCB board image captured by the image acquisition device for detection, and sends a control signal to control the transfer driver; the transfer driver transfers the sucked PCB board to a placement position corresponding to the control signal according to the control signal.
[0008] In a second aspect, an embodiment of the present invention further provides an image recognition method, which is applied to a controller of the PCB board detection device based on image recognition as described in the first aspect above, and the method includes:
[0009] If a detection instruction is received, obtaining an initial image of the PCB board captured by the image capture device;
[0010] performing pixel dissolving on the initial image to determine a circuit line outline corresponding to the initial image;
[0011] Screening the circuit line contour to obtain a discontinuous area according to a preset contour screening rule;
[0012] Acquire a regional image of the discontinuous region in the initial image;
[0013] A uniformity identification is performed on each of the regional images to obtain an identification result of whether the initial image meets a preset uniformity condition.
[0014] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the image recognition method described in the second aspect when executing the computer program.
[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the image recognition method described in the second aspect above.
[0016] The embodiment of the present invention provides a PCB board detection device and image recognition method based on image recognition. The method includes: if a detection instruction is received, obtaining an initial image of the PCB board obtained by an image acquisition device; performing pixel dissolution on the initial image to determine the circuit line contour corresponding to the initial image; filtering out discontinuous areas from the circuit line contour according to preset contour screening rules; obtaining regional images of the discontinuous areas in the initial image; performing uniformity recognition on each regional image to obtain a recognition result of whether the initial image meets the preset uniformity condition. In the above method, the initial image of the PCB board can be collected by the image acquisition device and intelligently recognized to obtain a recognition result of whether the corresponding conditions are met, without the need to manually judge whether the PCB board has defects, thereby greatly improving the detection efficiency of the PCB board. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 The overall structure diagram of the PCB board detection device based on image recognition provided by an embodiment of the present invention;
[0019] Figure 2 A partial structural diagram of a PCB board detection device based on image recognition provided by an embodiment of the present invention;
[0020] Figure 3 Another partial structural diagram of the PCB board detection device based on image recognition provided by an embodiment of the present invention;
[0021] Figure 4 A partial structural diagram of a transfer device provided in an embodiment of the present invention;
[0022] Figure 5 A circuit connection structure diagram of a PCB board detection device based on image recognition provided by an embodiment of the present invention;
[0023] Figure 6 A schematic diagram of a flow chart of an image recognition method provided by an embodiment of the present invention;
[0024] Figure 7 A schematic diagram of a sub-process of an image recognition method provided by an embodiment of the present invention;
[0025] Figure 8 A schematic diagram of another sub-process of the image recognition method provided by an embodiment of the present invention;
[0026] Figure 9 Another schematic diagram of the flow of the image recognition method provided by an embodiment of the present invention;
[0027] Figure 10 A schematic diagram of another sub-process of the image recognition method provided by an embodiment of the present invention;
[0028] Figure 11 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0030] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0031] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0032] It should be further understood that the term "and / or" used in the present description and appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0033] See also Figure 1 The embodiment of the present application discloses a PCB board inspection device based on image recognition, wherein the PCB board inspection device 1 includes a conveying mechanism 10, a mounting bracket 20 disposed on the upper side of the conveying mechanism 10, and a lighting lamp 30 fixed on the upper side of the conveying mechanism 10; the PCB board inspection device 1 also includes an image acquisition device 31 mounted on the mounting bracket 20, a bracket slide 21 disposed on the mounting bracket 20, and a transfer device 4 mounted on the bracket slide 21. The image acquisition device 31 can be mounted on one side of the lighting lamp 30. The conveying mechanism 10 is used to horizontally transport the PCB board to be inspected, while the lighting lamp 30 illuminates the PCB board to be inspected. The image acquisition device 31 captures the light reflected by the PCB board to achieve imaging, thereby obtaining an initial image of the PCB board. By analyzing the initial image captured by the image acquisition device 31, intelligent detection of defects in the PCB board can be achieved.
[0034] Specifically, such as Figures 2 to 5As shown, an embodiment of the present application discloses a PCB board detection device based on image recognition, wherein the transfer device 4 includes a transfer driver 41 assembled on the bracket slide 21, and a magnetic transfer plate 43 fixedly connected to the lower end of the transfer driver 41 through a connecting plate 42; the transfer driver 41 drives the magnetic transfer plate 43 to slide along the bracket slide 21 through the connecting plate 42; the lower end surface of the magnetic transfer plate 43 is provided with a plurality of suction cups 432, and the top of each suction cup 432 is provided with a magnetic suction component (not shown in the figure), and the suction cup 432 is fixed to the lower end surface of the magnetic transfer plate 43 by the magnetic suction force between the magnetic suction component and the magnetic transfer plate 43; the image acquisition device 31 and the transfer driver 41 are both electrically connected to the controller 45 of the detection device; the controller 45 receives the PCB board image captured by the image acquisition device 31 for detection, and sends a control signal to control the transfer driver 41; the transfer driver 41 transfers the sucked PCB board to a placement position corresponding to the control signal according to the control signal.
[0035] Specifically, such as Figure 2 As shown, a first placement table 11 and a second placement table 12 are provided on either side of the end of the conveying mechanism 10. The longitudinal axis of the support rail 21 can be perpendicular to the direction in which the conveying mechanism 10 conveys the PCB boards. The first placement table 11 and the second placement table 12 can store PCB boards. The conveying mechanism 10 performs defect inspection on the PCB boards placed thereon as they pass under the searchlight 30 and the image acquisition device 31. The transfer device 4 is used to absorb the PCB boards on the conveying mechanism 10 that have completed defect inspection and transfer them to the first placement table 11 or the second placement table 12. Since the specific embodiments of this application focus on the classification and transfer of PCB boards to corresponding placement positions, the embodiment of this application terminal describes the transfer device 4 provided at the end of the conveying mechanism 10. The end of the conveying mechanism 10 is also the downstream direction in which the conveying mechanism 10 transfers the PCB boards. The transfer device 4 can also be provided upstream of the conveying mechanism 10. For example, the transfer device 4 provided upstream of the conveying mechanism 10 can transfer the PCB boards to be inspected to the upper end surface of the conveying mechanism 10.
[0036] The specific use process of the transfer device 4 is to locate the non-circuit area of the PCB board. Generally speaking, the non-circuit areas in PCB boards of the same type (same specifications) are the same. The suction cup 432 is manually moved to be adsorbed on the position of the lower end surface of the magnetic transfer plate 43, so that the suction cup 432 moves to the position corresponding to the non-circuit area in the PCB board. The transfer driver 41 drives the transfer plate 43 to be pressed down, and the suction cup 432 fixed on the lower end surface of the transfer plate 43 can absorb the PCB board to be transferred. At this time, the suction cup 432 is fixed on the non-circuit area in the PCB board.
[0037] Specifically, a flexible cavity is provided at the lower end of the suction cup 432, and the flexible cavity is connected to a negative pressure generator (not shown in the figure) through a connecting tube 4322. When the flexible cavity at the lower end of the suction cup 432 contacts the PCB board, the negative pressure generator (such as a vacuum pump) is started, and the air in the flexible cavity can be extracted through the connecting tube 4322, so that the flexible concave cavity generates negative pressure and is tightly pressed against the PCB board, so that the suction cup 432 can absorb the PCB board; when the transfer driver 41 drives the transfer plate 43 to slide along the bracket slide rail 21, the PCB board sucked by the lower side of the suction cup 432 can be transferred.
[0038] The controller 45 can send a control signal to the transfer driver 41. For example, the controller 45 can send a first control signal to the transfer driver 41 to control the transfer driver 41 to drive the magnetic transfer plate 43 to move to the first placement table 11 according to the first control signal; the controller 45 can also send a second control signal to the transfer driver 41 to control the transfer driver 41 to drive the magnetic transfer plate 43 to move to the second placement table 12 according to the second control signal; thereby enabling the transfer driver to transfer the sucked PCB board to the placement position corresponding to the control signal according to the control signal.
[0039] The image acquisition device 31 outputs the acquired initial image of the PCB board to the controller 45. The controller 45 analyzes the initial image to determine whether the PCB board corresponding to the initial image has defects, and obtains an identification result of the PCB board. The controller 45 sends a corresponding control signal to the transfer driver 41 based on the identification result. The transfer driver 41 transfers the sucked PCB board to the placement position corresponding to the control signal based on the control signal.
[0040] In a specific embodiment, the transport driver 41 includes a first drive motor 411 and a second drive motor 412. The first drive motor 411 is mounted on the support rail 21 and can slide along the support rail 21. The second drive motor 412 is slidably connected to a connecting rod 413, the upper end of which is fixed to the first drive motor 411. The second drive motor 412 slides radially along the connecting rod 413. The magnetic transport plate 43 is fixedly connected to the lower end of the second drive motor 412 via the connecting plate 42. Specifically, the transport driver 41 also includes a housing 414, which is provided on the outside of the first drive motor 411 and the second drive motor 412.
[0041] Specifically, the transfer drive 41 includes a first drive motor 411 and a second drive motor 412. The controller 45 is electrically connected to the first drive motor 411 and the second drive motor 412 at the same time. The first motor 411 drives the second drive motor 412 and the magnetic transfer plate 43 connected to the second drive circuit to slide horizontally along the bracket slide rail 21. The second drive motor 412 drives the magnetic transfer plate 43 to slide vertically along the connecting rod 413. Through this setting, the magnetic transfer plate 43 descends to absorb the PCB board, and then rises, and then the first drive motor 411 drives the magnetic transfer plate 43 to move horizontally, so that the absorbed PCB board is transferred.
[0042] See also Figure 6 , the embodiment of the present application also discloses an image recognition method, which is applied to the controller 45 of the PCB board detection device 1. The image recognition method is executed by the application software installed in the controller 45. The controller 45 is a control device for executing the image recognition method to perform intelligent analysis on the initial image of the PCB board and control the transport device to classify, transport and store the PCB board, such as an MCU chip; wherein, the controller 45 can also send control signals to various functional components in the PCB board detection device 1 to control each functional component. Figure 6 As shown, the method includes steps S110 to S150.
[0043] S110: If a detection instruction is received, an initial image of the PCB board captured by the image capture device is acquired.
[0044] Upon receiving a detection instruction, an initial image of the PCB board captured by the image capture device is acquired. If the controller receives a detection instruction input by a user, it can send a capture instruction to the image capture device, which can then capture an image of the PCB board being transported by the transport mechanism, thereby acquiring the initial image of the PCB board captured by the image capture device.
[0045] S120 , performing pixel dissolution on the initial image to determine a circuit line outline corresponding to the initial image.
[0046] Pixel dissolving is performed on the initial image to determine the circuit line outline corresponding to the initial image. Pixel dissolving can be performed on the initial image to obtain the corresponding circuit line outline from the initial image, which is the outline information corresponding to the circuit line in the initial image.
[0047] In one embodiment, if Figure 7 As shown, step S120 includes sub-steps S121, S122, S123 and S124.
[0048] S121. Obtain pixel points whose pixel values are within a preset pixel range from the initial image to obtain an initial pixel area.
[0049] Pixels whose pixel values fall within a preset pixel range can be retrieved from the initial image. Each pixel in the initial image corresponds to a pixel value encompassing three color channels (RGB, red, green, and blue), and the pixel range corresponds to a range of pixel values corresponding to the three color channels. A determination can be made as to whether the pixel values of each pixel in the initial image for all three color channels fall within the pixel range. All pixels within the pixel range are then retrieved to form an initial pixel region. For example, circuit traces on a PCB are typically copper conductors. The pixel range can be set to a pixel value range close to that of the copper conductors, resulting in the initial pixel region being a pixel region with pixel values close to those of the copper conductors.
[0050] S122: Calculate the contrast between the pixel points at the edge of the initial pixel area and other surrounding pixel points.
[0051] Obtain the edge pixel points of the initial pixel area, and calculate the contrast value between each edge pixel point and other surrounding pixel points. Specifically, calculate the difference between the pixel values of other surrounding pixels and the edge pixel point and take the average value to obtain the contrast value of the pixel point.
[0052] For example, the specific calculation formula can be shown as formula (1):
[0053] ;
[0054] Among them, x i is the pixel value of the i-th pixel around the edge pixel, x0 is the pixel value of a certain edge pixel, and M is the total number of surrounding pixels. The surrounding pixels can be the pixels in the first circle around the edge pixel, in which case M=8; the surrounding pixels can be the pixels in the first and second circles around the edge pixel, in which case M=24.
[0055] S123 , acquiring edge pixel points in the initial pixel area whose contrast values are greater than a preset contrast threshold as target contour points.
[0056] The contrast value of the edge pixel point in the initial pixel area is judged against a preset contrast threshold, so as to obtain the edge pixel point with a contrast value greater than the contrast threshold from the initial pixel area as the target contour point according to the judgment result.
[0057] S124 , performing pixel dissolution on the initial image according to the target contour points to obtain a circuit line contour corresponding to the initial image.
[0058] After obtaining the target contour points, the initial image can be pixel-dissolved according to the target contour points. Pixel dissolution is to remove other pixel points other than the target contour points from the initial image. By connecting the remaining pixel points after pixel dissolution, the corresponding circuit contour line can be obtained. The circuit contour line is a binary image. The pixel points corresponding to the target contour points constitute the contour information in the circuit contour line, and the other areas are blank.
[0059] Since the pixel range of the obtained initial pixel area is relatively wide, the outer edge contour of the circuit line cannot be accurately determined. Therefore, the accurate circuit line contour in the initial pixel area can be determined by calculating the pixel value of the edge pixel point and judging whether the pixel value is greater than the contrast threshold.
[0060] S130 , filtering out discontinuous areas from the circuit line contour according to preset contour filtering rules.
[0061] The circuit line contour is filtered according to the contour filtering rules to filter out discontinuous areas within the circuit line contour. A determination can be made as to whether the normal distance between a contour line and another contour line within the circuit line contour is less than a spacing threshold specified in the contour filtering rules. For example, if two adjacent and parallel contour lines have a horizontal normal direction, the horizontal spacing between the two contour lines can be obtained and a determination can be made as to whether the spacing is less than the spacing threshold.
[0062] If the spacing is smaller than the spacing threshold, it indicates that the circuit lines include a discontinuous circuit line, and the area around the discontinuous circuit line is determined to be a discontinuous area.
[0063] S140: Acquire a regional image of the discontinuous region in the initial image.
[0064] The discontinuous area is a partial image area in the circuit line outline. According to the position of the discontinuous area, the image corresponding to the position of the discontinuous area in the initial image can be determined as the regional image. The regional image is an image containing corresponding colors, that is, the actual color image corresponding to the binarized discontinuous area is obtained.
[0065] S150 , performing uniformity identification on each of the regional images to obtain an identification result of whether the initial image meets a preset uniformity condition.
[0066] A uniformity recognition is performed on each regional image obtained from the initial image to obtain a recognition result corresponding to the initial image. If the uniformity of each regional image of the initial image satisfies the uniformity condition, it indicates that the initial image does not contain a defective area that requires special attention, and the recognition result is that the initial image is flawless. If the uniformity of any regional image of the initial image does not meet the uniformity condition, it indicates that the initial image contains a defective area that requires special attention, and the recognition result is that the initial image has defects.
[0067] In one embodiment, if Figure 8 As shown, step S150 includes sub-steps S151 and S152.
[0068] S151, obtaining uniformity feature information of the regional image; S152, determining whether the uniformity feature information of each regional image is within the numerical range of the uniformity condition, so as to obtain an identification result of whether the initial image meets the preset uniformity condition.
[0069] Specifically, the uniformity feature information of each regional image can be obtained, and it can be determined whether the uniformity feature information of each regional image is within the numerical range of the uniformity condition. The uniformity feature information includes the standard deviation of pixel values, the extreme difference of pixel values, the median difference of pixels, etc., among which the extreme difference of pixel values is the pixel difference between the pixel point with the maximum pixel value and the pixel point with the minimum pixel value in the regional image, and the median difference of pixels is the difference between the average value of pixels in the regional image and the median value of pixels.
[0070] A determination is made as to whether all the values included in the uniformity feature information are within the numerical range of the uniformity condition. If all the values are within the numerical range of the uniformity condition, the uniformity feature information of the regional image satisfies the preset uniformity condition. If all the values are not within the numerical range of the uniformity condition, the uniformity feature information of the regional image does not satisfy the preset uniformity condition. If the regional images of the initial image all satisfy the uniformity condition, a recognition result is obtained indicating that the initial image satisfies the uniformity condition, i.e., the initial image is flawless. If the regional images of the initial image do not satisfy the uniformity condition, a recognition result is obtained indicating that the initial image does not satisfy the uniformity condition, i.e., the initial image has defects.
[0071] In one embodiment, if Figure 9 As shown, step S150 further includes step S160.
[0072] S160 , sending a corresponding control signal to the transfer driver according to the recognition result, so that the transfer driver classifies and places the sucked PCB boards according to the recognition result.
[0073] Based on the recognition result, a corresponding control signal is sent to the transfer driver, causing the transfer driver to classify and place the absorbed PCBs according to the recognition result. The controller 45 may also send a control signal to the transfer driver, causing the transfer driver to classify and place the currently absorbed PCBs according to the recognition result. For example, if the recognition result satisfies the uniformity condition, a first control signal is sent to the transfer driver to deposit the PCBs on the first placement table 11; if the recognition result does not satisfy the uniformity condition, a second control signal is sent to the transfer driver to deposit the PCBs on the second placement table 12.
[0074] In one embodiment, if Figure 10 As shown, step S160 includes sub-steps S161 and S162.
[0075] S161, determining a corresponding translational transfer direction according to the recognition result; S162, generating a corresponding control signal according to the determined translational transfer direction and sending it to the transfer driver.
[0076] Specifically, the corresponding translational transfer direction is determined according to the recognition result. For example, the translational transfer direction can be translational transfer to the left side of the transmission mechanism 10 or translational transfer to the right side of the transmission mechanism 10. If the recognition result satisfies the uniformity condition, it is determined to be the left translational transfer direction; if the recognition result does not meet the uniformity condition, it is determined to be the right translational transfer direction.
[0077] A corresponding control signal is generated according to the determined translational transfer direction. For example, a first control signal is generated corresponding to the left translational transfer direction, and a second control signal is generated corresponding to the right translational transfer direction. The generated control signal is sent to the transfer driver to control the transfer driver to transfer the PCB board to the placement position corresponding to the control signal.
[0078] In an image recognition method provided in an embodiment of the present invention, the method includes: upon receiving a detection instruction, obtaining an initial image of a PCB board captured by an image acquisition device; performing pixel dissolving on the initial image to determine the circuit line contour corresponding to the initial image; screening the circuit line contour to obtain discontinuous regions according to preset contour screening rules; obtaining regional images of the discontinuous regions in the initial image; and performing uniformity identification on each regional image to obtain an identification result indicating whether the initial image meets a preset uniformity condition. In the above method, the initial image of the PCB board can be captured by the image acquisition device and intelligently identified to obtain an identification result indicating whether the corresponding condition is met, eliminating the need for manual determination of whether the PCB board has defects, thereby significantly improving PCB board inspection efficiency.
[0079] The image recognition method can be implemented in the form of a computer program, and the controller 45 can be implemented in the form of a computer device. The computer program can be implemented in the form of a computer device. Figure 11 Runs on the computer equipment shown.
[0080] See also Figure 11 , Figure 11 4 is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device may be a controller 45 for executing an image recognition method to perform intelligent detection of defects in a PCB board.
[0081] See Figure 11 The computer device 500 includes a processor 502 , a memory, and a network interface 505 connected via a system bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .
[0082] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 may execute an image recognition method. The storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
[0083] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0084] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can perform the image recognition method.
[0085] The network interface 505 is used for network communication, such as providing data information transmission. Those skilled in the art will understand that Figure 11 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0086] The processor 502 is configured to run a computer program 5032 stored in the memory to implement corresponding functions in the above-mentioned image recognition method.
[0087] Those skilled in the art will understand that Figure 11The embodiment of the computer device shown in the figure does not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such an embodiment, the structure and function of the memory and processor are the same as those in the figure. Figure 11 The embodiments shown are consistent and will not be described again here.
[0088] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), or may 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 any conventional processor.
[0089] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps included in the above-mentioned image recognition method are implemented.
[0090] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those of ordinary skill 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 with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. 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.
[0091] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, or units with the same function may be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.
[0092] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
[0093] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0094] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0095] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. An image recognition method, characterized in that: The method is applied to a controller of a PCB board detection device based on image recognition. The detection device includes an image acquisition device mounted on a mounting bracket, a bracket slide provided on the mounting bracket, and a transfer device mounted on the bracket slide. The transfer device includes a transfer driver mounted on the bracket slide and a magnetic transfer plate fixedly connected to the lower end of the transfer driver via a connecting plate. The transfer driver drives the magnetic transfer plate to slide along the bracket slide via the connecting plate. The image acquisition device and the transfer driver are both electrically connected to the controller of the detection device. The method includes: If a detection instruction is received, obtaining an initial image of the PCB board captured by the image capture device; performing pixel dissolving on the initial image to determine a circuit line outline corresponding to the initial image; Screening the circuit line contour to obtain a discontinuous area according to a preset contour screening rule, including: determining whether a distance between a contour line in the circuit line contour and another contour line along a normal direction is less than a distance threshold in the contour screening rule; if the distance is less than the distance threshold, determining that an area around the contour line currently being judged is a discontinuous area; Acquire a regional image of the discontinuous region in the initial image; Performing uniformity identification on each of the regional images to obtain an identification result of whether the initial image meets a preset uniformity condition; The performing of uniformity identification on each of the regional images to obtain an identification result of whether the initial image meets a preset uniformity condition includes: Obtaining uniformity feature information of the regional image; the uniformity feature information includes pixel value standard deviation, pixel value range, and pixel median difference; the pixel median difference is the difference between the pixel average value and the pixel median value in the regional image; Determining whether the uniformity feature information of each of the regional images is within the numerical range of the uniformity condition, so as to obtain an identification result of whether the initial image satisfies the preset uniformity condition; The lower end surface of the magnetic transfer plate is provided with a plurality of suction cups, and the top of each suction cup is provided with a magnetic attraction component, and the suction cup is fixed to the lower end surface of the magnetic transfer plate by the magnetic attraction force between the magnetic attraction component and the magnetic transfer plate; The controller receives the PCB board image captured by the image capture device for detection and sends a control signal to control the transfer driver; the transfer driver transfers the sucked PCB board to a placement position corresponding to the control signal according to the control signal.
2. The image recognition method according to claim 1, wherein: The performing pixel dissolving on the initial image to determine a circuit line contour corresponding to the initial image includes: Obtaining pixel points whose pixel values are within a preset pixel range from the initial image to obtain an initial pixel area; Calculating the contrast between the pixel points at the edge of the initial pixel area and other surrounding pixel points; Acquire edge pixel points in the initial pixel area whose contrast values are greater than a preset contrast threshold as target contour points; Pixel dissolving is performed on the initial image according to the target contour points to obtain a circuit line contour corresponding to the initial image.
3. The image recognition method according to claim 1, wherein: After performing the uniformity identification on each of the regional images and obtaining the identification result of whether the initial image meets the preset uniformity condition, the method further includes: A corresponding control signal is sent to the transfer driver according to the recognition result, so that the transfer driver classifies and places the sucked PCB boards according to the recognition result.
4. The image recognition method according to claim 3, wherein: The step of sending a corresponding control signal to the transport driver according to the recognition result includes: Determining a corresponding translational transport direction according to the recognition result; A corresponding control signal is generated according to the determined translational transfer direction and sent to the transfer drive.
5. The image recognition method according to claim 1, wherein: The transport driver includes a first drive motor and a second drive motor, wherein the first drive motor is mounted on the support rail and can slide along the support rail; The second drive motor is slidably connected to a connecting rod, the upper end of which is fixed to the first drive motor; the second drive motor slides along the radial direction of the connecting rod; The magnetic transfer plate is fixedly connected to the lower end of the second driving motor through the connecting plate.
6. The image recognition method according to claim 5, characterized in that: The transport driver further includes a housing, and the housing is disposed on the outside of the first drive motor and the second drive motor.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the image recognition method according to any one of claims 1 to 6 is implemented.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the image recognition method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Duct piece intelligent automatic identification transportation system and method
CN113443556A
Full-automatic flexible plate single-piece transfer device and method based on machine vision
CN114314364A