Method, device, electronic equipment and medium for detecting residue in barrel

The motion trend and residual situation of the chemical barrel are judged through the video acquisition device and classification algorithm, and the accuracy of pigment residue detection in the chemical barrel is solved, ensuring the accuracy of color ratio and production efficiency.

CN116703861BActive Publication Date: 2025-08-26CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310672108.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2025-08-26
Estimated Expiration
2043-06-07

AI Technical Summary

Technical Problem

In the prior art, it is difficult to efficiently and accurately determine the pigment residue detection in the chemical barrel, resulting in deviations in the color ratio.

Method used

The video acquisition device is used to collect images, and the motion trend is used to determine whether the storing barrel enters or leaves the storing area. Residual judgment is performed after the storing barrel is completed. The classification algorithm is used to identify the pigment residues in the storing barrel.

Benefits of technology

It realizes efficient and accurate detection of pigment residues in the chemical barrel, avoids color ratio deviations, and improves production accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116703861B_ABST
    Figure CN116703861B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, electronic device, and medium for detecting residue in a barrel. The method includes: obtaining a current image captured by a video capture device; if the current image includes a marking point for the chemical material area, performing a motion trend judgment; the motion trend judgment includes: obtaining at least two frames of detection images captured by the video capture device; and judging the motion trend of the chemical material barrel based on the at least two frames of detection images; wherein the motion trend includes entering the chemical material area and leaving the chemical material area; when the motion trend is entering the chemical material area, no residue judgment is performed; when the motion trend is leaving the chemical material area, a residue judgment is performed; performing the residue judgment includes: obtaining a target image captured by the video capture device during the period when the chemical material barrel leaves the chemical material area, classifying the target image based on a classification algorithm, and obtaining a residue judgment result, wherein the residue judgment result includes whether there is residue or no residue. The method of the present application can accurately determine whether there is residue in the chemical material barrel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of textile printing and dyeing technology, and in particular to a method, device, electronic equipment and medium for detecting residue in a barrel. Background Art

[0002] With the continuous development of automation technology, most textile dyeing and bleaching companies now use automated color mixing, chemical processing, and bleaching and dyeing production methods. In actual applications, the pigment in the chemical barrel may not be completely dissolved during the chemical process, or the textile may not be fully absorbed after the chemical barrel is absorbed. This may cause color deviation when the chemical barrel with residual pigment is used for the next batch of dyeing.

[0003] In the existing technology, the detection of whether there is any residue in the chemical barrel mainly relies on manual inspection, but automated equipment is not convenient for manual observation of the chemical barrel. In addition, human attention is limited and it is difficult to take into account multiple devices. There is a problem that it is impossible to efficiently and accurately determine whether there is any pigment residue in the chemical barrel. Summary of the Invention

[0004] The present application provides a barrel residue detection method, device, electronic equipment and medium to solve the problem of being unable to efficiently and accurately determine whether there is pigment residue in a chemical barrel.

[0005] On the one hand, the present application provides a method for detecting residue in a barrel, which is applied to a chemical material system, wherein the chemical material system includes: a first transport device, which is used to move on a preset first motion path to transport a second transport device located on the first transport device to a transfer position corresponding to each production area, wherein the production area includes a chemical material area, and the transfer position corresponding to the chemical material area is marked with a chemical material area marking point; a second transport device, which is used to place a chemical material barrel, and after arriving at the transfer position corresponding to any production area, move the chemical material barrel along the second motion path to enter or leave the production area; a video acquisition device installed on the top of the first transport device, the video acquisition device is used to capture images in a target field of view according to a top-down shooting angle, wherein, when the second transport device reaches the transfer position corresponding to the chemical material area, the target field of view at least includes the chemical material barrel and the chemical material area marking point; the method includes:

[0006] Acquire a current image captured by the video acquisition device, and if the current image includes the marking point of the chemical material area, perform motion trend determination; the motion trend determination includes: acquiring at least two frames of detection images captured by the video acquisition device, and determining the motion trend of the chemical material barrel based on the at least two frames of detection images; wherein the motion trend includes entering the chemical material area and leaving the chemical material area;

[0007] When the movement trend is to enter the chemical material area, the residue judgment is not performed; when the movement trend is to leave the chemical material area, the residue judgment is performed; the execution of the residue judgment includes: obtaining the target image captured by the video acquisition device during the period when the chemical material barrel leaves the chemical material area, classifying the target image based on the classification algorithm, and obtaining a residue judgment result, wherein the residue judgment result includes whether there is residue or not.

[0008] In a possible implementation, the determining the movement trend of the chemical barrel based on the at least two detection image frames includes:

[0009] Determining a first image edge of the detection image, where the first image edge extends in a direction perpendicular to the second motion path and is close to the first motion path and away from the chemical zone; and obtaining a distance between the chemical barrel and the first image edge in the at least two frames of the detection image;

[0010] If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is entering the chemical area; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is leaving the chemical area.

[0011] In a possible implementation, the method further includes:

[0012] Obtaining a minimum standard distance and a maximum standard distance; the minimum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary at a transfer position corresponding to the chemical area; and the maximum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary in the chemical area;

[0013] Adjusting the minimum standard distance and the maximum standard distance according to a preset redundancy, and obtaining and recording the minimum distance and the maximum distance;

[0014] After obtaining the distance between the chemical barrel and the edge of the first image in the at least two frames of detection images, the method further includes:

[0015] If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the maximum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the maximum distance; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the minimum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the minimum distance.

[0016] In a possible implementation, the method further includes:

[0017] Acquiring a standard image captured by the video capture device under a standard environment; the standard environment includes no light, no image, and no reflection;

[0018] Before executing the residual judgment, the method further includes:

[0019] For each frame of the target image, the chemical barrel area in the target image is differentiated from the chemical barrel area in the standard image to obtain the first pixel point whose threshold is less than a preset value in the differentiation process; based on the image completion algorithm, the first pixel point in the target image is completed.

