A method for estimating loading and unloading distances, a terminal device, and a computer storage medium.

By acquiring segmentation prediction maps of monitoring images and calculating straight-line pixel distances, combined with smoothing filtering methods, the problems of accuracy and efficiency in loading and unloading distance assessment were solved, achieving real-time and accurate loading and unloading distance estimation, reducing logistics costs and improving operational efficiency.

CN114022833BActive Publication Date: 2025-10-28ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111104211.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-18
Publication Date
2025-10-28
Estimated Expiration
2041-09-18

AI Technical Summary

Technical Problem

In existing technologies, the assessment of loading and unloading distances relies on manual judgment or measuring equipment, which results in high costs, slow speed, and insufficient accuracy. It also fails to provide timely feedback and is greatly affected by external factors.

Method used

By acquiring the segmentation prediction map of the monitoring image, the ratio of the straight-line pixel distance and the loading/unloading pixel distance of the logistics vehicle in the world coordinate system is calculated. The loading/unloading distance is estimated in real time by combining the Holt two-parameter linear exponential smoothing method and the adaptive median moving average filtering method.

Benefits of technology

It enables real-time and accurate estimation of loading and unloading distances, improves estimation efficiency and accuracy, reduces labor costs, lowers logistics costs, and improves operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114022833B_ABST
    Figure CN114022833B_ABST
Patent Text Reader

Abstract

This application provides a method for estimating loading and unloading distance, a terminal device, and a computer storage medium. The method includes: acquiring a segmentation prediction map of a monitoring image; acquiring the straight-line pixel distance of the logistics vehicle on the segmentation prediction map; setting a loading and unloading pixel distance based on the segmentation prediction map; and estimating the loading and unloading distance corresponding to the monitoring image using the straight-line pixel distance and the loading and unloading pixel distance. Through the above method, the loading and unloading distance estimation method of this application can estimate the loading and unloading distance of the logistics vehicle in real time, effectively improving the estimation efficiency and accuracy of loading and unloading distance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method for estimating loading and unloading distance, a terminal device, and a computer storage medium. Background Technology

[0002] In the logistics field, loading and unloading distance generally refers to the distance from the total cargo inside the truck bed to the truck bed door. Loading and unloading distance can be divided into static loading and unloading distance and dynamic loading and unloading distance. Static loading and unloading distance refers to the distance when the cargo inside the truck bed is stationary, while dynamic loading and unloading distance refers to the real-time, dynamic distance of the truck bed during the loading and unloading process. Loading and unloading distance is a method for evaluating operational efficiency and can be used to reflect the working status of logistics transshipment points. Therefore, vehicles can be rationally scheduled based on loading and unloading distance to fully utilize vehicle resources, reduce logistics costs, and improve operational efficiency.

[0003] Current technologies typically assess loading and unloading distances for cargo compartments based on human judgment or by using measuring equipment. Human judgment methods result in delays in providing timely feedback to the management system, while measuring equipment requires separate platforms and devices and is susceptible to external influences, leading to inaccurate calculations. Both methods require significant manpower, resulting in high costs and slow measurement speeds. Summary of the Invention

[0004] This application provides a method for estimating loading and unloading distances, a terminal device, and a computer storage medium.

[0005] This application provides a method for estimating loading and unloading distance, the method comprising:

[0006] Obtain the segmentation prediction map of the surveillance image;

[0007] Obtain the straight-line pixel distance of the logistics vehicle compartment on the segmentation prediction map;

[0008] The loading and unloading pixel distance is set based on the segmentation prediction map;

[0009] The loading and unloading distance corresponding to the monitoring image is estimated using the straight-line pixel distance and the loading and unloading pixel distance.

[0010] The step of estimating the loading / unloading distance corresponding to the monitoring image using the straight-line pixel distance and the loading / unloading pixel distance includes:

[0011] Obtain the physical distance of the logistics vehicle in the world coordinate system;

[0012] Obtain the ratio of the straight-line pixel distance to the loading / unloading pixel distance;

[0013] The loading and unloading distance corresponding to the monitoring image is obtained by using the ratio and the physical distance.

