Workpiece detection method, device and system, electronic equipment and storage medium
By determining the placement information of the workpiece to be tested at the first detection station of the workpiece detection system and applying it to other detection stations, the problems of long inspection time and low accuracy in the prior art are solved, and more efficient and accurate workpiece detection is achieved.
Patent Information
- Application Number
- CN202411958571.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-02-28
AI Technical Summary
The existing workpiece detection system needs to frequently judge the placement information of the workpiece between different detection stations and rotate and flip the image, resulting in an increase in detection time and the detection accuracy is affected by the position deviation of the loading device.
By determining the placement information of the workpiece to be tested at the first detection station and applying it to other detection stations, repeated judgments are avoided, and the object detection algorithm is directly executed based on the determined placement information to reduce image processing steps.
It significantly reduces the detection time, improves the detection efficiency and accuracy, and reduces the impact of position deviation of the feeding device on the detection results.
Smart Images

Figure CN119540224A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial detection, and in particular to a workpiece detection method, device, system, electronic equipment and storage medium. Background Art
[0002] Usually, after electronic components such as chips are manufactured, they need to be inspected for defects before leaving the factory to eliminate defective components. Defect inspection generally requires the use of a specialized inspection system. With the development of science and technology, the structural complexity of various components and the production capacity of components are constantly improving. Accordingly, higher requirements are placed on the inspection system of components, such as more complex target detection, higher inspection accuracy, and faster inspection speed.
[0003] In order to detect the workpiece, the detection system needs to take pictures, scan and perform other detection operations on each surface of the workpiece in different directions; even when detecting different surfaces, it is necessary to consider different angles of the workpiece, and finally perform sorting and unloading operations according to the detection results. When loading the workpiece, the workpiece may have fixed placement information, which may be the front or back, or the front and back. The placement information of the workpiece is different, and the detection area collected when the workpiece is imaged is also different. In order to perform target detection on the collected detection area, the prior art usually uses a placement information detection algorithm to judge the placement information at different detection stations, and rotates and mirrors the collected workpiece image for target detection. When using this method to detect the workpiece, the direction of the placement information of the workpiece needs to be judged at each detection station, which increases the detection time. On the other hand, since the position of the workpiece in the image will be affected by the feeding device, there will be deviations, and the detection area obtained after rotating and flipping the image will also have corresponding deviations. Therefore, it is necessary to obtain an area larger than the detection area from the detection image to cover the entire detection area, which leads to an increase in detection time again. Summary of the invention
[0004] The present invention is proposed in view of the above problems. The present invention provides a workpiece detection method, device, system, electronic device and storage medium. This solution can determine the target detection algorithm of each detection station for the workpiece to be detected based on the placement information of the workpiece to be detected determined by the first detection station, and the detection time is short and the flexibility is strong.
[0005] According to one aspect of the present invention, there is provided a workpiece detection method, which is applied to a workpiece detection system. The workpiece detection system includes at least two detection stations. For each of the at least two detection stations, at least two target detection algorithms corresponding to at least two placement information are preset. For the first detection station in the execution sequence of the at least two detection stations, a placement information detection algorithm is also preset. The placement information detection algorithm is used to obtain placement information indicating the workpiece to be measured. The method performs detection steps in the at least two detection stations in sequence according to the execution sequence; wherein, when the workpiece to be measured is located at the first detection station, the placement information detection algorithm is first executed for a first workpiece image of the workpiece to be measured collected at the first detection station to determine the placement information of the workpiece to be measured; then, a target detection algorithm corresponding to the placement information is executed according to the first workpiece image to obtain a detection result of the workpiece to be measured at the first detection station; when the workpiece to be measured is located at any non-first detection station of the at least two detection stations, a target detection algorithm corresponding to the determined placement information is executed according to a second workpiece image of the workpiece to be measured collected at the non-first detection station to obtain a detection result of the workpiece to be measured at the non-first detection station.
[0006] Optionally, when determining the placement information of the workpiece to be measured, the method also includes: marking the workpieces to be measured that arrive at the workpiece detection system in sequence to determine the marking information of each workpiece to be measured; associating and saving the marking information with the placement information; before executing the target detection algorithm corresponding to the determined placement information based on the second workpiece image of the workpiece to be measured collected at a non-first detection station, the method also includes: obtaining the placement information of the workpiece to be measured located at the detection station based on the marking information of the workpiece to be measured located at the detection station and the saved associated marking information and placement information.
[0007] Optionally, the placement information includes: front side placement information and back side placement information of the target surface of the workpiece to be measured.
[0008] Optionally, the placement information includes: location information of a preset mark on the target surface of the workpiece to be measured.
[0009] Optionally, before the detection step, the method also includes the following configuration steps: for each of the at least two detection stations, in response to first input information related to the target detection algorithm input by the user, configuring at least two target detection algorithms corresponding to the detection station that correspond one-to-one to at least two placement information; for the first detection station, in response to second input information related to the placement information detection algorithm input by the user, configuring a placement information detection algorithm to be executed when the workpiece to be measured is located at the first detection station.
[0010] Optionally, at least two inspection stations are arranged at intervals along the circumference of a turntable for placing the workpiece to be inspected.
[0011] Optionally, after executing the target detection algorithm corresponding to the determined placement information based on the second workpiece image of the workpiece to be measured collected at a non-first inspection station, the method also includes: obtaining multiple inspection results of the workpiece to be measured at at least two inspection stations; and obtaining a classification result of the workpiece to be measured based on the multiple inspection results and preset classification rules.
[0012] Optionally, before obtaining the classification result of the workpiece to be tested according to the multiple detection results and preset classification rules, the method further includes: determining the preset classification rule in response to operation information generated according to user operation, and the user operation includes creating and / or modifying the preset classification rule.
[0013] According to another aspect of the present invention, there is also provided a workpiece detection device, which is applied to a workpiece detection system. The workpiece detection system includes at least two detection stations. For each of the at least two detection stations, at least two target detection algorithms corresponding to at least two placement information are preset. For the first detection station in the execution sequence of the at least two detection stations, a placement information detection algorithm is also preset. The placement information detection algorithm is used to obtain placement information indicating the workpiece to be measured. The device is used to perform detection steps in the at least two detection stations in sequence according to the execution sequence. The device includes: a determination module, which is used to execute the placement information detection algorithm for a first workpiece image of the workpiece to be measured collected at the first detection station to determine the placement information of the workpiece to be measured; a first execution module, which is used to execute the target detection algorithm corresponding to the placement information according to the first workpiece image, so as to obtain the detection result of the workpiece to be measured at the first detection station; and a second execution module, which is used to execute the target detection algorithm corresponding to the determined placement information according to the second workpiece image of the workpiece to be measured collected at the non-first detection station when the workpiece to be measured is located at any non-first detection station of the at least two detection stations, so as to obtain the detection result of the workpiece to be measured at the non-first detection station.
[0014] According to another aspect of the present invention, there is provided a workpiece detection system, the system comprising at least two detection stations, each of the at least two detection stations being provided with an image acquisition device, the image acquisition device being used to perform image acquisition on the workpiece to be detected, the workpiece detection system also comprising a processor, the processor being used to execute the above-mentioned workpiece detection method.
[0015] According to another aspect of the present invention, there is provided an electronic device, comprising: a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used to execute the above-mentioned workpiece detection method when the processor is running.
[0016] According to another aspect of the present invention, a storage medium is provided, on which program instructions are stored, and the program instructions are used to execute the above-mentioned workpiece detection method when running.
[0017] The above technical solution can greatly reduce the time for re-determining the placement information of the workpiece to be measured in other non-first detection stations by using the placement information of the workpiece to be measured determined and saved in the first detection station as the placement information of the workpiece to be measured in other non-first detection stations, and the detection efficiency is high. On the other hand, the target detection algorithm corresponding to the placement information of the workpiece to be measured is used to perform target detection on the workpiece to be measured, and there is no need to rotate or flip the collected workpiece image, so the detection time is short. In addition, when the loading device loads multiple workpieces to be measured, there may be inconsistencies in the placement information of each workpiece to be measured after loading. Determining the target detection algorithm based on the placement information of each workpiece to be measured can effectively reduce the influence of the workpiece position deviation generated by the loading device when loading the workpiece to be measured on the target detection, thereby making the obtained target detection result more accurate.
[0018] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other purposes, features and advantages of the present invention will become more apparent by describing the embodiments of the present invention in more detail in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same reference numerals generally represent the same components or steps.
[0020] Figure 1 A schematic flow chart of a workpiece detection method according to an embodiment of the present invention is shown;
[0021] Figure 2 A schematic flow chart of workpiece defect detection according to an embodiment of the present invention is shown;
[0022] Figure 3 A configuration logic diagram of a workpiece detection system according to an embodiment of the present invention is shown;
[0023] Figure 4 A schematic block diagram of a workpiece detection device according to an embodiment of the present invention is shown;
[0024] Figure 5 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical scheme and advantages of the present invention more obvious, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the protection scope of the present invention.
[0026] As described above, in the related art, when multiple inspection stations are used to inspect the workpiece to be inspected, it is usually necessary to judge the placement information of the workpiece to be inspected at each inspection station through the collected workpiece image, and the collected workpiece image needs to be rotated and mirror-flipped to perform target detection on the workpiece image. In order to at least solve the above technical problems, the embodiments of the present invention provide a workpiece detection method, device, system, electronic device and storage medium. This solution can determine the target detection algorithm of each inspection station for the workpiece to be inspected based on the placement information of the workpiece to be inspected determined by the first inspection station, and the detection time is short and the flexibility is strong.
[0027] Before introducing the workpiece detection method provided by the present invention, a workpiece detection system to which the workpiece detection method is applied is first introduced in detail. Specifically, the workpiece detection system includes a turntable and a loading device, and the loading device is used to sequentially load the workpieces to be tested on the turntable. In order to improve the detection efficiency of the detection system, there may be multiple workpieces to be tested on the turntable at the same time, and multiple detection stations are arranged on the circumference of the turntable.
[0028] (1) After the loading device loads the material (i.e. the workpiece to be measured reaches the turntable from the loading device), due to the loading method adopted by the loading device, such as vibration loading, the placement information of the workpiece to be measured on the turntable is not fixed (i.e., it is random, it can be any random, or it can be random in a few fixed situations). For example, if the workpiece to be measured is a hexahedron, including the front side, the back side and four side faces, the first situation is any random, that is, the workpiece to be measured can face up on any side during loading, and the second situation is that there are only a few fixed situations for random, for example, the front and back sides of the workpiece to be measured will change, and the directions of other surfaces are fixed. In addition, after the workpiece to be measured is on the turntable, the placement information on the turntable is fixed.
[0029] (2) Each inspection station may be provided with a photographing component as required, wherein the photographing component of each inspection station includes at least one camera module. The purpose of the photographing component at each inspection station is to obtain an image of a surface (i.e., the photographing surface or the inspection surface) of a workpiece to be inspected that is located on the turntable and reaches the inspection station, wherein the placement information of the inspection workpiece is unknown, i.e., it is not certain which surface is the inspection surface of the inspection station. In other words, the photographing surface or the inspection surface of the inspection station is in an unknown state.
[0030] (3) The target detection algorithm mentioned below may be any one or more detection algorithms. For example, the target detection algorithm may be a defect detection algorithm for detecting one or more defects, or an attribute detection algorithm for detecting one or more attributes of the workpiece to be tested. The attributes include but are not limited to the pin position and the distance between two adjacent pins.
[0031] (4) The purpose of the placement information detection algorithm described below is to detect the placement information of the workpiece to be tested after it is loaded onto the turntable. The placement information will not change after loading. Therefore, the workpiece to be tested arrives at different detection stations on the turntable in sequence. Therefore, the placement information at different detection stations in the present invention is known and fixed.
[0032] (5) The shooting surfaces or detection surfaces at different inspection stations are different in order to complete the detection of different surfaces of the workpiece to be tested. Of course, in practical applications, for the same shooting surface, the target detection algorithm based on different detection requirements and the like has different requirements for the accuracy of the shooting component, that is, the shooting components used are different. Therefore, different inspection stations can be set, that is, there is a situation where the shooting surfaces of the workpiece to be tested corresponding to different inspection stations can also be the same. Therefore, the shooting surfaces of the shooting components of different inspection stations can be completely different, or completely the same, or partially the same or partially different.
[0033] See also Figure 1As shown, it is a schematic flow chart of a workpiece detection method according to an embodiment of the present invention. According to one aspect of the present invention, a workpiece detection method is provided, which is applied to a workpiece detection system, the workpiece detection system includes at least two detection stations, and at least two target detection algorithms corresponding to at least two placement information are preset for each of the at least two detection stations, and a placement information detection algorithm is also preset for the first detection station in the execution sequence of the at least two detection stations, and the placement information detection algorithm is used to obtain placement information indicating the workpiece to be detected. The method performs detection steps in at least two detection stations in sequence according to the execution sequence, and the detection steps include: step S110, step S120 and step S130. Among them, "each inspection station is preset with at least two target detection algorithms corresponding one-to-one to at least two random placement information", which can be understood as: at each inspection station, the random placement information and the target detection algorithm correspond one-to-one; for example: the random placement information includes the first and second types, at inspection station 1, the target detection algorithm includes algorithm 1 under the first placement information and algorithm 2 under the placement information of the second type; it is similar at other inspection stations and will not be repeated here.
[0034] Exemplarily, the workpiece detection system can be used to detect the workpiece properties of the workpiece to be measured in various dimensions, and the workpiece properties can include one or more of the following: position, size, shape, surface flatness, defect type, etc. The workpiece detection system can include multiple detection stations, each detection station can perform detection steps in sequence according to the execution order, and each detection station can detect one or more workpiece properties to be measured of the workpiece to be measured. Specifically, each detection station can be configured with a corresponding image acquisition device, and the image acquisition device can perform image acquisition on the workpiece to be measured to obtain a workpiece image. The image acquisition directions of the image acquisition devices corresponding to each detection station for the workpiece to be measured can be the same or different. Specifically, each detection station can be configured with one or more image acquisition devices. When multiple image acquisition devices are configured at any detection station, each image acquisition device can perform image acquisition on the workpiece to be measured from different image acquisition directions, and the areas of the workpiece to be measured contained in the collected workpiece images are different or not completely the same. And the image acquisition directions of the image acquisition devices of any two different detection stations are not completely the same. The placement information of the workpiece to be measured after loading is the same when it is transmitted to each detection station. For each inspection station, a plurality of target detection algorithms corresponding to a plurality of different placement information may be preset on the processor; the plurality of different placement information is the possible placement information of the workpiece, and the target detection algorithm corresponding to the placement information may be used to detect the properties of the workpiece to be measured at the inspection station according to the collected workpiece image under the placement information. Among them, the processor may be a processor inside the system of the workpiece detection system, and the target detection algorithm corresponding to the inspection station and the placement information of the workpiece to be measured may be executed on the processor for the workpiece image. The properties of the workpiece to be measured corresponding to each inspection station may be the same or different. The properties of the workpiece to be measured and the image acquisition direction corresponding to different inspection stations are not exactly the same.
[0035] In a specific embodiment, the workpiece inspection system includes four inspection stations, each of which can be equipped with an image acquisition device, and the four image acquisition devices corresponding to each of the four inspection stations can respectively acquire images of the workpiece to be inspected in the upper, front, left, and right directions relative to the corresponding inspection stations, and the target detection algorithms corresponding to the four inspection stations can all be used to detect scratch defects. In this case, the four workpiece images obtained by the four image acquisition devices for acquiring images of the workpiece to be inspected each contain a different area of the workpiece to be inspected.
[0036] In another specific embodiment, the four image acquisition devices corresponding to the four inspection stations can each sequentially acquire images of the workpiece to be measured above the corresponding inspection stations, and accordingly, the four workpiece images obtained by the four image acquisition devices for acquiring images of the workpiece to be measured each contain the same area of the workpiece to be measured. The target detection algorithms corresponding to the four inspection stations can be used to detect the size, surface flatness, scratch defects, and crack defects of the workpiece to be measured. Taking the inspection station corresponding to the scratch defect of the workpiece to be measured as an example, the number of target detection algorithms preset on the processor for the inspection station can be multiple, and the multiple target detection algorithms correspond to the placement information of the multiple workpieces to be measured one by one, and are all used to detect the scratch defects of the workpiece to be measured. For example, the inspection station target detection algorithm can include a first target detection algorithm and a second target detection algorithm, the first target detection algorithm is an algorithm executed when the placement information of the workpiece to be measured is placed on the front side, and the second target detection algorithm is an algorithm executed when the placement information of the workpiece to be measured is placed on the back side, and the first target detection algorithm and the second target detection algorithm are both used to detect the scratch defects of the workpiece to be measured.
[0037] In another specific embodiment, the workpiece inspection system includes four inspection stations, and four image acquisition devices configured at each of the four inspection stations can respectively capture images of the workpiece to be inspected in sequence above, in front, on the left, and above the corresponding inspection station, and the target detection algorithms corresponding to the first three inspection stations can be used to detect scratch defects on the workpiece to be inspected, and the target detection algorithm corresponding to the last inspection station can be used to detect dirt defects on the workpiece to be inspected.
[0038] It can be understood that when the placement information of the workpiece to be measured is consistent at each inspection station, if the orientation of the image acquisition device relative to the corresponding inspection station is different, the workpiece image obtained by performing image acquisition on the workpiece to be measured includes different areas of the workpiece to be measured.
[0039] Exemplarily, each detection station of the workpiece detection system has a preset order, and the workpiece to be measured moves to each detection station according to the preset order. In other words, each detection station can detect the corresponding workpiece properties of the workpiece to be measured in sequence according to the preset order. A placement information detection algorithm can be preset on the processor for the first detection station in each detection station to obtain the placement information of the workpiece to be measured, and the placement information can be used to indicate the placement information of the workpiece to be measured. The placement information detection algorithm can include one or more of the following: edge detection and Hough transform algorithm, principal component analysis algorithm (PCA), directional gradient histogram algorithm, etc. Specifically, when the workpiece to be measured is loaded, the workpiece to be measured will be placed according to the preset placement information, and the preset placement information may include front placement and back placement. For example, when the workpiece to be measured is loaded to the first detection station, if a preset reference surface of the workpiece to be measured faces the lens of the image acquisition device corresponding to the first detection station, the placement information of the workpiece to be measured can be defined as front placement. Correspondingly, if a preset reference surface of the workpiece to be measured is placed with its back facing the lens of the image acquisition device corresponding to the first detection station, the placement information of the workpiece to be measured can be defined as back placement. The image acquisition device corresponding to the first detection station performs image acquisition for the workpiece to be tested placed according to the placement information of the front side, and performs image acquisition for the workpiece to be tested placed according to the placement information of the back side, and the test area of the workpiece to be tested collected is different from the test area. The preset placement information can also include forward placement and reverse placement. For example, when the workpiece to be tested is loaded to the first detection station, if a certain surface of the workpiece to be tested faces the lens of the image acquisition device corresponding to the first detection station, the surface can have a forward and reverse direction. Specifically, when the surface is located in the viewfinder of the image acquisition device, a preset mark (such as a mark point, a mark edge, a mark image block) of the surface meets the preset position condition (for example, compared with other edges of the surface, the mark edge is closest to the left edge of the viewfinder) The corresponding placement information is defined as forward placement, and the placement information corresponding to the forward-placed workpiece to be tested is rotated 180° in a plane parallel to the surface is defined as reverse placement. The image acquisition device corresponding to the first inspection station performs image acquisition on the workpiece to be tested placed according to the forward placement information, and performs image acquisition on the workpiece to be tested placed according to the reverse placement information, and the acquired test areas of the workpiece to be tested are the same test areas.
[0040] Exemplarily, the placement information in each spatial dimension described in the aforementioned embodiments may also be integrated. Specifically, the placement information may also include front-forward placement, front-reverse placement, reverse-forward placement, and reverse-reverse placement.
[0041] Taking the front-forward placement as an example, when the workpiece to be tested is loaded to the first inspection station, if a preset reference surface of the workpiece to be tested is placed facing the image acquisition device corresponding to the first inspection station, and when the preset reference surface is located in the viewfinder of the image acquisition device, the preset features of the preset reference surface meet the preset position conditions, then the placement information currently corresponding to the workpiece to be tested can be defined as the front-forward placement. The front-reverse placement, the reverse-forward placement and the reverse-reverse placement are the same as the front-forward placement, which will not be repeated here.
[0042] Accordingly, the placement information may include, for example, front placement information and back placement information, or may include forward placement information and reverse placement information, or may include front-forward placement information, front-reverse placement information, reverse-forward placement information, and reverse-reverse placement information. It should be noted that the above-mentioned types of placement information are only examples, that is, the workpiece to be measured may also have other types of placement information. For example, the workpiece to be measured may have deflection angles with the three coordinate axes in the spatial coordinate system, and the placement information and the corresponding placement information may be described and defined based on the deflection angles with each coordinate axis.
[0043] In step S110, when the workpiece to be measured is located at the first detection station, a placement information detection algorithm is first executed on a first workpiece image of the workpiece to be measured collected at the first detection station to determine the placement information of the workpiece to be measured.
[0044] Exemplarily, when the workpiece to be measured is located at the first detection station, the image acquisition device corresponding to the first detection station can perform image acquisition on the workpiece to be measured to obtain a first workpiece image. The processor can execute a placement information detection algorithm on the first workpiece image to determine the placement information of the workpiece to be measured. Those skilled in the art can understand that the placement information detection algorithm can detect preset marks in the first workpiece image (such as edges, points, image blocks with identification meanings on the workpiece to be measured, etc.) to determine the placement information of the workpiece to be measured, and the placement information is the placement information of the workpiece to be measured when it is located at each detection station.
[0045] In step S120, a target detection algorithm corresponding to the placement information is executed according to the first workpiece image to obtain a detection result of the workpiece to be detected at the first detection station.
[0046] Exemplarily, the processor presets a plurality of target detection algorithms corresponding to the first detection station and corresponding to the placement information at the first detection station. After executing the placement information detection algorithm for the first workpiece image to obtain the placement information of the workpiece to be measured, the target detection algorithm corresponding to the determined placement information can be selected from the plurality of target detection algorithms corresponding to the first detection station according to the determined placement information, and the determined target detection algorithm is executed for the first workpiece image to obtain the detection result of the workpiece to be measured at the first detection station. It can be understood that the detection result corresponds to the attribute of the workpiece to be measured corresponding to the first detection station, and corresponds to the target detection algorithm preset for the first detection station. The detection result can be, for example, a size detection result, a shape detection result, a surface flatness detection result, a specific defect (such as scratches, cracks, dirt) detection result, etc.
[0047] In step S130, when the workpiece to be measured is located at any non-first inspection station of at least two inspection stations, a target detection algorithm corresponding to the determined placement information is executed according to a second workpiece image of the workpiece to be measured collected at the non-first inspection station to obtain a detection result of the workpiece to be measured at the non-first inspection station.
[0048] Exemplarily, when the workpiece to be measured is located at any non-first detection station, its placement information is consistent with the placement information at the first detection station. The image acquisition device corresponding to the detection station can perform image acquisition on the workpiece to be measured to obtain a second workpiece image. The detection area of the workpiece to be measured contained in the second workpiece image may be the same as or different from the detection area of the workpiece to be measured contained in the first workpiece image. The processor can select a target detection algorithm corresponding to the determined placement information from a plurality of target detection algorithms corresponding to a plurality of placement information preset for the detection station according to the placement information determined at the first detection station, and execute the determined target detection algorithm for the second workpiece image to obtain the detection result of the workpiece to be measured at the detection station. It can be understood that the detection result corresponds to the attribute of the workpiece to be measured corresponding to the detection station, and corresponds to the target detection algorithm preset for the detection station. Similarly, the detection result of the workpiece to be measured at the detection station can be, for example, a size detection result, a shape detection result, a surface flatness detection result, a specific defect (such as scratches, cracks, dirt) detection result, etc.
[0049] Take an example to illustrate, the workpiece to be measured is a hexahedron, and the random placement information includes the first face facing up and the second face facing up, the orientations of other surfaces are fixed, the first face and the second face can be opposite faces, the surface features of the first face and the second face can be different, the shooting surface at detection station 1 is from top to bottom, and the shooting surface at detection station 2 is from bottom to top, and two target detection algorithms corresponding to the two random placement information are arranged at detection station 1 (that is, at detection station 1, target detection algorithm 1 when the first face is facing up, and target detection algorithm 2 when the second face is facing up), wherein target detection algorithm 1 satisfies the detection requirement of completing the detection of the shooting surface shot from top to bottom when the first face is facing up, that is, target detection algorithm 1 completes the detection requirement of detecting the first surface; similarly, target detection algorithm 2 satisfies the detection requirement of completing the detection of the shooting surface shot from top to bottom when the second face is facing up, that is, target detection algorithm 2 completes the detection requirement of detecting the second surface. Two target detection algorithms corresponding to the two random placement information are arranged at the detection station 2 (i.e., at the detection station 2, target detection algorithm 3 when the first surface is facing up, and target detection algorithm 4 when the second surface is facing up), wherein the target detection algorithm 3 satisfies the detection requirement of completing the detection of the shooting surface shot from bottom to top when the first surface is facing up, i.e., the target detection algorithm 3 completes the detection requirement of detecting the second surface; similarly, the target detection algorithm 4 satisfies the detection requirement of completing the detection of the shooting surface shot from bottom to top when the second surface is facing up, i.e., the target detection algorithm 1 completes the detection requirement of detecting the first surface.
[0050] See also Figure 2 As shown, it is a schematic flow chart of workpiece defect detection according to an embodiment of the present invention. Figure 2In the illustrated embodiment, the workpiece detection system includes at least three detection stations, each of which is used to perform defect detection on the workpiece to be tested. Station 1 is the first detection station, and station 2 is the second detection station. Two target detection algorithms corresponding to direction 1 (first placement information) and direction 2 (second placement information) are preset for each detection station. Direction 1 and direction 2 can be two different directions, for example, direction 1 can be placed on the front side, and direction 2 can be placed on the back side. For another example, direction 1 can be placed on the front-forward side, and direction 2 can be placed on the front-reverse side. A placement information detection algorithm is preset for station 1. When the workpiece to be tested is located at station 1, the image acquisition device corresponding to station 1 can perform image acquisition on the workpiece to be tested to obtain a first workpiece image, and a placement information detection algorithm can be executed for the first workpiece image to judge the placement information of the workpiece to be tested, and the direction judgment result can be direction 1 or direction 2, and the placement information generated based on the direction judgment result is stored in the memory. For the first workpiece image, a target detection algorithm corresponding to station 1 and corresponding to the direction judgment result can also be executed to perform defect detection on the workpiece to be tested. When the workpiece to be measured is located at station 2, based on the placement information obtained at station 1, a target detection algorithm corresponding to station 2 and corresponding to the direction judgment result can be executed to perform defect detection on the workpiece to be measured. Taking directions 1 and 2 as front placement and back placement respectively as an example, when the workpiece to be measured is located at station 1 with the placement information of front placement, the first workpiece image obtained by image acquisition of the workpiece to be measured can execute the placement information detection algorithm, and the direction judgment result obtained by the placement information detection algorithm is direction 1, and direction 1 can be saved in the memory as the placement information of the workpiece to be measured. For the first workpiece image, a target detection algorithm corresponding to station 1 and corresponding to direction 1 can also be executed. When the workpiece to be measured is located at station 2, a target detection algorithm corresponding to station 2 and corresponding to direction 1 can be executed based on the placement information of the workpiece to be measured stored in the memory. The defect detection process of the remaining non-first stations is the same as that of station 2, which will not be repeated here.
[0051] The above technical solution can greatly reduce the time for re-determining the placement information of the workpiece to be measured in other non-first detection stations by using the placement information of the workpiece to be measured determined and saved in the first detection station as the placement information of the workpiece to be measured in other non-first detection stations, and the detection efficiency is high. On the other hand, the target detection algorithm corresponding to the placement information of the workpiece to be measured is used to perform target detection on the workpiece to be measured, and it is not necessary to rotate or flip the collected workpiece image, and the detection time is short. In addition, when the loading device loads multiple workpieces to be measured, there may be inconsistencies in the placement information of each workpiece to be measured after loading. Determining the target detection algorithm based on the placement information of each workpiece to be measured can effectively reduce the influence of the workpiece position deviation generated by the loading device when loading the workpiece to be measured on the target detection, thereby making the obtained detection result more accurate.
[0052] Optionally, when determining the placement information of the workpiece to be measured, the method also includes: marking the workpieces to be measured that arrive at the workpiece detection system in sequence to determine the marking information of each workpiece to be measured; associating and saving the marking information with the placement information; before executing the target detection algorithm corresponding to the determined placement information based on the second workpiece image of the workpiece to be measured collected at a non-first detection station, the method also includes: obtaining the placement information of the workpiece to be measured located at the detection station based on the marking information of the workpiece to be measured located at the detection station and the saved associated marking information and placement information.
[0053] Exemplarily, for each detection station including the first detection station and the non-first detection station, multiple workpieces to be measured can be detected in sequence at the detection station. For each workpiece to be measured located at the first detection station, when the placement information of the workpiece to be measured is determined, the workpiece to be measured can be marked. In some embodiments, after determining the placement information of the workpiece to be measured, the processor can generate marking information of the workpiece to be measured, and the marking information can be, for example, a workpiece identification code of the workpiece to be measured, and the marking information and the placement information can be associated and stored in a memory connected to the processor. In other embodiments, after determining the placement information of the workpiece to be measured, the processor can generate marking information of the first workpiece image, and the marking information can be, for example, an image number, a workpiece identification code of the workpiece to be measured, etc., and the marking information of the first workpiece image can be used as the marking information of the workpiece to be measured. In this case, the first workpiece image, the marking information of the first workpiece image, and the placement information can be associated and stored in the memory. In other embodiments, the placement information can also be directly numbered, and the number of the placement information can be used as the marking information of the corresponding workpiece to be measured. Exemplarily, when any workpiece to be measured is located at any non-first detection station, the processor can obtain the marking information of the workpiece to be measured from the memory and obtain the placement information of the workpiece to be measured according to the marking information. In some embodiments, the marking information of each workpiece to be measured can be arranged in the memory according to the acquisition order / save order. For each non-first detection station, the processor can sequentially obtain the marking information of the workpiece to be measured located at the detection station according to the arrangement order of the marking information at a preset time interval, and obtain the placement information of the workpiece to be measured located at the detection station according to the marking information. In other embodiments, the processor can arrange the marking information in a preset order and determine the detection station corresponding to the first workpiece to be measured in real time, according to the preset detection order of each detection station for the same workpiece to be measured, and the preset arrangement order of the marking information, obtain the marking information of the workpiece to be measured on each detection station in real time, and obtain the placement information of each workpiece to be measured located at each detection station according to the marking information.
[0054] The above technical solution marks the workpieces to be tested and saves the marking information in association with the placement information. Each inspection station can accurately obtain the placement information corresponding to each workpiece to be tested when performing target detection on multiple workpieces to be tested, thereby accurately matching the inspection results obtained at the inspection station with the corresponding workpiece to be tested.
[0055] Optionally, the placement information includes: front side placement information and back side placement information of the target surface of the workpiece to be measured.
[0056] Exemplarily, the workpiece to be measured may have a preset target surface, and the placement information of the workpiece to be measured may be determined according to the placement position of the target surface. Specifically, the target surface may be placed facing the image acquisition device corresponding to the first detection station. In this case, the placement information of the workpiece to be measured obtained based on the first workpiece image obtained by performing image acquisition on the workpiece to be measured may be the front placement information. Accordingly, when the target surface is placed in reverse with its back facing the image acquisition device corresponding to the first detection station, the placement information of the workpiece to be measured obtained based on the first workpiece image obtained by performing image acquisition on the workpiece to be measured may be the back placement information.
[0057] The above technical solution determines the placement information of the workpiece to be measured by the placement direction of the target surface, and can convert the placement information of the workpiece to be measured determined in three-dimensional space into the recognition of image features in two-dimensional space, thereby realizing the rapid and accurate automatic determination of the placement information of the workpiece to be measured through the collected first workpiece image and the placement information detection algorithm.
[0058] Optionally, the placement information includes: location information of a preset mark on the target surface of the workpiece to be measured.
[0059] Exemplarily, the target surface of the workpiece to be measured may have a preset mark, and the placement information of the workpiece to be measured can be determined according to the position of the preset mark on the target surface. Specifically, when the workpiece to be measured is located at the first workstation, the target surface can be placed facing the image acquisition device, and when the first workpiece image of the workpiece to be measured is obtained, the placement information can be determined according to the position of the preset mark contained in the first workpiece image. For example, when the preset mark is located in a preset area (for example, the left half area) of the first workpiece image, it can be determined that the placement information corresponding to the position information of the preset mark of the workpiece to be measured is forward placement, otherwise, it can be determined that the placement information corresponding to the position information of the preset mark is reverse placement. For another example, when the preset feature point of the preset mark contained in the first workpiece image is in a preset area (for example, the right half area of the minimum circumscribed rectangle) within the minimum circumscribed rectangle of the preset mark, it can be determined that the placement information corresponding to the position information of the preset mark of the workpiece to be measured is forward placement, otherwise, it can be determined that the placement information corresponding to the position information of the preset mark is reverse placement.
[0060] Please continue reading Figure 2 As shown, in Figure 2In the illustrated embodiment, the target surface of the workpiece to be measured may have a preset mark. Direction 1 may be placed in the front-forward direction, and direction 2 may be placed in the front-reverse direction. Specifically, when the target surface of the workpiece to be measured is located at station 1, if the target surface of the workpiece to be measured faces the lens of the image acquisition device corresponding to station 1, and the preset mark on the target surface is located in the left half area of the viewfinder of the image acquisition device, the placement information of the workpiece to be measured may be defined as placed in the front-forward direction. Correspondingly, when the preset mark on the target surface is located in the right half area of the viewfinder of the image acquisition device, the placement information of the workpiece to be measured may be defined as placed in the front-reverse direction. When the workpiece to be measured is placed according to the front-forward placement information, the target surface may face the image acquisition device corresponding to station 1, the first workpiece image collected for the workpiece to be measured may include the target surface, and the preset mark on the target surface is located in the left half area of the first workpiece image. Correspondingly, when the workpiece to be measured is placed according to the reverse-reverse placement information, the preset mark in the first workpiece image collected by the image acquisition device corresponding to station 1 for the workpiece to be measured is located in the right half area of the first workpiece image. If the workpiece to be measured is placed according to the front-forward placement information, when the placement information detection algorithm is executed for the first workpiece image, according to the position information that the preset mark contained in the first workpiece image is located in the left half area of the first workpiece image, it can be determined that the placement information of the workpiece to be measured is placed in the front-forward direction. Similarly, if the workpiece to be measured is placed according to the front-reverse placement information, when the placement information detection algorithm is executed for the first workpiece image, according to the position information that the preset mark contained in the first workpiece image is located in the right half area of the first workpiece image, it can be determined that the placement information of the workpiece to be measured is placed in the front-reverse direction.
[0061] The above technical solution determines the placement information of the workpiece to be measured by the position of the preset mark on the target surface of the workpiece to be measured, and can quickly and accurately determine the placement information of the workpiece to be measured and obtain accurate placement information through the position of the image feature in the image.
[0062] Optionally, before the detection step, the method also includes the following configuration steps: for each of the at least two detection stations, in response to first input information related to the target detection algorithm input by the user, configuring at least two target detection algorithms corresponding to the detection station that correspond one-to-one to at least two placement information; for the first detection station, in response to second input information related to the placement information detection algorithm input by the user, configuring a placement information detection algorithm to be executed when the workpiece to be measured is located at the first detection station.
[0063] Exemplarily, before the detection step, the user can configure the target detection algorithm and the placement information detection algorithm for the processor. Specifically, for each detection station, the user can input first input information related to multiple target detection algorithms corresponding to the detection station and corresponding to multiple placement information, and the processor can configure multiple target detection algorithms corresponding to the detection station in response to the first input information. Similarly, for the first detection station, the user can input second input information related to the placement information detection algorithm corresponding to the first detection station, and the processor can configure the placement information detection algorithm corresponding to the first detection station in response to the second input information.
[0064] See also Figure 3 As shown, it is a configuration logic diagram of a workpiece detection system according to an embodiment of the present invention. Figure 3 The first detection station in the workpiece detection system, i.e., station 1, and the second detection station, i.e., station 2, are shown. The image acquisition device corresponding to station 1 is camera 1, and the image acquisition device corresponding to station 2 is station 2. The configuration logic for station 1 includes: when the workpiece to be detected is located at station 1 (at Figure 3 (shown as incoming material), camera 1 captures the first workpiece image of the workpiece to be measured, and executes process ①, process ① includes: determining the placement information of the workpiece to be measured based on the first workpiece image captured by camera 1. After executing process ①, the direction determination result (i.e., the placement information) can be stored in the resource pool of the memory. If the direction determination result is forward placement, process ② is executed, process ② includes: executing the target detection algorithm corresponding to the placement information of the forward placement in the multiple target detection algorithms corresponding to station 1. If the direction determination result is non-forward placement, process ③ is executed, process ③ includes: executing the target detection algorithm corresponding to the placement information of the reverse placement in the multiple target detection algorithms corresponding to station 1. The configuration logic for station 2 includes: when the workpiece to be measured is located at station 2 (at Figure 3 In the figure, the camera 2 collects the second workpiece image of the workpiece to be measured, and the processor obtains the direction determination result obtained in process ① in the storage pool. If the direction determination result is forward placement, process ④ is executed, and process ④ includes: executing the target detection algorithm corresponding to the placement information of the forward placement in the multiple target detection algorithms corresponding to station 2. If the direction determination result is non-forward placement, process ⑤ is executed, and process ⑤ includes: executing the target detection algorithm corresponding to the placement information of the reverse placement in the multiple target detection algorithms corresponding to station 2. The configuration logic of the remaining non-first detection stations is the same as that of station 2, which will not be repeated here.
[0065] The configuration process of the above technical solution is easy to implement, and the user can simply modify the current configuration information according to actual needs to enable the workpiece detection system to detect the workpiece properties of different types of workpieces to be tested, with high flexibility.
[0066] Optionally, at least two inspection stations are arranged at intervals along the circumference of a turntable for placing the workpiece to be inspected.
[0067] For example, the workpiece to be tested can be loaded onto the turntable and rotate with the turntable. During the rotation of the turntable, the workpiece to be tested can arrive at each detection station in sequence according to the rotation direction of the turntable. Each detection station can be arranged along the circumference of the turntable, and the intervals between any two adjacent detection stations can be the same or different. By placing the workpiece to be tested on the turntable and arranging each detection station along the circumference of the turntable, it is helpful to realize the time sequence of the acquisition of the workpiece image, which is conducive to ensuring the correctness of the detection process of each workpiece to be tested.
[0068] Optionally, after executing the target detection algorithm corresponding to the determined placement information based on the second workpiece image of the workpiece to be measured collected at a non-first inspection station, the method also includes: obtaining multiple inspection results of the workpiece to be measured at at least two inspection stations; and obtaining a classification result of the workpiece to be measured based on the multiple inspection results and preset classification rules.
[0069] Exemplarily, after obtaining multiple test results of the workpiece to be tested, the workpiece to be tested can be classified according to preset classification rules. In some embodiments, the same property of the workpiece to be tested (such as scratches) is detected for different test areas of the workpiece to be tested at each test station, and the preset classification rules can be set based on whether the property of the workpiece to be tested exists, or can be set based on the specific classification of the property of the workpiece to be tested for the workpiece to be tested. Taking the property of the workpiece to be tested as scratches as an example, the preset classification rules may include: when the test result corresponding to any test station is that there are scratches, the workpiece to be tested is an unqualified workpiece, and vice versa, it is a qualified workpiece. Alternatively, the preset classification rules may include: when all test results are that there are no scratches, the workpiece to be tested is a normal workpiece; when there is a test result corresponding to a test station that there are scratches, the workpiece to be tested is slightly scratched; when there are two test stations corresponding to the test results that there are scratches, the workpiece to be tested is slightly scratched; when there are three or more test stations corresponding to the test results that there are scratches, the workpiece to be tested is severely scratched. In other embodiments, for the detection of different workpiece properties of the workpiece to be tested at each detection station, the preset classification rules can be set based on the preset detection results corresponding to each workpiece property of the multiple workpiece properties to be tested. Taking the workpiece detection system including two detection stations as an example, scratches can be detected at the first detection station, and dirt can be detected at the other detection station. The preset classification rules may include: when the detection results include the presence of scratches and / or the presence of dirt, the workpiece to be tested is an unqualified workpiece, otherwise, the workpiece to be tested is a qualified workpiece. Or the preset classification rules may include: when the detection results do not include the presence of scratches and the presence of dirt, the workpiece to be tested is a non-defective workpiece; when the detection results include any one of the presence of scratches and the presence of dirt, the workpiece to be tested is a slightly defective workpiece; when the detection results include the presence of scratches and the presence of dirt, the workpiece to be tested is a seriously defective workpiece. It should be noted that the preset classification rules described in the above embodiment are only examples. It can be understood that the preset classification rules can further subdivide the categories of the workpieces to be tested based on the specific classifications corresponding to the multiple workpiece properties to be tested. For example, the workpieces to be tested with slight scratches and no dirt can be determined as a type of workpiece, and the workpieces to be tested with slight scratches and dirt can be determined as a type of workpiece, etc. The degree of dirt can also be classified, and the workpieces to be tested can be classified based on the scratch category and the dirt category. This will not be repeated. The embodiment of the present invention does not limit the specific classification method of any attribute of the workpiece to be tested. In the embodiment of the present invention, the classification results of the detection results of each detection station can be preset based on the Bin classification rule.
[0070] The above technical solution classifies the workpieces to be tested according to preset classification rules based on multiple detection results, and can accurately and intuitively obtain the classification results of multiple workpieces to be tested, which is helpful for different types of workpieces to be tested to accurately enter the corresponding processing flow during subsequent processing.
[0071] Optionally, before obtaining the classification result of the workpiece to be tested according to the multiple detection results and preset classification rules, the method further includes: determining the preset classification rule in response to operation information generated according to user operation, and the user operation includes creating and / or modifying the preset classification rule.
[0072] Exemplarily, the user can perform a user operation for creating and / or modifying a preset classification rule on the processor. The processor can determine the preset classification rule in response to the operation information generated based on the user operation. Specifically, the operation information may include creating and / or modifying first operation information for classifying the workpiece to be tested based on multiple detection results, and may also include creating and / or modifying second operation information for grading a single detection result, and classifying the workpiece to be tested according to the grading results of each of the multiple detection results. The processor determines the preset classification rule in response to the user's operation information, so that the user can adaptively adjust the classification requirements of the workpiece to be tested according to actual needs, and the flexibility is high.
[0073] See also Figure 4 As shown, it is a schematic block diagram of a workpiece detection device according to an embodiment of the present invention. According to another aspect of the present invention, a workpiece detection device 400 is also provided, which is applied to a workpiece detection system, the workpiece detection system includes at least two detection stations, and at least two target detection algorithms corresponding to at least two placement information are preset for each of the at least two detection stations, and a placement information detection algorithm is also preset for the first detection station in the execution sequence of the at least two detection stations, and the placement information detection algorithm is used to obtain placement information indicating the workpiece to be detected, and the device is used to perform detection steps in at least two detection stations in sequence according to the execution sequence, and the device 400 includes:
[0074] A determination module 410 is used to execute a placement information detection algorithm on a first workpiece image of the workpiece to be measured collected at a first detection station to determine placement information of the workpiece to be measured;
[0075] A first execution module 420 is used to execute a target detection algorithm corresponding to the placement information according to the first workpiece image to obtain a detection result of the workpiece to be detected at the first detection station;
[0076] The second execution module 430 is used to execute a target detection algorithm corresponding to the determined placement information based on a second workpiece image of the workpiece to be measured collected at the non-first inspection station when the workpiece to be measured is located at any non-first inspection station of at least two inspection stations, so as to obtain the inspection result of the workpiece to be measured at the non-first inspection station.
[0077] According to another aspect of the present invention, there is provided a workpiece detection system, the system comprising at least two detection stations, each of the at least two detection stations being provided with an image acquisition device, the image acquisition device being used to perform image acquisition on the workpiece to be detected, the workpiece detection system also comprising a processor, the processor being used to execute the above-mentioned workpiece detection method.
[0078] Exemplarily, each inspection station is provided with an image acquisition device, and the positions of the image acquisition devices corresponding to the inspection stations relative to the inspection stations may be the same or different. For each image acquisition device, when the workpiece to be measured is located at the inspection station corresponding to the image acquisition device, the image acquisition device may perform image acquisition on the workpiece to be measured to obtain a workpiece image. The image acquisition device may be connected to a processor of the workpiece inspection system, and the processor may obtain the workpiece image acquired by the image acquisition device.
[0079] See also Figure 5 As shown, it is a schematic block diagram of an electronic device according to an embodiment of the present invention. According to another aspect of the present invention, an electronic device 500 is also provided, including: a processor 510 and a memory 520, wherein the memory 510 stores computer program instructions, and the computer program instructions are used by the processor 510 to execute the above-mentioned workpiece detection method when it is running.
[0080] According to another aspect of the present invention, a storage medium is also provided, on which program instructions are stored, and when the program instructions are executed by a computer or a processor, the computer or the processor executes the corresponding steps of the above-mentioned workpiece detection method of the embodiment of the present invention, and is used to implement the corresponding module in the above-mentioned workpiece detection device according to the embodiment of the present invention or the corresponding module in the above-mentioned workpiece detection device. The storage medium may include, for example, a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above-mentioned storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.
[0081] According to yet another aspect of the present invention, a computer program product is provided, comprising computer program instructions, wherein the computer program instructions are used to execute the workpiece detection method as described above when running.
[0082] A person skilled in the art can understand the specific implementation and beneficial effects of the above-mentioned workpiece detection device by reading the above-mentioned detailed description of the workpiece detection method, and for the sake of brevity, it will not be described in detail here.
[0083] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely exemplary and are not intended to limit the scope of the present invention thereto. Various changes and modifications may be made therein by one of ordinary skill in the art without departing from the scope and spirit of the present invention. All such changes and modifications are intended to be included within the scope of the present invention as required by the appended claims.
[0084] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0085] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0086] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0087] Similarly, it should be understood that in order to streamline the present invention and help understand one or more of the various inventive aspects, in the description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the method of the present invention should not be interpreted as reflecting the following intention: the claimed invention requires more features than the features explicitly stated in each claim. More specifically, as reflected in the corresponding claims, the inventive point is that the corresponding technical problem can be solved with less than all the features of a single disclosed embodiment. Therefore, the claims following the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present invention.
[0088] It will be understood by those skilled in the art that, except for mutually exclusive features, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this specification may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature that provides the same, equivalent or similar purpose.
[0089] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims, any one of the claimed embodiments may be used in any combination.
[0090] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some modules in a workpiece detection device according to an embodiment of the present invention. The present invention may also be implemented as a device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0091] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
[0092] The above is only a specific embodiment or description of a specific embodiment of the present invention, and the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A workpiece detection method, characterized in that: Applied to a workpiece detection system, the workpiece detection system includes at least two detection stations, at least two target detection algorithms corresponding to at least two placement information are preset for each of the at least two detection stations, a placement information detection algorithm is also preset for the first detection station in the execution sequence of the at least two detection stations, the placement information detection algorithm is used to obtain placement information indicating the workpiece to be detected, and the method performs detection steps in at least two detection stations in sequence according to the execution sequence; wherein, When the workpiece to be measured is located at the first detection station, the placement information detection algorithm is first executed on a first workpiece image of the workpiece to be measured collected at the first detection station to determine the placement information of the workpiece to be measured; Then, executing a target detection algorithm corresponding to the placement information according to the first workpiece image to obtain a detection result of the workpiece to be detected at the first detection station; When the workpiece to be measured is located at any non-first inspection station of the at least two inspection stations, a target detection algorithm corresponding to the determined placement information is executed according to a second workpiece image of the workpiece to be measured collected at the non-first inspection station to obtain a detection result of the workpiece to be measured at the non-first inspection station.
2. The method according to claim 1, characterized in that When the placement information of the workpiece to be measured is determined, the method further includes: Marking the workpieces to be tested that arrive at the workpiece detection system in sequence to determine the marking information of each workpiece to be tested; Associating the marking information with the placement information and saving the same; Before executing the target detection algorithm corresponding to the determined placement information according to the second workpiece image of the workpiece to be measured collected at the non-first inspection station, the method further includes: The placement information of the workpiece to be measured located at the inspection station is obtained according to the marking information of the workpiece to be measured located at the inspection station and the saved associated marking information and placement information.
3. The method according to claim 1, characterized in that The placement information includes: front side placement information and back side placement information of the target surface of the workpiece to be measured.
4. The method according to claim 1 or 3, characterized in that: The placement information includes: location information of a preset mark on the target surface of the workpiece to be measured.
5. The method according to any one of claims 1 to 3, characterized in that: Before the detection step, the method further includes the following configuration steps: For each of the at least two inspection stations, in response to first input information related to the target detection algorithm input by a user, configuring at least two target detection algorithms corresponding to the at least two placement information corresponding to the inspection station; For the first inspection station, in response to second input information related to the placement information detection algorithm input by a user, the placement information detection algorithm is configured to be executed when the workpiece to be inspected is located on the first inspection station.
6. The method according to any one of claims 1 to 3, characterized in that: The at least two inspection stations are arranged at intervals along the circumference of a turntable for placing the workpiece to be inspected.
7. The method according to any one of claims 1 to 3, characterized in that: After executing the target detection algorithm corresponding to the determined placement information according to the second workpiece image of the workpiece to be measured collected at the non-first inspection station, the method further includes: Acquire multiple inspection results of the workpiece to be inspected at the at least two inspection stations; According to the multiple detection results and preset classification rules, a classification result of the workpiece to be detected is obtained.
8. The method according to claim 7, characterized in that Before obtaining the classification result of the workpiece to be tested according to the multiple detection results and the preset classification rules, the method further includes: The preset classification rule is determined in response to operation information generated according to a user operation, wherein the user operation includes creating and / or modifying the preset classification rule.
9. A workpiece detection device, characterized in that: Applied to a workpiece detection system, the workpiece detection system includes at least two detection stations, at least two target detection algorithms corresponding to at least two placement information are preset for each of the at least two detection stations, a placement information detection algorithm is also preset for the first detection station in the execution sequence of the at least two detection stations, the placement information detection algorithm is used to obtain placement information indicating the workpiece to be detected, the device is used to perform detection steps in at least two detection stations in sequence according to the execution sequence, and the device includes: A determination module, configured to execute the placement information detection algorithm on the first workpiece image of the workpiece to be measured collected at the first detection station to determine the placement information of the workpiece to be measured; A first execution module, configured to execute a target detection algorithm corresponding to the placement information according to the first workpiece image, so as to obtain a detection result of the workpiece to be detected at the first detection station; The second execution module is used to execute a target detection algorithm corresponding to the determined placement information according to a second workpiece image of the workpiece to be measured collected at the non-first inspection station when the workpiece to be measured is located at any non-first inspection station of the at least two inspection stations, so as to obtain the inspection result of the workpiece to be measured at the non-first inspection station.
10. A workpiece detection system, characterized in that: The system includes at least two inspection stations, each of the at least two inspection stations is provided with an image acquisition device, and the image acquisition device is used to acquire images of the workpiece to be inspected. The workpiece inspection system also includes a processor, and the processor is used to execute the workpiece inspection method according to any one of claims 1 to 8.
11. An electronic device comprising a processor and a memory, characterized in that: The memory stores computer program instructions, which are used by the processor to execute the workpiece detection method according to any one of claims 1 to 8 when the processor runs the computer program instructions.
12. A storage medium having program instructions stored thereon, characterized in that: The program instructions are used to execute the workpiece detection method according to any one of claims 1 to 8 when running.