Method, device, electronic device and storage medium for determining abnormal weighing
By obtaining surveillance video and setting tripwire intrusion rules, detecting tripwire intrusion in weighing scenarios, the measurement deviation problem of the transport device when grabbing the items to be weighed to the weighing table is solved, and accurate weighing results are achieved.
Patent Information
- Application Number
- CN202111109405.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-22
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2041-09-22
AI Technical Summary
In the prior art, in the scenario where the items to be weighed are grabbed to the weighing table through a transport device, there is a deviation in weighing measurement, especially in the weighing systems of factories, mining enterprises and supermarkets, it is difficult to accurately determine whether the items are completely placed on the weighing platform, resulting in measurement errors.
By obtaining surveillance video, setting tripwire intrusion rules, detecting tripwire intrusion situation in weighing scenarios, and determining whether the tripwire intrusion situation meets the preset conditions. If not, judge that there is a weighing abnormality, including identifying the number of moving targets and determining the intersection point of the rule line, ensuring that the items are completely placed on the weighing platform.
In the scene where the transport device grabs the items to be weighed to the weighing table, it is realized that the items are accurately judged completely, avoid measurement errors, and improve the accuracy of weighing.
Smart Images

Figure CN114022834B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision, and in particular to a method, device, electronic device, and storage medium for determining abnormal weighing. Background Art
[0002] Weighing refers to weighing items or goods with a weighing scale. Currently, in some weighing scenarios, there are weighing measurement deviations. For example, in the material measurement system of factories and mines, transport vehicles need to move to the weighing platform to collect weighing data. In actual applications, the transport vehicles for material transportation in factories and mines are large in volume and difficult to drive, making it easy for drivers to make operational mistakes and not completely drive the transport vehicle onto the weighing platform. At this time, the weighing measurement value obtained through the weighing platform will be less than the total weight of the transport vehicle and the materials, resulting in a deviation in the weighing measurement process; in the supermarket weighing system, weighing may be carried out when the customer's hand has not left the weighing platform, causing a deviation in the weighing measurement process.
[0003] In the existing methods, mainly an on-board signal is obtained through an infrared grating; and then a card insertion signal is obtained; so as to determine whether there is an abnormal weighing for the vehicle to be weighed according to the acquisition order of the card insertion signal and the weighing signal. However, the above cannot be applied to the scenario where the item to be weighed is grabbed by a transport device onto the weighing platform, and cannot be applied to daily weighing scenarios. For example, when a crane grabs sand from a ship in a sand yard and transports it to the weighing platform for weighing, some people may press the bucket of the crane above the sand in order to increase the weight during weighing, resulting in a deviation in the weighing measurement process; when weighing on the supermarket weighing platform, weighing may be carried out when the hand has not left the weighing platform, causing a deviation in the weighing measurement process. Summary of the Invention
[0004] In this embodiment, a method, device, electronic device, and storage medium for determining abnormal weighing are provided to solve the problem of weighing measurement deviation in the scenario where the item to be weighed is grabbed by a transport device onto the weighing platform in the related art.
[0005] In a first aspect, in this embodiment, a method for determining abnormal weighing is provided, including:
[0006] Obtain a monitoring video for the weighing scenario;
[0007] Set a tripwire intrusion rule;
[0008] Detect the tripwire intrusion situation in the weighing scenario;
[0009] If the tripwire intrusion situation does not meet the preset intrusion conditions, it is determined that there is an abnormal weighing.
[0010] In some of these embodiments, the preset intrusion condition includes: triggering the tripwire intrusion rule twice, the directions of the two triggers being inconsistent, and the transport device placing the item to be weighed on the weighing platform between the two triggers.
[0011] In some of these embodiments, the transport device placing the item to be weighed on the weighing platform between the two triggers is determined in the following manner:
[0012] Obtain the first moment when the tripwire intrusion rule is triggered for the first time and the second moment when the tripwire intrusion rule is triggered for the second time;
[0013] Determine a first time period according to the first moment and the second moment;
[0014] Obtain a monitoring video segment, where the monitoring video segment is the video segment of the monitoring video within the first time period;
[0015] Identify moving targets in the monitoring video segment;
[0016] If the number of the moving targets meets a first preset condition, and the moving targets are the transport device and / or the item to be weighed, it is determined that the transport device places the item to be weighed on the weighing platform between the two triggers.
[0017] In some of these embodiments, the first preset condition is that the number of the moving targets increases from one to two, and after a second time period, the number of the moving targets decreases from two to one, where the second time period is less than the first time period.
[0018] In some of these embodiments, the method further includes:
[0019] If the tripwire intrusion situation does not meet the preset intrusion condition, determine whether the transport device places the item to be weighed on the weighing platform;
[0020] If so, obtain the distance between the transport device and the weighing platform in the image coordinate system, and determine whether the weighing is abnormal according to the distance between the transport device and the weighing platform.
[0021] In some of these embodiments, setting the tripwire intrusion rule includes:
[0022] Preset a first preset range above the weighing platform for a first rule line in the image coordinate system.
[0023] In some of these embodiments, the method further includes:
[0024] The second regular line in the preset image coordinate system is within a second preset range above the weighing platform, where, in the image coordinate system, the distance between the first regular line and the weighing platform is greater than the distance between the second regular line and the weighing platform;
[0025] Detect the tripwire intrusion situation in the weighing scenario;
[0026] If the tripwire intrusion situation does not meet the preset intrusion conditions, determine whether the transport device places the item to be weighed on the weighing platform;
[0027] If so, if there is an intersection between the transport device and the second regular line in the image coordinate system, it is determined that there is an abnormal weighing.
[0028] In some embodiments, the preset directions of the first regular line and the second regular line are parallel, and the preset direction of the first regular line is parallel to the plane of the weighing platform.
[0029] In a second aspect, a device for determining abnormal weighing is provided in this embodiment, including:
[0030] An acquisition module, configured to acquire a monitoring video of the weighing scenario;
[0031] A rule setting module, configured to set tripwire intrusion rules;
[0032] A detection module, configured to detect the tripwire intrusion situation in the weighing scenario, and if the tripwire intrusion situation does not meet the preset intrusion conditions, determine that there is an abnormal weighing.
[0033] In a third aspect, an electronic device is provided in this embodiment, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for determining abnormal weighing described in the first aspect above is implemented.
[0034] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored. When the program is executed by a processor, the method for determining abnormal weighing described in the first aspect above is implemented.
[0035] Compared with the related art, the method, device, electronic device, and storage medium for determining abnormal weighing provided in this embodiment acquire a monitoring video of the weighing scenario, set tripwire intrusion rules, detect the tripwire intrusion situation in the weighing scenario, and if the tripwire intrusion situation does not meet the preset intrusion conditions, determine that there is an abnormal weighing, which solves the problem of deviation in weighing measurement in the scenario of grabbing the item to be weighed to the weighing platform by the transport device or in the daily weighing scenario, and realizes accurate weighing of the item to be weighed.
[0036] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more concise and understandable. Description of the Drawings
[0037] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The illustrative embodiments and descriptions thereof of the present application are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:
[0038] Figure 1 is a hardware structure block diagram of an application terminal of a weighing anomaly determination method according to an embodiment of the present application;
[0039] Figure 2 is a flowchart of a weighing anomaly determination method according to an embodiment of the present application;
[0040] Figure 3 is a schematic diagram of transporting an item to be weighed according to an embodiment of the present application;
[0041] Figure 4 is a flowchart of another weighing anomaly determination method according to an embodiment of the present application;
[0042] Figure 5 is a flowchart of yet another weighing anomaly determination method according to an embodiment of the present application;
[0043] Figure 6 is a structure block diagram of a weighing anomaly determination device according to this embodiment. Detailed Embodiments
[0044] To more clearly understand the purpose, technical solution, and advantages of the present application, the present application is described and illustrated below with reference to the drawings and embodiments.
[0045] Unless otherwise defined, technical or scientific terms used in this application shall have the ordinary meanings as understood by those of ordinary skill in the technical field to which this application pertains. In this application, words such as "a", "an", "one kind", "the", "these", etc. do not indicate a limitation in quantity and can be singular or plural. The terms "including", "comprising", "having" and any variations thereof used in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent in these processes, methods, products or devices. The terms "connected", "coupled" and similar words used in this application do not limit to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" used in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. Usually, the character " / " indicates that the objects associated before and after are in an "or" relationship. The terms "first", "second", "third", etc. used in this application only distinguish similar objects and do not represent a specific order for the objects.
[0046] The method embodiments provided in this embodiment may be executed on a terminal, a computer or a similar computing device. For example, when running on a terminal, Figure 1 is a hardware structure block diagram of an application terminal of the weighing anomaly determination method according to an embodiment of this application. As Figure 1 shown, the terminal may include one or more ( Figure 1 only one is shown in the figure) processors 102 and a memory 104 for storing data. Among them, the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above terminal. For example, the terminal may further include more or fewer components than those shown in Figure 1 the figure, or have a different configuration from that shown in Figure 1 the figure.
[0047] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the weighing anomaly determination method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above-mentioned method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories can be connected to the terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
[0048] The transmission device 106 is used to receive or send data via a network. The above-mentioned network includes a wireless network provided by a communication provider of the terminal. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one instance, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0049] In this embodiment, a method for determining weighing anomaly is provided. Figure 2 It is a flowchart of a method for determining weighing anomaly according to an embodiment of the present application, as Figure 2 shown, the process includes the following steps:
[0050] Step S201, obtain a monitoring video for the weighing scenario.
[0051] Step S202, set a tripwire intrusion rule.
[0052] Step S203, detect the tripwire intrusion situation in the weighing scenario.
[0053] Step S204, if the tripwire intrusion situation does not meet the preset intrusion conditions, it is determined that there is a weighing anomaly.
[0054] In this embodiment, when it can be determined that there is a weighing anomaly, an alarm is issued to prompt the user that there is an anomaly in the weighing, and the weighing result of this time is filtered out, and the item to be weighed this time needs to be weighed again.
[0055] It can be understood that a tripwire intrusion rule is set in the captured monitoring video, and the tripwire intrusion situation in the weighing scenario is detected based on the monitoring video. If the tripwire intrusion situation does not meet the first preset condition, it indicates that the transport device still stays on the weighing platform after placing the item to be weighed on the weighing platform. Therefore, at this time, it is determined that there is an abnormal weighing, and no metering weighing is required, so as to solve the problem of deviation in weighing metering and achieve more accurate weighing of the item to be weighed.
[0056] In some of these embodiments, the preset intrusion conditions include: triggering the tripwire intrusion rule twice, the directions of the two triggers are inconsistent, and the transport device places the item to be weighed on the weighing platform between the two triggers.
[0057] In this embodiment, the transport device is used to transport the item to be weighed. A rule line is preset in the monitoring screen. Triggering the tripwire intrusion rule means that there is an intersection between the target in the monitoring screen and the set rule line.
[0058] It can be understood that when the transport device places the item to be weighed on the weighing platform, the tripwire intrusion rule will be triggered once. After the transport device places the item to be weighed and leaves the weighing platform, the tripwire intrusion rule will be triggered a second time, and the directions of the two triggers of the tripwire intrusion rule are inconsistent. Therefore, when the tripwire intrusion situation meets the preset intrusion conditions, it can be determined that the transport device places the item to be weighed on the weighing platform and, after placing the item to be weighed, the transport device leaves the weighing platform, thus not affecting the metering of the item to be weighed. When the tripwire intrusion situation does not meet the preset intrusion conditions, it indicates that the transport device has not placed the item to be weighed on the weighing platform, the transport device is placing the item to be weighed on the weighing platform, or the transport device has not left the weighing platform after placing the item to be weighed on the weighing platform. At this time, if the item to be weighed is weighed, it will cause a metering error. In this application, when it is determined that the tripwire intrusion situation does not meet the preset intrusion conditions, it is handled as an abnormal weighing to avoid causing a metering error and improve the accuracy of the metering of the item to be weighed.
[0059] Exemplarily, the weighing anomaly determination method proposed in this application can be applied to the weighing scenario in a supermarket. Cameras are deployed near the weighing platform in the supermarket. The cameras acquire surveillance videos. A tripwire intrusion rule is set in the images of the acquired surveillance videos. If the item to be weighed triggers the tripwire intrusion rule during the weighing process, the directions of the two triggers are inconsistent, and a supermarket customer places the item to be weighed on the weighing platform between the two triggers, it indicates that the customer has left the weighing platform after placing the item to be weighed on the weighing platform. At this time, weighing can be performed. If the item to be weighed triggers the tripwire intrusion rule during the weighing process but is triggered only once, it indicates that the customer's hand has not left the weighing platform after placing the item to be weighed on the weighing platform. In this application, this situation is treated as a weighing anomaly to avoid errors caused by measuring the weight of the customer's hand as the item to be weighed.
[0060] In some of these embodiments, the following method is used to determine that the transport device places the item to be weighed on the weighing platform between the two triggers:
[0061] Obtain the first moment when the tripwire intrusion rule is triggered for the first time and the second moment when the tripwire intrusion rule is triggered for the second time;
[0062] Determine the first time period according to the first moment and the second moment;
[0063] Obtain a surveillance video segment, where the surveillance video segment is the video segment of the surveillance video within the first time period;
[0064] Identify moving objects in the surveillance video segment;
[0065] If the number of moving objects meets the first preset condition and the moving objects are the transport device and / or the item to be weighed, it is determined that the transport device places the item to be weighed on the weighing platform between the two triggers.
[0066] In this embodiment, the time period between the first moment and the second moment is used as the first time period.
[0067] It can be understood that when the transport device triggers the tripwire intrusion rule for the first time, it indicates that the transport device is transporting the item to be weighed. At this time, one moving object can be identified in the surveillance video and this moving object is the transport device. During the process of the transport device placing the item to be weighed on the weighing platform, two moving objects can be identified in the surveillance video, and these two moving objects are the transport device and the item to be weighed. After the transport device completely places the item to be weighed on the weighing platform and leaves the weighing platform, one moving object will be identified, and this moving object is the transport device. Therefore, when determining that the moving objects are the transport device and / or the item to be weighed, according to the changing trend of the number of moving objects, it is possible to accurately determine whether the transport device places the item to be weighed on the weighing platform between the two triggers.
[0068] In some of these embodiments, the first preset condition is that the number of moving targets increases from one to two, and after a second time period, the number of moving targets decreases from two to one, where the second time period is less than the first time period.
[0069] In this embodiment, the second time period can be adjusted according to the actual situation and is not specifically limited herein. By way of example, the second time period can be determined based on the moving speed of the transport device, the weight of the item to be weighed, and / or the time required for the transport device to place the item to be weighed on the weighing platform.
[0070] It can be understood that when the transport device is placing the item to be weighed on the weighing platform, the number of moving targets will increase from one to two. Initially, it is the transport device that is moving. During the process of the transport device placing the item to be weighed on the weighing platform, both the transport device and the item to be weighed are moving. After the transport device places the item to be weighed on the weighing platform, the number of moving targets will decrease from two to one. That is, after the transport device places the item to be weighed on the weighing platform and during the process of leaving the weighing platform, there is only the transport device as the moving target. Therefore, in this application, it is possible to accurately determine whether the transport device has placed the item to be weighed on the weighing platform by determining whether the number of moving targets in the monitoring screen meets the first preset condition.
[0071] In some of these embodiments, setting the tripwire intrusion rule includes:
[0072] The first rule line in the preset image coordinate system is within a first preset range above the weighing platform.
[0073] In this embodiment, the first preset range can be adjusted according to the actual situation and is not specifically limited herein. By way of example, in the monitoring screen, the first preset range is determined based on the pixel distance between the transport device and the weighing platform, so that the first rule line can be set between the transport device and the weighing platform. Further, it is possible to accurately determine whether the transport device has placed the item to be weighed on the weighing platform in a standard manner based on whether the transport device has intruded into the first rule line, the direction of intrusion into the first rule line, and the number of times of intrusion into the first rule line, thus avoiding abnormal weighing.
[0074] It should be noted that the image coordinate system is a coordinate system established based on the two-dimensional photo taken by the camera and is used to specify the position of an object in the photo.
[0075] In this application, meeting the preset intrusion condition indicates that there must be no abnormal weighing. However, if the preset intrusion condition is not met, it is not particularly accurate to say that there is abnormal weighing. Please refer to Figure 3, because there is a certain distance between the set rule line and the weighing platform. After the transportation device places the item to be weighed on the weighing platform and leaves the weighing platform, it may not trigger the trip wire intrusion rule for the second time. At this time, it would be inaccurate to say that there is an abnormal weighing. Therefore, the present application further improves the accuracy of abnormal weighing detection through the following method.
[0076] In some embodiments, after obtaining the monitoring video of the weighing scenario, it further includes:
[0077] The second rule line in the preset image coordinate system is within a second preset range above the weighing platform, where the distance between the first rule line and the weighing platform in the image coordinate system is greater than the distance between the second rule line and the weighing platform.
[0078] Detect the trip wire intrusion situation in the weighing scenario;
[0079] If the trip wire intrusion situation does not meet the preset intrusion conditions, determine whether the transportation device has placed the item to be weighed on the weighing platform;
[0080] If so, if there is an intersection between the transportation device and the second rule line in the image coordinate system, it is determined that there is an abnormal weighing.
[0081] It can be understood that in this embodiment, please refer to Figure 3 , in the image coordinate system, a first rule line 32 is set at a position relatively close to the weighing platform 31, and a second rule line 33 is set at a position very close to the weighing platform 31. When the transportation device 34 places the item to be weighed 35 on the weighing platform 31 and there is no intersection with the second rule line 33, it means that the transportation device 34 has left the weighing platform 31 and will not cause abnormal weighing. If there is an intersection with the second rule line 33, it means that the transportation device 34 has not completely left the weighing platform 31. At this time, if the item to be weighed 35 is measured, there will be an error. Therefore, in the present application, this measurement result is treated as an abnormal weighing to avoid deviation between the weighing result and the actual weight.
[0082] The present application can also further improve the accuracy of abnormal weighing detection through the following method.
[0083] In some embodiments, after detecting the trip wire intrusion situation in the weighing scenario, it further includes:
[0084] If the trip wire intrusion situation does not meet the preset intrusion conditions, determine whether the transportation device has placed the item to be weighed on the weighing platform;
[0085] If so, obtain the distance between the transportation device and the weighing platform in the image coordinate system, and determine whether the weighing is abnormal according to the distance between the transportation device and the weighing platform.
[0086] Exemplarily, after the transport device places the item to be weighed on the weighing platform, in the image coordinate system, if the distance between the transport device and the weighing platform is greater than or equal to a set threshold value, it indicates that the transport device has left the weighing platform. If the distance between the transport device and the weighing platform is less than the set threshold value, it indicates that the transport device has not completely left the weighing platform. At this time, if the item to be weighed is measured, there will be an error. Therefore, in this application, this measurement result is treated as an abnormal weighing to avoid deviation between the weighing result and the actual weight.
[0087] It can be understood that after this application determines that the transport device places the item to be weighed on the weighing platform, it can determine whether the transport device has completely left the weighing platform according to the distance between the transport device and the weighing platform. If the transport device has not completely left the weighing platform, it indicates that there is an abnormality in weighing, thereby prompting the user that this result is inaccurate and needs to be weighed again, improving the accuracy of measuring the item to be weighed.
[0088] In some of these embodiments, the preset direction of the first regular line is parallel to the preset direction of the second regular line, and the preset direction of the first regular line is parallel to the plane of the weighing platform.
[0089] In this embodiment, the first regular line and the second regular line can be enabled to be associated, so that it is possible to accurately determine whether there is an abnormal weighing by combining the intrusion results of the first regular line and the intrusion results of the second regular line. Exemplarily, after the transport device triggers the first regular line, it triggers the second regular line twice, and after the second trigger of the second regular line, there is no intersection between the transport device and the second regular line. Then it can be determined that after the transport device places the item to be weighed on the weighing platform, the transport device has completely left the weighing platform.
[0090] In this embodiment, another method for determining abnormal weighing is also provided. Figure 4 is a flowchart of another method for determining abnormal weighing according to an embodiment of this application, as Figure 4 shown, this process includes the following steps:
[0091] Step S401, identify the moving target in the monitoring video.
[0092] Step S402, obtain the number of moving targets.
[0093] Step S403, if the number of moving targets does not meet the second preset condition, and the moving targets are the transport device and / or the item to be weighed, then determine that there is an abnormal weighing.
[0094] In this embodiment, the second preset condition is that the number of moving targets increases from one to two, and after the third time period, the number of moving targets decreases from two to one.
[0095] It can be understood that when the transportation device is placing the item to be weighed on the weighing platform, the number of moving targets will increase from one to two. Initially, it is the transportation device that is moving. During the process of the transportation device placing the item to be weighed on the weighing platform, both the transportation device and the item to be weighed are moving. After the transportation device places the item to be weighed on the weighing platform, the number of moving targets will decrease from two to one. That is, after the transportation device places the item to be weighed on the weighing platform and leaves the weighing platform, only the transportation device is the moving target. Therefore, in the present application, it is possible to accurately determine whether the transportation device has placed the item to be weighed on the weighing platform and whether it has left the weighing platform in a timely manner after placing the item to be weighed by determining whether the number of moving targets in the monitored video satisfies the second preset condition. If the second preset condition is not satisfied, it indicates that the transportation device has not placed the item to be weighed on the weighing platform, the transportation device is placing the item to be weighed on the weighing platform, or the transportation device has not left the weighing platform after placing the item to be weighed. At this time, if the item to be weighed is weighed, it will cause a measurement error. In the present application, when it is determined that the tripwire intrusion situation does not satisfy the second preset condition, it is treated as an abnormal weighing situation to avoid causing a measurement error and improve the accuracy of weighing the item to be weighed.
[0096] In one embodiment, a safe weighing range is set around the weighing platform. Among them, the safe weighing range includes the area of the weighing platform. After determining that the transportation device enters the safe weighing range, the moving targets within the weighing range are identified, and the number of moving targets is obtained. If the number of moving targets does not satisfy the second preset condition, it is determined that there is an abnormal weighing situation.
[0097] It can be understood that in this embodiment, after determining that the transportation device enters the safe weighing range, if the number of moving targets is one and the moving target is the transportation device, it indicates that the transportation device is transporting the item to be weighed. If the number of moving targets is two, and the moving targets are the transportation device and the item to be weighed, it indicates that the transportation device is pouring the item to be weighed onto the weighing platform. When the transportation device has poured all the items to be weighed onto the weighing platform, the number of moving targets will decrease from two to one again, and the moving target is the transportation device. When it is detected that the transportation device moves or stops outside the safe weighing range, it indicates that the transportation device has placed all the items to be weighed on the weighing platform in accordance with the specifications, and has left the weighing platform after placing the items to be weighed, without causing an adverse impact on the weighing result of the item to be weighed.
[0098] In addition, when identifying moving targets in the monitoring video, there may be some interfering objects, such as birds, flying insects, etc. To avoid these interferences, the present application solves them in the following way.
[0099] In one embodiment, after identifying a moving target in the surveillance video, the size of the moving target is matched with a standard template. If they do not match, the moving target is removed, where the standard template is determined according to the shape and size of the transportation device.
[0100] It can be understood that in this embodiment, the standard template is determined according to the shape and size of the transportation device. If the moving target does not match the standard template, it means that the moving template is not the transportation platform but some interfering objects. Thus, interfering objects such as birds and flying insects can be removed, achieving more accurate identification of the transportation device. Further, more accurate weighing of the items to be weighed is achieved.
[0101] Figure 5 It is a flowchart of another method for determining weighing anomalies according to an embodiment of the present application. As Figure 5 shown, the method for determining weighing anomalies includes the following steps:
[0102] Step S501, set a first rule line in the surveillance screen, where the first rule line is within a first preset range above the weighing platform in the image coordinate system.
[0103] Step S502, determine whether the transportation device triggers the tripwire intrusion rule from the first direction.
[0104] In this embodiment, triggering the tripwire intrusion rule means that there is an intersection between the target in the surveillance screen and the set first rule line. If it is determined that the transportation device triggers the tripwire intrusion rule from the first direction, go to step S503; otherwise, go to step S507.
[0105] Step S503, determine whether the transportation device has placed all the items to be weighed on the weighing platform.
[0106] In this embodiment, if it is determined that the transportation device has placed all the items to be weighed in the transportation device on the weighing platform, go to step S504; otherwise, go to step S508 and then re-determine whether the transportation device has placed all the items to be weighed on the weighing platform.
[0107] Step S504, determine whether the transportation device triggers the tripwire intrusion rule from the second direction.
[0108] In this embodiment, the first direction is opposite to the second direction. If it is determined that the transportation device triggers the tripwire intrusion rule from the second direction, go to step S505; if after waiting for a period of time, it is found that the transportation device still does not trigger the tripwire intrusion rule from the second direction, go to step S506.
[0109] Step S505, weigh the items to be weighed.
[0110] Step S506, trigger the weighing cheating alarm.
[0111] Step S507, end.
[0112] Step S508, wait for the fourth time period.
[0113] In this embodiment, the fourth time period can be adjusted according to the actual situation and is not limited herein.
[0114] It can be understood that when the transportation device places the item to be weighed on the weighing platform, a tripwire intrusion rule will be triggered once. When the transportation device leaves the weighing platform after placing the item to be weighed, the tripwire intrusion rule will be triggered for the second time, and the directions of the two triggerings of the tripwire intrusion rule are inconsistent. If the tripwire intrusion rule is not triggered twice during the weighing of the item to be weighed, it means that the transportation device has not placed the item to be weighed on the weighing platform, the transportation device is placing the item to be weighed on the weighing platform, or the transportation device has not left the weighing platform after placing the item to be weighed on the weighing platform. At this time, if the item to be weighed is weighed, it will cause a measurement error. In this application, when it is determined that the tripwire intrusion rule is not triggered twice, a weighing cheating alarm is triggered to avoid causing a weighing error and improve the accuracy of the measurement of the item to be weighed.
[0115] It should be noted that the steps shown in the above process or the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here. For example, steps S505 and S506 can be interchanged.
[0116] In this embodiment, a weighing anomaly determination device is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. The following terms such as "module", "unit", "sub-unit", etc. can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0117] Figure 6 is a structural block diagram of a weighing anomaly determination device according to this embodiment, as Figure 6 shown, this device includes:
[0118] An acquisition module 61, configured to acquire a monitoring video for a weighing scenario.
[0119] A rule setting module 62, configured to set a tripwire intrusion rule.
[0120] The detection module 63 is used to detect the tripwire intrusion situation in the weighing scenario. If the tripwire intrusion situation does not meet the preset intrusion conditions, it is determined that there is a weighing anomaly.
[0121] In one embodiment, the preset intrusion conditions include: triggering the tripwire intrusion rule twice, the target of triggering the tripwire intrusion rule is the transport device, the directions of the two triggers are inconsistent, and the transport device places the item to be weighed on the weighing platform between the two triggers, where the transport device is used to transport the item to be weighed.
[0122] In one embodiment, the weighing anomaly determination device further includes:
[0123] Obtain the first moment when the tripwire intrusion rule is triggered for the first time and the second moment when the tripwire intrusion rule is triggered for the second time;
[0124] Determine the first time period according to the first moment and the second moment;
[0125] Obtain the surveillance video segment, where the surveillance video segment is the video segment of the surveillance video within the first time period;
[0126] Identify the moving targets in the surveillance video segment;
[0127] If the number of moving targets meets the first preset condition, and the moving targets are the transport device and / or the item to be weighed, it is determined that the transport device places the item to be weighed on the weighing platform between the two triggers.
[0128] In one embodiment, the first preset condition is that the number of moving targets increases from one to two, and after the second time period, the number of moving targets decreases from two to one, where the second time period is less than the first time period.
[0129] In one embodiment, the rule setting module 62 includes:
[0130] Preset that the first rule line in the preset image coordinate system is within the first preset range above the weighing platform.
[0131] In one embodiment, the weighing anomaly determination device further includes:
[0132] Preset that the second rule line in the preset image coordinate system is within the second preset range above the weighing platform, where the distance between the first rule line and the weighing platform is greater than the distance between the second rule line and the weighing platform in the image coordinate system;
[0133] Detect the tripwire intrusion situation in the weighing scenario;
[0134] If the tripwire intrusion situation does not meet the preset intrusion conditions, determine whether the transport device places the item to be weighed on the weighing platform;
[0135] If, in the image coordinate system, there is an intersection between the transportation device and the second regular line, it is determined that there is an abnormal weighing situation.
[0136] In one embodiment, the preset direction of the first regular line is parallel to the preset direction of the second regular line, and the preset direction of the first regular line is parallel to the plane of the weighing platform.
[0137] In one embodiment, the abnormal weighing determination device further includes:
[0138] If the tripwire intrusion situation does not meet the preset intrusion conditions, determine whether the transportation device places the item to be weighed on the weighing platform;
[0139] If so, obtain the distance between the transportation device and the weighing platform in the image coordinate system, and determine whether the weighing is abnormal according to the distance between the transportation device and the weighing platform.
[0140] It should be noted that the above-mentioned various modules can be functional modules or program modules, and can be implemented either by software or by hardware. For the modules implemented by hardware, the above-mentioned various modules can be located in the same processor; or the above-mentioned various modules can also be located in different processors in any combination form.
[0141] In this embodiment, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0142] Optionally, the above-mentioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above-mentioned processor, and the input / output device is connected to the above-mentioned processor.
[0143] Optionally, in this embodiment, the above-mentioned processor may be configured to execute the following steps through a computer program:
[0144] Obtain the monitoring video for the weighing scenario.
[0145] Set the tripwire intrusion rule.
[0146] Detect the tripwire intrusion situation in the weighing scenario.
[0147] If the tripwire intrusion situation does not meet the preset intrusion conditions, it is determined that there is an abnormal weighing situation.
[0148] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiment and the optional implementation manners, and will not be repeated in this embodiment.
[0149] In addition, in combination with the weighing anomaly determination method provided in the above embodiments, a storage medium may also be provided in this embodiment to implement the method. A computer program is stored on the storage medium; when the computer program is executed by a processor, any one of the weighing anomaly determination methods in the above embodiments is implemented.
[0150] It should be understood that the specific embodiments described herein are only used to explain this application and not to limit it. According to the embodiments provided in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of this application.
[0151] Obviously, the drawings are only some examples or embodiments of this application. For those of ordinary skill in the art, this application can also be applied to other similar situations based on these drawings without creative efforts. Additionally, it can be understood that although the work done during the development process may be complex and time-consuming, for those of ordinary skill in the art, certain design, manufacturing, or production changes based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient disclosure of this application.
[0152] The term "embodiment" in this application means that the specific features, structures, or characteristics described in connection with the embodiments may be included in at least one embodiment of this application. The phrase appears in various positions in the specification and does not necessarily mean the same embodiment, nor does it mean being independent or alternative to other embodiments and mutually exclusive. Those of ordinary skill in the art can clearly or implicitly understand that the embodiments described in this application can be combined with other embodiments without conflict.
[0153] The above embodiments only represent several implementation manners of this application, and their descriptions are relatively specific and detailed, but should not be construed as a limitation on the scope of patent protection. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of this application should be subject to the appended claims.
Claims
1. A method for determining abnormal weighing, characterized in that, Including: Obtain a monitoring video for the weighing scenario; Set a tripwire intrusion rule; Detect the tripwire intrusion situation in the weighing scenario; If the tripwire intrusion situation does not meet the preset intrusion conditions, it is determined that there is an abnormal weighing; The preset intrusion conditions include: triggering the tripwire intrusion rule twice, the directions of the two triggers being inconsistent, and the transport device placing the item to be weighed on the weighing platform between the two triggers.
2. The weighing anomaly determination method according to claim 1, characterized in that Determine that the transport device places the item to be weighed on the weighing platform between the two triggers in the following manner: Obtain the first moment when the tripwire intrusion rule is triggered for the first time and the second moment when the tripwire intrusion rule is triggered for the second time; Determine the first time period according to the first moment and the second moment; Obtain a monitoring video segment, where the monitoring video segment is the video segment of the monitoring video within the first time period; Identify the moving targets in the monitoring video segment; If the number of the moving targets meets the first preset condition, and the moving targets are the transport device and / or the item to be weighed, it is determined that the transport device places the item to be weighed on the weighing platform between the two triggers.
3. The weighing anomaly determination method according to claim 2, characterized in that The first preset condition is that the number of the moving targets increases from one to two, and after the second time period, the number of the moving targets decreases from two to one, where the second time period is less than the first time period.
4. The weighing anomaly determination method according to claim 1, characterized in that The method further includes: If the tripwire intrusion situation does not meet the preset intrusion conditions, determine whether the transport device places the item to be weighed on the weighing platform; If so, obtain the distance between the transport device and the weighing platform in the image coordinate system, and determine whether the weighing is abnormal according to the distance between the transport device and the weighing platform.
5. The method for determining abnormal weighing according to claim 1, characterized in that The setting of the tripwire intrusion rule includes: Preset the first rule line in the image coordinate system within the first preset range above the weighing platform.
6. The weighing anomaly determination method according to claim 5, wherein The method further includes: Preset the second rule line in the image coordinate system within the second preset range above the weighing platform, where the distance between the first rule line and the weighing platform in the image coordinate system is greater than the distance between the second rule line and the weighing platform; Detect the tripwire intrusion situation in the weighing scenario; If the tripwire intrusion situation does not meet the preset intrusion conditions, determine whether the transport device places the item to be weighed on the weighing platform; If so, if there is an intersection point between the transport device and the second rule line in the image coordinate system, it is determined that there is an abnormal weighing.
7. The weighing anomaly determination method according to claim 6, characterized in that The preset directions of the first rule line and the second rule line are parallel, and the preset direction of the first rule line is parallel to the plane of the weighing platform.
8. A weighing anomaly determination device, characterized in that Including: An acquisition module for obtaining a monitoring video for the weighing scenario; A rule setting module for setting a tripwire intrusion rule; A detection module for detecting the tripwire intrusion situation in the weighing scenario, and if the tripwire intrusion situation does not meet the preset intrusion conditions, it is determined that there is an abnormal weighing; The preset intrusion conditions include: triggering the tripwire intrusion rule twice, the directions of the two triggers being inconsistent, and the transport device placing the item to be weighed on the weighing platform between the two triggers.
9. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to run the computer program to execute the weighing anomaly determination method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Security monitoring method and system based on infrared and face recognition technologies
CN104394359A
Wagon balance human body intrusion detection method based on Mask Rcnn and SSD
CN112861631A
Anti-cheating weighing system and method
CN113340390A