[0014] The step of obtaining the loading and unloading distance corresponding to the monitoring image using the ratio and the physical distance includes:

[0015] When the ratio is less than or equal to a preset threshold, the loading and unloading distance corresponding to the monitoring image is obtained by using the physical distance according to the first loading and unloading distance estimation relationship;

[0016] When the ratio is greater than the preset threshold, the loading and unloading distance corresponding to the monitoring image is obtained by using the physical distance according to the second loading and unloading distance estimation relationship.

[0017] After estimating the loading and unloading distance corresponding to the monitored image, the loading and unloading distance estimation method further includes:

[0018] Acquire multiple consecutive frames of monitoring images and their corresponding loading and unloading distances;

[0019] Acquire the current monitoring image and a preset number of historical monitoring images preceding the current monitoring image in time sequence;

[0020] The dynamic loading and unloading distance of the current monitoring image is estimated by using the current loading and unloading distance of the current monitoring image and the historical loading and unloading distance of the preset number of historical monitoring images.

[0021] The step of obtaining the dynamic loading and unloading distance of the current monitoring image by utilizing the current loading and unloading distance of the current monitoring image and the historical loading and unloading distances of the preset number of historical monitoring images includes:

[0022] Remove the maximum and minimum values ​​from the current loading / unloading distance and the preset number of historical loading / unloading distances;

[0023] The average value of the remaining loading and unloading distance is determined as the dynamic loading and unloading distance of the current monitoring image.

[0024] The step of setting the loading and unloading pixel distance based on the segmentation prediction map includes:

[0025] Based on the segmentation prediction map, a first horizontal projection map of the pixels of the first preset label and a second horizontal projection map of the pixels of the second preset label are obtained.

[0026] Obtain the first coordinate position in the first horizontal projection image where the pixel value from top to bottom is greater than or equal to a preset pixel threshold;

[0027] Obtain the second coordinate position in the second horizontal projection image where the pixel value from top to bottom is greater than or equal to a preset pixel threshold;

[0028] The starting point coordinate position is dynamically calculated using the first coordinate position and the second coordinate position;

[0029] The coordinate position corresponding to the maximum pixel value in the second horizontal projection image is used as the dynamically calculated endpoint coordinate position;

[0030] The loading and unloading pixel distance is obtained based on the dynamically calculated starting point coordinate position and the dynamically calculated ending point coordinate position.

[0031] The step of obtaining the dynamic calculation starting point coordinate position using the first coordinate position and the second coordinate position includes:

[0032] Obtain the minimum coordinate position between the first coordinate position and the second coordinate position;

[0033] The minimum coordinate position is smoothed by using a preset exponential smoothing method to obtain a smoothed coordinate position;

[0034] The dynamic calculation starting point coordinate position is obtained based on the smoothed coordinate position;

[0035] The preset exponential smoothing method is Holt's two-parameter linear exponential smoothing method.

[0036] This application also provides a terminal device, the terminal device comprising:

[0037] The prediction module is used to obtain the segmentation prediction map of the surveillance image;

[0038] The distance module is used to obtain the straight-line pixel distance of the logistics vehicle compartment on the segmentation prediction map;

[0039] The distance module is used to set the loading and unloading pixel distance based on the segmentation prediction map;

[0040] An estimation module is used to estimate the loading and unloading distance corresponding to the monitoring image using the straight-line pixel distance and the loading and unloading pixel distance.

[0041] This application also provides another terminal device, the terminal device including a memory and a processor, wherein the memory is coupled to the processor;

[0042] The memory is used to store program data, and the processor is used to execute the program data to implement the loading and unloading distance estimation method described above.

[0043] This application also provides a computer storage medium for storing program data, which, when executed by a processor, is used to implement the above-described loading and unloading distance estimation method.