[0020] In a possible implementation, the method further includes:

[0021] If the residue determination result is that there is residue, identifying and obtaining the shape of the residue in the chemical barrel area in the target image based on a classification algorithm;

[0022] If the shape of the residual part is not a preset standard shape, the residual judgment result is updated to no residue; the standard shape includes at least one of the following: circle, teardrop and strip.

[0023] On the other hand, the present application provides a barrel residue detection device, which is applied to a chemical material system, and the device includes:

[0024] a motion judgment module, configured to obtain a current image captured by the video acquisition device, and if the current image includes the marking point of the chemical material area, perform motion trend judgment; the motion trend judgment comprises: obtaining at least two frames of detection images captured by the video acquisition device, and judging the motion trend of the chemical material barrel based on the at least two frames of detection images; wherein the motion trend includes entering the chemical material area and leaving the chemical material area;

[0025] The residue judgment module is used to not perform residue judgment when the movement trend is entering the chemical material area; and to perform residue judgment when the movement trend is leaving the chemical material area; the execution of the residue judgment includes: obtaining the target image captured by the video acquisition device during the period when the chemical material barrel leaves the chemical material area, classifying the target image based on the classification algorithm, and obtaining a residue judgment result, wherein the residue judgment result includes whether there is residue or not.

[0026] In a possible implementation, the motion determination module is specifically configured to:

[0027] Determining a first image edge of the detection image, where the first image edge extends in a direction perpendicular to the second motion path and is close to the first motion path and away from the chemical zone; and obtaining a distance between the chemical barrel and the first image edge in the at least two frames of the detection image;

[0028] If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is entering the chemical area; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is leaving the chemical area.

[0029] In a possible implementation, the apparatus further includes:

[0030] a correction module, configured to obtain a minimum standard distance and a maximum standard distance; the minimum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary at a transfer position corresponding to the chemical zone; and the maximum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary in the chemical zone;

[0031] Adjusting the minimum standard distance and the maximum standard distance according to a preset redundancy, and obtaining and recording the minimum distance and the maximum distance;

[0032] The motion judgment module is further used to:

[0033] If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the maximum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the maximum distance; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the minimum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the minimum distance.

[0034] In a possible implementation, the apparatus further includes:

[0035] A differential module is used to obtain a standard image captured by the video capture device under a standard environment; the standard environment includes no light, no image, and no reflection;

[0036] The residue judgment module is further used to:

[0037] For each frame of the target image, the chemical barrel area in the target image is differentiated from the chemical barrel area in the standard image to obtain the first pixel point whose threshold is less than a preset value in the differentiation process; based on the image completion algorithm, the first pixel point in the target image is completed.

[0038] In a possible implementation, the apparatus further includes:

[0039] an updating module, configured to identify and obtain the shape of the residual portion in the chemical barrel area in the target image based on a classification algorithm if the residual judgment result is that there is residual;

[0040] If the shape of the residual part is not a preset standard shape, the residual judgment result is updated to no residue; the standard shape includes at least one of the following: circle, teardrop and strip.

[0041] On the other hand, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method as described above.

[0042] On the other hand, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to implement the method as described above when executed by a processor.

[0043] In the barrel residue detection method, device, electronic device and medium provided by the present application, images are collected by a video acquisition device, and whether the chemical barrel is located in the corresponding area of ​​the chemical area is judged based on whether the collected image contains a preset chemical area mark point; and the movement trend of the chemical barrel is judged to be entering or leaving the chemical area based on the image. When the movement trend of the chemical barrel is to leave the chemical area, it indicates that the chemical processing has been completed and residue detection can be performed; the target recognition algorithm is used to classify and calculate the image during the residue detection, and deep learning is used to accurately identify whether there is color residue in the chemical barrel, so that it can efficiently and accurately judge whether there is pigment residue in the chemical barrel. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0045] Figure 1 exemplarily shows a side view of the material processing system provided in Example 1 of the present application;

[0046] Figure 2 exemplarily shows a scene example diagram of the field of view of the video acquisition device provided in Example 1 of the present application;

[0047] Figure 3 hereinafter is a flow chart showing a method for detecting residue in a barrel according to the first embodiment of the present application;

[0048] Figure 4 exemplarily shows an example diagram of obtaining the edge of the first image provided in the first embodiment of the present application;

[0049] Figure 5 exemplarily shows an example of a later frame of detection image provided by the first embodiment of the present application;

[0050] Figure 6 exemplarily shows an example of a previous frame detection image provided by the first embodiment of the present application;

[0051] Figure 7 Schematic diagram of the structure of the barrel residue detection device provided in the second embodiment of the present application is shown in FIG.

[0052] Figure 8 Schematic diagram of the structure of the electronic device for detecting residue in a barrel provided in Example 3 of the present application is shown in FIG.

[0053] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0054] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0055] A module in this application refers to a functional module or a logical module. It can be in software form, where a processor executes program code to implement its functionality, or it can be in hardware form. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0056] With the continuous development of automation technology, most textile dyeing and bleaching companies now use automated color mixing, chemical processing, and bleaching and dyeing production methods. In actual applications, the pigment in the chemical barrel may not be completely dissolved during the chemical process, or the textile may not be fully absorbed after the chemical barrel is absorbed. This may cause color deviation when the chemical barrel with residual pigment is used for the next batch of dyeing.

[0057] In the existing technology, the detection of whether there is any residue in the chemical barrel mainly relies on manual inspection, but automated equipment is not convenient for manual observation of the chemical barrel. In addition, human attention is limited and it is difficult to take into account multiple devices. There is a problem that it is impossible to accurately judge whether there is any pigment residue in the chemical barrel.

[0058] The following specific embodiments are used to illustrate the technical solution of the present application. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0059] Example 1

