Tray size recognition method, system, and storage medium
By extracting reflective lines from the tray image, calculating and comparing line segment information, the problem of low size recognition efficiency under reflective tray conditions is solved, and efficient tray size confirmation is achieved.
Patent Information
- Application Number
- CN202310806127.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-06-30
AI Technical Summary
In existing technologies, when the material tray and conveyor belt are similar in color, the material tray is made of transparent material, or the material tray is reflective, the size of the material tray cannot be effectively identified, resulting in low identification efficiency.
By capturing images of the material tray, extracting reflective lines, calculating the line segment information of the reflective lines, and comparing them with preset original size information, the actual size of the material tray can be confirmed.
When the tray is reflective, the tray size can be directly identified, improving the efficiency of tray size identification and avoiding errors in size and model identification.
Smart Images

Figure CN116883484B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent warehousing technology, and in particular to a method, system and storage medium for identifying the size of material trays. Background Technology
[0002] Currently, during the storage and retrieval of material trays, it is necessary to take images of the material trays with a camera and process the images to identify the outline of the material trays, thereby calculating the size of the material trays and completing the identification of the material tray size.
[0003] In related technologies, because cameras use light sources during shooting, when the tray and conveyor belt are similar in color, the tray is made of transparent material, or the tray is reflective, the tray's outline cannot be directly identified, thus making it impossible to obtain the tray's size and reducing the efficiency of tray size recognition. How to identify the tray size under these conditions—where the tray and conveyor belt are similar in color, the tray is made of transparent material, or the tray is reflective—and improve the efficiency of tray size recognition, is a problem that urgently needs to be discussed and solved. Summary of the Invention
[0004] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a method, system, and storage medium for identifying the size of a material tray, which can identify the size of the material tray even when the color of the material tray and the conveyor belt are similar, the material tray is made of transparent material, or the material tray is reflective, thereby improving the efficiency of material tray size identification.
[0005] To solve the above-mentioned technical problems, the present invention proposes the following technical solution:
[0006] The first aspect of this application provides a method for identifying the size of a material tray, including:
[0007] Determine the target material tray;
[0008] The target tray is photographed to obtain an image of the tray;
[0009] The reflective lines are extracted from the image of the material tray to obtain reflective lines;
[0010] Extract the line segment information from the reflective lines, and calculate the first real-time size information of the target tray based on the line segment information;
[0011] The first real-time size information is compared with the preset original size information. When the first real-time size information matches the preset original size information, the first real-time size information and the preset original size information are determined to be the actual size information.
[0012] The method for identifying the size of a tray according to the first aspect of this application has at least the following beneficial effects: When encountering situations where the tray and conveyor belt are similar in color, the tray is made of transparent material, or the tray is reflective, the edge of the circular tray will reflect light. This application can confirm the first real-time size information of the target tray by taking a picture of the target tray and using the reflective lines on the surface of the target tray. The first real-time size information is then compared with the preset original size information. When the first real-time size information matches the preset original size information, the first real-time size information and the preset original size information are determined to be the actual size information. This achieves the purpose of directly identifying the size of the tray when it is reflective, thus improving the efficiency of tray size identification.
[0013] According to some embodiments of the first aspect of this application, after taking a picture of the target tray to obtain an image of the tray, the method further includes:
[0014] Determine whether contour lines can be extracted from the tray image;
[0015] When the outline lines can be extracted from the tray image, the size of the target tray is determined according to the outline lines to obtain the second real-time size information, and the second real-time size information is output as the actual size information.
[0016] Correspondingly, the process of extracting reflective lines from the image of the material tray to obtain reflective lines includes:
[0017] If no outline lines are extracted from the tray image, reflective lines are extracted from the tray image.
[0018] According to some embodiments of the first aspect of this application, the identification method further includes:
[0019] If no outline lines and reflective lines are extracted from the image of the material tray, the target material tray is photographed again.
[0020] Extract the re-shot images of the material tray until you get the outline or reflective lines.
[0021] According to some embodiments of the first aspect of this application, the step of extracting reflective lines from the tray image to obtain reflective lines includes:
[0022] The region containing the edge of the material tray in the material tray image is extracted to obtain a region image;
[0023] By analyzing the grayscale values in the image of the region, the contour reflective lines are obtained;
[0024] Select contour reflective lines with pixel values greater than the preset pixel threshold to obtain reflective lines.
[0025] According to some embodiments of the first aspect of this application, the step of extracting line segment information from the reflective lines and calculating the first real-time size information of the target tray based on the line segment information includes:
[0026] The reflective lines are cut according to the turning points in the reflective lines to obtain several cut lines;
[0027] The cutting lines are classified to obtain straight line images, circular arc images, and elliptical arc images;
[0028] The arc data of the arc image is filtered out from the straight line image, the arc image and the elliptical arc image to obtain line segment information, wherein the line segment information includes arc length and radian.
[0029] The center of measurement, the radius of measurement, and the area of measurement of the target material tray are calculated based on the arc length and the radian.
[0030] The measured radius and the measured area are used as the first real-time size information.
[0031] According to some embodiments of the first aspect of this application, determining the actual size information based on the first real-time size information and the preset original size information includes:
[0032] By comparing the first real-time size information with the original size information, a comparison result is obtained;
[0033] When the comparison result shows that the first real-time size information and the original size information match, the first real-time size information is output as the actual size information.
[0034] If the comparison result shows that the first real-time size information and the original size information do not match, the target tray is photographed again until the actual size information is obtained.
[0035] According to some embodiments of the first aspect of this application, the original size information includes the original area, and the comparison of the first real-time size information and the original size information to obtain a comparison result includes:
[0036] Calculate the difference between the original area and the measured area to obtain the area difference value;
[0037] When the area difference is less than a preset error threshold, the comparison result is that the first real-time size information and the original size information match;
[0038] When the area difference is greater than the error threshold, the comparison result is that the first real-time size information and the original size information do not match.
[0039] According to some embodiments of the first aspect of this application, the original size information is obtained through the following steps:
[0040] Obtain the identification code affixed to the target material tray from the image of the material tray;
[0041] The identification code is identified to obtain the original size information.
[0042] A second aspect of this application provides a tray size identification system, comprising:
[0043] At least one memory;
[0044] At least one processor;
[0045] At least one program;
[0046] The program is stored in the memory, and the processor executes at least one of the programs to achieve the following:
[0047] The method for identifying the size of the tray as described in any of the first aspects of this application.
[0048] A third aspect of this application provides a computer-readable storage medium storing computer-executable signals for performing:
[0049] The method for identifying the size of the tray as described in any of the first aspects of this application.
[0050] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0051] Additional aspects and advantages of this application will become apparent and readily understood in conjunction with the following description of the embodiments, in which:
[0052] Figure 1 The main flowchart of the tray size identification method provided in some embodiments of this application;
[0053] Figure 2 A sub-flowchart of a method for identifying tray size provided in some embodiments of this application;
[0054] Figure 3 A sub-flowchart of a method for identifying tray size provided in some embodiments of this application;
[0055] Figure 4 A sub-flowchart of a method for identifying tray size provided in some embodiments of this application;
[0056] Figure 5A sub-flowchart of a method for identifying tray size provided in some embodiments of this application;
[0057] Figure 6 A sub-flowchart of a method for identifying tray size provided in some embodiments of this application;
[0058] Figure 7 A sub-flowchart of a method for identifying tray size provided in some embodiments of this application;
[0059] Figure 8 A sub-flowchart of a method for identifying tray size provided in some embodiments of this application;
[0060] Figure 9 This is a block diagram of a tray size recognition system provided in some embodiments of this application. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0062] It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown in the flowchart. The terminology in the specification, claims, and the foregoing drawings is used to distinguish similar objects and is not necessarily used to describe a specific order or sequence.
[0063] In the description of this application, the use of "first" and "second" is for the purpose of distinguishing technical features only, and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or the order of the technical features indicated.
[0064] In the description of this application, unless otherwise expressly defined, terms such as "setup," "installation," and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this application in conjunction with the specific content of the technical solution.
[0065] Currently, the process of storing and retrieving material trays requires capturing images of the trays with a camera and processing these images to identify the tray's outline and calculate its dimensions. However, in related technologies, because the camera uses a light source, situations arise where the tray and conveyor belt are similar in color, the tray is transparent, or the tray is reflective. In these cases, the tray's outline cannot be directly identified, making it impossible to obtain its dimensions and reducing the efficiency of tray size recognition. Therefore, how to identify tray dimensions under these conditions—where the tray and conveyor belt are similar in color, the tray is transparent, or the tray is reflective—and improve the efficiency of tray size recognition, is a problem that urgently needs to be discussed and solved.
[0066] Based on this, the tray size identification method of this application can identify the tray size when the tray and conveyor belt are similar in color, the tray is made of transparent material, or the tray is reflective, thereby improving the efficiency of tray size identification.
[0067] Reference Figure 1 In a first aspect, embodiments of this application provide a method for identifying the size of a material tray, including but not limited to steps S110, S120, S130, S140, and S150.
[0068] Step S110: Determine the target material tray;
[0069] Step S120: Take a picture of the target tray to obtain an image of the tray;
[0070] Step S130: Extract reflective lines from the material tray image to obtain reflective lines;
[0071] Step S140: Extract the line segment information from the reflective lines and calculate the first real-time size information of the target material tray based on the line segment information;
[0072] Step S150: Compare the first real-time size information with the preset original size information. When the first real-time size information matches the preset original size information, determine that the first real-time size information and the preset original size information are the actual size information.
[0073] It should be noted that when encountering situations where the material tray and conveyor belt are similar in color, the material tray is made of transparent material, or the material tray is reflective, the edge of the circular material tray will reflect light. This application can confirm the first real-time size information of the target material tray by taking a picture of the target material tray and using the reflective lines on the surface of the target material tray. Based on the first real-time size information and the preset original size information, the actual size information of the target material tray is determined, thereby achieving the purpose of directly identifying the size of the material tray under reflective conditions and improving the efficiency of material tray size recognition.
[0074] According to one embodiment of this application, this application is applied to the identification of circular trays. Different models of circular trays correspond to different sizes. In the process of storing and retrieving circular trays in an intelligent warehousing system, the size of the target tray needs to be identified before storing the tray to determine whether the actual size of the target tray matches the original size of the target tray, thereby confirming the size of the target tray. The original size of the target tray is obtained by identifying the identification code affixed to the surface of the target tray. Similarly, the size of the target tray also needs to be identified before taking it out, and the actual size of the target tray needs to be identified again to determine whether it matches the original size of the target tray, thereby further confirming the size of the target tray and effectively avoiding errors in the actual size of the output target tray.
[0075] Specifically, in actual operation, because the imaging device requires lighting to capture a clearer image of the tray, reflective lines will appear along the edges of the tray when the target tray and conveyor belt are similar in color, the tray is transparent, or the tray is reflective. This interferes with the image processing device's recognition, making it impossible to directly identify the tray's outline. In this case, it's necessary to first determine the target tray at the current moment. The imaging device is then aimed at the target tray to acquire an image of it on the conveyor belt. This image is then transmitted to the image processing device, which extracts the reflective lines. To further calculate the tray's dimensions based on these lines, line segment information, such as arc length, needs to be extracted. This information is used to calculate the first real-time dimensions of the target tray. After obtaining the first real-time dimensions, to confirm whether the tray's model and size are correct, the actual dimensions are determined based on the first real-time dimensions and the original dimensions.
[0076] It should be noted that there may be multiple reflective lines on the actual target material tray. Some of these reflective lines may not be located at the edge of the target material tray. In this case, the extracted reflective lines will be compared one by one with the preset original size information. When a reflective line is matched, the first real-time size information corresponding to that reflective line and the preset original size information are determined to be the actual size information.
[0077] This application identifies and processes reflective lines to calculate the size of the target tray, i.e., the first real-time size information. Finally, the first real-time size information is compared with the preset original size information. When the first real-time size information matches the preset original size information, the first real-time size information and the preset original size information are determined to be the actual size information, further confirming the model and size of the target tray. This solves the current problem of not being able to directly identify the outline information of the target tray when the tray and conveyor belt are similar in color, the tray is made of transparent material, or the tray is reflective. This improves the recognition efficiency of tray size and effectively avoids the situation where the size and model of the target tray do not match the information corresponding to the identification code pasted on the target tray.
[0078] Reference Figure 2 In a first aspect, embodiments of this application provide a method for identifying the size of a target tray, including but not limited to steps S210 and S220.
[0079] Step S210: Determine whether the outline lines can be extracted from the material tray image;
[0080] Step S220: When the outline lines can be extracted from the material tray image, the size of the target material tray is determined according to the outline lines to obtain the second real-time size information, and the second real-time size information is output as the actual size information.
[0081] Correspondingly, reflective lines are extracted from the tray image to obtain reflective lines, including:
[0082] If the outline lines are not extracted from the tray image, extract the reflective lines from the tray image.
[0083] According to one embodiment of this application, after acquiring an image of the target tray on the conveyor belt at the current moment through an imaging device and transmitting the tray image to an image processing device, it is necessary to determine whether contour lines can be extracted from the tray image. If no reflective lines appear at the edge of the target tray, the contour lines of the target tray can be directly obtained after preprocessing the tray image by the image processing device. If the contour lines of the target tray can be directly obtained, the size of the target tray can be directly calculated based on the contour lines. Therefore, the size of the target tray can be directly determined based on the contour lines, obtaining second real-time size information, and outputting the second real-time size information as the actual size. Further, if no contour lines are extracted from the tray image, it indicates that the tray and conveyor belt are similar in color, the tray is made of transparent material, and the tray is reflective. Because reflective lines exist at the edge of the target tray in the tray image, they interfere with the image processing device's extraction of contour lines. In this case, it is necessary to extract the reflective lines from the tray image and recalculate the size of the target tray based on the extracted reflective lines.
[0084] Reference Figure 3 In a first aspect, embodiments of this application provide a method for identifying the size of a target tray, including but not limited to steps S310 and S320.
[0085] Step S310: If no outline lines and reflective lines are extracted from the image of the material tray, the target material tray is photographed again.
[0086] Step S320: Extract the re-shot image of the material tray until the outline or reflective lines are obtained.
[0087] According to one embodiment of this application, if the outline lines and reflective lines are not extracted from the tray image, it may be because the tray image is blurry, causing the image processing device to fail to extract the outline lines and reflective lines. It may also be because the shooting device is not aimed at the target tray, resulting in the tray image not containing the target tray. Therefore, it is necessary to take a picture of the target tray and extract the outline lines or reflective lines from the re-shot tray image until the tray image becomes clear or the shooting device is aimed at the target tray. The size of the target tray is then calculated based on the outline lines or reflective lines.
[0088] According to another embodiment of this application, since the shooting device set above the conveyor belt takes pictures of the target tray on the conveyor belt at preset time intervals, there is a gap between the target tray calculated in the previous calculation and the target tray calculated in the next calculation. Therefore, sometimes the target tray may not be present in the tray image, and the outline and reflective lines of the target tray cannot be identified. In this case, it is necessary to acquire the tray image of the target tray on the conveyor belt again until the outline and reflective lines of the target tray are identified.
[0089] Reference Figure 4 In a first aspect, embodiments of this application provide a method for identifying the size of a target tray, including but not limited to steps S410, S420, and S430.
[0090] Step S410: Extract the region containing the edge of the target material tray from the tray image to obtain the region image;
[0091] Step S420: Analyze the gray values in the region image to obtain the contour reflective lines;
[0092] Step S430: Select contour reflective lines with pixel values greater than a preset pixel threshold to obtain reflective lines.
[0093] According to one embodiment of this application, when the image processing device receives a tray image transmitted by the imaging device, it first needs to extract the reflective lines from the tray image. Specifically, it is necessary to first extract the area containing the edge of the target tray from the tray image, obtaining at least one region image, i.e., obtaining multiple region images containing the edge of the target tray. Each region image includes information about the edge of the target tray. After obtaining the region images, it is necessary to find all the contour reflective lines in the region images based on the changes in grayscale values. Furthermore, to suppress noise interference in the region images, it is also necessary to filter out the contour reflective lines with pixel values greater than a preset pixel threshold to obtain the reflective lines. The pixel threshold can be 300px, 400px, or 500px, and the specific pixel threshold is determined based on the pixel count of the actually captured tray image.
[0094] Reference Figure 5 In a first aspect, embodiments of this application provide a method for identifying the size of a target tray, including but not limited to steps S510, S520, S530, S540, and S550.
[0095] Step S510: Cut the reflective lines according to the turning points in the reflective lines to obtain several cut lines;
[0096] Step S520: Classify the cutting lines to obtain straight line images, circular arc images, and elliptical arc images;
[0097] Step S530: Filter the arc data of the arc image from the line image, arc image and elliptical arc image to obtain line segment information, wherein the line segment information includes arc length and radian.
[0098] Step S540: Calculate the center, radius, and area of the target material tray based on the arc length and radius.
[0099] Step S550: The measurement radius and measurement area are used as the first real-time size information.
[0100] According to one embodiment of this application, after obtaining the reflective lines, to facilitate the calculation of the target tray size, the reflective lines need to be cut according to all the turning points included in the reflective lines to obtain multiple cut lines. These cut lines include straight lines, arcs, and elliptical arcs. Since the image processing device cannot directly perform calculations based on these lines, it is necessary to further classify the cut lines to obtain straight line images, arc images, and elliptical arc images respectively, and filter out the arc data containing the arc image to obtain line segment information for subsequent target tray size calculation. Furthermore, after obtaining the arc length and radian, the center, radius, and area of the target tray can be directly calculated based on the arc length and radian, i.e., measuring the center, radius, and area, and using the measured radius and area as the first real-time size information for subsequent calculations.
[0101] Specifically, the line segment information includes arc length and radian. The image processing device cannot directly calculate the size of the target tray based on the arc image. Therefore, after screening the arc image, it is necessary to use a measurement tool to measure the arc image in order to obtain the arc length and radian corresponding to the arc image.
[0102] Reference Figure 6 In a first aspect, embodiments of this application provide a method for identifying the size of a target tray, including but not limited to steps S610, S620, and S630.
[0103] Step S610: Compare the first real-time size information with the original size information to obtain the comparison result;
[0104] Step S620: When the comparison result shows that the first real-time size information matches the original size information, the first real-time size information is output as the actual size information.
[0105] Step S630: When the comparison result shows that the first real-time size information and the original size information do not match, the target tray is photographed again until the actual size information is obtained.
[0106] According to one embodiment of this application, after calculating the first real-time size information, it is also necessary to determine the actual size information based on the first real-time size information and the original size information. The specific calculation steps are as follows: First, it is necessary to compare the first real-time size information and the original size information to obtain a comparison result. When the comparison result shows that the first real-time size information and the original size information match, it means that the size of the target tray calculated at this time corresponds to the original size obtained through the identification code pasted on the surface of the target tray and the model of the target tray. The first real-time size information calculated at this time is the actual size of the target tray, and the first real-time size information can be directly output as the actual size information. When the comparison result shows that the first real-time size information and the original size information do not match, it means that the size of the target tray calculated at this time is incorrect and cannot correspond to the original size obtained through the identification code pasted on the surface of the target tray and the model of the target tray. It is necessary to re-photograph the target tray to obtain the tray image of the target tray on the conveyor belt at the current moment, and calculate the first real-time size information based on the tray image until the actual size information is obtained. Furthermore, if after multiple calculations of the target material tray's dimensions, the comparison results still show a mismatch between the first real-time dimension information and the original dimension information, it may be due to an error in the identification code pasted on the surface of the target material tray. In this case, the image processing device will automatically report an error and hand it over to manual processing.
[0107] Reference Figure 7 In a first aspect, embodiments of this application provide a method for identifying the size of a target tray, including but not limited to steps S710, S720, and S730.
[0108] Step S710: Calculate the difference between the original area and the measured area to obtain the area difference value;
[0109] Step S720: When the area difference is less than the preset error threshold, the comparison result is that the first real-time size information and the original size information match.
[0110] Step S730: When the area difference is greater than the error threshold, the comparison result is that the first real-time size information and the original size information do not match.
[0111] According to one embodiment of this application, after calculating the first real-time size information of the target tray, in order to further confirm whether the model and size of the target tray are calculated incorrectly, it is also necessary to compare the first real-time size information with the original size information to obtain a comparison result. The comparison step is explained here: different models of target trays have different sizes, but due to the manufacturing process of the target tray, the actual measured size of the target tray may also differ from the size of the corresponding model of target tray. To accurately identify whether the difference is in the size of different models of target trays or in the manufacturing process of the same model of target tray, it is first necessary to calculate the difference between the original area and the measured area of the current target tray to obtain the difference, i.e., the area difference. After calculating the area difference, it is necessary to further compare the area difference with a preset error threshold. When the area difference is less than the error threshold, the comparison result is that the first real-time size information and the original size information match. This indicates that the calculated size of the target tray matches the size and model of the target tray identified by the identification code, and the first real-time size information can be directly output as the actual size of the current target tray. When the area difference is greater than the error threshold, the comparison result is that the first real-time size information and the original size information do not match. This indicates that the calculated size of the target tray does not match the size and model of the target tray identified by the identification code. This may be due to an error in the calculation process or an error in the QR code affixed to the surface of the target tray. It is necessary to re-capture the target tray using the imaging device to obtain an image of the target tray on the conveyor belt at the current moment, and calculate the size of the target tray based on the image until the actual size information of the target tray is obtained. Specifically, in actual storage and retrieval operations, the error threshold is determined by the operator based on the manufacturing process of the target tray.
[0112] Reference Figure 8 In a first aspect, embodiments of this application provide a method for identifying the size of a target tray, including but not limited to steps S810 and S820.
[0113] Step S810: Obtain the identification code pasted on the target material tray from the material tray image;
[0114] Step S820: Identify the identification code to obtain the original size information.
[0115] According to one embodiment of this application, each circular target tray conveyed by the conveyor belt has an identification code affixed to its surface. After the image processing device receives the tray image transmitted by the imaging device, it extracts the identification code affixed to the target tray from the tray image and identifies the identification code to obtain the size and model of the target tray, i.e., the original size information. The identification code can be a QR code or a barcode, as long as it enables the image processing device to recognize the original size information of the target tray.
[0116] Secondly, referring to Figure 9 This application provides a tray size identification system, including:
[0117] At least one memory 200;
[0118] At least one processor 100;
[0119] At least one program;
[0120] The program is stored in memory 200, and processor 100 executes at least one program to achieve:
[0121] The method for identifying the size of the tray as described in any embodiment of the first aspect of this application.
[0122] The processor 100 and the memory 200 can be connected via a bus or other means.
[0123] Memory 200, as a non-transitory readable storage medium, can be used to store non-transitory software instructions and non-transitory instructions. Furthermore, memory 200 may include high-speed random access memory 200, and may also include non-transitory memory 200, such as at least one disk storage device 200, flash memory device, or other non-transitory solid-state storage device 200. It is understood that memory 200 may optionally include memory 200 remotely located relative to processor 100, and these remote memories 200 can be connected to processor 100 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0124] The processor 100 executes non-transitory software instructions, commands, and signals stored in the memory 200 to perform various functional applications and data processing, thereby implementing the tray size identification method of the first aspect embodiment described above.
[0125] The non-transient software instructions required to implement the tray size identification method of the above embodiments are stored in the memory 200. When executed by the processor 100, the tray size identification method of the first aspect of this application is executed, for example, the method described above is executed. Figure 1Method steps S110 to S150 in the text Figure 2 Method steps S210 to S220, Figure 3 Method steps S310 to S320 in the text Figure 4 Method steps S410 to S430 in the text Figure 5 Method steps S510 to S550 in the text Figure 6 Method steps S610 to S630 in the text Figure 7 Method steps S710 to S730 in the text Figure 8 Method steps S810 to S820.
[0126] Thirdly, embodiments of this application provide a computer-readable storage medium storing computer-executable signals for execution:
[0127] The method for identifying the size of the tray as described in any embodiment of the first aspect of the application.
[0128] For example, execute the above description. Figure 1 Method steps S110 to S150 in the text Figure 2 Method steps S210 to S220, Figure 3 Method steps S310 to S320 in the text Figure 4 Method steps S410 to S430 in the text Figure 5 Method steps S510 to S550 in the text Figure 6 Method steps S610 to S630 in the text Figure 7 Method steps S710 to S730 in the text Figure 8 Method steps S810 to S820.
[0129] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0130] Based on the above description of the embodiments, those skilled in the art will understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable signals, data structures, instruction modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible by a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable signals, data structures, instruction modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0131] The embodiments of this application have been described in detail above with reference to the accompanying drawings. However, this application is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of this application.
Claims
1. A method of identifying the size of a tray, characterized by, The method comprises the following steps: determining a target tray on a conveyor belt; taking a picture of the target tray to obtain a tray image; judging whether a contour line can be extracted from the tray image; when the contour line can be extracted from the tray image, determining the size of the target tray according to the contour line to obtain second real-time size information, and outputting the second real-time size information as actual size information; when the contour line is not extracted from the tray image, performing a highlight line extraction process on the tray image to obtain a highlight line; extracting line segment information in the highlight line, and calculating first real-time size information of the target tray according to the line segment information to obtain the first real-time size information of the target tray which is approximately the color of the conveyor belt or is transparent material; comparing the first real-time size information with preset original size information, and determining the first real-time size information as actual size information when the first real-time size information matches the preset original size information; when the target tray is a circular tray, the step of extracting line segment information in the highlight line and calculating first real-time size information of the target tray according to the line segment information comprises the following steps: cutting the highlight line according to turning points in the highlight line to obtain a plurality of cut lines; classifying the cut lines to obtain a straight line image, a circular arc image and an elliptical arc image; screening circular arc data of the circular arc image from the straight line image, the circular arc image and the elliptical arc image to obtain line segment information, wherein the line segment information comprises arc length and arc degree; calculating the arc length and the arc degree to obtain a measurement center, a measurement radius and a measurement area of the target tray; taking the measurement radius and the measurement area as the first real-time size information.
2. The method of identifying the size of a tray according to claim 1, wherein The recognition method further comprises the following steps: when neither the contour line nor the highlight line is extracted from the tray image, re-taking a picture of the target tray; extracting the re-taken tray image until the contour line or the highlight line is obtained.
3. The method of identifying the size of a tray according to claim 1, wherein, The step of performing a highlight line extraction process on the tray image to obtain a highlight line comprises the following steps: cutting a region in the tray image where a tray edge exists to obtain a region image; analyzing a gray value in the region image to obtain a contour highlight line; selecting the contour highlight line with a pixel value greater than a preset pixel threshold value to obtain the highlight line.
4. The method of identifying the size of a tray according to claim 1, wherein, The step of determining actual size information according to the first real-time size information and preset original size information comprises the following steps: comparing the first real-time size information with the original size information to obtain a comparison result; when the comparison result is that the first real-time size information matches the original size information, outputting the first real-time size information as actual size information; when the comparison result is that the first real-time size information does not match the original size information, re-taking a picture of the target tray until the actual size information is obtained.
5. The method of identifying the size of a tray according to claim 4, wherein, The original size information comprises an original area, and the step of comparing the first real-time size information with the original size information to obtain a comparison result comprises the following steps: calculating a difference between the original area and the measured area to obtain an area difference value; when the area difference value is less than a preset error threshold, the comparison result is that the first real-time size information matches the original size information; when the area difference value is greater than the error threshold, the comparison result is that the first real-time size information does not match the original size information.
6. The method of identifying the size of a tray according to claim 1, wherein, the original size information is obtained by the following steps: obtaining an identification code pasted on the target tray from the tray image; identifying the identification code to obtain the original size information.
7. A tray size recognition system characterized by, comprise: at least one memory; at least one processor; at least one program; the program is stored in the memory, and the processor executes at least one of the programs to implement: the tray size identification method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, the computer readable storage medium stores computer executable signals, and the computer executable signals are used to execute: the tray size identification method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Grinding wheel dressing method and device based on machine vision
CN110517276A
Tab quality detection method, system and equipment and storage medium
CN115205198A