[0044] The beneficial effects of this application are: the terminal device acquires a segmentation prediction map of the monitoring image; acquires the straight-line pixel distance of the logistics vehicle on the segmentation prediction map; sets the loading and unloading pixel distance based on the segmentation prediction map; and estimates the loading and unloading distance corresponding to the monitoring image using the straight-line pixel distance and the loading and unloading pixel distance. Through the above methods, the loading and unloading distance estimation method of this application can estimate the loading and unloading distance of the logistics vehicle in real time, effectively improving the estimation efficiency and accuracy of the loading and unloading distance. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0046] Figure 1 This is a flowchart illustrating an embodiment of the loading and unloading distance estimation method provided in this application;

[0047] Figure 2 This is a schematic diagram of the framework of the loading and unloading monitoring images provided in this application;

[0048] Figure 3 This is a flowchart illustrating an embodiment of the dynamic calculation starting point coordinate position estimation method provided in this application;

[0049] Figure 4 This application provides the dynamically calculated dividing line and horizontal projection. Figure 1 A schematic diagram of the embodiment;

[0050] Figure 5 This is a schematic diagram of another embodiment of the dynamically calculated dividing line and horizontal projection diagram provided in this application;

[0051] Figure 6 This is a schematic diagram of the structure of an embodiment of the terminal device provided in this application;

[0052] Figure 7 This is a schematic diagram of another embodiment of the terminal device provided in this application;

[0053] Figure 8 This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application. Detailed Implementation

[0054] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0055] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the loading and unloading distance estimation method provided in this application.

[0056] The loading and unloading distance estimation method of this application is applied to a terminal device, which can be a server or a system consisting of a server and electronic equipment working together. Accordingly, the various parts of the terminal device, such as units, subunits, modules, and submodules, can be all located in the server, or they can be located separately in the server and electronic equipment.

[0057] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed servers, or as a single software program or software module; no specific limitation is made here. In some possible implementations, the loading and unloading distance estimation method of this application embodiment can be implemented by a processor calling computer-readable instructions stored in memory.

[0058] Specifically, such as Figure 1 As shown, the loading and unloading distance estimation method of this application embodiment specifically includes the following steps:

[0059] Step S11: Obtain the segmentation prediction map of the monitoring image.

[0060] In this embodiment, the terminal device uses a monitoring camera installed on top of a factory or logistics truck to collect loading and unloading videos inside the logistics truck, and then extracts several monitoring images from the loading and unloading videos to analyze the loading and unloading distance inside the logistics truck compartment.

[0061] Specifically, the terminal equipment extracts surveillance images from the loading and unloading video, such as Figure 2As shown, if the size of the monitored image does not meet the preset size of the segmentation network model in this embodiment, the size of the monitored image is scaled down to the preset size. For example, the preset size can be set to 512×512, and the terminal device scales the monitored image to 512×512 to meet the size requirements of the segmentation network model. Furthermore, the terminal device can also divide the three RGB channels of the monitored image by 255 respectively to normalize the monitored image. This normalized data processing method is beneficial to the convergence of the segmentation network model and accelerates its segmentation efficiency.

[0062] Furthermore, the terminal device inputs the monitoring image into the segmentation network model to obtain the segmentation label for each pixel of the monitoring image, forming a segmentation prediction map.

[0063] During the segmentation network modeling process, staff need to fit and label the scene inside the carriage. The main segmentation labels include, but are not limited to: packages, carriage interior sidewalls, carriage interior ceiling, carriage interior floor, conveyor belts, logistics personnel, and others. After fitting and labeling, a labeled image of the same size as the original image is obtained. Figure 1 A training set is constructed using a one-to-one correspondence, and then the segmentation network model is trained using its loss function.

[0064] In practical applications, the terminal device sends the video frames from the monitoring video to the segmentation network model frame by frame, which can obtain a predicted map of the scene inside the carriage for each video frame. Each pixel in the predicted map is composed of different predicted labels.

[0065] Since the differences between the labels in the scene inside the carriage are relatively large, in order to enable the constructed segmentation network model to better learn the features of each label and thus achieve more accurate segmentation results, the embodiments of this application provide the following loss function:

[0066]

[0067] Where M is the number of labels in the segmentation network model, w c y represents the weight parameter for label c; c Let p be the label value of label c, where is a one-hot vector with label values ​​of only 0 and 1; c To predict the probability that a sample belongs to label c.