[0060] This embodiment provides a method for detecting residue in a barrel, which is applied to a chemical material system, wherein the chemical material system may include:

[0061] a first transport device, configured to move along a preset first motion path to transport a second transport device located on the first transport device to a transfer location corresponding to each production area, wherein the production area includes a chemical material area, and the transfer location corresponding to the chemical material area is marked with a chemical material area marking point;

[0062] A second transport device is used to place the chemical barrel and, after arriving at a transfer position corresponding to any production area, move the chemical barrel along a second movement path to enter or leave the production area;

[0063] A video acquisition device is installed on the top of the first transport device, and the video acquisition device is used to capture images in the target field of view according to a top-down shooting angle. When the second transport device reaches the transfer position corresponding to the chemical material area, the target field of view at least includes the chemical material barrel and the chemical material area marking point.

[0064] Figure 1 This is a side view of the structure of a chemical material system provided in one embodiment of the present application. Figure 2 This is an example diagram of a scene of the field of view of a video acquisition device provided in one embodiment of the present application. Figure 1 As shown, a second transport device and a video acquisition device are installed on the first transport device. The first transport device is used to move along the first motion path to transport the second transport device to the transfer position corresponding to each production area. In conjunction with the example shown in the figure, the transfer position corresponding to each production area is located in the area on the track below the production area in the figure. The chemical barrel is placed on the second transport device. The second transport device is used to move the chemical barrel along the second motion path (in the example in the figure, it is a direction perpendicular to the extension direction of the track) after reaching the transfer position corresponding to any production area, entering or leaving the production area; the video acquisition device is located on the top of the first transport device, and is used to capture images in the target field of view from a bird's-eye view. Among them, the video acquisition device can be a camera. The specific specifications and models can be selected according to the actual production needs and are not limited here.

[0065] like Figure 2 As shown, the dotted box range represents the size of the target field of view of the video acquisition device. The first transport device runs on a track, and the extension direction of the track is the first movement path. The first transport device passes through the transfer positions corresponding to each production area, wherein each production area includes an empty barrel area for placing empty barrels, a mixing area for mixing pigments, and a chemical material area for absorbing chemical materials; the video acquisition device is installed on the top of the first transport device, moves with the first transport device, and shoots from a top-down perspective. The size of the field of view of the video acquisition device is shown in the dotted box in the figure. For example, when the first transport device arrives at the transfer position corresponding to the chemical material area, the field of view captured by the video acquisition device is as follows Figure 2As shown in the field of view of the video capture device in FIG, the first transport device may include a chemical material barrel and a chemical material area marking point located on the track. The chemical material area marking point can be set according to actual production needs. For example, at a transfer position corresponding to the chemical material area on the track, two chemical material area marking points can be set according to the field of view of the video capture device. When the image captured by the video capture device contains two chemical material area marking points, it indicates that the first transport device is at the transfer position corresponding to the chemical material area.

[0066] Figure 3 This is a flow chart of a barrel residue detection method provided by an embodiment of the present application. Figure 3 As shown, the barrel residue detection method provided by this embodiment may include:

[0067] S301, obtaining a current image captured by the video acquisition device, and if the current image includes the marking point of the chemical material area, performing motion trend determination; the motion trend determination includes: obtaining at least two frames of detection images captured by the video acquisition device, and determining the motion trend of the chemical material barrel based on the at least two frames of detection images; wherein the motion trend includes entering the chemical material area and leaving the chemical material area;

[0068] S2302. When the movement trend is to enter the chemical material area, the residue judgment is not performed; when the movement trend is to leave the chemical material area, the residue judgment is performed; the performing of the residue judgment includes: obtaining the target image captured by the video acquisition device during the period when the chemical material barrel leaves the chemical material area, classifying the target image based on the classification algorithm, and obtaining a residue judgment result, wherein the residue judgment result includes whether there is residue or not.

[0069] In actual applications, the executor of this embodiment can be a barrel residue detection device, which can be implemented through a computer program, such as application software, etc.; or, it can also be implemented as a medium storing relevant computer programs, such as a USB flash drive, a cloud disk, etc.; or, it can also be implemented through a physical device integrated or installed with relevant computer programs, such as a chip, a server, etc.

[0070] Specifically, a video frame captured by a video capture device is obtained as a current image; and determining whether the current image includes a marking point in the chemical material area may include: performing image recognition on the current image based on a target recognition algorithm, performing dense sampling at different positions of the current image, extracting features using a convolutional neural network, and then performing classification and regression to obtain an identification result of whether the marking point in the chemical material area is contained; wherein the target recognition algorithm includes but is not limited to the YOLO algorithm (full name: You Only Look Once: Unified, Real-Time Object Detection) or the SSD algorithm (full name: Single Shot MultiBox Detector), which may be selected according to actual production needs and is not limited here.

[0071] If the current image includes the marking point of the chemical processing area, indicating that the first transport device has transported the second transport device to the transfer position corresponding to the chemical processing area, then the residue judgment is further performed.

[0072] Based on the at least two frames of detection images obtained, the movement trend of the chemical barrel is determined to be either entering or leaving the chemical barrel area. In practical applications, obtaining the at least two frames of detection images captured by the video capture device may include obtaining, as the detection images, the video frame captured by the video capture device at the current moment and the previous video frame corresponding to the video frame at the current moment. When the movement trend of the chemical barrel is entering the chemical barrel area, it indicates that the chemical barrel has not completed chemical processing, and the residual determination is not performed. When the movement trend of the chemical barrel is leaving the chemical barrel area, it indicates that the chemical barrel has completed chemical processing, and the residual determination is performed.

