A medical fabric sorting abnormality identification method and device
By using cameras and target tracking algorithms in the medical fabric sorting system, video analysis is performed only when abnormal signals are received, which solves the problem that the photoelectric sensor cannot determine the status of the medical fabric, and improves the automatic processing capability and sorting efficiency.
Patent Information
- Application Number
- CN202410948163.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-16
AI Technical Summary
The existing medical fabric sorting abnormality recognition method can only identify abnormal residence time of medical fabrics through photoelectric sensors, but cannot determine the specific status, resulting in difficulty in automatic processing and frequent manual intervention to reduce sorting efficiency.
When an abnormal trigger signal is received, a video of the sorting line area is captured through the camera, and a target tracking algorithm is used to determine the position and status of the abnormal medical fabric, thereby triggering the corresponding abnormal processing strategy and reducing computer resource consumption.
It realizes the acquisition of position information of medical fabrics in the event of sorting abnormalities while consuming less computer resources, provides sufficient automatic processing information, improves sorting efficiency and reduces manual intervention.
Smart Images

Figure CN118506250B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image recognition, and in particular relates to a method and a device for identifying abnormalities in sorting medical fabrics. Background Art
[0002] For medical fabric intelligent integrated service providers that provide medical fabric leasing, washing, distribution and other services, manual intervention should be reduced as much as possible in each link of the service to reduce the risk of cross infection. For this reason, medical fabric intelligent integrated service providers generally use sorting lines instead of manual sorting of medical fabrics. In the related art, the sorting process of medical fabrics is: identifying the category of medical fabrics; conveying medical fabrics of various categories to designated sorting points through sorting lines. Specifically, the structure of the sorting line and the sorting method of conveying items of various categories to designated sorting points can refer to the contents disclosed in patent document 1 (publication number CN106362954A) and patent document 2 (publication number CN111570296A). For example, by connecting multiple sorting machines with the same structure (the sorting machine is composed of a conveyor, and the conveyor can be controlled to change the conveying direction) in series, a sorting line that matches the sorting needs of different quantities of categories can be formed. A photoelectric sensor is installed on each sorting machine to identify whether the medical fabric has arrived at and left the current sorting machine. Once it is identified that the medical fabric has stayed on a certain sorting machine for an abnormal time, it will be determined that the medical fabric has an abnormality on the sorting machine, thereby sounding an alarm and shutting down the machine. Manual intervention is required to handle the abnormal medical fabric, resulting in a decrease in sorting efficiency.
[0003] It can be seen that the abnormality identification method in the prior art has shortcomings, that is, the photoelectric sensor can only identify that an abnormality has occurred in the time that the medical fabric stays in a certain sorting machine, but cannot determine the specific state of the medical fabric at the time of the abnormality, and thus cannot provide sufficient information for automatically solving the abnormality. Frequent manual intervention is still required to handle the abnormality. Summary of the invention
[0004] In view of the above shortcomings, an easy-to-think-of solution is to use a camera to shoot a video of the area where the sorting line is located and execute a target tracking algorithm in real time to track all medical fabrics on the sorting line, so that when an abnormality occurs, the specific status information of the medical fabric, such as the location information of the medical fabric, can be obtained. However, the real-time image processing in this solution consumes a lot of computer resources. Therefore, the technical difficulty faced by this application is how to obtain the status information of the medical fabric when the sorting is abnormal, such as the location information, while consuming less computer resources.
[0005] The object of the present invention is to solve at least one of the above problems and to provide a method and device for identifying medical fabric sorting anomalies, which can obtain the position information of medical fabrics when sorting anomalies occur while consuming less computer resources.
[0006] In order to achieve the above-mentioned object of the invention, the present invention provides a method for identifying abnormality in sorting of medical fabrics, the method comprising:
[0007] When an abnormal trigger signal is received, a video segment to be analyzed is determined from a target video; wherein the target video is a video obtained by shooting the area where the sorting line is located;
[0008] Taking the abnormal medical fabric in the first frame of the video segment to be analyzed as a tracking target;
[0009] Determine the position of the tracking target in the tail frame of the video segment to be analyzed based on the target tracking algorithm;
[0010] The abnormal state of the abnormal medical fabric is identified based on the position of the tracking target in the tail frame of the video segment to be analyzed; the abnormal state is used to trigger the sorting line to execute a corresponding abnormality handling strategy.
[0011] On the other hand, the present invention also provides a device for identifying abnormal sorting of medical fabrics, the device comprising a camera, a memory, a processor and a computer program stored in the memory, the processor executing the computer program to implement the steps of the above method.
[0012] Beneficial effects: The medical fabric sorting abnormality identification method and device provided by the present invention do not need to execute the target tracking algorithm in real time throughout the whole process to track all medical fabrics on the sorting line. Instead, the target tracking algorithm is executed on the abnormal medical fabric only when an abnormal trigger signal is received to obtain the position of the abnormal medical fabric and identify its abnormal state, thereby providing sufficient information for automatically handling the abnormality and reducing the consumption of computer resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to make the technical problems solved by the present invention, the technical means adopted and the technical effects achieved more clearly, the specific embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, it should be noted that the drawings described below are only drawings of exemplary embodiments of the present invention, and those skilled in the art can obtain drawings of other embodiments based on these drawings without creative work.
[0014] Figure 1 A schematic diagram of the structure of a sorting line provided by an embodiment of the present invention;
[0015] Figure 2A video frame in a target video obtained by shooting the area where the sorting line is located by a camera in one embodiment of the present invention;
[0016] Figure 3 It is a schematic diagram of the principle of dividing a video frame into regions in an image coordinate system in one embodiment of the present invention;
[0017] Figure 4 is the first frame of the video segment to be analyzed in Example 1;
[0018] Figure 5 is the tail frame of the video segment to be analyzed when the abnormal state is the first type of abnormal state in the first embodiment;
[0019] Figure 6 This is a schematic diagram of the principle of determining the area to be retained in the video frame image coordinate system in the second embodiment;
[0020] Figure 7 A schematic diagram of the principle of determining a cropping area in a video frame in Embodiment 2;
[0021] Figure 8 is the first frame of the video segment to be analyzed in Example 2;
[0022] Fig. 9 is the tail frame of the video segment to be analyzed when the abnormal state is the first type of abnormal state in the second embodiment;
[0023] Fig.10 is the tail frame of the video segment to be analyzed when the abnormal state is the second type of abnormal state in the second embodiment;
[0024] Fig.11 is the tail frame of the video segment to be analyzed when the abnormal state is the third type of abnormal state in the second embodiment;
[0025] Fig.12 A flowchart of an abnormality identification method provided by an embodiment of the present invention;
[0026] Fig.13 A flowchart of an abnormality identification method provided by an embodiment of the present invention;
[0027] Fig.14 A flowchart of an abnormality identification method provided by an embodiment of the present invention;
[0028] Fig.15 A flowchart of an abnormality identification method provided by an embodiment of the present invention;
[0029] Fig.16 A structural block diagram of an abnormality identification device provided by an embodiment of the present invention;
[0030] Fig.17This is a structural block diagram of the No. 1-6 sorting machine control module and the No. 0 loader control module provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] Figure 1 FIG. 1 is a schematic diagram showing the structure of a sorting line provided by an embodiment. Before introducing the abnormality identification method provided by the present application, it is necessary to briefly describe the structure and operation control process of the sorting line in conjunction with the accompanying drawings. Figure 1 As shown, the sorting line in this embodiment includes 7 conveyors, one of which is used as a feeder, and the other 6 are used as sorters, which are named sorter No. 1, sorter No. 2, sorter No. 3, sorter No. 4, sorter No. 5, and sorter No. 6 in the order of numbering. Figure 1 As shown, for the six sorting machines, along the moving direction of the conveyor, the front and rear sides are the first exit and the second exit respectively, and the side perpendicular to the moving direction of the conveyor is the feed port, the first exit is connected to the corresponding sorting point, and the second exit is connected to the feed port of the next-level sorting machine; the sorting point can be a container for receiving medical fabrics, such as a barrel or a packing bag, etc. For the feeder, in order to unify the name with the sorter, it can also be called the No. 0 feeder in this article, and the feeder only moves in the direction of the No. 1 sorter connected to its outlet. The operator puts the packaged and sorted single medical fabric on the feeder, and an RFID reader is installed on the feeder. An RFID chip is sewn in each piece of medical fabric, and the classification information of the medical fabric, such as size information, type information, etc., is pre-written in the RFID chip. The RFID reader obtains the classification information of the medical fabric by accessing the RFID chip of the single medical fabric placed on the feeder by the operator.
[0033] Assume that the size information in the classification information is L code, and the category information is clothes. For L code clothes, they should be sorted to sorting point G. If the movement of sorters 1 to 5 toward the next level sorter is defined as positive, and the movement toward the corresponding sorting point is defined as negative, the movement of sorter 6 toward sorting point F is defined as positive, and the movement toward sorting point G is defined as negative. The corresponding sorting path is: when the L-code clothes arrive at sorting machine No. 1, the motor of sorting machine No. 1 is controlled to rotate forward until the clothes leave sorting machine No. 1; when the L-code clothes arrive at sorting machine No. 2, the motor of sorting machine No. 2 is controlled to rotate forward until the clothes leave sorting machine No. 2; when the L-code clothes arrive at sorting machine No. 3, the motor of sorting machine No. 3 is controlled to rotate forward until the clothes leave sorting machine No. 3; when the L-code clothes arrive at sorting machine No. 4, the motor of sorting machine No. 4 is controlled to rotate forward until the clothes leave sorting machine No. 4; when the L-code clothes arrive at sorting machine No. 5, the motor of sorting machine No. 5 is controlled to rotate forward until the clothes leave sorting machine No. 5; when the L-code clothes arrive at sorting machine No. 6, the motor of sorting machine No. 6 is controlled to rotate reversely until the clothes leave sorting machine No. 6. In summary, the sorting path of medical fabrics with sorting point X is determined by the following method:
[0034] The first step is to obtain the number of the sorting machine connected to the X sorting point, and set the sorting machine number to N; N is a positive integer.
[0035] In the second step, when it is detected that the target medical fabric arrives at sorting machine No. M, the motor of sorting machine No. M is controlled to rotate forward until the target medical fabric leaves sorting machine No. M; M is a positive integer less than N.
[0036] The third step is to detect that the target medical fabric arrives at sorting machine No. N, and determine the number of sorting points corresponding to sorting machine No. N. If the number of sorting points corresponding to sorting machine No. N is 1, the motor of sorting machine No. N is controlled to rotate in the opposite direction until the clothes leave sorting machine No. N; if the number of sorting points corresponding to sorting machine No. N is 2, the position corresponding to sorting point X is determined. If sorting point X is in the forward position (that is, sorting point X is sorting point F), the motor of sorting machine No. N is controlled to rotate in the forward direction until the clothes leave sorting machine No. N; if sorting point X is in the reverse position (that is, sorting point X is sorting point G), the motor of sorting machine No. N is controlled to rotate in the opposite direction until the clothes leave sorting machine No. N.
[0037] Specifically, photoelectric sensors (referred to as the first photoelectric sensor and the second photoelectric sensor, respectively) are installed at the two exit positions of each conveyor. When an object on the conveyor leaves the conveyor from the two exits of the conveyor, it can be detected by the photoelectric sensors. For example, sorter No. 3 can detect objects leaving from the two exit ends of sorter No. 3 through the first photoelectric sensor and the second photoelectric sensor installed thereon. Since the exit of the upper-level conveyor is connected to the feed port of the lower-level conveyor or the sorting point, if the medical fabric leaves from the exit end of the upper-level conveyor, it is considered that the medical fabric has entered the lower-level conveyor. For example, when the medical fabric moves forward and leaves the exit of sorter No. 3, the first photoelectric sensor on it will be triggered, and it can be determined that the medical fabric has entered sorter No. 4, and when the medical fabric moves backward and leaves the exit of sorter No. 3, the second photoelectric sensor on it will be triggered, and it can be determined that the medical fabric has entered sorting point C. For another example, when the medical fabric moves forward and leaves the exit of the No. 0 feeder, the first photoelectric sensor on it will be triggered, and it can be determined that the medical fabric enters the sorting machine No. 1. Therefore, the photoelectric sensor can be used to determine whether the medical fabric enters or leaves each sorting machine, or enters each sorting point.
[0038] Specifically, Fig.16 and 17 As shown, the feeder and each sorter have their own control modules, and the structure of each control module is the same, such as Fig.17 As shown, it is composed of a second microcontroller, a first photoelectric sensor electrically connected to the second microcontroller, a second photoelectric sensor and a motor drive circuit. At the same time, the second microcontroller of each control module is connected to the first microcontroller for communication, and the data transmission between the control modules is realized through the first microcontroller. It can be understood that through this structure, when the number of cascades of the sorting machine needs to be increased or decreased later, collaborative control can be facilitated.
[0039] Specifically, for the feeder or each sorter, the second microcontroller in the control module controls the forward or reverse motion of the drive motor of each sorter through the corresponding motor drive circuit, and controls the forward motion of the drive motor of the feeder. The process of the second microcontroller controlling the drive motor of each sorter to cooperate in the forward and reverse motion is described as follows:
[0040] Once the RFID reader identifies the classification information of the medical fabric, the first microcontroller determines the corresponding sorting point according to the classification information, and then determines the action instructions and the order of execution of the actions of each sorting machine before the medical fabric reaches the sorting point based on the above method for determining its sorting path. Specifically, the second microcontroller of each sorting machine will create an instruction queue, including the instruction queue No. 1 created by the second microcontroller of sorting machine No. 1, the instruction queue No. 2 created by the second microcontroller of sorting machine No. 2, the instruction queue No. 3 created by the second microcontroller of sorting machine No. 3, the instruction queue No. 4 created by the second microcontroller of sorting machine No. 4, the instruction queue No. 5 created by the second microcontroller of sorting machine No. 5, and the instruction queue No. 6 created by the second microcontroller of sorting machine No. 6. Whenever the sorting point corresponding to the medical fabric is detected, the first microcontroller will send a queue entry command to the second microcontroller of the path sorting machine on the medical fabric sorting path, and the queue entry command carries the action instructions corresponding to each sorting machine. When the second microcontroller of each sorting machine receives the corresponding queue entry command, it adds the corresponding action instruction at the end of the queue of each instruction queue.
[0041] For L-size clothes, they need to be sorted into the G sorting point, and the sorting machines in the path include No. 1 to No. 6. Therefore, it is necessary to generate action instructions corresponding to sorting machines No. 1 to No. 6 and package these action instructions into queue commands and send them to the second microcontrollers of each sorting machine. Assuming that it is the first piece of medical fabric placed on the feeder, the data corresponding to the instruction queues from No. 1 to No. 6 are [(1,id1)], [(1,id1)], [(1,id1)], [(1,id1)], [(1,id1)], [(0,id1)], so the first microcontroller generates 6 queue commands based on these 6 action instructions and sends them to the second microcontrollers corresponding to sorting machines No. 1 to No. 6. Among them, the array (1,id) or (0,id) is an action instruction, the first element is 1 to control the drive motor to rotate forward, the first element is 0 to control the drive motor to rotate reversely, and the second element id1 is the unique identification code of the medical fabric identified by the RFID reader. When it is detected that the L-sized clothes arrive at sorting machine No. 1, the second microcontroller on sorting machine No. 1 queries the head of instruction queue No. 1. If the first element of the first array in the head is 1, the motor is controlled to rotate forward until it is detected that the L-sized clothes leave sorting machine No. 1, and the array (1, id1) at the head of instruction queue No. 1 is deleted. At this time, the data corresponding to instruction queues No. 1 to 6 are [], [(1,id1)], [(1,id1)], [(1,id1)], [(1,id1)], [(0,id1)]. If at this time, S-size clothes with sorting point E entering the sorting machine and being identified by the RFID reader, the first microcontroller needs to generate action instructions corresponding to sorting machines No. 1 to 5 and package them into queue entry commands and send them to the second microcontrollers on each sorting machine. After each second microcontroller receives the queue entry command, the data corresponding to instruction queues No. 1 to 6 are updated to [(1,id2)], [(1,id1), (1,id2)], [(1,id1), (1,id2)], [(1,id1), (1,id2)], [(1,id1), (1,id2)], [(1,id1), (0,id2)], [(0,id1)].
[0042] Next, the L-code clothes are detected by the photoelectric sensor and enter sorter No. 2. The second microcontroller on sorter No. 2 queries the head of instruction queue No. 2. It is known that the head is array (1, id1), so the motor is controlled to rotate forward until it is detected that the L-code clothes leave sorter No. 2. The array (1, id1) at the head of instruction queue No. 2 is deleted. At this time, the data corresponding to instruction queues No. 1 to No. 6 are updated to [(1, id2)], [(1, id2)], [(1, id1), (1, id2], [(1, id1), (1, id2)], [(1, id1), (0, id2)], [(0, id1)]. Next, the L-code clothes are detected by the photoelectric sensor and enter sorter No. 3. At the same time, the S-code clothes enter sorter No. 1. The second microcontroller on sorter No. 1 queries instruction queue No. 1 and the second microcontroller on sorter No. 3 queries instruction queue No. 3. The head of the queue No. 1 is (1, id2), so the drive motor of sorter No. 1 is controlled to rotate forward. The head of the queue No. 3 is (1, id1), so the drive motor of sorter No. 3 is controlled to rotate forward until the L-sized clothes are detected to leave sorter No. 3, and the second microcontroller on sorter No. 3 deletes the array (1, id1) of the head of the queue No. 3. When the S-sized clothes are detected to leave sorter No. 1, the second microcontroller on sorter No. 1 deletes the array (1, id2) of the head of the queue No. 1. If the L-sized clothes leave sorter No. 3 and the S-sized clothes also leave sorter No. 1, then at this time, the data corresponding to the instruction queues No. 1 to No. 6 are updated to [], [(1, id2)], [(1, id2)], [(1, id1), (1, id2)], [(1, id1), (0, id2)], [(0, id1)].
[0043] Then, when another piece of clothing with sorting point C is put into the feeder, the data corresponding to instruction queues 1 to 6 are updated to [(1, id3)], [(1, id2), (1, id3)], [(1, id2), (0, id3)], [(1, id1), (1, id2)], [(1, id1), (0, id2)], [(0, id1)]. By analogy, the control of the sorting process of the sorting line is realized. It can be seen that as long as the time interval of placing the medical fabric is controlled so that only one piece is on the same sorting machine at a time, the normal operation of the sorting line can be guaranteed. Therefore, in some embodiments, it can also be set that the medical fabric on the feeder is allowed to enter the sorting machine No. 1 only after it is detected that the medical fabric on the sorting line No. 1 leaves the sorting machine No. 1 (that is, enters the sorting machine No. 2).
[0044] It can be understood that the sorting path corresponding to each medical fabric includes a series of action instructions executed in time sequence distributed in different instruction queues. For example, the sorting point is the G sorting point for L-code clothes, and the action instructions executed in time sequence included in the sorting path corresponding to it are ((1, id1), (1, id1), (1, id1), (1, id1), (0, id1)); the sorting point is the E sorting point for S-code clothes, and the action instructions executed in time sequence included in the sorting path corresponding to it are ((1, id2), (1, id2), (1, id2), (1, id2), (0, id2)); the sorting point is the C sorting point for clothes, and the action instructions executed in time sequence included in the sorting path corresponding to it are ((1, id3), (1, id3), (0, id3)). Then, the queue first-in-first-out structure can ensure that the action instructions corresponding to each sorting path are executed in time sequence.
[0045] Generally speaking, the speed of the drive motors of each sorting machine can be set to be the same. For example, when the speed of the drive motor is 500 rpm, the speed of each sorting machine to convey medical fabrics can be determined to be 50 cm / s according to the belt speed calculation formula of the conveyor. If the speed of the drive motors of each sorting machine is 500 rpm, the time for each medical fabric to stay on each sorting machine can be ensured. In this example, the normal stay time is 1 second. The allowable deviation range is between 0.8 seconds and 1.2 seconds (including 0.8 seconds and 1.2 seconds), that is, if it is detected that the medical fabric enters sorting machine No. 2 to the time when the medical fabric leaves sorting machine No. 2, as long as the stay time is within this range, it is determined to be in a normal state. Otherwise, it is considered that the stay time is abnormal and it is determined to be in an abnormal state. Specifically, the forward rotation of sorter No. 1 causes the medical fabric thereon to be transferred to the exit end of sorter No. 1. When the medical fabric falls from the exit end of sorter No. 1 into sorter No. 2, the second photoelectric sensor at the exit end of sorter No. 1 is triggered. Therefore, the second microcontroller on sorter No. 1 receives the entry trigger signal of the medical fabric entering sorter No. 2 sent by the second photoelectric sensor at the exit end of sorter No. 1 and sends the entry trigger signal to the first microcontroller. The first microcontroller forwards the entry trigger signal to the second microcontroller on sorter No. 2. At this time, the second microcontroller on sorter No. 2 starts timing and controls sorter No. 2 to rotate forward according to instruction queue No. 2. If the second microcontroller on sorter No. 2 receives the departure trigger signal of the medical fabric leaving sorter No. 2 sent by the second photoelectric sensor at the exit end of sorter No. 2 between 0.8 seconds and 1.2 seconds, the head of the queue in instruction queue No. 2 is deleted. At this time, the medical fabric is in a normal state. On the contrary, if the second microcontroller on sorter No. 2 receives the departure trigger signal of the medical fabric leaving sorter No. 2 sent by the second photoelectric sensor at the exit end of sorter No. 2 in less than 0.8 seconds, or does not receive the departure trigger signal of the medical fabric leaving sorter No. 2 sent by the second photoelectric sensor at the exit end of sorter No. 2 after 1.2 seconds, it is determined that the medical fabric is in an abnormal state. At this time, an abnormal trigger signal is sent to the first microcontroller, and sorter No. 2 is the target sorter.
[0046] The above method can be used to control the sorting line to automatically sort different types of medical fabrics. Of course, the solution in patent document 1 or 2 can also be used to achieve automatic sorting. However, during the sorting process, once the photoelectric sensor identifies that the medical fabric stays abnormally on a certain sorting machine, it will be determined that the medical fabric has an abnormality in the sorting machine, thereby sounding an alarm and shutting down the machine, and manual intervention is required to handle the abnormal medical fabric, resulting in a decrease in sorting efficiency. That is, in the prior art, the photoelectric sensor can only identify that the medical fabric has an abnormal stay time on a certain sorting machine, but cannot determine the specific state of the medical fabric at the time of the abnormality, thereby failing to provide sufficient information for automatically solving the abnormality, and frequent manual intervention is still required to handle the abnormality.
[0047] In view of the above shortcomings, an easy-to-think-of solution is to use a camera to shoot a video of the area where the sorting line is located and execute a target tracking algorithm in real time to track all medical fabrics on the sorting line, so as to obtain specific status information of the medical fabric when an abnormality occurs, such as the location information of the medical fabric. However, this solution consumes a lot of computer resources. Therefore, the technical difficulty faced by this application is how to obtain the status information of the medical fabric when the sorting is abnormal, such as the location information, while consuming less computer resources.
[0048] In this regard, the embodiment of the present application provides a method and device for identifying abnormal sorting of medical fabrics, which can obtain the position information of medical fabrics when sorting is abnormal while consuming less computer resources. The following will describe in detail a method for identifying abnormal sorting of medical fabrics provided by the present application in conjunction with the accompanying drawings and specific embodiments.
[0049] like Fig.12 As shown, in one embodiment, a method for identifying abnormality in sorting of medical fabrics includes:
[0050] Step S202, when the first microcontroller receives the abnormal trigger signal, it determines the video segment to be analyzed from the target video; wherein the target video is a video obtained by shooting the area where the sorting line is located.
[0051] like Figure 2 As shown in FIG. 1 , the corresponding medical fabric is being transported on the three conveyors of the feeder, sorter No. 2, and sorter No. 5 on the sorting line in this frame. Therefore, the specific position information of the medical fabric on the sorting line can be determined through the target video.
[0052] Step S204: the first microcontroller takes the abnormal medical fabric in the first frame of the video segment to be analyzed as a tracking target.
[0053] Step S206: the first microcontroller determines the position of the tracking target in the last frame of the video segment to be analyzed based on a target tracking algorithm.
[0054] It should be noted that the target tracking algorithm is a computer vision technology used to detect and track specific target objects in a video sequence. Its main task is to continuously detect the position and state of the target, and to maintain its recognition and positioning even when the target is moving. The input of the target tracking algorithm is: the video frame sequence and the position and boundary of the tracked target in the first frame (i.e., the first frame) (usually represented by a rectangular box). Its output is: the position and boundary of the tracked target in each frame (usually represented by a rectangular box). The target tracking algorithm belongs to the prior art, and specifically can include tracking based on correlation filtering (such as MOSSE filter), tracking based on feature points (such as optical flow method) or tracking based on deep learning (such as Siamese network), which is not limited here.
[0055] Step S208: the first microcontroller identifies the abnormal state of the abnormal medical fabric based on the position of the tracking target in the tail frame of the video segment to be analyzed; wherein the abnormal state is used to trigger the sorting line to execute a corresponding abnormality handling strategy.
[0056] Generally, due to the failure of the photoelectric sensor or the jumping of the abnormal medical fabric, the second photoelectric sensor cannot detect the abnormal medical fabric entering the next-level sorting machine or the first photoelectric sensor cannot detect the abnormal medical fabric entering the corresponding sorting point, which will cause the target sorting machine to send an abnormal trigger signal. Or, due to the relative sliding of the abnormal medical fabric on the target sorting machine and the conveyor belt of the sorting machine, the friction coefficient is reduced, which will cause the abnormal medical fabric to stay on the target sorting machine for too long, causing the target sorting machine to send an abnormal trigger signal.
[0057] It can be seen that if the position of abnormal medical fabrics cannot be determined only by photoelectric sensors, it is necessary to refer to the solution in Patent Document 2, manually check the cause and sort them, resulting in a decrease in sorting efficiency. If the target tracking algorithm is used to track all hospital fabrics throughout the process, the position of abnormal medical fabrics can be determined when an abnormality occurs, but it will cause excessive computer resource consumption. In this embodiment, it is not necessary to execute the target tracking algorithm in real time throughout the process to track all medical fabrics on the sorting line. Instead, the target tracking algorithm is executed on the abnormal medical fabric only when an abnormal trigger signal is received to obtain the position of the abnormal medical fabric and identify its abnormal state, providing sufficient information for automatic abnormal processing and reducing the consumption of computer resources.
[0058] like Fig.13 As shown, in some embodiments, before the step of determining the video segment to be analyzed from the target video, the method further includes:
[0059] Step S302, the first microcontroller takes the sorter that sends out an abnormal trigger signal on the sorting line as the target sorter; wherein the abnormal trigger signal is a signal sent by the sorter when the photoelectric sensor detects that there is an abnormality in the residence time of the medical fabric.
[0060] Step S304, the first microcontroller takes the sorting path to which the action instruction being executed by the target sorting machine when the abnormal trigger signal is issued as the target sorting path; wherein each piece of medical fabric corresponds to a sorting path, and each sorting path is jointly determined by the action instructions executed by each sorting machine on the sorting line in chronological order.
[0061] Step S306: The first microcontroller regards the medical fabric corresponding to the target sorting path as abnormal medical fabric.
[0062] Specifically, the action instruction being executed is the action instruction corresponding to the head of the instruction queue. The sorting path corresponding to the medical fabric can be determined according to the second element of the action instruction corresponding to the head of the instruction queue of the second microcontroller of the target sorting machine, and the second element is the unique identification code of the medical fabric identified by the RFID reader. For example, the target sorting machine is sorting machine No. 4, when the action instruction in the head of the instruction queue of the second microcontroller of sorting machine No. 4 is (1, id1), it can be determined that the medical fabric with the unique identification code id1 is an abnormal medical fabric. Since each piece of medical fabric is identified by its unique identification code by the RFID reader when entering the feeder, once the unique identification code of the abnormal medical fabric is determined, the target time point when the RFID reader identifies the abnormal medical fabric can be determined. The target time point is the time point when the abnormal medical fabric enters the feeder. The progress of the target video is adjusted to the video frame corresponding to the target time point. The abnormal medical fabric can definitely be found in the area corresponding to the feeder, thereby automatically determining the position of the tracking target (i.e., the abnormal medical fabric) in the video frame, so as to realize the determination of the initial position of the tracking target in the first frame in the target tracking algorithm. See Example 1 for details.
[0063] Embodiment 1: In this embodiment, determining a video segment to be analyzed from a target video specifically includes:
[0064] In step A1, the first microcontroller detects the video frame corresponding to the first moment when the abnormal medical fabric enters the preset starting position of the sorting line as the first frame of the video segment to be analyzed.
[0065] Specifically, the preset starting point of the sorting line is the feeder. The unique identification code of the medical fabric placed on the feeder can be identified by the RFID reader, and the time point when each medical fabric is placed on the feeder is recorded, and a record table is formed on the first microcontroller. For example, the unique identification code of the abnormal medical fabric is id1, and the time point when it is placed on the feeder is the first moment. Since the camera has been shooting since the sorting line started running to obtain the target video, the target video can be adjusted to the first moment to determine that the frame corresponding to the first moment is the first frame of the video segment to be analyzed, as shown in FIG. Figure 4 shown.
[0066] In step A2, the first microcontroller uses the video frame corresponding to the second moment when the abnormal trigger signal is received as the last frame of the video segment to be analyzed.
[0067] When the abnormal medical fabric is transmitted to sorter No. 4 and stays on sorter No. 4 for too long, causing sorter No. 4 to send an abnormal trigger signal at the second moment, the target video is adjusted to the second moment to determine that the frame corresponding to the second moment is the tail frame of the video segment to be analyzed. Figure 5 As shown, the second moment is after the first moment.
[0068] In step A3, the first microcontroller determines a video segment to be analyzed from the target video based on the first frame and the last frame.
[0069] The first frame, the last frame, and the frames between the first frame and the position in the target video are taken as the video segments to be analyzed. In the first frame, the medical fabric is identified from the area corresponding to the feeder by the target recognition algorithm. The medical fabric is used as the tracking target and the target tracking algorithm is subsequently performed based on the detection frame (i.e., rectangular frame) of the tracking target.
[0070] It should be noted that, considering the characteristics of medical fabrics, that is, each medical fabric is roughly the same in appearance, it is impossible to distinguish each medical fabric through image recognition. If there are two pieces of medical fabric on the same sorting machine, they cannot be distinguished by image recognition. Therefore, the operating specifications can be used to constrain the operator to allow the next piece of medical fabric to be placed on the feeder only after the feeder has sent the previous piece of medical fabric to sorting machine No. 1. Or a conveyor belt is connected to the previous level of the feeder, and the operator places the medical fabric on the conveyor belt, and the conveyor belt transports the medical fabric to the feeder, and the program setting does not allow the conveyor belt to continue to move before the medical fabric entering the feeder leaves the feeder, that is, the conveyor belt is not allowed to continue to transport new medical fabric to the feeder, ensuring that there is only one piece of medical fabric on the feeder at the same time. It can be understood that in order to ensure that there is only one piece of medical fabric on the subsequent sorting machine at the same time, it can also be set by the program that the current level sorting machine is not allowed to continue to move before the medical fabric entering the next level sorting machine leaves the next level sorting machine.
[0071] Embodiment 2: In this embodiment, determining the video segment to be analyzed from the target video specifically includes:
[0072] Step B1, the first microcontroller detects the video frame corresponding to the third moment when the abnormal medical fabric enters the intermediate sorting machine as the first frame of the video segment to be analyzed; the intermediate sorting machine is any sorting machine on the sorting line that the abnormal medical fabric passes through before reaching the target sorting machine through the corresponding sorting path.
[0073] Specifically, for a piece of clothing of size L whose sorting point is sorting point G, the corresponding sorting path includes the following action instructions executed in chronological order: ((1,id1), (1,id1), (1,id1), (1,id1), (1,id1), (0,id1)). The target sorter is sorter No. 4. Figure 1 It can be seen that sorting machines 1 to 3 can all be used as intermediate sorting machines. For example, if sorting machine 3 is used as the intermediate sorting machine, then when the second photoelectric sensor at the exit end of sorting machine 2 detects that the abnormal medical fabric leaves sorting machine 2, it is the third moment when the abnormal medical fabric enters sorting machine 3. Therefore, the target video can be adjusted to the third moment to determine that the frame corresponding to the third moment is the first frame of the video segment to be analyzed.
[0074] Step B2: The first microcontroller uses the video frame corresponding to the fourth moment when the abnormal trigger signal is received as the last frame of the video segment to be analyzed.
[0075] When the abnormal medical fabric is transferred to sorter No. 4 and stays on sorter No. 4 for too long, causing sorter No. 4 to send an abnormal trigger signal at the fourth moment, the target video is adjusted to the fourth moment to determine that the frame corresponding to the fourth moment is the last frame of the video segment to be analyzed. The fourth moment is located after the third moment. Figure 5 shown.
[0076] Step B3: the first microcontroller determines a video segment to be analyzed from the target video based on the first frame and the last frame.
[0077] Specifically, Fig.14 As shown, in this embodiment, determining the video segment to be analyzed from the target video based on the first frame and the last frame specifically includes:
[0078] Step S402, the first microcontroller determines the various sorting machines that need to be passed from the intermediate sorting machine to the subsequent sorting machine based on the sorting path corresponding to the abnormal medical clothing; wherein the subsequent sorting machine is any sorting machine on the sorting line that the abnormal medical fabric passes through before reaching the sorting point from the target sorting machine through the corresponding sorting path.
[0079] Specifically, sorter No. 4 is the target sorter, refer to Figure 1 It can be seen that sorters 5 and 6 can both be used as subsequent sorters. It is also known that the intermediate sorter is sorter 3. If sorter 5 is set as the subsequent sorter, then the sorters that need to be passed from sorter 3 to sorter 5 include sorter 4. Therefore, there is only one sorter passed, that is, sorter 4 is the passing sorter.
[0080] Step S404, the first microcontroller determines the area to be reserved based on the subsequent sorting machine, the target sorting point, the intermediate sorting machine and each passing sorting machine; wherein each video frame is pre-divided into a plurality of areas, each area corresponds to a sorting machine or a sorting point; the target sorting point is the sorting point corresponding to the target sorting machine.
[0081] Reference Figure 3 , the camera's viewing angle for capturing the target video is constant, and the positions of the sorting machines and sorting points on the sorting line in the actual world coordinate system are also constant. Therefore, as long as the corresponding image coordinate ranges are pre-divided for the feeder, each sorting machine, and each sorting point on a video frame, when the image of the medical fabric is detected in a certain area of the video frame by image recognition technology, the medical fabric must exist at the corresponding position on the sorting line at the time corresponding to the video frame. Figure 3As shown in the figure, each area is named according to the naming rules of the corresponding loader, sorter and sorting point. For example, area 1 in the video frame corresponds to sorter No. 1 on the sorting line, area A corresponds to sorting point A on the sorting line, and area 0 corresponds to loader No. 0 on the sorting line. When the target sorter is sorter No. 4, the corresponding sorting point is sorting point D.
[0082] The areas corresponding to the subsequent sorting machine, the target sorting point, the intermediate sorting machine and each passing sorting machine on the video frame are taken as the areas to be retained. Based on step S402, it can be known that the subsequent sorting machine is sorting machine No. 5, and the area corresponding to it on the video frame is area 5; the intermediate sorting machine is sorting machine No. 3, and the area corresponding to it on the video frame is area 3; the target sorting point is sorting point D, and the area corresponding to it on the video frame is area D; the passing sorting machine is sorting machine No. 4, and the area corresponding to it on the video frame is area 4.
[0083] Step S406, the first microcontroller obtains the coordinate extreme values of the area to be retained in the two coordinate axis directions of the video frame image coordinate system; wherein the coordinate extreme values include a maximum value and a minimum value.
[0084] In one example, the resolution of the video frame is 1080*1080, and the 3rd, 4th, 5th and Dth regions are all rectangular, wherein the coordinates (u, v) of the four corners of the 3rd region are (440, 390), (440, 640), (640, 390), (640, 640) respectively. The coordinates (u, v) of the four corners of the 4th region are (640, 390), (640, 660), (820, 390), (820, 660) respectively. The coordinates (u, v) of the four corners of the 5th region are (620, 190), (620, 390), (820, 190), (820, 390) respectively. The coordinates (u, v) of the four corners of the Dth region are (680, 660), (680, 760), (780, 660), (780, 760) respectively.
[0085] It can be seen that the area to be retained has a maximum coordinate value of u=820 and a minimum coordinate value of u=440 in the u coordinate axis direction of the video frame image coordinate system, and a maximum coordinate value of v=390 and a minimum coordinate value of v=760 in the v coordinate axis direction of the video frame image coordinate system.
[0086] Step S408: The first microcontroller combines the extreme values of the coordinates in the directions of the two coordinate axes into the coordinates of the four corners of the cropping area.
[0087] Combining the above four coordinate values, we get the coordinates of the four corners of the clipping area as (440, 390), (440, 760), (820, 390), (820, 760), that is, Figure 6 The shaded rectangle is the cropping area. Figure 7 The dashed box in the middle shows the range of the cropping area on the image frame of the target video.
[0088] In step S410, the first microcontroller crops each frame from the first frame to the last frame in the target video based on the cropping area to obtain cropped video frames, and the cropped video frames constitute the video segment to be analyzed.
[0089] Each frame from the first frame to the last frame is cropped, the portion in the cropped area is retained, and the portion outside the cropped area is deleted to obtain cropped frames, and the cropped video frames constitute the video segment to be analyzed.
[0090] In this embodiment, the target is tracked by using the cropped frames to form a video segment to be analyzed, which can reduce the data volume of the image frames processed by the target tracking algorithm, reduce the occupation of computer resources, and improve the processing speed.
[0091] Figure 8 This is the first frame after cropping. Figures 9 to 11 The cropped tail frames correspond to the three abnormal states. Fig. 9 The abnormal medical fabric is located on the target sorter (sorter No. 4). Fig.10 The abnormal medical fabric is located on the subsequent sorting machine (sorting machine No. 5), Fig.11 The abnormal medical fabric is located at the target sorting point (D sorting point).
[0092] Figures 9 to 11 Corresponding to different abnormal states, specifically, the abnormal states include a first type of abnormal state, a second type of abnormal state and a third type of abnormal state. The first type of abnormal state is that the abnormal medical fabric is located on the target sorting machine, such as Fig. 9 As shown; the second abnormal state is that the abnormal medical fabric is located on the subsequent sorting machine, such as Fig.10 As shown; the third abnormal state is that the abnormal medical fabric is located at the target sorting point, such as Fig.11 shown.
[0093] When the abnormal state of the abnormal medical fabric is a first type of abnormal state, the abnormal handling strategy is: the sorting line suspends the sorting action of other medical fabrics that enter the preset starting position of the sorting line after the abnormal medical fabric, and controls the target sorting machine to continue the action based on the real-time tracking of the abnormal medical fabric and controls the action instructions of each subsequent sorting machine on the sorting path corresponding to the abnormal medical fabric; and after identifying that the abnormal medical fabric leaves the target sorting machine, resumes the sorting action of other medical fabrics that enter the preset starting position of the sorting line after the abnormal medical fabric.
[0094] In one example, 4 pieces of medical fabrics are put into the feeder in chronological order, and the medical fabrics with unique identification codes id1, id2, id3, and id4 are placed in the order from first to last. If the sorting points of the four pieces of medical fabrics id1, id2, id3, and id4 are all G sorting points, the medical fabric with unique identification code id3 is in the first abnormal state when it arrives at sorter No. 4. At this time, the medical fabric corresponding to id1 is located at sorter No. 1, the medical fabric corresponding to id2 is located at sorter No. 2, and the medical fabric corresponding to id4 is located at sorter No. 6. At this time, the abnormal handling strategy is: suspend the sorting action of the medical fabrics corresponding to id1 and id2, that is, suspend the rotation of the feeder and the drive motors of sorters No. 1 to No. 3, and keep the drive motors of sorters No. 5 and No. 6 (i.e., the subsequent sorters on the sorting path) rotating normally. Then, based on the results of abnormal medical fabric target tracking, the position of the abnormal medical fabric corresponding to id3 on sorting machine No. 4 is identified in real time. When it is identified that the abnormal medical fabric corresponding to id3 leaves sorting machine No. 4, the rotation of the loader and the drive motors of sorting machines No. 1 to No. 3 is restored.
[0095] It can be seen that when the first type of abnormal state occurs, the friction coefficient decreases due to the relative sliding between the abnormal medical fabric and sorting machine No. 4, which makes it difficult for the abnormal medical fabric to leave sorting machine No. 4, thus causing the abnormal residence time to cause an alarm. Therefore, in order not to modify the residence time corresponding to the alarm, this example uses real-time target tracking to detect whether the abnormal medical fabric leaves the target sorting machine, without adjusting the residence time that triggers the abnormal alarm.
[0096] When the abnormal state of the abnormal medical fabric is the second type of abnormal state, the abnormality handling strategy is: based on real-time tracking of the abnormal medical fabric, controlling the target sorting machine to continue to execute action instructions and controlling the action instructions of each subsequent sorting machine on the sorting path corresponding to the abnormal medical fabric.
[0097] In one example, 4 pieces of medical fabrics are put into the feeder in chronological order, and the medical fabrics with unique identification codes id1, id2, id3, and id4 are placed in the order from first to last. If the sorting points of the four pieces of medical fabrics id1, id2, id3, and id4 are all G sorting points, the medical fabric with unique identification code id3 is in the first abnormal state when it arrives at sorter No. 4. At this time, the medical fabric corresponding to id1 is located in sorter No. 1, the medical fabric corresponding to id2 is located in sorter No. 2, and the medical fabric corresponding to id4 is located in sorter No. 6. At this time, the abnormal handling strategy is: keep the sorting action of the medical fabrics corresponding to id1 and id2 unchanged, that is, keep the rotation and normal control of the drive motors of the feeder and sorters No. 1 to No. 3, and keep the drive motors of sorters No. 5 and No. 6 (i.e., the subsequent sorters on the sorting path) rotating normally. Then, based on the result of target tracking of abnormal medical fabrics, the position of abnormal medical fabrics corresponding to id3 is identified in real time, and the abnormal medical fabrics enter the corresponding sorting point. That is, target tracking is used to identify abnormal medical fabrics entering or leaving the subsequent sorting machine in real time to replace the photoelectric sensor.
[0098] It can be seen that when the second type of abnormal state occurs, it means that the medical fabric may jump and cannot be detected by the photoelectric sensor or the photoelectric sensor may fail. At this time, the photoelectric sensor alone may not be able to identify the abnormal medical fabric in the subsequent sorting machine (i.e., sorting machines No. 5 and No. 6). Therefore, it is necessary to rely on target tracking to identify the position information of the abnormal medical fabric in the subsequent sorting machine in real time to ensure the normal sorting of the abnormal medical fabric and automatically come out of the abnormal state without human intervention.
[0099] When the abnormal state of the abnormal medical fabric is the third type of abnormal state, the abnormality handling strategy is: deleting the sorting path corresponding to the abnormal medical fabric.
[0100] Specifically, if the abnormal medical fabric is no longer on the sorting machine, the sorting path corresponding to the abnormal medical fabric needs to be deleted, that is, the action instruction corresponding to the abnormal medical fabric is deleted from the instruction queue of the second microcontroller of each sorting machine.
[0101] In summary, for various abnormal conditions that may occur, this embodiment automatically detects abnormalities without manual intervention, thereby improving sorting efficiency.
[0102] In one embodiment, the first microcontroller checks whether the range of the speed V of the driving motor of each sorting machine on the sorting path corresponding to each medical fabric meets the requirements according to the following formula 1:
[0103] Formula 1: ;
[0104] Where, m is the weight of the medical fabric, is the reference weight, α is the sensitivity coefficient, is the reference speed, which indicates the maximum allowable speed of the driving motor when the reference weight of medical fabric can be normally transmitted on the sorting machine. When the medical fabric of the reference weight cannot be normally transmitted on the sorting machine, for example, it may jump or slide relative to the sorting machine. In order to obtain the maximum allowable speed, the speed of the drive motor may be adjusted from small to large. It is understandable that since the speed of the drive motor generally has an upper limit, if the medical fabric can still be normally transmitted on the sorting machine when the speed of the drive motor is adjusted to the upper limit, the upper limit of the speed is used as the maximum allowable speed.
[0105] On the one hand, when the weight of the medical fabric is too light, the friction between it and the sorting machine is reduced; on the other hand, when the belt conveyor speed on the sorting machine is too fast, it may cause the medical fabric to jump or slide relative to the sorting machine, reducing the friction coefficient between the medical fabric and the sorting machine, thereby also reducing the friction between the medical fabric and the sorting machine. When the friction is reduced, it will cause abnormalities in the sorting process. For this reason, it is necessary to check whether the range of the drive motor speed V of each sorting machine meets the requirements.
[0106] It is understandable that different medical fabrics may have weight deviations due to production processes, wear and tear, etc. Therefore, a weighing platform is provided before entering the feeder. The weighing platform is used to measure the weight of the medical fabric. The weighing platform is communicatively connected to the first microcontroller and sends the measured weight data of the medical fabric to the first microcontroller. The first microcontroller forwards the weight data to the second microcontroller of each sorting machine.
[0107] In order to obtain the value of the sensitivity coefficient α in Formula 1, it is necessary to conduct experiments to obtain multiple sets of test data ( , ), i is a positive integer, where is the weight of the medical fabric in the i-th test group, is the number of tests in the i-th group that makes the weight The maximum permissible speed of the motor that the medical fabric can drive when it is normally transported on the sorting machine. Then define the model function (called Formula 3) , and then use nonlinear regression to fit the model. When the error meets the error threshold requirement, the corresponding sensitivity coefficient α is obtained.
[0108] Formula 1 can be used to check whether the rotation speed of each sorting machine on the sorting path meets the requirements. If it does not meet the requirements, the rotation speed can be lowered to avoid the occurrence of abnormal conditions in advance. It can be understood that in order to adjust the rotation speed, the array corresponding to the action instruction in this embodiment includes 3 elements, in the form of (1, id1, 500). The first element is used to control the forward and reverse rotation of the drive motor, 1 is forward, 0 is reverse, the second element is the unique identification code of the medical fabric, id1 in this example, and the third element is the rotation speed of the drive motor, that is, 500 revolutions per minute. Formula 1 can be used to check whether the rotation speed in the action instruction meets the requirements. When the rotation speed needs to be adjusted, the first microcontroller can adjust the third element of the array when generating the action instruction.
[0109] Further, such as Fig.15 As shown, the control of the target sorting machine to continue to operate based on real-time tracking of abnormal medical fabrics specifically includes:
[0110] Step S502, entering the speed regulation mode, the second microcontroller of the target sorting machine gradually reduces the speed of the drive motor of the target sorting machine and the first microcontroller tracks the abnormal medical fabric on the target sorting machine in real time to identify whether the abnormal medical fabric moves in the direction of the subsequent sorting machine.
[0111] Specifically, the first microcontroller sends a speed control command to the second microcontroller of the target sorting machine. After the second microcontroller of the target sorting machine receives the speed control command, the target sorting machine enters the speed control mode and no longer controls the driving motor according to the action instructions in the instruction queue.
[0112] Step S504: If the first microcontroller detects that the abnormal medical fabric has moved, the rotation speed of the driving motor of the current target sorting machine is used as the corrected rotation speed.
[0113] Step S506, the second microcontroller of the target sorting machine controls the target sorting machine to continue to move based on the corrected speed until the abnormal medical fabric leaves the target sorting machine, and after the abnormal medical fabric leaves the target sorting machine, the target sorting machine exits the speed regulation mode and deletes the action instruction at the head of the instruction queue, and then continues to control the drive motor to move according to the action instruction in the instruction queue.
[0114] It is understandable that due to the different mechanical errors of different sorters, there may be differences between the sorter under test and the sorters on the sorting line, which leads to differences in the transmission ratio between the drive motor of each sorter on the sorting line and the conveyor belt of the sorter and the transmission ratio of the sorter under test, that is, under the same rotation speed, there is a difference in the actual transmission speed between the sorter under test and a certain sorter on the sorting line. For example, under the same rotation speed, the actual transmission speed of a certain sorter on the sorting line is faster than that of the sorter under test, which means that the maximum allowable rotation speed that can be normally transmitted in the test will cause the sorter to fail to transmit normally.
[0115] In step S502 to step S506, a method for correcting the rotation speed is provided, which can automatically handle the abnormality caused by the rotation speed.
[0116] Furthermore, the method further comprises:
[0117] When it is detected that the weight of other medical fabrics entering the target sorting machine is the same as that of the abnormal medical fabric, the operation of the target sorting machine is controlled based on the corrected rotation speed.
[0118] When the first microcontroller detects that the weight of the other medical fabrics is the same as that of the abnormal medical fabrics, the speed will be set to the corrected speed when generating the action instruction, so that the second microcontroller of the target sorter controls the action of the target sorter based on the corrected speed. It can be understood that if the weight of the other medical fabrics entering the target sorter is the same as that of the abnormal medical fabrics, using the corrected speed to control the action of the target sorter can avoid abnormalities caused by excessive speed and improve sorting efficiency.
[0119] Furthermore, the method further comprises:
[0120] When the first microcontroller counts that the number of abnormal trigger signals sent by the target sorter reaches n times, the range of the rotation speed V of the drive motor of the sorter is checked based on the following formula 2:
[0121] Formula 2: ;
[0122] in, It is the difference between the corrected speed corresponding to the abnormal trigger signal sent by the target sorter for the i-th time and the maximum allowable speed calculated by formula 1, and n is a positive integer.
[0123] In one example, n is 10, and when the number of abnormal trigger signals sent by the target sorting machine reaches 10, the range of the rotation speed V of the drive motor of the sorting machine is checked based on Formula 2 instead of Formula 1. After the target sorting machine sends the abnormal trigger signal for the i-th time, the corresponding corrected rotation speed Vx(i) is determined according to steps S502 to S504, and then the weight of the abnormal medical fabric corresponding to each abnormal trigger signal is brought into the maximum allowable rotation speed Vmax(i) calculated by Formula 1. Formula 2 can correct the problem of inapplicability of Formula 1 due to mechanical errors between the sorting machine and the target sorting machine during the test.
[0124] On the other hand, in one embodiment, a medical fabric sorting abnormality identification device is provided, the device comprising a camera and a first microcontroller, the first microcontroller comprising a memory, a processor and a computer program stored in the memory, the processor executes the computer program to implement the steps of the above method.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for identifying abnormality in sorting medical fabrics, characterized in that: Only when an abnormal trigger signal is received will the target tracking algorithm be executed on the abnormal medical fabric to obtain the position of the abnormal medical fabric and thus identify its abnormal state; The method comprises: When an abnormal trigger signal is received, a video segment to be analyzed is determined from a target video; wherein the target video is a video obtained by shooting the area where the sorting line is located; the abnormal trigger signal is a signal issued when the sorting machine detects an abnormality in the residence time of the medical fabric through a photoelectric sensor; Taking the abnormal medical fabric in the first frame of the video segment to be analyzed as a tracking target; Determine the position of the tracking target in the tail frame of the video segment to be analyzed based on the target tracking algorithm; The abnormal state of the abnormal medical fabric is identified based on the position of the tracking target in the tail frame of the video segment to be analyzed; wherein the abnormal state is used to trigger the sorting line to execute a corresponding abnormality handling strategy.
2. A method for identifying abnormality in sorting medical fabrics according to claim 1, characterized in that: Before the step of determining the video segment to be analyzed from the target video, the method further includes: The sorter that sends out an abnormal trigger signal on the sorting line is taken as the target sorter; The sorting path to which the action instruction being executed by the target sorting machine belongs when the abnormal trigger signal is issued is used as the target sorting path; wherein each piece of medical fabric corresponds to a sorting path, and each sorting path is jointly determined by the action instructions executed by each sorting machine on the sorting line in chronological order; The medical fabric corresponding to the target sorting path is regarded as abnormal medical fabric; Determining the video segment to be analyzed from the target video specifically includes: The video frame corresponding to the first moment when the abnormal medical fabric is detected to enter the preset starting position of the sorting line is used as the first frame of the video segment to be analyzed; The video frame corresponding to the second moment when the abnormal trigger signal is received is used as the tail frame of the video segment to be analyzed; A video segment to be analyzed is determined from the target video based on the first frame and the last frame.
3. A method for identifying abnormality in sorting medical fabrics according to claim 1, characterized in that: Before the step of determining the video segment to be analyzed from the target video, the method further includes: The sorter that sends out an abnormal trigger signal on the sorting line is taken as the target sorter; The sorting path to which the action instruction being executed by the target sorting machine belongs when the abnormal trigger signal is issued is used as the target sorting path; wherein each piece of medical fabric corresponds to a sorting path, and each sorting path is jointly determined by the action instructions executed by each sorting machine on the sorting line in chronological order; The medical fabric corresponding to the target sorting path is regarded as abnormal medical fabric; Determining the video segment to be analyzed from the target video specifically includes: The video frame corresponding to the third moment when the abnormal medical fabric is detected to enter the intermediate sorting machine is used as the first frame of the video segment to be analyzed; the intermediate sorting machine is any sorting machine on the sorting line that the abnormal medical fabric passes through before reaching the target sorting machine through the corresponding sorting path; The video frame corresponding to the fourth moment when the abnormal trigger signal is received is used as the tail frame of the video segment to be analyzed; A video segment to be analyzed is determined from the target video based on the first frame and the last frame.
4. A method for identifying abnormality in sorting medical fabrics according to claim 3, characterized in that: Determining a video segment to be analyzed from the target video based on the first frame and the last frame specifically includes: Based on the sorting path corresponding to the abnormal medical clothing, the various sorting machines that need to be passed from the intermediate sorting machine to the subsequent sorting machine are determined; wherein the subsequent sorting machine is any sorting machine on the sorting line that the abnormal medical fabric passes through before reaching the sorting point from the target sorting machine through the corresponding sorting path; The area to be reserved is determined based on the subsequent sorting machine, the target sorting point, the intermediate sorting machine and each passing sorting machine; wherein each video frame is pre-divided into a plurality of areas, each area corresponds to a sorting machine or a sorting point; the target sorting point is the sorting point corresponding to the target sorting machine; Obtaining the coordinate extreme values of the area to be retained in the two coordinate axis directions of the video frame image coordinate system; wherein the coordinate extreme values include a maximum value and a minimum value; The coordinate extreme values in the directions of the two coordinate axes are combined into the coordinates of the four corners of the clipping area; Each frame from the first frame to the last frame in the target video is cropped based on the cropping area to obtain cropped video frames, and the cropped video frames constitute the video segment to be analyzed.
5. The method for identifying abnormality in sorting medical fabrics according to claim 1, characterized in that: The abnormal state includes a first abnormal state, a second abnormal state and a third abnormal state. The first abnormal state is that the abnormal medical fabric is located on the target sorting machine, the second abnormal state is that the abnormal medical fabric is located on the subsequent sorting machine, and the third abnormal state is that the abnormal medical fabric is located on the target sorting point. When the abnormal state of the abnormal medical fabric is the first type of abnormal state, the abnormal handling strategy is: the sorting line suspends the sorting action of other medical fabrics that enter the preset starting position of the sorting line after the abnormal medical fabric, and controls the target sorting machine to continue the action based on the real-time tracking of the abnormal medical fabric and controls the action instructions of each subsequent sorting machine on the sorting path corresponding to the abnormal medical fabric; After identifying that the abnormal medical fabric has left the target sorting machine, resuming the sorting action of other medical fabrics that have entered the preset starting position of the sorting line after the abnormal medical fabric; When the abnormal state of the abnormal medical fabric is the second type of abnormal state, the abnormality handling strategy is: based on real-time tracking of the abnormal medical fabric, controlling the target sorting machine to continue to execute the action instructions and controlling the action instructions of each subsequent sorting machine on the sorting path corresponding to the abnormal medical fabric; When the abnormal state of the abnormal medical fabric is the third type of abnormal state, the abnormality handling strategy is: deleting the sorting path corresponding to the abnormal medical fabric.
6. A method for identifying abnormality in sorting medical fabrics according to claim 5, characterized in that: According to the following formula 1, check whether the range of the speed V of the driving motor of each sorting machine on the sorting path corresponding to each medical fabric meets the requirements: Formula 1: ; Where, m is the weight of the medical fabric, is the reference weight, α is the sensitivity coefficient, is the reference speed.
7. A method for identifying abnormality in sorting medical fabrics according to claim 6, characterized in that: The control of the target sorting machine to continue to operate based on real-time tracking of abnormal medical fabrics specifically includes: Gradually reduce the speed of the drive motor of the target sorter and track the abnormal medical fabric on the target sorter in real time to identify whether the abnormal medical fabric moves in the direction of the subsequent sorter; If movement occurs, the speed of the drive motor of the current target sorter is used as the corrected speed; The target sorter is controlled to continue operating based on the corrected rotation speed.
8. A method for identifying abnormality in sorting medical fabrics according to claim 7, characterized in that: The method further comprises: When it is detected that the weight of other medical fabrics entering the target sorting machine is the same as that of the abnormal medical fabric, the operation of the target sorting machine is controlled based on the corrected rotation speed.
9. A method for identifying abnormality in sorting medical fabrics according to claim 7, characterized in that: The method further comprises: When the number of abnormal trigger signals sent by the target sorter reaches n times, the range of the speed V of the drive motor of the sorter is checked based on the following formula 2: Formula 2: ; in, It is the difference between the corrected speed corresponding to the abnormal trigger signal sent by the target sorter for the i-th time and the maximum allowable speed calculated by formula 1, and n is a positive integer.
10. A medical fabric sorting abnormality identification device, characterized in that: The device comprises a camera, a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 9.