[0068] Wherein, the weight parameter w c The calculation method is as follows:

[0069]

[0070] Where N is the total number of pixels in the monitored image, N c The number of pixels for label c.

[0071] Step S12: Obtain the straight-line pixel distance of the logistics vehicle compartment on the segmentation prediction map.

[0072] In this embodiment of the application, in order to more accurately estimate the loading and unloading distance, the terminal device needs to configure a regular straight line in the unloading area of ​​the parking space in the world coordinate system, so that it is roughly consistent with the length of the car body.

[0073] Specifically, the terminal device acquires the physical distance L of the regular straight line in the world coordinate system, and the start and end points of the regular straight line in the image identified in the segmentation prediction map, and obtains the coordinates of the start and end points. Then, based on the coordinates of the start and end points, it calculates the line pixel distance LD of the regular straight line in the image coordinate system of the segmentation prediction map. The line pixel distance LD has a corresponding relationship with the physical distance L, representing the transformation relationship of the straight line in reality to the image.

[0074] In cases where the image coordinate systems of the monitoring image and the segmentation prediction image are inconsistent, a coordinate transformation between the two image coordinate systems is required. For example, the monitoring image may be in a 1024 image coordinate system, while the segmentation prediction image may be in a 512 image coordinate system. The terminal device obtains the start and end point coordinates of the regular straight line in the 1024 image coordinate system, calculates the coordinate conversion relationship between the 1024 and 512 image coordinate systems, and then uses this conversion relationship to map the start and end point coordinates in the 1024 image coordinate system to the start and end point coordinates in the 512 image coordinate system. Finally, the pixel distance LD of the straight line is calculated using the start and end point coordinates in the 512 image coordinate system.

[0075] Step S13: Set the loading and unloading pixel distance based on the segmentation prediction map.

[0076] In this embodiment, the terminal device obtains the pixel distribution of each tag in step S11, and can use the pixels of one or more tags to obtain the dynamically calculated starting coordinate position. This embodiment provides a method for obtaining the dynamically calculated starting coordinate position using the pixels of conveyor belt tags and the pixels of tags on the floor of the carriage; please refer to the following for details. Figure 3 , Figure 3 This is a flowchart illustrating an embodiment of the dynamic calculation starting point coordinate position estimation method provided in this application. In other embodiments, pixels from other tags can also be used to obtain the dynamic calculation starting point coordinate position, which will not be elaborated here.

[0077] Specifically, the dynamic calculation starting point coordinate position estimation method of this application includes the following steps:

[0078] Step S131: Obtain the first horizontal projection map of the pixels of the first preset label and the second horizontal projection map of the pixels of the second preset label based on the segmentation prediction map.

[0079] In this embodiment, the terminal device calculates the horizontal projection of the pixels of the conveyor belt label based on the segmentation prediction map to obtain a first horizontal projection map; it also calculates the horizontal projection of the pixels of the label on the floor of the carriage to obtain a second horizontal projection map. For details, please refer to [link to relevant documentation]. Figure 4 and Figure 5 .exist Figure 4 and Figure 5 In the image, the left image is the segmentation prediction map and its dynamically calculated segmentation lines, the middle image is the second horizontal projection map, and the right image is the first horizontal projection map.

[0080] Step S132: Obtain the first coordinate position in the first horizontal projection map where the pixel value from top to bottom is greater than or equal to the preset pixel threshold.

[0081] Step S133: Obtain the second coordinate position in the second horizontal projection map where the pixel value from top to bottom is greater than or equal to the preset pixel threshold.

[0082] In this embodiment, since logistics packages are generally transported from the doorway to the interior of the vehicle, the lower region in the segmentation prediction map is the doorway region, and the upper region is the interior region. Therefore, the terminal device obtains the first coordinate position and the second coordinate position, respectively, from top to bottom, of the first horizontal projection map and the second horizontal projection map, where the pixel value is greater than or equal to a preset pixel threshold. That is, it obtains the projection position where the first horizontal projection map and the second horizontal projection map first reach the preset pixel threshold.

[0083] Step S134: Use the first coordinate position and the second coordinate position to obtain the dynamic calculation starting point coordinate position.