[0073] Among them, performing residual judgment can specifically include: obtaining the target image captured by the video acquisition device during the period when the chemical barrel leaves the chemical area, for example, selecting the detection image whose movement trend has been determined to be entering the chemical area as the target image; based on the target recognition algorithm, identifying the chemical barrel area in the target image, and classifying and calculating the chemical barrel area in the target image based on the classification algorithm to obtain the residual judgment result. Since the colors of pigments are diverse in actual applications and the residual concentrations in the chemical barrels are different, resulting in diverse residual appearances, when the classification algorithm is used for calculation, only the no-residue situation is classified into one category, and all other situations are classified as having residues as the residual judgment result. Among them, the classification algorithm can be the SE_ResNeXt algorithm (with the Sequeeze-and-Excitation module added to the ResNeXt model), the deep residual network (ResNet) or the ResNet-50 algorithm, and can also be selected according to the needs of actual production, and is not limited here.

[0074] In practical applications, there are many ways to determine the movement trend of the chemical barrel. In one example, determining the movement trend of the chemical barrel based on the at least two frames of detection images may include:

[0075] Determining a first image edge of the detection image, where the first image edge extends in a direction perpendicular to the second motion path and is close to the first motion path and away from the chemical zone; and obtaining a distance between the chemical barrel and the first image edge in the at least two frames of the detection image;

[0076] If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is entering the chemical area; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is leaving the chemical area.

[0077] Figure 4 This is an example diagram of obtaining the edge of the first image provided by an embodiment of the present application, such as Figure 4 As shown, the first image edge is determined among the four edges of the detection image, and the conditions satisfied by the first image edge are: the extension direction of the first image edge is parallel to the first motion path and perpendicular to the second motion path; the first image edge is close to the side of the first motion path and away from the side of the chemical area.

[0078] Based on the target recognition algorithm, the chemical barrel area in the detection image is identified, and the distance between the chemical barrel area in the detection image and the edge of the first image is used as the X coordinate value. The distance between the chemical barrel and the edge of the first image in the next frame of detection image is recorded as X p , the distance between the chemical barrel and the edge of the first image in the previous frame detection image is recorded as X p-1 , X p With X p-1 Compare. If X p <X p-1 , then it is determined that the movement trend of the chemical barrel is to leave the chemical area; if X p >X p-1 , it is determined that the movement trend of the chemical barrel is entering the chemical area.

[0079] For example, Figure 5 This is an example of the next frame of detection image provided by this application. Figure 6 This is an example of a previous frame of detection image provided by this application, such as Figure 5 、 Figure 6As shown, after determining the edge of the first image in the detection image, the chemical barrel in the detection image is locked through the chemical barrel recognition frame based on the target recognition algorithm. The distance X between the chemical barrel and the edge of the first image in the next frame of the detection image is obtained. p , and the distance between the chemical barrel and the edge of the first image in the previous frame detection image is recorded as X p-1 .X p <X p-1 , it is determined that the movement trend of the chemical barrel is to leave the chemical area.

[0080] In practical applications, there is a certain error in determining the chemical barrel area in the image through the target recognition algorithm. To avoid misjudging the movement trend of the chemical barrel, in one example, the method may further include:

[0081] Obtaining a minimum standard distance and a maximum standard distance; the minimum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary at a transfer position corresponding to the chemical area; and the maximum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary in the chemical area;

[0082] Adjusting the minimum standard distance and the maximum standard distance according to a preset redundancy, and obtaining and recording the minimum distance and the maximum distance;

[0083] After obtaining the distance between the chemical barrel and the edge of the first image in the at least two frames of detection images, the method further includes:

[0084] If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the maximum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the maximum distance; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the minimum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the minimum distance.

[0085] In actual applications, the movement of the chemical barrel along the second motion path can be divided into two situations: entering the chemical area and leaving the chemical area. In each case, when the movement slows down and stops, the running speed of the chemical barrel is slower. There is a situation where the distance between the chemical barrel and the edge of the first image in the next frame of detection image is closer to the distance between the chemical barrel and the edge of the first image in the previous frame of detection image. However, the recognition accuracy of the classification and recognition algorithm is limited. Therefore, the classification and recognition algorithm has certain errors in recognizing the chemical barrel area in the detection image.

[0086] To eliminate this error, when the chemical barrel is stationary at the transfer position corresponding to the chemical area, the image captured by the video acquisition device is obtained, the chemical barrel area in the image is determined based on the target recognition algorithm, and the distance X between the chemical barrel and the edge of the first image is obtained. min , as the minimum standard distance; when the chemical barrel is stationary in the chemical area, obtain the image captured by the video acquisition device, determine the chemical barrel area in the image based on the target recognition algorithm, and obtain the distance X between the chemical barrel and the edge of the first image max , as the maximum standard distance.

[0087] Since the target recognition algorithm always has a certain error, the preset redundancy X0 is min and X max Adjust to get the minimum distance X Min and the maximum distance X Max .

[0088] If X p >X Max , then let X p-1 =X Max , that is, in the next frame of detection image, the distance between the chemical barrel and the edge of the first image is greater than the maximum distance, indicating that the chemical barrel is located near the chemical area and is in a deceleration state. It is determined that the movement trend of the chemical barrel at the corresponding moment of the next frame of detection image is entering the chemical area; if X p <X Min , then let X p-1 =X Min , meaning that in the next detection image frame, the distance between the chemical barrel and the edge of the first image is less than the minimum distance, indicating that the chemical barrel is located near the first transport device and is decelerating. Therefore, the chemical barrel's movement trend at the corresponding moment in the next detection image frame is determined to be leaving the chemical area. By correcting the distance between the chemical barrel and the edge of the first image in the detection image before performing the motion trend determination, the impact of the target recognition algorithm's insufficient accuracy on the determination result is reduced.

