Pin detection method, device and system
Through automated image processing technology, pin feature parameters on electronic devices are extracted, and the problems of low manual detection efficiency and poor accuracy are solved, and efficient and accurate pin detection is achieved.
Patent Information
- Application Number
- CN202411687664.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-02-28
AI Technical Summary
In the prior art, pin detection mainly relies on manual detection, and there are problems such as inaccurate judgment, low efficiency, and reduced accuracy on electronic devices with dense pin deployment.
Using an automated method, by obtaining the image of the electronic device, determining the region of interest, performing matching operations based on multiple area matching templates, extracting the characteristic parameters of the pins, and determining whether the pin arrangement is qualified.
Improve the efficiency and accuracy of pin detection, reduce manual participation, and ensure the stability and reliability of detection.
Smart Images

Figure CN119540206A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of circuit detection, and more specifically, to a method, device and system for pin detection. Background Art
[0002] In electronic devices, pins are usually used to connect circuit boards and other components or devices. If the pins are damaged or abnormally positioned, that is, the pin arrangement is abnormal, it may cause the device to not work properly or cause circuit failure, affecting the performance and reliability of the electronic device. Therefore, before electronic devices leave the factory, they need to undergo a series of quality control operations, and pin detection is an important part of the quality control of electronic devices.
[0003] However, the current pin detection method usually adopts the manual detection method, which usually has the problem of inaccurate judgment caused by human subjective factors, and the efficiency of manual detection is very low. For electronic devices with dense pin deployment, the accuracy of manual detection will be further reduced. Summary of the invention
[0004] The present application provides a method, device and system for pin detection, which can automatically trigger and execute the pin detection method, improve the pin detection efficiency, and ensure the stability and accuracy of pin detection of electronic products.
[0005] In a first aspect, a method for pin detection is provided, the method comprising: acquiring a first image, the first image comprising a first electronic device; determining a first region of interest in the first image, the first region of interest comprising N pins deployed on the first electronic device, N being a positive integer; performing matching operations on the first region of interest based on M region matching templates to determine M candidate regions, the M region matching templates corresponding to M pin arrangement presentation forms, and each candidate region corresponding to a region matching score, M being greater than 1; performing feature extraction on a target region to determine a first feature parameter of the target region, the target region being a candidate region with the highest region matching score among the M candidate regions, the first feature parameter comprising at least one of the following: the number, shape and position of pins in the target region; determining whether the pin arrangement of the first electronic device is qualified according to the first feature parameter.
[0006] In combination with the first aspect, in certain implementations of the first aspect, the M region matching templates include a first region matching template, and based on the first region matching template, a matching operation is performed on the K sub-regions in the first region of interest to determine the sub-region matching score corresponding to each sub-region; the sub-region corresponding to the highest sub-region matching score is determined as the first candidate region, and the first candidate region belongs to the M candidate regions.
[0007] In combination with the first aspect, in certain implementations of the first aspect, a first configuration file is determined, the first configuration file being used to indicate a starting position and a deployment range of N pins in a first electronic device; according to the first configuration file, a target area is divided into N first target sub-areas; and feature extraction is performed on the N first target sub-areas to determine morphological features and position features of the pins in each first target sub-area.
[0008] In combination with the first aspect, in certain implementations of the first aspect, after determining the morphological features and positional features of the stitches in each first target sub-area, a first straight line where the N stitches are located is fitted based on the N stitches; the distance from the first reference point of each stitch to the first straight line is determined; and when it is determined that the distance from the first reference point of a first stitch among the N stitches to the first straight line is outside a preset distance range, the first stitch is determined to be image noise.
[0009] In combination with the first aspect, in certain implementations of the first aspect, the first target sub-region corresponding to the first stitch is reduced to determine the second target sub-region; features are extracted from the second target sub-region to determine second feature parameters, and when the second feature parameters are used to indicate features of a stitch, the feature parameters corresponding to the first stitch are replaced with the second feature parameters.
[0010] In combination with the first aspect, in certain implementations of the first aspect, threshold segmentation processing is performed on the first image to determine a second image, and the second image retains features of N stitches; an opening operation is performed on the second image to determine a third image, and the third image, compared to the second image, removes objects in the second image whose volume is less than or equal to a volume threshold, and the volume threshold is less than the volume of the stitches; and a first region of interest is determined based on the third image.
[0011] In combination with the first aspect, in some implementations of the first aspect, the first electronic device includes a first graphic code, and the first area of interest is determined based on first identification information of the first electronic device carried by the first graphic code, and the first identification information is associated with the first area of interest.
[0012] In combination with the first aspect, in some implementations of the first aspect, before performing threshold segmentation processing on the first image, Gaussian filtering processing is performed on the first image.
[0013] In combination with the first aspect, in some implementations of the first aspect, before extracting features for the target area, the contrast between the first color and other colors in the first region of interest is increased according to the first color presented by the N pins.
[0014] In combination with the first aspect, in certain implementations of the first aspect, the first characteristic parameter is compared with the target characteristic parameter, and the target parameter is used to indicate the characteristic parameter that the N pins need to meet; when the first characteristic parameter matches the target characteristic parameter, it is determined that the pin arrangement of the first electronic device is qualified.
[0015] In a second aspect, a device for pin detection is proposed, comprising a processor and a memory, wherein the processor and the memory are connected, wherein the memory is used to store program code, and the processor is used to call the program code to execute a method in any possible implementation of the method design of the first aspect above.
[0016] In a third aspect, a system for pin detection is proposed, including: an image acquisition component, the image acquisition component includes a camera, a lens, a light source and a fixing frame, the light source, the lens and the camera are coaxially arranged, the light source is annular, the inside of the ring of the light source passes through the lens, and the lens is connected to the camera; an image processing device, the image processing device includes a device in any possible implementation method of the device design of the second aspect above, the image processing device is connected to the image acquisition component; a carrier, the carrier includes a platform and a fixing mechanism, the platform is opposite to the image acquisition component, and the fixing mechanism is used to fix a first electronic device at a first position of the platform so that the first electronic device is completely exposed to the field of view of the camera.
[0017] In combination with the third aspect, in some implementations of the third aspect, the fixing frame includes a first sub-fixing frame, a second sub-fixing frame and a third sub-fixing frame, wherein the first sub-fixing frame is used to fix the camera, the second sub-fixing frame is used to fix the lens, and the third sub-fixing frame is used to fix the light source.
[0018] In combination with the third aspect, in some implementations of the third aspect, the second sub-fixing frame includes a circular ring fixer, the circular ring fixer includes a first semicircular ring and a second semicircular ring, and the first semicircular ring and the second semicircular ring are connected by a telescopic member.
[0019] In combination with the third aspect, in certain implementations of the third aspect, the light source is a yellow polarized light source.
[0020] In combination with the third aspect, in certain implementations of the third aspect, the platform includes a bottom plate, a top plate and H vertical panels, the H vertical panels are vertically fixed on the bottom plate, and the top plate is fixed to the top edges of the H vertical panels to form a hollow structure, and H is a positive integer greater than 1.
[0021] In combination with the third aspect, in certain implementations of the third aspect, the fixing mechanism includes K slide rails, J sliding parts and J fixing parts, wherein the K slide rails are located outside the edge of the platform, the J sliding parts are arranged in the K slide rails, and each sliding part is equipped with a fixing part, the fixing part is used to fix the sliding part on the slide rail, the sliding part is provided with a protrusion, and the protrusion extends above the platform, the protrusion is used to limit the position of the first electronic device, wherein J and K are positive integers.
[0022] In a fourth aspect, a computer-readable storage medium is provided, storing a computer program or instruction, wherein the computer program or instruction is used to implement the method in any possible implementation manner in the method design of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 1 is a schematic diagram of the main structure of a pin detection system 100 proposed in an embodiment of the present application;
[0024] Figure 2 is a top view of the placement position of a pin detection system 100 proposed in an embodiment of the present application;
[0025] Figure 3 is a structural schematic diagram of an image acquisition component 120 proposed in an embodiment of the present application;
[0026] Figure 4 is a flowchart of a method 400 for pin detection proposed in an embodiment of the present application;
[0027] Figure 5 is a flowchart of a method 500 for determining a region of interest proposed in an embodiment of the present application;
[0028] Figure 6 is a flowchart of a feature extraction method 600 proposed in an embodiment of the present application;
[0029] Figure 7 is a flowchart of a method 700 for image noise recognition proposed in an embodiment of the present application;
[0030] Figure 8 is a schematic diagram of a pin detection device 800 provided in an embodiment of the present application;
[0031] Fig. 9 It is a schematic diagram of a graphical interactive interface 900 of an image processing device proposed in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The technical solution in this application will be described below in conjunction with the accompanying drawings.
[0033] The embodiments of the present application will present various aspects, embodiments or features around a system including multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and / or may not include all devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.
[0034] In addition, in the embodiments of the present application, words such as "exemplary" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.
[0035] The business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of technology and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0036] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0037] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can be represented by: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0038] In the description of the embodiments of the present application, the directions or positional relationships indicated by terms such as "up", "down", "left", "right", "inside", "outside", "vertical" and "horizontal" are defined relative to the directions or positions of the components schematically placed in the drawings. It should be understood that these directional terms are relative concepts. They are used for relative description and clarification, rather than indicating or implying that the device or component referred to must have a specific direction, or be constructed and operated in a specific direction. They may change accordingly according to changes in the directions of the components placed in the drawings, and therefore cannot be understood as limitations on the present application.
[0039] In the embodiments of the present application, the same reference numerals are used to represent the same components or parts. For the same parts in the embodiments of the present application, only one of the parts or parts may be marked with a reference numeral in the figure. It should be understood that the reference numerals are also applicable to other identical parts or parts. In addition, the various parts in the drawings are not drawn to scale, and the sizes and dimensions of the parts shown in the drawings are only exemplary and should not be understood as limiting the present application.
[0040] Electronic devices usually require pins of a specific structure to connect to the corresponding circuit boards and other components or devices. If the pins are damaged or abnormally positioned, that is, the pin arrangement structure is abnormal, it may cause the device to not work properly, or cause circuit failure, affecting the performance and reliability of the electronic device. Therefore, in the electronic equipment production line, a series of quality control operations are required for the electronic equipment, among which pin detection is an important part of the quality control of electronic equipment.
[0041] Pins are metal contacts used to connect circuit board components. They are usually slender metal rods that are inserted into sockets or connectors to establish electrical connections between electronic components. Taking a display panel as an example, a pin-based pin header structure can be used to connect the display's drive circuit, backlight power supply, touch screen interface, etc.
[0042] Pin detection refers to the detection of the pin position and structure of electronic products to determine whether there are missing or offset pins in the electronic products, so as to prevent abnormal products from flowing into the next process of the production line, ensure that the pin interface is not offset or missing, etc., to improve the quality of electronic products.
[0043] At present, the pin detection of electronic products is based on manual inspection. During the manual inspection process, the operator needs to use a small handheld electron microscope and manually and quickly translate the lens to check whether there are any abnormalities in the pin position or structure of the electronic product.
[0044] However, the manual pin detection method has the following problems:
[0045] 1. The field of view of an electron microscope is small, and each image acquisition operation can only capture part of the pin images on the electronic device.
[0046] 2. There may be multiple pin arrangements in the same product. When manually translating the lens of the electron microscope, it is necessary to adaptively adjust the translation direction of the lens based on the pin arrangement in the field of view. Each image acquisition operation takes 3 to 5 seconds, which is inefficient and reduces the production capacity of the production line.
[0047] 3. The accuracy of manual operation is poor. On the one hand, the human eye inspection method is easy to cause visual fatigue after working for a long time, and there is instability in the detection standard. On the other hand, in the process of manually and quickly moving the lens of the electron microscope, due to the shaking of the lens and the fast translation speed, it is difficult to ensure the accuracy of the detection of pins in the field of view.
[0048] 4. During the entire manual inspection process, there is usually no record of inspection results for each product. When product quality problems are discovered later, it is difficult to trace them back to the stitch inspection link of the production line.
[0049] In view of this, the embodiments of the present application propose a method, device and system for pin detection. After the electronic product is placed on the pin detection carrier proposed in the embodiments of the present application, the pin detection method proposed in the embodiments of the present application can be automatically triggered and executed directly, which can improve the efficiency of pin detection while ensuring the stability and accuracy of pin detection of electronic products.
[0050] Figure 1 Schematic diagram of the architecture of a pin detection system 100 proposed in an embodiment of the present application.
[0051] refer to Figure 1 As shown, the system 100 includes:
[0052] A carrier 110, the carrier 110 is used to carry the electronic device to be tested;
[0053] The image acquisition component 120 is located on the first side of the stage 110 . The image acquisition component includes a camera 121 , a lens 122 and a light source 123 . The camera 121 , the lens 122 and the light source 123 are coaxially arranged.
[0054] The lens 122 corresponds to the surface of the stage 110 .
[0055] The image processing device 130 is connected to the image acquisition component 120, and is used to receive the image from the image acquisition component, extract features of the stitches included in the image, analyze whether there is an abnormality in the stitches based on the extracted features, and output the detection result.
[0056] In some possible embodiments, the image processing device 130 is provided with a digital image processing algorithm for stitch detection and is configured with a stitch abnormality judgment mechanism, so that the image processing device can use universal stitch abnormality judgment conditions, thereby avoiding the instability of manual stitch detection.
[0057] In some possible embodiments, the light source 123 is a ring-shaped light source, and the ring of the light source 123 passes through the lens 122, so that light can propagate in multiple directions to ensure that the corners of the electronic device panel can also be illuminated.
[0058] In some possible embodiments, the camera 121 is a wide-angle camera so as to be able to acquire all pins deployed on the electronic device.
[0059] In some possible embodiments, the lens 122 is a fixed-focus telecentric lens to ensure a clear image.
[0060] In some possible embodiments, the light source 123 is a yellow polarized light source, which can reduce the interference of reflected light in the detection environment and highlight the stitch image.
[0061] In some possible embodiments, the connection established between the image processing device 130 and the image acquisition component 120 may be a wired connection or a wireless connection, as long as it can ensure that the image processing device 130 can obtain the image acquired by the image acquisition component 120 in a timely manner.
[0062] In some possible embodiments, the image processing device 130 may be a computer with digital image processing capabilities.
[0063] In some possible embodiments, the above-mentioned image processing device 130 can also be connected to the input device 140 and the output device 150 respectively, wherein the input device 140 is used to configure relevant parameters of the stitch detection algorithm in the image processing device and other operations, and the output device 150 is used to display operable controls, stitch detection results and other information to the user through a graphical interface.
[0064] In some possible embodiments, the input device 140 may be a keyboard and a mouse, and the output device 150 may be a display screen.
[0065] In some possible embodiments, the system 100 may further include a trigger switch 135, which is used to trigger the image acquisition component 120 to acquire an image of the electronic device being detected and transmit the image to the image processing device 130, and the image processing device 130 performs a series of operations such as extracting features of the pins of the electronic device based on the image and determining whether the pins are abnormal based on the extracted features, and outputting the detection results. The trigger switch 135 can be a virtual graphic switch displayed by the output device 150, that is, it can be an application control or a physical switch.
[0066] In some possible embodiments, the image acquisition component 120 may be fixed to a first sliding portion 125, and the system 100 further includes a first slide rail 126, and the first slide portion 125 is used to slide on the first slide rail 126, so that the coverage position of the viewing angle of the camera 121 in the image acquisition component 120 can be adaptively adjusted for electronic devices of different specifications, thereby increasing the detection flexibility of the system 100.
[0067] In some possible embodiments, the first sliding portion 125 is further provided with a first fixing portion, which is used to fix the first sliding portion 125 to the first slide rail 126, so as to prevent the image acquisition component 120 from being unexpectedly changed in position on the first slide rail 126 due to the influence of the system 100 itself or external external forces.
[0068] Based on the above technical solution, the system 100 detects the pin position and structure of the electronic device through the image acquisition component 120 and the image processing device 130. The operator only needs to place the electronic device on the carrier 110 and trigger the pin detection process of the system 100, thereby avoiding manual participation in the entire pin detection process as much as possible. In addition, the pin detection based on the digital image processing method has a stable judgment standard, which helps to improve the accuracy of pin detection while also helping to improve the efficiency of pin detection.
[0069] In some possible embodiments, a graphic code is provided on the electronic device being detected, and the graphic code includes identification information of the electronic device. Based on this, the above-mentioned system 100 may also include a graphic code scanner 145, which is configured to respond to the graphic code of the electronic device and associate the identification information of the electronic device with the scanning time.
[0070] For example, before the operator triggers the system 100 to start the pin detection process, the graphic code scanner 145 can be used to scan the graphic code on the electronic device, so as to associate the identification information of the electronic device with the scanning time.
[0071] Based on the above technical solution, before the electronic device performs pin detection, the identification information of the electronic device can be associated with the scanning time, so that when the electronic device is subsequently pointed out to have a pin abnormality, the pin detection process of the electronic device can be traced back to preliminarily determine whether the pin abnormality of the electronic device started from the production line or other production processes.
[0072] In some possible embodiments, the system 100 may further include:
[0073] The fan 160 is located above the carrier 110 , and an air outlet of the fan 160 is opposite to the surface of the carrier 110 .
[0074] In some possible embodiments, the fan 160 may be an ion fan.
[0075] For example, after the operator places the electronic device on the carrier 110 , the blower 160 may be started to blow air to the surface of the electronic device, thereby removing impurities attached to the surface of the electronic device as much as possible.
[0076] Based on the above technical solution, a fan 160 is set in the system 100, so that the system 100 blows air on the surface of the electronic device before performing pin detection on the electronic device to remove impurities attached to the surface of the electronic device, thereby avoiding as much as possible the adverse effects of impurities on subsequent pin detection.
[0077] In addition, the system 100 can be mounted on a Figure 1 In the cabinet shown.
[0078] Figure 2 It is a top view of the placement position of a pin detection system 100 proposed in an embodiment of the present application.
[0079] refer to Figure 2 As shown, the working area of pin detection may include the following areas:
[0080] A first logistics area 210, the left side of which is connected to the output end 205 of the previous process of the production line, and is used to receive the electronic equipment transmitted from the production line;
[0081] The installation area 220 of the system 100, the left side of the installation area 220 is adjacent to the right side of the first logistics area 210;
[0082] The working area 230 is located in front of the placement area 220 to present the carrier 110 of the system 100 to the operator in the working area.
[0083] The unqualified product unloading area 240 is adjacent to the right side of the above-mentioned placement area 220, so that the operator can directly put the electronic equipment on the current carrier 110 into the unqualified product unloading area 240 based on the unqualified product result output by the system 100, so that the unqualified product can be intercepted on the production line.
[0084] The second logistics area 250, the left side of which is adjacent to the right side of the operation area 230, is used to receive electronic products that have passed the inspection, and the right side of which is connected to the input of the next process of the production line, is used to transmit the qualified products to the next process of the production line.
[0085] For example, the operator only needs to place the electronic device from the previous process of the production line normally on the carrier 110 of the system 100 and start the detection process of the system 100 to detect the pin structure and position of the electronic device and output the corresponding detection result. When the detection result is qualified, the operator only needs to put the electronic device into the second logistics area; when the detection result is unqualified, the operator only needs to put the electronic device into the unqualified product unloading area; the process is simple to operate, and the accuracy, stability and efficiency of pin detection based on digital image processing are significantly higher than manual detection.
[0086] Figure 3 It is a structural schematic diagram of an image acquisition component 120 proposed in an embodiment of the present application.
[0087] refer to Figure 3 As shown, the image acquisition component 120 also includes:
[0088] The fixing frame 170 includes a first sub-fixing frame 171, a second sub-fixing frame 172 and a third sub-fixing frame 173, wherein the first sub-fixing frame 171 is used to fix the camera 121 (in Figure 3 is blocked by the second sub-mount housing, so Figure 3 The second sub-fixing frame 172 is used to fix the lens 122, and the third sub-fixing frame 173 is used to fix the light source 123.
[0089] In some possible embodiments, the first sub-fixing frame 171 is disposed adjacent to the second sub-fixing frame 172 , and the third sub-fixing frame 173 is disposed adjacent to the second sub-fixing frame 172 , and ensures that the camera 121 , the lens 122 , and the light source 123 are coaxially disposed.
[0090] In some possible embodiments, the second sub-fixing frame 172 includes a ring fixture 1720, which includes a first semi-circular ring 1721 and a second semi-circular ring 1722. The first semi-circular ring 1721 and the second semi-circular ring 1722 are connected by a telescopic member 1723 to increase or decrease the distance between the first semi-circular ring 1721 and the second semi-circular ring 1722, so as to adapt to lenses with different size parameters.
[0091] In addition, the embodiments of the present application also make corresponding structural improvements to the above-mentioned carrier.
[0092] Refer to the above Figure 1 As shown, the carrier 110 may include:
[0093] A platform 111, the platform 111 is opposite to the image acquisition component 120;
[0094] The fixing mechanism 112 is used to fix the electronic device at a designated position of the platform 111 so that the electronic device is completely exposed to the field of view of the camera 121 .
[0095] In some possible embodiments, the platform 111 includes H vertical panels, a bottom plate and a top plate, the H vertical panels 01 are vertically fixed to the bottom plate, and the top plate is fixed to the top edges of the H vertical panels to form a platform body with a hollow structure. H is a positive integer greater than 1, and usually H is 4, so that the platform 110 is in the shape of a rectangular parallelepiped.
[0096] In some possible embodiments, the fixing mechanism 112 may be a limiter, so that the electronic device can be restricted in a specified position.
[0097] In some possible embodiments, reference Figure 1 As shown, the fixing mechanism 112 may include K second slide rails, J second sliding parts and J second fixing parts, wherein the K second slide rails are located outside the edge of the platform 111, the J second sliding parts are arranged in the K second slide rails, and each second sliding part is equipped with a second fixing part, the second fixing part is used to fix the second sliding part on the second slide rail to prevent the second sliding part from continuing to slide on the second slide rail, and the second sliding part is provided with a protrusion, the protrusion extends above the platform 111, and the protrusion is used to limit the position of the electronic device placed on the platform 111. Wherein, J and K are positive integers.
[0098] In some possible embodiments, further, the protrusion can be retractable.
[0099] In some possible embodiments, when the platform 111 is a rectangular parallelepiped and K=2, two second slide rails may be located on both sides (left and right sides) of the platform 111; when K=3, two of the second slide rails may be located on the left and right sides of the platform 111, and the remaining second slide rail may be located on the upper side of the platform 111. At this time, the platform 111 may be designed as a structure in which the height of the lower side of the platform 111 is higher than the height of the upper side of the platform 111, so that the electronic device can naturally rest on the second sliding portion in the second slide rail arranged on the upper side of the platform 111 based on gravity, so as to achieve position restriction of the electronic device on the platform 111; when K=4, four second slide rails may surround the platform 111.
[0100] Based on the above technical solution, through the special design of the structure of the carrier 110, the electronic device can be fixed at a specified position through the fixing mechanism 112 included in the carrier 110, so that the electronic device can be completely exposed to the field of view of the camera 121, and for electronic devices prepared in the same batch, as long as the position of the first electronic device is fixed for the first time based on the fixing mechanism 112, there is no need to adjust the sub-fixing mount of the fixing mechanism 112 again. The subsequent position of the electronic device can reuse the fixing state when the fixing mechanism 112 fixes the first electronic device. It is only necessary to put the electronic device into the fixed range limited by the fixing mechanism 112, thereby simplifying the operating process of the operator and helping to increase the efficiency of pin detection.
[0101] In addition, the present application also provides a method for detecting stitches, which can be installed in the above-mentioned image processing device 130 to realize the function of the image processing device to detect stitches. Of course, the method can also be installed in other image processing devices for stitch detection.
[0102] Figure 4 It is a flowchart of a method 400 for pin detection proposed in an embodiment of the present application.
[0103] refer to Figure 4 As shown, the method 400 includes the following steps:
[0104] S410: Acquire a first image, where the first image includes a first electronic device;
[0105] In some possible embodiments, the first image may be acquired by an image acquisition device, and the image acquisition device may be a camera. Furthermore, the camera may be the camera in the system 100 proposed in the embodiment of the present application.
[0106] S420: Determine a first region of interest in the first image, where the first region of interest includes N pins deployed on the first electronic device, where N is a positive integer.
[0107] S430: Based on the M region matching templates, matching operations are performed on the first region of interest respectively to determine M candidate regions, the M region matching templates correspond to M stitch arrangement presentation forms, and each candidate region corresponds to a region matching score, M is greater than 1.
[0108] In some possible embodiments, the above-mentioned region matching template is used to pre-store image features in multiple stitches to be detected. The higher the matching score between the region matching template and the candidate region, the higher the similarity between the stitch arrangement form presented in the candidate region and the stitch arrangement form corresponding to the region matching template.
[0109] It should be understood that the above-mentioned multiple different area matching templates can be matched with the pin arrangement forms presented to the outside under different observation angles and different light and shadow conditions (including different light intensities, different light distributions and other factors) under the same pin arrangement form, and can also be matched with different pin arrangement forms presented to the outside under different degrees of occlusion of the pins under the same pin arrangement form. Using multiple matching templates to match N pins of the same arrangement form can avoid mismatching of the first region of interest caused by some pins being blocked by other materials, improve the extraction accuracy of the first region of interest, and help improve the accuracy and stability of pin detection.
[0110] It should be understood that the matching operation refers to searching the first region of interest for the part that is most similar to the region matching template using the corresponding region matching template. The matching operation process generally involves sliding the region matching template in the first region of interest and calculating the matching degree at each position.
[0111] In the process of performing a matching operation on at least part of the first region of interest using the region matching template, a corresponding score is determined based on the degree of matching between the two. After completing the matching of the first region of interest based on the matching template, multiple scores are usually output, where the matching region corresponding to the highest score can be considered as the region where the N pins corresponding to the region matching template are deployed. In addition, the above-mentioned region matching template is associated with the arrangement form of the N pins, and the arrangement form of the N pins can be the positional relationship between the N pins and the geometric parameters of the N pins.
[0112] For ease of understanding, the following takes the first region matching template among the M region matching templates as an example to describe in detail the operation process of performing matching operations on the first region of interest based on the M region matching templates:
[0113] After obtaining the above-mentioned first region matching template, a matching operation can be performed on the K sub-regions in the first region of interest based on the first region matching template to determine the sub-region matching score corresponding to each sub-region; then the sub-region corresponding to the highest sub-region matching score is determined as the first candidate region, and the first candidate region belongs to the M candidate regions.
[0114] In some possible embodiments, the above matching operation may include square difference matching, correlation matching or coefficient matching, etc. A suitable matching algorithm may be selected according to different actual application scenarios.
[0115] S440: Perform feature extraction on the target area to determine a first feature parameter of the target area, the target area is the candidate area with the highest area matching score among the M candidate areas, and the first feature parameter includes at least one of the following: the number, shape and position of the pins in the target area.
[0116] It should be understood that since the target area is the candidate area with the highest area matching score among the M candidate areas, it can be considered that the target area is the area where the above-mentioned N pins are deployed.
[0117] In some possible embodiments, after acquiring the target area, the contrast between the first color and other colors in the first region of interest may be increased according to the first color presented by the N pins, so as to highlight the morphological features and positional features of the N pins.
[0118] In some possible embodiments, the morphological features of the stitches may include posture features and shape features of the stitches; the position features of the stitches may include absolute position features of the stitches deployed in the first region of interest, and relative position features between the stitches.
[0119] S450: Determine whether the pin arrangement of the first electronic device is qualified according to the first characteristic parameter.
[0120] In some possible embodiments, during the execution of S450 , it is necessary to determine a target characteristic parameter, where the target characteristic parameter is used to indicate a characteristic parameter that the N pins need to satisfy.
[0121] For example, the target feature parameter may be used to indicate the morphological features, position features, and quantity features that the N stitches need to satisfy.
[0122] In some possible embodiments, the above target characteristic parameters can be adaptively adjusted according to different electronic device models or parameters.
[0123] In some possible embodiments, the target characteristic parameters may be pre-configured by an operator. For example, before an operator performs pin detection on a batch of electronic devices of the same model, the operator may configure the target characteristic parameters according to the model of the electronic device.
[0124] In some possible embodiments, the above S450 may be implemented in the following manner: comparing the first characteristic parameter with the target characteristic parameter; and determining that the pin arrangement of the first electronic device is qualified when the first characteristic parameter matches the target characteristic parameter.
[0125] It should be noted that the above-mentioned first characteristic parameter and target characteristic parameter are consistent may mean that the first characteristic parameter and the target characteristic parameter are consistent, or may mean that the difference between the first characteristic parameter and the target characteristic parameter is less than an error threshold, and the error threshold may also be pre-configured.
[0126] Based on the above technical solution, it is possible to realize automatic pin detection of electronic devices. Considering that the area on the electronic device used to deploy pins is only a small area of the entire electronic device, by first extracting the first region of interest, and then performing the pin feature extraction operation based on the first region of interest, the feature extraction area is greatly reduced, which helps to improve the efficiency of pin detection. In addition, in the process of extracting the first region of interest where pins are deployed, multiple complementary and identical region matching templates are used to extract the first region of interest from multiple observation angles and / or light and shadow conditions to avoid mismatching of the first region of interest due to the obstruction of some pins by other materials, thereby improving the extraction accuracy and robustness of the first region of interest, and helping to improve the accuracy and stability of pin detection.
[0127] Figure 5 It is a flowchart of a method 500 for determining a region of interest proposed in an embodiment of the present application.
[0128] refer to Figure 5 The method 500 comprises the following steps:
[0129] S510: Perform threshold segmentation processing on the first image to determine a second image, where the second image retains features of N stitches.
[0130] Among them, threshold segmentation processing is a region-based image segmentation technology. The principle is to divide the pixels of the image into different categories or regions by setting one or more thresholds. Different categories or regions usually correspond to different objects or features in the image.
[0131] In some possible embodiments, before executing the above S510, Gaussian filtering may be performed on the first image to reduce partial image noise in the first image.
[0132] S520: performing an opening operation to determine a third image. Compared with the second image, the third image removes objects in the second image whose volumes are less than or equal to a volume threshold, and the volume threshold is less than the volume of the stitches.
[0133] Among them, the opening operation is an operation of morphological processing, which can include two steps: erosion and dilation. When performing the opening operation, the image needs to be eroded first, and then dilated. Among them, the erosion operation will remove small objects or noise in the image, and the edges of the objects will be gradually eroded, removing smaller irregular parts. The dilation operation will gradually expand or connect the pixels that match the structural elements, thereby restoring part of the eroded image information.
[0134] S530: Determine a first region of interest according to the third image.
[0135] It should be understood that after the above S510 and S520, the features of the stitches can be extracted from the first image, and interfering objects smaller than the stitches are removed, so that the N stitches can be highlighted in the third image to facilitate determination of the first region of interest.
[0136] Based on the above technical solution, the image noise in the first image can be effectively removed by performing threshold segmentation processing and opening operation processing on the first image, thereby helping to improve the accuracy of extracting the first region of interest.
[0137] In some possible embodiments, the above-mentioned first electronic device may also include a first graphic code, which may carry first identification information of the first electronic device, and the first identification information may be associated with the first area of interest. In view of this, after acquiring the first image code, the first area of interest may be determined based on the first identification information of the first electronic device carried by the first graphic code.
[0138] In some possible embodiments, the first graphic code may be a barcode, a QR code, etc.
[0139] In some possible embodiments, the above-mentioned first identification information and the information associated with the first area of interest can be determined in a pre-configured manner. For example, when generating the first graphic code, the position information of the first area of interest of the first electronic device can be obtained, and the position information can be associated with the first identification information. Then for electronic devices of the same model in the same batch, the position information of the same first area of interest can be associated with the identification information of multiple electronic devices in the batch. Therefore, after obtaining the identification information of the electronic device, the position of the area of interest for deploying N pins in the electronic device can be directly determined.
[0140] In some possible embodiments, after the first region of interest is acquired, threshold segmentation and opening operations may be performed on the first region of interest to reduce image noise in the first region of interest.
[0141] Based on the above technical solution, it is possible to avoid performing corresponding image processing operations based on the first image to determine the first region of interest, and the first region of interest can be directly determined based on the first identification information of the first electronic device, thereby reducing the image processing overhead during the pin detection process.
[0142] In addition, the embodiment of the present application also proposes a feature extraction method to achieve feature extraction of the target area.
[0143] Figure 6 It is a flowchart of a feature extraction method 600 proposed in an embodiment of the present application.
[0144] refer to Figure 6 As shown, the method 600 includes the following steps:
[0145] S610: Determine a first configuration file, where the first configuration file is used to indicate the starting position and deployment range of N pins in the first electronic device.
[0146] In some possible embodiments, the above-mentioned first configuration file can be pre-stored in the image processing device by the operator before executing the pin detection method proposed in the embodiment of the present application. When the image processing device executes the present method 700, it can directly call the first configuration file to obtain the starting position and deployment range of N pins in the first electronic device, and then enter the subsequent feature extraction process.
[0147] In some possible embodiments, the N pins deployed on the first electronic device are usually arranged in an array, and the starting position of the N pins on the first electronic device refers to the position of the first pin on the first electronic device, which coincides with the outer edge of the pin (the inner edge of the pin is opposite to the adjacent pin).
[0148] In some possible embodiments, the deployment range of the N pins in the first electronic device may be the deployment range of each pin, such as a rectangular area of 1 cm×2.5 cm, a rectangular area of 0.75 cm×2.5 cm, etc. Or the deployment range of the N pins in the first electronic device may be the deployment range of each pin, which can be characterized by the value of N and the overall deployment range of the N pins. For example, the overall deployment range of the N pins is a rectangular area with a length of 30 cm and a width of 2.5 cm, and N is equal to 30, from which it can be inferred that each pin corresponds to a rectangular area with a length of 1 cm and a width of 2.5 cm.
[0149] S620: Divide the target area into N first target sub-areas according to the first configuration file.
[0150] It should be understood that each first target sub-region corresponds to a single stitch, so in the absence of recognition errors, the N first target sub-regions correspond one-to-one to the N stitches, that is, one first target sub-region includes one stitch.
[0151] S630: Extract features from the N first target sub-regions to determine the morphological features and positional features of the stitches in each first target sub-region.
[0152] Based on the above technical solution, feature extraction is performed in a small area corresponding to each stitch to obtain corresponding feature parameters, which helps to deeply analyze the morphological characteristics and positional characteristics of each stitch, thereby helping to improve the accuracy of stitch detection.
[0153] In addition, considering that there may be cases of misidentification of the feature extraction object during the feature extraction process, for example, due to factors such as reflection, there are bright spots or bright lines near the stitches, which makes it easy to identify the bright spots or bright lines as stitches during the feature extraction process. In response to this situation, an embodiment of the present application also proposes a method for image noise recognition.
[0154] Figure 7 7 is a flow chart of a method 700 for image noise recognition proposed in an embodiment of the present application.
[0155] refer to Figure 7 As shown, the method 700 includes the following steps:
[0156] S710: Fitting a first straight line where the N stitches are located according to the N stitches.
[0157] In some possible embodiments, the basis for fitting the first straight line may be any reference point among the N stitches, but it is necessary to ensure that the positions of the reference points set in the N stitches are consistent, for example, the reference point may be the center point of the N stitches.
[0158] S720: Determine the distance from the first reference point of each stitch to the first straight line.
[0159] In some possible embodiments, the first reference point may be any reference point among the N pins, but it is necessary to ensure that the positions of the reference points selected from the N pins are consistent, for example, the reference point may be the aforementioned reference point.
[0160] S730: When it is determined that the distance from the first reference point of a first stitch among the N stitches to the first straight line is outside a preset distance range, determine that the first stitch is image noise.
[0161] In some possible embodiments, the above-mentioned preset distance range can be understood as an error range. If the distance from the first reference point to the first straight line exceeds the preset distance range or does not reach the preset distance range, it means that there is an abnormality in the morphological characteristics of the first stitch, for example, the first stitch is too long or too short, or the first stitch is actually a bright spot or bright line caused by reflection on the first electronic device, that is, image noise.
[0162] In some possible embodiments, after determining that the first stitch is image noise, the following operations may also be performed: reducing the first target sub-region corresponding to the first stitch to determine the second target sub-region; performing feature extraction on the second target sub-region to determine a second feature parameter, and when the second feature parameter is used to indicate the feature of a stitch, replacing the feature parameter corresponding to the first stitch with the second feature parameter.
[0163] It should be understood that when the second characteristic parameter is used to indicate the characteristics of a stitch, it at least includes the location characteristics used to describe the stitch, thereby indicating that the stitch can be identified in the second target sub-region.
[0164] In some possible embodiments, generally, the second characteristic parameter may include a morphological feature and a position feature for describing a stitch.
[0165] Based on the above technical solution, it is possible to effectively determine whether there is image noise (such as bright spots or bright lines caused by reflection) in the N stitches obtained through image recognition, which helps to reduce the interference of background noise, thereby accurately determining the first area of interest, improving the accuracy of template matching, and further improving the accuracy of stitch detection.
[0166] In addition, embodiments of the present application also provide a device for implementing any of the above methods. For example, a device for stitch detection is provided, and the device includes a unit (or means) for implementing any of the above stitch detection methods.
[0167] Figure 8 It is a schematic diagram of a pin detection device 800 provided in an embodiment of the present application.
[0168] refer to Figure 8 As shown, the device 800 includes:
[0169] An acquisition unit 810 is configured to acquire a first image, where the first image includes a first electronic device;
[0170] A first determining unit 820 is configured to determine a first region of interest in the first image, where the first region of interest includes N pins deployed on the first electronic device, where N is a positive integer;
[0171] A matching unit 830 is used to perform matching operations on the first region of interest based on the M region matching templates to determine M candidate regions, the M region matching templates correspond to the M pin arrangement presentation forms, and each candidate region corresponds to a region matching score;
[0172] The processing unit 840 is used to perform feature extraction on the target area to determine a first feature parameter of the target area, where the target area is the candidate area with the highest region matching score among the M candidate areas, and the first feature parameter includes at least one of the following: the number, shape, and position of pins in the target area;
[0173] The second determining unit 850 is configured to determine whether the pin arrangement of the first electronic device is qualified according to the first characteristic parameter.
[0174] In some possible embodiments, the M region matching templates include a first region matching template, and the matching unit 830 is specifically used to: perform matching operations on the K sub-regions in the first region of interest based on the first region matching template to determine the sub-region matching score corresponding to each sub-region; determine the sub-region corresponding to the highest sub-region matching score as the first candidate region, and the first candidate region belongs to the M candidate regions.
[0175] In some possible embodiments, the processing unit 840 is specifically used to: determine a first configuration file, which is used to indicate the starting position and deployment range of N pins in the first electronic device; divide the target area into N first target sub-areas according to the first configuration file; perform feature extraction on the N first target sub-areas to determine the morphological features and position features of the pins in each first target sub-area.
[0176] In some possible embodiments, after the processing unit 840 determines the morphological features and positional features of the stitches in each first target sub-region, the processing unit 840 is further used to: fit a first straight line where the N stitches are located according to the N stitches; determine the distance from the first reference point of each stitch to the first straight line; and when it is determined that the distance from the first reference point of the first stitch among the N stitches to the first straight line is outside a preset distance range, determine that the first stitch is image noise.
[0177] In some possible embodiments, when determining that the first stitch is image noise, the processing unit 840 is further used to reduce the first target sub-region corresponding to the first stitch to determine the second target sub-region; perform feature extraction on the second target sub-region to determine a second feature parameter, and when the second feature parameter is used to indicate the feature of a stitch, replace the feature parameter corresponding to the first stitch with the second feature parameter.
[0178] In some possible embodiments, the first determination unit 820 is specifically used to: perform threshold segmentation processing on the first image to determine a second image, where the second image retains features of N stitches; perform opening operation processing on the second image to determine a third image, where, compared with the second image, the third image removes objects in the second image whose volume is less than or equal to a volume threshold, where the volume threshold is less than the volume of the stitches; and determine a first region of interest based on the third image.
[0179] In some possible embodiments, the first electronic device includes a first graphic code, and the first determination unit 820 is specifically used to determine the first area of interest based on first identification information of the first electronic device carried by the first graphic code, and the first identification information is associated with the first area of interest.
[0180] In some possible embodiments, before the first determining unit 820 performs threshold segmentation processing on the first image, the first determining unit 820 is further configured to: perform Gaussian filtering processing on the first image.
[0181] In some possible embodiments, before the processing unit 840 performs feature extraction on the target area, the processing unit 840 is further configured to: increase the contrast between the first color and other colors in the first region of interest according to the first color presented by the N pins.
[0182] In some possible embodiments, the second determination unit 850 is specifically used to: compare the first characteristic parameter with the target characteristic parameter, where the target parameter is used to indicate the characteristic parameter that the N pins need to meet; when the first characteristic parameter matches the target characteristic parameter, it is determined that the pin arrangement of the first electronic device is qualified.
[0183] An embodiment of the present application also proposes a device for pin detection, which includes a processor and a memory, wherein the processor and the memory are connected, wherein the memory is used to store program code, and the processor is used to call the program code to execute any pin detection method proposed in the embodiment of the present application.
[0184] Fig. 9 It is a schematic diagram of a graphical interactive interface 900 of an image processing device proposed in an embodiment of the present application.
[0185] It should be understood that the graphical interactive interface 900 is an interface that can be displayed to the operator through the output device 150 connected to the image processing device 130, which is used to assist the operator in inputting corresponding detection algorithm parameters to the image processing device 130, such as the target feature parameters mentioned in the embodiment of the present application, the model of the electronic device being tested and other information, and display the real-time acquired image of the electronic device being tested, as well as the display image related to the stitch detection result to the operator.
[0186] refer to Fig. 9 As shown, the above-mentioned graphical interaction interface 900 may include:
[0187] The real-time image area 910 is used to display the real-time image captured by the current image acquisition component 120 for real-time monitoring and analysis by operators;
[0188] The defective product display area 920 is used to display images or marks of defective products to assist operators in quickly identifying and handling the defective products;
[0189] Image feature extraction result display area 930, used to display the feature image of the product that has completed the stitch inspection and the related inspection parameters for recording and analysis;
[0190] The camera configuration area 940 is used to assist the operator in pointing and adjusting the working parameters of the camera 121 to improve the image acquisition quality;
[0191] Image processing parameter configuration area 950 is used to assist the operator in selecting the model of the current electronic device under test and the corresponding detection algorithm parameters to ensure that the pin detection is performed normally and accurately;
[0192] The product test result display area 960 is used to display the image and test result (qualified / unqualified / pending) of the current tested product, and provide real-time test status feedback and data records for the operator.
[0193] When the test result is pending, the operator can check whether the electronic device under test has any problems such as obstruction, and perform a secondary test on the electronic device under test.
[0194] 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 in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0195] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0196] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0197] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0198] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0199] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0200] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for pin detection, characterized in that: The method comprises: Acquire a first image, wherein the first image includes a first electronic device; Determine a first region of interest in the first image, where the first region of interest includes N pins deployed on the first electronic device, where N is a positive integer; Based on M region matching templates, matching operations are performed on the first region of interest respectively to determine M candidate regions, wherein the M region matching templates correspond to M pin arrangement presentation forms, and each candidate region corresponds to a region matching score, and M is greater than 1; Performing feature extraction on a target area to determine a first feature parameter of the target area, wherein the target area is a candidate area with the highest region matching score among the M candidate areas, and the first feature parameter includes at least one of the following: the number, shape, and position of the pins in the target area; Whether the pin arrangement of the first electronic device is qualified is determined according to the first characteristic parameter.
2. The method according to claim 1, characterized in that The M region matching templates include a first region matching template, and performing matching operations on the first region of interest based on the M region matching templates includes: Based on the first region matching template, performing a matching operation on the K sub-regions in the first region of interest to determine a sub-region matching score corresponding to each sub-region; The subregion corresponding to the highest subregion matching score is determined as a first candidate region, and the first candidate region belongs to the M candidate regions.
3. The method according to claim 1 or 2, characterized in that: The feature extraction for the target area comprises: Determine a first configuration file, where the first configuration file is used to indicate the starting position and deployment range of the N pins in the first electronic device; According to the first configuration file, the target area is divided into N first target sub-areas; Feature extraction is performed on the N first target sub-regions to determine the morphological features and positional features of the stitches in each of the first target sub-regions.
4. The method according to claim 3, characterized in that After determining the morphological features and positional features of the stitches in each of the first target sub-areas, the method further includes: Fitting a first straight line where the N stitches are located according to the N stitches; Determine the distance from the first reference point of each of the pins to the first straight line; When it is determined that the distance from the first reference point of a first stitch among the N stitches to the first straight line is outside a preset distance range, the first stitch is determined to be image noise.
5. The method according to claim 4, characterized in that The method further comprises: reducing the first target sub-region corresponding to the first stitch to determine a second target sub-region; Feature extraction is performed on the second target sub-region to determine a second feature parameter, and when the second feature parameter is used to indicate a feature of a stitch, the feature parameter corresponding to the first stitch is replaced with the second feature parameter.
6. The method according to any one of claims 1 to 5, characterized in that Determining a first region of interest in the first image comprises: Performing threshold segmentation processing on the first image to determine a second image, wherein the second image retains features of the N stitches; Performing an opening operation on the second image to determine a third image, wherein the third image is obtained by removing objects in the second image whose volume is less than or equal to a volume threshold, compared to the second image, and the volume threshold is less than the volume of the stitch; The first region of interest is determined according to the third image.
7. The method according to any one of claims 1 to 5, characterized in that The first electronic device includes a first graphic code, and determining a first region of interest in the first image includes: The first region of interest is determined according to first identification information of the first electronic device carried by the first graphic code, where the first identification information is associated with the first region of interest.
8. The method according to claim 6, characterized in that Before performing threshold segmentation processing on the first image, the method further includes: Perform Gaussian filtering on the first image.
9. The method according to any one of claims 1 to 8, characterized in that Before extracting features from the target area, the method further includes: According to the first color presented by the N pins, the contrast between the first color and other colors in the first region of interest is increased.
10. The method according to any one of claims 1 to 9, characterized in that The determining, according to the first characteristic parameter, whether the pin arrangement of the first electronic device is qualified includes: Comparing the first characteristic parameter with a target characteristic parameter, where the target characteristic parameter is used to indicate the characteristic parameter that the N pins need to satisfy; When the first characteristic parameter matches the target characteristic parameter, it is determined that the pin arrangement of the first electronic device is qualified.
11. A device for pin detection, characterized in that: The system comprises a processor and a memory, wherein the processor and the memory are connected, wherein the memory is used to store program codes, and the processor is used to call the program codes to execute the method according to any one of claims 1 to 10.
12. A system for pin detection, characterized in that: The system comprises: An image acquisition component, the image acquisition component includes a camera, a lens, a light source and a fixing frame, the light source, the lens and the camera are coaxially arranged, the light source is annular, the inside of the ring of the light source passes through the lens, and the lens is connected to the camera; An image processing device, the image processing device comprising the apparatus according to claim 11, the image processing device being connected to the image acquisition component; The carrier comprises a platform and a fixing mechanism, wherein the platform is opposite to the image acquisition component, and the fixing mechanism is used to fix a first electronic device at a first position of the platform so that the first electronic device is completely exposed within the field of view of the camera.
13. The system according to claim 12, characterized in that The fixing frame includes a first sub-fixing frame, a second sub-fixing frame and a third sub-fixing frame, wherein the first sub-fixing frame is used to fix the camera, the second sub-fixing frame is used to fix the lens, and the third sub-fixing frame is used to fix the light source.
14. The system according to claim 13, characterized in that The second sub-fixing frame includes a circular ring fixer, and the circular ring fixer includes a first semicircular ring and a second semicircular ring. The first semicircular ring and the second semicircular ring are connected by a telescopic member.
15. The system according to any one of claims 12 to 14, characterized in that The light source is a yellow polarized light source.
16. The system according to any one of claims 12 to 15, characterized in that The platform includes a bottom plate, a top plate and H vertical panels, the H vertical panels are vertically fixed to the bottom plate, and the top plate is fixed to the top edges of the H vertical panels to form a hollow structure, and H is a positive integer greater than 1.
17. The system according to any one of claims 12 to 16, characterized in that The fixing mechanism includes K slide rails, J sliding parts and J fixing parts, wherein the K slide rails are located outside the edge of the platform, the J sliding parts are arranged in the K slide rails, and each of the sliding parts is equipped with the fixing part, the fixing part is used to fix the sliding part on the slide rail, the sliding part is provided with a protrusion, and the protrusion extends above the platform, the protrusion is used to limit the position of the first electronic device, and K and J are positive integers.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 10.