[0084] In this embodiment, the terminal device may take the minimum coordinate position between the first coordinate position and the second coordinate position, and obtain the dynamic calculation starting point coordinate position according to the minimum coordinate position; the terminal device may also take the average coordinate position between the first coordinate position and the second coordinate position, and obtain the dynamic calculation starting point coordinate position according to the average coordinate position value; the terminal device may also take the maximum coordinate position between the first coordinate position and the second coordinate position, and obtain the dynamic calculation starting point coordinate position according to the maximum coordinate position.

[0085] Furthermore, taking the minimum coordinate position as an example, the terminal device can also use a preset exponential smoothing method to smooth the minimum coordinate position to obtain a smoothed coordinate position. Then, the dynamic calculation starting point coordinate position is obtained according to the smoothed coordinate position, which can effectively avoid the deviation of the loading and unloading distance value caused by the movement of goods and provide a basis for the calculation of dynamic loading and unloading distance.

[0086] The preset exponential smoothing method provided in this application embodiment is the Holt two-parameter linear exponential smoothing method. The specific expression of the Holt two-parameter linear exponential smoothing method is as follows:

[0087] S t =αC0+(1-α)(S t-1 +b t-1 )

[0088] b t =γ(S t -S t-1 )+(1-γ)b t-1

[0089] C h =S t +b t

[0090] Wherein, α and γ are smoothing parameters; in this embodiment, α can be 0.4 and γ can be 0.1; C0 is the minimum coordinate position value, C h S represents the smoothed coordinate position value. t and b t It is an intermediate variable.

[0091] Step S135: Use the coordinate position corresponding to the maximum pixel value in the second horizontal projection map as the coordinate position of the dynamically calculated endpoint.

[0092] In this embodiment, the terminal device calculates the maximum pixel value in the second horizontal projection map corresponding to the label on the bottom wall of the carriage as the dynamic calculation endpoint coordinate position.

[0093] Step S136: Based on the dynamically calculated starting point coordinate position and the dynamically calculated ending point coordinate position, obtain the loading and unloading pixel distance.

[0094] In this embodiment, the terminal device calculates D = end – start based on the difference between the dynamically calculated start coordinate position start and the dynamically calculated end coordinate position end, and uses this as the loading and unloading pixel distance D of the monitoring image.

[0095] Step S14: Estimate the loading and unloading distance corresponding to the monitoring image using the straight-line pixel distance and the loading and unloading pixel distance.

[0096] In this embodiment, the terminal device calculates the ratio between the loading / unloading pixel distance D and the straight-line pixel distance LD, denoted as r, and calculates the loading / unloading distance Dist using the loading / unloading distance estimation function.

[0097] Specifically, the expression for the loading and unloading distance estimation function provided in this application embodiment is as follows:

[0098]

[0099] Where L is the physical distance.

[0100] Furthermore, the terminal equipment can also use the adaptive median moving average filtering method to smooth the loading and unloading distance, compensate for the distance deviation caused by the movement of goods, and finally obtain the dynamic loading and unloading distance.

[0101] Specifically, the terminal device treats the N consecutively acquired loading and unloading distances as a queue, with a fixed length of N. Each time a new data point is calculated, it is placed at the tail of the queue according to the first-in, first-out (FIFO) principle, and the data point at the head of the queue is discarded. For the current monitoring image and its current loading and unloading distance, the terminal device places the current loading and unloading distance at the tail of the queue, then removes the maximum and minimum values ​​of the current loading and unloading distance in the queue, and finally performs an arithmetic average of the loading and unloading distances in the current queue to obtain the dynamic loading and unloading distance of the current monitoring image.

[0102] In practical applications, the terminal device sends the dynamic loading and unloading distance generated by the above process to the control server, so that the control server can record and further analyze the dynamic loading and unloading distance information, and provide a reference for reasonable vehicle scheduling.

[0103] Specifically, the control server uses the recorded dynamic loading and unloading distances to set thresholds based on demand, issues scheduling information, and rationally dispatches vehicles in order to make full use of vehicle resources, reduce logistics costs, and improve operational efficiency.