[0089] For example, suppose you want to judge the movement trend of the chemical barrel, and obtain that when the chemical barrel is stationary at the corresponding transfer position of the chemical area, the minimum standard distance between the chemical barrel and the edge of the first image is x min , and when the chemical barrel is located in the production area, the maximum standard distance between the chemical barrel and the edge of the first image is. According to the accuracy of the target recognition algorithm, the redundancy x0 is preset, and according to x0, x min and x max , get the minimum distance x ri and the maximum distance x li The distance between the chemical barrel and the edge of the first image in the next frame of the detection image is x p And the distance between the chemical barrel and the edge of the first image in the previous frame detection image is x p-1, assuming x p <x ri , let x p-1 =x ri , at this time x p <x p-1 , it is determined that the movement trend of the chemical barrel is to leave the chemical area.

[0090] Furthermore, since the external environment may interfere with the residual judgment result, in order to improve the accuracy of the residual judgment result, the detection image can be processed. In one example, the method may further include:

[0091] Acquiring a standard image captured by the video capture device under a standard environment; the standard environment includes no light, no image, and no reflection;

[0092] Before executing the residual judgment, the method further includes:

[0093] For each frame of the target image, the chemical barrel area in the target image is differentiated from the chemical barrel area in the standard image to obtain the first pixel point whose threshold is less than a preset value in the differentiation process; based on the image completion algorithm, the first pixel point in the target image is completed.

[0094] Specifically, in a standard environment without light, images, or reflections, a standard image without external interference is captured by a video capture device and used for comparison with a target image. Processing the target image may include: performing a differential calculation between a chemical barrel area in the target image and a chemical barrel area in the standard image, wherein the chemical barrel area in each target image and the chemical barrel area in the corresponding standard image are located at the same position, obtaining a differential calculation value for each pixel in the target image, obtaining the first pixel point whose differential calculation value is less than a preset value, and determining the pixel point that may be affected by the environment; and completing the first pixel point based on an image completion algorithm to obtain a processed target image that eliminates external interference.

[0095] For example, a standard image captured by a video acquisition device is obtained in a standard environment without external interference, and each pixel point in the chemical barrel area in the target image is differentiated from each pixel point in the chemical barrel area in the standard image. The pixel point in the target image whose differential calculation value is less than the threshold M is determined as the first pixel point, the pixel value of the first pixel point in the target image is deleted, and it is completed by an image completion algorithm to obtain a processed target image.

[0096] To further reduce the impact of the external environment on the residue determination result, in one example, the method may further include:

[0097] If the residue determination result is that there is residue, identifying and obtaining the shape of the residue in the chemical barrel area in the target image based on a classification algorithm;

[0098] If the shape of the residual part is not a preset standard shape, the residual judgment result is updated to no residue; the standard shape includes at least one of the following: circle, teardrop and strip.

[0099] In practice, liquid residue may remain in the chemical barrel after the chemical is dissolved. This residue may take on shapes such as near-circular, teardrop-shaped, or long strips. To eliminate external influences that were not eliminated during the differential algorithm phase, when the residue determination result indicates that there is residue, a classification algorithm is used to classify the chemical barrel region in the target image and identify the shape of the residue within the barrel. If the shape of the residue does not conform to any of the pre-defined standard shapes, such as near-circular, teardrop-shaped, or long strips, the residue determination result is incorrect, and the residue determination result is updated to no residue.

[0100] For example, assuming that the current residue judgment result is that there is residue, the chemical barrel area in the target image is classified and calculated based on the classification algorithm, and the shape of the residual part does not conform to the shape of a circle, a teardrop, or a strip, indicating that the residual part is not liquid residue, and may be a shadow formed by external lights, reflections, etc., and the residue judgment result is updated to no residue.

[0101] In the barrel residue detection method provided by the present application, images are captured by a video capture device, and whether the chemical barrel is located in the corresponding area of ​​the chemical area is determined based on whether the captured image contains a preset chemical area marking point; and the movement trend of the chemical barrel is determined to be entering the chemical area or leaving the chemical area based on the image. When the movement trend of the chemical barrel is to leave the chemical area, it indicates that the chemical process has been completed and residue detection can be performed; the target recognition algorithm is used to classify and calculate the image during residue detection, and deep learning is used to accurately identify whether there is color residue in the chemical barrel, thereby solving the problem that the existing technology cannot accurately determine whether there is pigment residue in the chemical barrel.

[0102] Example 2

[0103] This embodiment provides a device for detecting residue in a barrel, which is applied to a chemical material system, wherein the chemical material system may include:

[0104] a first transport device, configured to move along a preset first motion path to transport a second transport device located on the first transport device to a transfer location corresponding to each production area, wherein the production area includes a chemical material area, and the transfer location corresponding to the chemical material area is marked with a chemical material area marking point;

[0105] A second transport device is used to place the chemical barrel and, after arriving at a transfer position corresponding to any production area, move the chemical barrel along a second movement path to enter or leave the production area;

[0106] A video acquisition device is installed on the top of the first transport device, and the video acquisition device is used to capture images in the target field of view according to a top-down shooting angle. When the second transport device reaches the transfer position corresponding to the chemical material area, the target field of view at least includes the chemical material barrel and the chemical material area marking point.

[0107] Figure 7 This is a schematic diagram of the structure of the barrel residue detection device provided by an embodiment of the present application. Figure 7 As shown, the barrel residue detection device 700 provided in this embodiment may include:

[0108] The motion judgment module 71 is configured to obtain a current image captured by the video acquisition device and, if the current image includes the marking point of the chemical material area, perform motion trend judgment. The motion trend judgment comprises: obtaining at least two frames of detection images captured by the video acquisition device and judging the motion trend of the chemical material barrel based on the at least two frames of detection images; wherein the motion trend includes entering the chemical material area and leaving the chemical material area;

