A method, system, storage medium and intelligent terminal for detecting chips on a tray
By segmenting the grayscale image of the material tray and variance calculation of the grayscale value, the position of the chip on the material tray is automatically identified, which solves the problem of manually setting the chip position in the prior art, improves production efficiency and reduces labor costs.
Patent Information
- Application Number
- CN202211089516.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-09-07
AI Technical Summary
Existing automated production equipment cannot automatically identify where chips are placed on the material tray, resulting in manual settings, reducing production efficiency and increasing labor costs.
By obtaining the grayscale image of the material tray, segmenting the ROI area, and calculating the grayscale value variance of all pixel points on the diagonal line of each ROI area, and determining whether a chip is placed.
Automatic recognition of chip location is achieved, reducing manual intervention, improving production efficiency, and reducing the chance of robotic arm alarm.
Smart Images

Figure CN115656214B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of product detection, and in particular to a method, system, storage medium and intelligent terminal for detecting chips on a tray. Background Art
[0002] With the rapid development of science and technology, the production of a series of electronic products has been transformed from the traditional manual process to the automated production line. In the automated production process of chips, chip testing, packaging, baking and other processes all require the use of trays as containers to carry chips. However, existing automated production equipment cannot automatically identify which positions on the tray have chips and which positions do not. When loading the tray, it is necessary to manually set the positions of the chips on the tray so that the robotic arm can accurately complete the material removal on the tray, avoiding the robotic arm from picking up materials at positions without chips and triggering the vacuum alarm. Manually setting the positions of the chips on the tray not only reduces production efficiency, but also increases labor costs. Summary of the invention
[0003] The purpose of the present invention is to provide a method, system, storage medium and intelligent terminal for detecting chips on a tray, which can automatically identify the chip position, reduce manual intervention and improve production efficiency.
[0004] The technical solution provided by the present invention is as follows:
[0005] On the one hand, a method for detecting chips on a tray is provided, comprising:
[0006] Acquire a grayscale image of the tray on which the chips are placed;
[0007] Performing ROI region segmentation on the grayscale image according to the number of rows and columns of the material tray;
[0008] Calculate the gray value variance of all pixels on at least one diagonal line of each ROI area;
[0009] It is determined whether a chip is placed in the corresponding ROI area according to the gray value variance.
[0010] In some implementations, calculating the grayscale value variance of all pixels on at least one diagonal line of each ROI region specifically includes:
[0011] Obtain pixel coordinates of the upper left corner, upper right corner, lower left corner, and lower right corner of the grayscale image;
[0012] Obtaining the pixel coordinates of the starting point and the ending point of a diagonal line of the current ROI region according to the pixel coordinates of the upper left corner, the upper right corner, the lower left corner and the lower right corner of the grayscale image and the row number and the column number of the current ROI region;
[0013] The grayscale value variance of all pixel points on the diagonal line between the starting point pixel coordinate and the end point pixel coordinate is calculated.
[0014] In some embodiments, the calculation formula of the starting point pixel coordinates is:
[0015]
[0016] The calculation formula of the end point pixel coordinates is:
[0017]
[0018] Among them, Rows is the number of rows of the material tray; Cols is the number of columns of the material tray; p1 (x1, y1) is the pixel coordinate of the upper left corner of the grayscale image; p3 (x1, y2) is the pixel coordinate of the lower left corner of the grayscale image; p4 (x2, y2) is the pixel coordinate of the lower right corner of the grayscale image; i is the number of rows in the current ROI area, and j is the number of columns in the current ROI area.
[0019] In some implementations, judging whether a chip is placed in the corresponding ROI area according to the gray value variance specifically includes:
[0020] When the gray value variance is less than a first preset threshold, it is determined that no chip is placed on the corresponding ROI area;
[0021] When the gray value variance is greater than a second preset threshold, it is determined that a chip is placed on the corresponding ROI area, and the second preset threshold is greater than the first preset threshold.
[0022] In some implementations, when the gray value variance is greater than the first preset threshold and less than the second preset threshold, it is determined that a chip is placed on the corresponding ROI area and the chip is warped.
[0023] On the other hand, a system for detecting chips on a tray is also provided, comprising:
[0024] An image acquisition module, used to acquire a grayscale image of the tray on which the chips are placed;
[0025] A region segmentation module, used for performing ROI region segmentation on the grayscale image according to the number of rows and columns of the tray;
[0026] A calculation module, used for calculating the gray value variance of all pixels on at least one diagonal line of each ROI area;
[0027] The judging module is used to judge whether a chip is placed in the corresponding ROI area according to the gray value variance.
[0028] In some embodiments, the calculation module includes:
[0029] A pixel coordinate acquisition unit, used to acquire the pixel coordinates of the upper left corner, upper right corner, lower left corner and lower right corner of the grayscale image;
[0030] A calculation unit, used to obtain the pixel coordinates of the starting point and the ending point of a diagonal line of the current ROI area according to the pixel coordinates of the upper left corner, the upper right corner, the lower left corner and the lower right corner of the grayscale image and the row number and the column number of the current ROI area;
[0031] The calculation unit is further used to calculate the gray value variance of all pixel points on the diagonal line between the starting point pixel coordinates and the end point pixel coordinates.
[0032] In some implementations, the judgment module is further configured to judge that no chip is placed on the corresponding ROI area when the gray value variance is less than a first preset threshold;
[0033] When the gray value variance is greater than a second preset threshold, it is determined that a chip is placed on the corresponding ROI area, and the second preset threshold is greater than the first preset threshold;
[0034] When the gray value variance is greater than the first preset threshold and less than the second preset threshold, it is determined that a chip is placed on the corresponding ROI area and the chip is warped.
[0035] On the other hand, a storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the operations performed by the method for detecting chips on a tray described in any of the above embodiments.
[0036] On the other hand, there is also provided an intelligent terminal, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to execute the computer program stored in the memory to implement the operations performed by the method for detecting chips on a tray described in any of the above-mentioned embodiments.
[0037] The technical effects of the present invention are:
[0038] (1) By segmenting the grayscale image into ROI regions, the chip can be located on the grayscale image. By calculating the grayscale value variance of each ROI region, it is possible to automatically detect which ROI regions have chips and which ROI regions do not have chips, so as to provide more accurate location information for the robot arm to pick up materials, reduce manual intervention, enhance the robot arm's effective material picking, significantly reduce the alarm probability of the robot arm, and improve production efficiency.
[0039] (2) This detection method can also identify whether the chip product is warped, and can promptly issue an alarm to remind manual processing, thereby reducing damage to the product appearance when the nozzle is picking up the material and enhancing the safety of the arm picking up the material. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments:
[0041] Figure 1 It is a flow chart of an embodiment of a method for detecting chips on a tray of the present invention;
[0042] Figure 2 It is a flow chart of another embodiment of a method for detecting chips on a tray of the present invention;
[0043] Figure 3 The present invention is a schematic structural diagram of a chip detection system on a tray.
[0044] Description of Figure Numbers:
[0045] 100, image acquisition module; 200, region segmentation module; 300, calculation module; 310, pixel coordinate acquisition unit; 320, calculation unit; 400, judgment module. DETAILED DESCRIPTION
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] In order to simplify the drawings, only the parts related to the present invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".
[0048] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0049] In this document, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0050] In addition, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0051] See also Figure 1 , Figure 1 A schematic flow chart of a method for detecting chips on a tray provided by an embodiment of the present invention is shown, the method comprising:
[0052] S100 acquires a grayscale image of a tray on which chips are placed;
[0053] Specifically, a camera is placed directly above the loading area. After the robot arm places the tray with chips in the loading area, the host computer sends a trigger signal to the camera through software communication, and the camera captures the image of the tray in the loading area. The image captured by the camera can be a color image or a grayscale image. If the image captured by the camera is a color image, the color image is converted into a grayscale image through image processing.
[0054] In this embodiment, the material tray is a white material tray, and the chips on the material tray are other colors, such as the chip surface is generally black. The material tray is divided into multiple receiving areas by rows and columns, each receiving area has the same size, and one chip can be placed in each receiving area.
[0055] S200 performs ROI region segmentation on the grayscale image according to the number of rows and columns of the tray;
[0056] Specifically, the number of rows and columns of the material tray is fixed. By performing ROI region segmentation on the acquired grayscale image according to the number of rows and columns of the material tray, multiple segmented ROI regions can be obtained. Each segmented ROI region corresponds to a containing area on the material tray, that is, one ROI region corresponds to a containing area on the material tray, and the containing area is used to place the chip. Therefore, each ROI region corresponds to the placement position of a chip. By performing ROI region segmentation on the grayscale image, the chip can be positioned on the grayscale image.
[0057] S300 calculates the gray value variance of all pixels on at least one diagonal line of each ROI area;
[0058] Specifically, after the image is segmented into ROI regions, line profile data statistics can be performed on each ROI region, that is, the gray value variance of all pixel points on at least one diagonal line of each ROI region is calculated.
[0059] S400 determines whether a chip is placed in the corresponding ROI area according to the gray value variance.
[0060] Specifically, because the material tray is white, if a black chip is placed in the receiving area on the material tray, the grayscale value of the pixels on the diagonal of the receiving area (ROI area) will be larger; if no black chip is placed in the receiving area on the material tray, the grayscale value of the pixels on the diagonal of the receiving area (ROI area) will be smaller. Therefore, whether a chip is placed in the ROI area or not, the grayscale value of the pixels on its diagonal is different. Therefore, the present invention can determine whether a chip is placed in the ROI area by calculating the grayscale value variance of all pixels on the diagonal of each ROI area, which can not only realize automatic detection of the presence or absence of chips, but also improve detection accuracy.
[0061] The present invention performs ROI area segmentation on the grayscale image to locate the chip on the grayscale image, and calculates the grayscale value variance of each ROI area to automatically detect which ROI areas have chips and which ROI areas do not have chips, so as to provide more accurate location information to the robot arm for material picking, reduce alarms and manual intervention, and improve production efficiency.
[0062] In some embodiments, the calculation of the grayscale value variance of all pixels on at least one diagonal line of each ROI region in S300 in the above embodiment specifically includes:
[0063] S310 obtains pixel coordinates of the upper left corner, upper right corner, lower left corner, and lower right corner of the grayscale image;
[0064] S320 obtains the pixel coordinates of the starting point and the ending point of a diagonal line of the current ROI region according to the pixel coordinates of the upper left corner, the upper right corner, the lower left corner and the lower right corner of the grayscale image and the row number and the column number of the current ROI region;
[0065] S330 calculates the gray value variance of all pixel points on the diagonal line between the starting point pixel coordinate and the end point pixel coordinate.
[0066] The calculation formula of the pixel coordinates of the starting point is:
[0067]
[0068] The calculation formula of the end point pixel coordinates is:
[0069]
[0070] Among them, Rows is the number of rows of the material tray; Cols is the number of columns of the material tray; p1 (x1, y1) is the pixel coordinate of the upper left corner of the grayscale image; p3 (x1, y2) is the pixel coordinate of the lower left corner of the grayscale image; p4 (x2, y2) is the pixel coordinate of the lower right corner of the grayscale image; i is the number of rows in the current ROI area, and j is the number of columns in the current ROI area.
[0071] The calculation formula for the grayscale value variance of all pixels on the diagonal line between the starting point pixel coordinates and the end point pixel coordinates is:
[0072] std=STD(LineProfile(image,ROI Startpoint ROI Endpoint ))
[0073] Among them, ROI Startpoint =ROI(x,y) [i,j] ;
[0074] ROI Endpoint =ROI(x,y) [i+1,j+1] .
[0075] Specifically, after obtaining the grayscale image, the pixel coordinates of the four corners of the entire grayscale image can be obtained, and then the pixel coordinates of the two end points of a diagonal line of the current ROI area are calculated according to the pixel coordinates of the four corners and the number of rows and columns of the current ROI area. Finally, the grayscale value variance of all pixels between the two end points of the diagonal line can be calculated. If the grayscale value variance is greater than the preset threshold, it means that a chip is placed on the current ROI area. By calculating the variance of all pixels on the diagonal of each ROI area, it can be detected whether a chip is placed on each ROI area.
[0076] In some embodiments, the step S400 in the above embodiment of determining whether a chip is placed on the corresponding ROI area according to the gray value variance specifically includes:
[0077] S410: when the gray value variance is less than a first preset threshold, determining that no chip is placed on the corresponding ROI area;
[0078] S420: When the gray value variance is greater than a second preset threshold, it is determined that a chip is placed on the corresponding ROI area, and the second preset threshold is greater than the first preset threshold.
[0079] Specifically, the first preset threshold is a preset minimum threshold, and the second preset threshold is a preset maximum threshold. If the gray value variance of all pixels on the diagonal of the current ROI area is less than the minimum threshold, it means that no chip is placed on the current ROI area. If the gray value variance of all pixels on the diagonal of the current ROI area is greater than the maximum threshold, it means that a chip is placed on the current ROI area.
[0080] Before detection, a chip can be placed in each receiving area on the tray, and then a grayscale image of the tray with the chip is taken. The grayscale image is then segmented into ROI areas, and the grayscale value variance of all pixels on the diagonal of each ROI area is calculated. The second preset threshold is determined based on the calculated grayscale value variance of all ROI areas. For example, the smallest grayscale value variance among all ROI areas can be found first, and then the second preset threshold can be set to be slightly smaller than the smallest grayscale value variance.
[0081] Similarly, when determining the first preset threshold, first obtain a grayscale image of the blank tray, then perform ROI region segmentation on the grayscale image, and then calculate the grayscale value variance of all pixels on the diagonal of each ROI region, and determine the second preset threshold based on the calculated grayscale value variance of all ROI regions. For example, first find the largest grayscale value variance of all ROI regions, and then set the first preset threshold to be slightly larger than the largest grayscale value variance.
[0082] Furthermore, it also includes: if the gray value variance of all pixels on the diagonal line of the current ROI area is greater than a first preset threshold and less than a second preset threshold, it is determined that a chip is placed on the current ROI area and the chip is warped.
[0083] Specifically, a chip is placed on the ROI area, but when the chip is in a tilted state, the white area on the tray will be partially exposed, so that the gray value variance of all pixels on the diagonal of the ROI area will be less than the second preset threshold and greater than the first preset threshold. Therefore, when the gray value variance is greater than the first preset threshold and less than the second preset threshold, it can be determined that the chip on the corresponding ROI area is tilted. This embodiment can reduce the damage to the chip appearance when the nozzle picks up the material by identifying whether the chip is tilted, and enhance the safety of the robot arm to pick up the material.
[0084] The present invention also provides an embodiment of a chip detection system on a tray, comprising:
[0085] An image acquisition module 100 is used to acquire a grayscale image of a tray on which chips are placed;
[0086] A region segmentation module 200 is used to perform ROI region segmentation on the grayscale image according to the number of rows and columns of the tray;
[0087] A calculation module 300 is used to calculate the gray value variance of all pixels on at least one diagonal line of each ROI area;
[0088] The judgment module 400 is used to judge whether a chip is placed in the corresponding ROI area according to the gray value variance.
[0089] In some embodiments, the computing module 300 includes:
[0090] A pixel coordinate acquisition unit 310 is used to acquire the pixel coordinates of the upper left corner, upper right corner, lower left corner and lower right corner of the grayscale image;
[0091] A calculation unit 320 is used to obtain the pixel coordinates of the starting point and the ending point of a diagonal line of the current ROI area according to the pixel coordinates of the upper left corner, the upper right corner, the lower left corner and the lower right corner of the grayscale image and the row number and the column number of the current ROI area;
[0092] The calculation unit 320 is further configured to calculate the grayscale value variance of all pixel points on the diagonal line between the starting point pixel coordinate and the end point pixel coordinate.
[0093] The calculation formula of the starting point pixel coordinates is:
[0094]
[0095] The calculation formula for the end point pixel coordinates is:
[0096]
[0097] Among them, Rows is the number of rows of the material tray; Cols is the number of columns of the material tray; p1 (x1, y1) is the pixel coordinate of the upper left corner of the grayscale image; p3 (x1, y2) is the pixel coordinate of the lower left corner of the grayscale image; p4 (x2, y2) is the pixel coordinate of the lower right corner of the grayscale image; i is the number of rows in the current ROI area, and j is the number of columns in the current ROI area.
[0098] The calculation formula for the grayscale value variance of all pixels on the diagonal line between the starting point pixel coordinates and the end point pixel coordinates is:
[0099] std=STD(LineProfile(image,ROI Startpoint ROI Endpoint ))
[0100] Among them, ROI Startpoint =ROI(x,y) [i,j] ;
[0101] ROI Endpoint =ROI(x,y)[i+1,j+1] .
[0102] The judgment module 400 is further used to judge that no chip is placed in the corresponding ROI area when the gray value variance is less than a first preset threshold;
[0103] When the gray value variance is greater than a second preset threshold, it is determined that a chip is placed in the corresponding ROI area, and the second preset threshold is greater than the first preset threshold;
[0104] When the gray value variance is greater than the first preset threshold and less than the second preset threshold, it is determined that a chip is placed on the corresponding ROI area and the chip is warped.
[0105] Specifically, this embodiment is a system embodiment corresponding to the above method embodiment. For specific effects, please refer to the above method embodiment, which will not be described in detail here.
[0106] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned program modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program units or modules to complete all or part of the functions described above. The program modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a processing unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software program unit. In addition, the specific names of the program modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0107] One embodiment of the present invention is a smart terminal, including a processor and a memory, wherein the memory is used to store computer programs; the processor is used to execute the computer programs stored in the memory to implement the method for detecting chips on a tray in the above-mentioned corresponding method embodiment.
[0108] The intelligent terminal can be a desktop computer, a notebook, a PDA, a tablet computer, a mobile phone, a human-computer interaction screen and other devices. The intelligent terminal may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above are only examples of intelligent terminals and do not constitute a limitation on intelligent terminals. They may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the intelligent terminal may also include an input / output interface, a display device, a network access device, a communication bus, a communication interface, and the like. The communication interface and the communication bus may also include an input / output interface, wherein the processor, the memory, the input / output interface and the communication interface communicate with each other through the communication bus. The memory stores a computer program, and the processor is used to execute the computer program stored in the memory to implement the detection method of the chip on the tray in the above-mentioned corresponding method embodiment.
[0109] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0110] The memory may be an internal storage unit of the smart terminal, such as a hard disk or memory of the smart terminal. The memory may also be an external storage device of the smart terminal, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the smart terminal. Furthermore, the memory may include both an internal storage unit and an external storage device of the smart terminal. The memory is used to store the computer program and other programs and data required by the smart terminal. The memory may also be used to temporarily store data that has been output or is to be output.
[0111] The communication bus is a circuit that connects the elements described and implements transmission between these elements. For example, the processor receives commands from other elements through the communication bus, decrypts the received commands, and performs calculations or data processing according to the decrypted commands. The memory may include program modules, such as kernels, middleware, application programming interfaces (APIs), and applications. The program modules may be composed of software, firmware, or hardware, or at least two of them. The input / output interface forwards commands or data entered by the user through the input / output interface (such as a sensor, keyboard, or touch screen). The communication interface connects the intelligent terminal to other network devices, user devices, and networks. For example, the communication interface may be connected to the network by wire or wireless to connect to other external network devices or user devices. Wireless communication may include at least one of the following: wireless fidelity (WiFi), Bluetooth (BT), near field communication technology (NFC), global satellite positioning system (GPS), and cellular communication, etc. Wired communication may include at least one of the following: universal serial bus (USB), high-definition multimedia interface (HDMI), asynchronous transmission standard interface (RS-232), etc. The network may be a telecommunications network and a communication network. The communication network may be a computer network, the Internet, the Internet of Things, or a telephone network. The intelligent terminal may be connected to the network via a communication interface, and the protocol used by the intelligent terminal and other network devices to communicate may be supported by at least one of an application, an application programming interface (API), a middleware, a kernel, and a communication interface.
[0112] One embodiment of the present invention is a storage medium, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the operations performed by the corresponding embodiment of the above-mentioned chip detection method on the tray. For example, the storage medium can be a read-only memory (ROM), a random access memory (RAM), a read-only compact disk (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device.
[0113] They can be implemented with program codes executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0114] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0115] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, 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.
[0116] In the embodiments provided by the present invention, it should be understood that the disclosed devices / intelligent terminals and methods can be implemented in other ways. For example, the device / intelligent terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation. For example, 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, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0117] 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.
[0118] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0119] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by sending instructions to related hardware through a computer program. The computer program can be stored in a storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program can be in source code form, object code form, executable file or some intermediate form. The storage medium may include: any entity or device capable of carrying the computer program, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example: in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0120] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0121] It should be noted that the above embodiments can be freely combined as needed. The above is only a preferred implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for detecting chips on a tray, characterized in that: include: Acquire a grayscale image of the tray on which the chips are placed; Performing ROI region segmentation on the grayscale image according to the number of rows and columns of the material tray; Calculate the gray value variance of all pixels on at least one diagonal line of each ROI area; It is determined whether a chip is placed in the corresponding ROI area according to the gray value variance.
2. A method for detecting chips on a tray according to claim 1, characterized in that: The step of calculating the gray value variance of all pixels on at least one diagonal line of each ROI region specifically includes: Obtain pixel coordinates of the upper left corner, upper right corner, lower left corner, and lower right corner of the grayscale image; Obtaining the pixel coordinates of the starting point and the ending point of a diagonal line of the current ROI region according to the pixel coordinates of the upper left corner, the upper right corner, the lower left corner and the lower right corner of the grayscale image and the row number and the column number of the current ROI region; The grayscale value variance of all pixel points on the diagonal line between the starting point pixel coordinate and the end point pixel coordinate is calculated.
3. A method for detecting chips on a tray according to claim 2, characterized in that: The calculation formula of the starting point pixel coordinates is: The calculation formula of the end point pixel coordinates is: Among them, Rows is the number of rows of the material tray; Cols is the number of columns of the material tray; p1 (x1, y1) is the pixel coordinate of the upper left corner of the grayscale image; p3 (x1, y2) is the pixel coordinate of the lower left corner of the grayscale image; p4 (x2, y2) is the pixel coordinate of the lower right corner of the grayscale image; i is the number of rows in the current ROI area, and j is the number of columns in the current ROI area.
4. The method for detecting chips on a tray according to claim 1, characterized in that: The step of judging whether a chip is placed in the corresponding ROI area according to the gray value variance specifically includes: When the gray value variance is less than a first preset threshold, it is determined that no chip is placed on the corresponding ROI area; When the gray value variance is greater than a second preset threshold, it is determined that a chip is placed on the corresponding ROI area, and the second preset threshold is greater than the first preset threshold.
5. A method for detecting chips on a tray according to claim 4, characterized in that: Also includes: When the gray value variance is greater than the first preset threshold and less than the second preset threshold, it is determined that a chip is placed on the corresponding ROI area and the chip is warped.
6. A chip detection system on a tray, characterized in that: include: An image acquisition module, used to acquire a grayscale image of the tray on which the chips are placed; A region segmentation module, used for performing ROI region segmentation on the grayscale image according to the number of rows and columns of the tray; A calculation module, used for calculating the gray value variance of all pixels on at least one diagonal line of each ROI area; The judging module is used to judge whether a chip is placed in the corresponding ROI area according to the gray value variance.
7. A chip detection system on a tray according to claim 6, characterized in that: The calculation module comprises: A pixel coordinate acquisition unit, used to acquire the pixel coordinates of the upper left corner, upper right corner, lower left corner and lower right corner of the grayscale image; A calculation unit, used to obtain the pixel coordinates of the starting point and the ending point of a diagonal line of the current ROI area according to the pixel coordinates of the upper left corner, the upper right corner, the lower left corner and the lower right corner of the grayscale image and the row number and the column number of the current ROI area; The calculation unit is further used to calculate the gray value variance of all pixel points on the diagonal line between the starting point pixel coordinates and the end point pixel coordinates.
8. A chip detection system on a tray according to claim 6, characterized in that: The judgment module is further configured to judge that no chip is placed on the corresponding ROI area when the gray value variance is less than a first preset threshold; When the gray value variance is greater than a second preset threshold, it is determined that a chip is placed on the corresponding ROI area, and the second preset threshold is greater than the first preset threshold; When the gray value variance is greater than the first preset threshold and less than the second preset threshold, it is determined that a chip is placed on the corresponding ROI area and the chip is warped.
9. A storage medium, characterized in that: The storage medium stores at least one instruction, which is loaded and executed by the processor to implement the operations performed by the method for detecting chips on a tray as described in any one of claims 1 to 5.
10. An intelligent terminal, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor is used to execute the computer program stored in the memory to implement the operations performed by the method for detecting chips on a tray as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Target detection method and device
CN104217208A
Edge defect detection method and system for glass panel
CN105405142A