[0104] The terminal device in this embodiment combines semantic segmentation with a convolutional neural network to analyze loading and unloading videos of logistics trucks captured by cameras. It calculates dynamic coordinates using a horizontal projection algorithm and calculates the dynamic loading and unloading distance in real time using a filtering and smoothing algorithm and a loading and unloading distance estimation function. This device not only eliminates the need for complex calibration processes, reducing calculation errors caused by cargo movement, but also provides a clear and real-time display of the loading and unloading distance, sending this distance to a central server for recording and analysis. The loading and unloading distance estimation method in this embodiment helps to rationally schedule vehicles, fully utilize vehicle resources, reduce logistics costs, and improve operational efficiency.

[0105] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0106] To implement the loading and unloading distance estimation method of the above embodiments, this application also proposes a terminal device, which can be found in detail below. Figure 6 , Figure 6 This is a schematic diagram of the structure of an embodiment of the terminal device provided in this application.

[0107] like Figure 6As shown, the terminal device 400 provided in this application includes a prediction module 41, a distance module 42, and an estimation module 43.

[0108] The prediction module 41 is used to obtain the segmentation prediction map of the monitoring image.

[0109] The distance module 42 is used to obtain the straight-line pixel distance of the logistics vehicle on the segmentation prediction map; it is also used to set the loading and unloading pixel distance based on the segmentation prediction map.

[0110] The estimation module 43 is used to estimate the loading and unloading distance corresponding to the monitoring image using the straight-line pixel distance and the loading and unloading pixel distance.

[0111] To implement the loading and unloading distance estimation method of the above embodiments, this application also proposes another terminal device, please refer to [link to details]. Figure 7 , Figure 7 This is a schematic diagram of another embodiment of the terminal device provided in this application.

[0112] The terminal device 500 of this application embodiment includes a memory 51 and a processor 52, wherein the memory 51 and the processor 52 are coupled together.

[0113] The memory 51 is used to store program data, and the processor 52 is used to execute the program data to implement the loading and unloading distance estimation method described in the above embodiments.

[0114] In this embodiment, processor 52 can also be referred to as a CPU (Central Processing Unit). Processor 52 may be an integrated circuit chip with signal processing capabilities. Processor 52 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or processor 52 can be any conventional processor.

[0115] This application also provides a computer storage medium, such as Figure 8 As shown, the computer storage medium 600 is used to store program data 61. When the program data 61 is executed by the processor, it is used to implement the loading and unloading distance estimation method as described in the above embodiments.

[0116] This application also provides a computer program product, wherein the computer program product includes a computer program operable to cause a computer to perform the loading and unloading distance estimation method as described in the embodiments of this application. The computer program product may be a software installation package.

[0117] The loading and unloading distance estimation method described in the above embodiments of this application, when implemented as a software functional unit and sold or used as an independent product, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0118] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for estimating loading and unloading distance, characterized in that, The method for estimating loading and unloading distances includes: Obtain the segmentation prediction map of the surveillance image; Obtain the straight-line pixel distance of the logistics vehicle compartment on the segmentation prediction map; The loading and unloading pixel distance is set based on the segmentation prediction map; Using the straight-line pixel distance and the loading / unloading pixel distance, the loading / unloading distance corresponding to the monitoring image is estimated; The step of estimating the loading / unloading distance corresponding to the monitoring image using the straight-line pixel distance and the loading / unloading pixel distance includes: Obtain the physical distance of the logistics vehicle in the world coordinate system; Obtain the ratio of the straight-line pixel distance to the loading / unloading pixel distance; The loading and unloading distance corresponding to the monitoring image is obtained by using the ratio and the physical distance; The step of obtaining the loading and unloading distance corresponding to the monitoring image using the ratio and the physical distance includes: When the ratio is less than or equal to a preset threshold, the loading and unloading distance corresponding to the monitoring image is obtained by using the physical distance according to the first loading and unloading distance estimation relationship; When the ratio is greater than the preset threshold, the loading and unloading distance corresponding to the monitoring image is obtained by using the physical distance according to the second loading and unloading distance estimation relationship.