[0109] The residue judgment module 72 is used for not performing residue judgment when the movement trend is entering the chemical material area; and performing residue judgment when the movement trend is leaving the chemical material area; the performing of residue judgment includes: obtaining the target image captured by the video acquisition device during the period when the chemical material barrel leaves the chemical material area, classifying the target image based on the classification algorithm, and obtaining a residue judgment result, wherein the residue judgment result includes whether there is residue or not.

[0110] In actual applications, the residue detection device in the barrel can be implemented through a computer program, such as application software, etc.; or, it can be implemented as a medium storing relevant computer programs, such as a USB flash drive, a cloud disk, etc.; or, it can be implemented through a physical device integrated or installed with a relevant computer program, such as a chip, a server, etc.

[0111] Specifically, a video frame captured by a video acquisition device is obtained as a current image; judging whether the current image includes a marking point of a chemical material area may include: performing image recognition on the current image based on a target recognition algorithm, performing dense sampling at different positions of the current image, extracting features using a convolutional neural network, and then performing classification and regression to obtain an identification result of whether the marking point of the chemical material area is contained; wherein the target recognition algorithm includes but is not limited to the YOLO algorithm or the SSD algorithm, which may be selected according to actual production needs and is not limited here.

[0112] If the current image includes the marking point of the chemical processing area, indicating that the first transport device has transported the second transport device to the transfer position corresponding to the chemical processing area, then the residue judgment is further performed.

[0113] Based on the at least two frames of detection images obtained, the movement trend of the chemical barrel is determined to be either entering or leaving the chemical barrel area. In practical applications, obtaining the at least two frames of detection images captured by the video capture device may include obtaining, as the detection images, the video frame captured by the video capture device at the current moment and the previous video frame corresponding to the video frame at the current moment. When the movement trend of the chemical barrel is entering the chemical barrel area, it indicates that the chemical barrel has not completed chemical processing, and the residual determination is not performed. When the movement trend of the chemical barrel is leaving the chemical barrel area, it indicates that the chemical barrel has completed chemical processing, and the residual determination is performed.

[0114] Among them, performing residual judgment can specifically include: obtaining the target image captured by the video acquisition device during the period when the chemical barrel leaves the chemical area, for example, selecting the detection image whose movement trend has been determined to be entering the chemical area as the target image; based on the target recognition algorithm, identifying the chemical barrel area in the target image, and classifying and calculating the chemical barrel area in the target image based on the classification algorithm to obtain the residual judgment result. Due to the variety of pigment colors and different residual concentrations in the chemical barrel in actual applications, resulting in diverse residual appearances, when the classification algorithm is used for calculation, only the no-residue situation is classified into one category, and all other situations are classified as having residues as the residual judgment result. Among them, the classification algorithm can be the SE_ResNeXt algorithm, the ResNet algorithm, or the ResNet50 algorithm, and can also be selected according to the actual production needs, and is not limited here.

[0115] In practical applications, there are many ways to determine the movement trend of the chemical barrel. In one example, the movement determination module can be used to:

[0116] Determining a first image edge of the detection image, where the first image edge extends in a direction perpendicular to the second motion path and is close to the first motion path and away from the chemical zone; and obtaining a distance between the chemical barrel and the first image edge in the at least two frames of the detection image;

[0117] If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is entering the chemical area; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is leaving the chemical area.

[0118] Specifically, the first image edge is determined among the four edges of the detection image, and the conditions satisfied by the first image edge are: the extension direction of the first image edge is parallel to the first motion path and perpendicular to the second motion path; the first image edge is close to the side of the first motion path and away from the side of the chemical area.

[0119] Based on the target recognition algorithm, the chemical barrel area in the detection image is identified, and the distance between the chemical barrel area in the detection image and the edge of the first image is used as the X coordinate value. The distance between the chemical barrel and the edge of the first image in the next frame of detection image is recorded as X p , the distance between the chemical barrel and the edge of the first image in the previous frame detection image is recorded as X p-1 , X p With X p-1 Compare. If X p <X p-1 , then it is determined that the movement trend of the chemical barrel is to leave the chemical area; if X p >X p-1 , it is determined that the movement trend of the chemical barrel is entering the chemical area.

[0120] In practical applications, there is a certain error in determining the chemical barrel area in the image through the target recognition algorithm. In order to avoid misjudging the movement trend of the chemical barrel, in one example, the device may further include:

[0121] a correction module, configured to obtain a minimum standard distance and a maximum standard distance; the minimum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary at a transfer position corresponding to the chemical zone; and the maximum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary in the chemical zone;

[0122] Adjusting the minimum standard distance and the maximum standard distance according to a preset redundancy, and obtaining and recording the minimum distance and the maximum distance;

[0123] The motion judgment module can also be used to:

[0124] If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the maximum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the maximum distance; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the minimum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the minimum distance.

[0125] In actual applications, the movement of the chemical barrel along the second motion path can be divided into two situations: entering the chemical area and leaving the chemical area. In each case, when the movement slows down and stops, the running speed of the chemical barrel is slower. There is a situation where the distance between the chemical barrel and the edge of the first image in the next frame of detection image is closer to the distance between the chemical barrel and the edge of the first image in the previous frame of detection image. However, the recognition accuracy of the classification and recognition algorithm is limited. Therefore, the classification and recognition algorithm has certain errors in recognizing the chemical barrel area in the detection image.

[0126] To eliminate this error, when the chemical barrel is stationary at the transfer position corresponding to the chemical area, the image captured by the video acquisition device is obtained, the chemical barrel area in the image is determined based on the target recognition algorithm, and the distance X between the chemical barrel and the edge of the first image is obtained. min , as the minimum standard distance; when the chemical barrel is stationary in the chemical area, obtain the image captured by the video acquisition device, determine the chemical barrel area in the image based on the target recognition algorithm, and obtain the distance X between the chemical barrel and the edge of the first image max , as the maximum standard distance.

[0127] Since the target recognition algorithm always has a certain error, the preset redundancy X0 is min and X max Adjust to get the minimum distance X Min and the maximum distance X Max .

[0128] If X p >X Max , then let X p-1 =X Max , that is, in the next frame of detection image, the distance between the chemical barrel and the edge of the first image is greater than the maximum distance, indicating that the chemical barrel is located near the chemical area and is in a deceleration state. It is determined that the movement trend of the chemical barrel at the corresponding moment of the next frame of detection image is entering the chemical area; if X p <X Min , then let X p-1 =X Min That is, in the next frame of detection image, the distance between the chemical barrel and the edge of the first image is less than the minimum distance, indicating that the chemical barrel is located close to the first transport device and is in a deceleration state. It is determined that the movement trend of the chemical barrel at the corresponding moment of the next frame of detection image is to leave the chemical area.

[0129] Furthermore, since the external environment may interfere with the residual judgment result, in order to improve the accuracy of the residual judgment result, the detection image can be processed. In one example, the device may further include:

[0130] A differential module is used to obtain a standard image captured by the video capture device under a standard environment; the standard environment includes no light, no image, and no reflection;

[0131] The residue judgment module is further used to:

[0132] For each frame of the target image, the chemical barrel area in the target image is differentiated from the chemical barrel area in the standard image to obtain the first pixel point whose threshold is less than a preset value in the differentiation process; based on the image completion algorithm, the first pixel point in the target image is completed.

[0133] Specifically, in a standard environment without light, images, or reflections, a standard image free of external interference is captured by a video capture device and compared with the target image. Processing the target image may include: performing a differential calculation between the chemical barrel area in the target image and the chemical barrel area in the standard image, wherein the chemical barrel area in each target image and the chemical barrel area in the corresponding standard image are located at the same position; obtaining a differential calculation value for each pixel in the target image, obtaining the first pixel whose differential calculation value is less than a preset value as a pixel that may be affected by the environment; and completing the first pixel based on an image completion algorithm to obtain a processed target image that eliminates external interference.

[0134] In order to further reduce the influence of the external environment on the residue determination result, in one example, the apparatus may further include:

[0135] an updating module, configured to identify and obtain the shape of the residual portion in the chemical barrel area in the target image based on a classification algorithm if the residual judgment result is that there is residual;

[0136] If the shape of the residual part is not a preset standard shape, the residual judgment result is updated to no residue; the standard shape includes at least one of the following: circle, teardrop and strip.

[0137] In practice, liquid residue may remain in the chemical barrel after the chemical is dissolved. This residue may take on shapes such as near-circular, teardrop-shaped, or long strips. To eliminate external influences that were not eliminated during the differential algorithm phase, when the residue determination result indicates that there is residue, a classification algorithm is used to classify the chemical barrel region in the target image and identify the shape of the residue within the barrel. If the shape of the residue does not conform to any of the pre-defined standard shapes, such as near-circular, teardrop-shaped, or long strips, the residue determination result is incorrect, and the residue determination result is updated to no residue.

[0138] In the barrel residue detection device provided by the present application, images are collected by a video acquisition device, and whether the chemical barrel is located in the corresponding area of ​​the chemical area is judged based on whether the collected image contains a preset chemical area mark point; and the movement trend of the chemical barrel is judged to be entering the chemical area or leaving the chemical area based on the image. When the movement trend of the chemical barrel is to leave the chemical area, it indicates that the chemical processing has been completed and residue detection can be performed; the target recognition algorithm is used to classify and calculate the image during the residue detection, and deep learning is used to accurately identify whether there is color residue in the chemical barrel, thereby solving the problem that the existing technology cannot accurately determine whether there is pigment residue in the chemical barrel.

[0139] Example 3

[0140] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as Figure 8 As shown, the electronic device includes:

[0141] The electronic device includes a processor 291 and a memory 292; a communication interface 293, and a bus 294. The processor 291, memory 292, and communication interface 293 can communicate with each other via bus 294. Communication interface 293 can be used for information transmission. The processor 291 can invoke logic instructions in memory 292 to execute the methods of the above embodiments.

[0142] In addition, the logic instructions in the memory 292 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0143] Memory 292, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. Processor 291 executes the software programs, instructions, and modules stored in memory 292 to perform functional applications and data processing, thereby implementing the methods in the above-mentioned method embodiments.

[0144] Memory 292 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal device. Memory 292 may also include high-speed random access memory and non-volatile memory.

[0145] An embodiment of the present disclosure provides a non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to implement the method described in the above embodiment.

[0146] Example 4

[0147] An embodiment of the present disclosure provides a computer program product, including a computer program. When the computer program is executed by a processor, the method provided in any of the above embodiments of the present disclosure is implemented.

[0148] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0149] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for detecting residue in a barrel, characterized in that: Applied to a chemical material system, the chemical material system includes: a first transport device for moving on a preset first motion path to transport a second transport device located on the first transport device to a transfer position corresponding to each production area, the production area including a chemical material area, and the transfer position corresponding to the chemical material area is marked with a chemical material area marking point; a second transport device for placing a chemical material barrel, and after arriving at the transfer position corresponding to any production area, causing the chemical material barrel to move along the second motion path to enter or leave the production area; a video acquisition device installed on the top of the first transport device, the video acquisition device being used to capture images in a target field of view according to a top-down shooting angle, wherein, when the second transport device reaches the transfer position corresponding to the chemical material area, the target field of view at least includes the chemical material barrel and the chemical material area marking point; the method includes: Acquire a current image captured by the video acquisition device, and if the current image includes the marking point of the chemical material area, perform motion trend determination; the motion trend determination includes: acquiring at least two frames of detection images captured by the video acquisition device, and determining the motion trend of the chemical material barrel based on the at least two frames of detection images; wherein the motion trend includes entering the chemical material area and leaving the chemical material area; When the movement trend is to enter the chemical material area, the residue judgment is not performed; when the movement trend is to leave the chemical material area, the residue judgment is performed; the execution of the residue judgment includes: obtaining the target image captured by the video acquisition device during the period when the chemical material barrel leaves the chemical material area, classifying the target image based on the classification algorithm, and obtaining a residue judgment result, wherein the residue judgment result includes whether there is residue or not.