2. The loading and unloading distance estimation method according to claim 1, characterized in that, After estimating the loading and unloading distance corresponding to the monitoring image, the loading and unloading distance estimation method further includes: Acquire multiple consecutive frames of monitoring images and their corresponding loading and unloading distances; Acquire the current monitoring image and a preset number of historical monitoring images preceding the current monitoring image in time sequence; The dynamic loading and unloading distance of the current monitoring image is estimated by using the current loading and unloading distance of the current monitoring image and the historical loading and unloading distance of the preset number of historical monitoring images.

3. The loading and unloading distance estimation method according to claim 2, characterized in that, The step of estimating the dynamic loading and unloading distance of the current monitoring image using the current loading and unloading distance of the current monitoring image and the historical loading and unloading distances of the preset number of historical monitoring images includes: Remove the maximum and minimum values ​​from the current loading / unloading distance and the preset number of historical loading / unloading distances; The average value of the remaining loading and unloading distance is determined as the dynamic loading and unloading distance of the current monitoring image.

4. The loading and unloading distance estimation method according to claim 1, characterized in that, Setting the loading and unloading pixel distance based on the segmentation prediction map includes: Based on the segmentation prediction map, a first horizontal projection map of the pixels of the first preset label and a second horizontal projection map of the pixels of the second preset label are obtained. Obtain the first coordinate position in the first horizontal projection image where the pixel value from top to bottom is greater than or equal to a preset pixel threshold; Obtain the second coordinate position in the second horizontal projection image where the pixel value from top to bottom is greater than or equal to a preset pixel threshold; The starting point coordinate position for dynamic calculation is obtained using the first coordinate position and the second coordinate position; The coordinate position corresponding to the maximum pixel value in the second horizontal projection image is used as the dynamically calculated endpoint coordinate position; The loading and unloading pixel distance is obtained based on the dynamically calculated starting point coordinate position and the dynamically calculated ending point coordinate position.

5. The loading and unloading distance estimation method according to claim 4, characterized in that, The step of obtaining the dynamic calculation starting point coordinate position using the first coordinate position and the second coordinate position includes: Obtain the minimum coordinate position between the first coordinate position and the second coordinate position; The minimum coordinate position is smoothed by using a preset exponential smoothing method to obtain a smoothed coordinate position; The dynamic calculation starting point coordinate position is obtained based on the smoothed coordinate position; The preset exponential smoothing method is Holt's two-parameter linear exponential smoothing method.

6. A terminal device, characterized in that, The terminal device includes: The prediction module is used to obtain the segmentation prediction map of the surveillance image; The distance module is used to obtain the straight-line pixel distance of the logistics vehicle compartment on the segmentation prediction map; The distance module is used to set the loading and unloading pixel distance based on the segmentation prediction map; The estimation module is used to estimate the loading and unloading distance corresponding to the monitoring image using the straight-line pixel distance and the loading and unloading pixel distance; The estimation module is also used to obtain the physical distance of the logistics vehicle in the world coordinate system; obtain the ratio of the straight-line pixel distance to the loading and unloading pixel distance; and use the ratio and the physical distance to obtain the loading and unloading distance corresponding to the monitoring image. The estimation module is further configured to, when the ratio is less than or equal to a preset threshold, use the physical distance to obtain the loading and unloading distance corresponding to the monitoring image according to a first loading and unloading distance estimation relationship; and when the ratio is greater than the preset threshold, use the physical distance to obtain the loading and unloading distance corresponding to the monitoring image according to a second loading and unloading distance estimation relationship.

7. A terminal device, characterized in that, The terminal device includes a memory and a processor, wherein the memory is coupled to the processor; The memory is used to store program data, and the processor is used to execute the program data to implement the loading and unloading distance estimation method according to any one of claims 1-5.

8. A computer storage medium, characterized in that, The computer storage medium is used to store program data, which, when executed by a processor, is used to implement the loading and unloading distance estimation method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Method for extracting wheatear morphological parameters

    CN101944231A

  • Method for calibrating relation between actual road distance and corresponding pixel distance in traffic video

    CN102592282A