2. The method according to claim 1, characterized in that The determining of the movement trend of the chemical barrel based on the at least two frames of detection images includes: Determining a first image edge of the detection image, where the first image edge extends in a direction perpendicular to the second motion path and is close to the first motion path and away from the chemical zone; and obtaining a distance between the chemical barrel and the first image edge in the at least two frames of the detection image; If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is entering the chemical area; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is leaving the chemical area.

3. The method according to claim 2, characterized in that The method further comprises: Obtaining a minimum standard distance and a maximum standard distance; the minimum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary at a transfer position corresponding to the chemical area; and the maximum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary in the chemical area; Adjusting the minimum standard distance and the maximum standard distance according to a preset redundancy, and obtaining and recording the minimum distance and the maximum distance; After obtaining the distance between the chemical barrel and the edge of the first image in the at least two frames of detection images, the method further includes: If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the maximum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the maximum distance; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the minimum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the minimum distance.

4. The method according to claim 1, wherein The method further comprises: Acquiring a standard image captured by the video capture device under a standard environment; the standard environment includes no light, no image, and no reflection; Before executing the residual judgment, the method further includes: For each frame of the target image, the chemical barrel area in the target image is differentiated from the chemical barrel area in the standard image to obtain the first pixel point whose threshold is less than a preset value in the differentiation process; based on the image completion algorithm, the first pixel point in the target image is completed.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: If the residue determination result is that there is residue, identifying and obtaining the shape of the residue in the chemical barrel area in the target image based on a classification algorithm; If the shape of the residual part is not a preset standard shape, the residual judgment result is updated to no residue; the standard shape includes at least one of the following: circle, teardrop and strip.

6. A device for detecting residue in a barrel, characterized in that: Applied to a chemical material system, the chemical material system includes: a first transport device for moving on a preset first motion path to transport a second transport device located on the first transport device to a transfer position corresponding to each production area, the production area including a chemical material area, and the transfer position corresponding to the chemical material area is marked with a chemical material area marking point; a second transport device for placing a chemical material barrel, and after arriving at the transfer position corresponding to any production area, causing the chemical material barrel to move along the second motion path to enter or leave the production area; a video acquisition device installed on the top of the first transport device, the video acquisition device is used to capture images in a target field of view according to a top-down shooting angle, wherein, when the second transport device reaches the transfer position corresponding to the chemical material area, the target field of view at least includes the chemical material barrel and the chemical material area marking point; the device includes: a motion judgment module, configured to obtain a current image captured by the video acquisition device, and if the current image includes the marking point of the chemical material area, perform motion trend judgment; the motion trend judgment comprises: obtaining at least two frames of detection images captured by the video acquisition device, and judging the motion trend of the chemical material barrel based on the at least two frames of detection images; wherein the motion trend includes entering the chemical material area and leaving the chemical material area; The residue judgment module is used to not perform residue judgment when the movement trend is entering the chemical material area; and to perform residue judgment when the movement trend is leaving the chemical material area; the execution of the residue judgment includes: obtaining the target image captured by the video acquisition device during the period when the chemical material barrel leaves the chemical material area, classifying the target image based on the classification algorithm, and obtaining a residue judgment result, wherein the residue judgment result includes whether there is residue or not.

7. The device according to claim 6, characterized in that The motion judgment module is specifically used to: Determining a first image edge of the detection image, where the first image edge extends in a direction perpendicular to the second motion path and is close to the first motion path and away from the chemical zone; and obtaining a distance between the chemical barrel and the first image edge in the at least two frames of the detection image; If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is entering the chemical area; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the distance between the chemical barrel and the edge of the first image in the previous frame detection image, it is determined that the movement trend of the chemical barrel is leaving the chemical area.

8. The device according to claim 7, characterized in that The device further comprises: a correction module, configured to obtain a minimum standard distance and a maximum standard distance; the minimum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary at a transfer position corresponding to the chemical zone; and the maximum standard distance being the distance between the chemical barrel and the edge of the first image in an image captured by the video acquisition device when the chemical barrel is stationary in the chemical zone; Adjusting the minimum standard distance and the maximum standard distance according to a preset redundancy, and obtaining and recording the minimum distance and the maximum distance; The motion judgment module is further used to: If the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is greater than the maximum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the maximum distance; if the distance between the chemical barrel and the edge of the first image in the subsequent frame detection image is less than the minimum distance, the distance between the chemical barrel and the edge of the first image in the previous frame detection image is corrected to the minimum distance.

9. The device according to claim 6, characterized in that The device further comprises: A differential module is used to obtain a standard image captured by the video capture device under a standard environment; the standard environment includes no light, no image, and no reflection; The residue judgment module is further used to: For each frame of the target image, the chemical barrel area in the target image is differentiated from the chemical barrel area in the standard image to obtain the first pixel point whose threshold is less than a preset value in the differentiation process; based on the image completion algorithm, the first pixel point in the target image is completed.

10. The device according to any one of claims 6 to 9, characterized in that: The device further comprises: an updating module, configured to identify and obtain the shape of the residual portion in the chemical barrel area in the target image based on a classification algorithm if the residual judgment result is that there is residual; If the shape of the residual part is not a preset standard shape, the residual judgment result is updated to no residue; the standard shape includes at least one of the following: circle, teardrop and strip.

11. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 5.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 5 when executed by a processor.

Citation Information

Patent Citations

  • Release cloth residue detection system and detection method thereof

    CN112630158A

  • Method and system for confirming target residence time, electronic equipment and storage medium

    CN115546662A