CN115776610B - Camera shooting control method and device for cargo monitoring of freight vehicle - Google Patents

Camera shooting control method and device for cargo monitoring of freight vehicle Download PDF

Info

Publication number
CN115776610B
CN115776610B CN202310093523.4A CN202310093523A CN115776610B CN 115776610 B CN115776610 B CN 115776610B CN 202310093523 A CN202310093523 A CN 202310093523A CN 115776610 B CN115776610 B CN 115776610B
Authority
CN
China
Prior art keywords
image
state
cargo
current
camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310093523.4A
Other languages
Chinese (zh)
Other versions
CN115776610A (en
Inventor
刘新峰
郭辉
赵峰
韩华明
岳增践
吴晶晶
苏旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xcmg Hanyun Technology Co ltd
XCMG Hanyun Technologies Co Ltd
Original Assignee
Beijing Xcmg Hanyun Technology Co ltd
XCMG Hanyun Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xcmg Hanyun Technology Co ltd, XCMG Hanyun Technologies Co Ltd filed Critical Beijing Xcmg Hanyun Technology Co ltd
Priority to CN202310093523.4A priority Critical patent/CN115776610B/en
Publication of CN115776610A publication Critical patent/CN115776610A/en
Application granted granted Critical
Publication of CN115776610B publication Critical patent/CN115776610B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a camera shooting control method and a camera shooting control device for cargo monitoring of a freight vehicle, wherein the method comprises the following steps: acquiring the current running condition of the freight vehicle at the current preset detection time point; determining the state of a camera mounted on the freight vehicle based on the current running condition of the freight vehicle and the historical running condition of the freight vehicle acquired at the last preset detection time point; if the state of the camera is a monitoring state, determining a shooting interval based on the current running condition of the freight vehicle, and controlling the camera to shoot and upload a cargo state image based on the shooting interval; and if the state of the camera is a reference updating state, performing single-time shooting based on the camera, uploading a current cargo image, and updating a reference cargo image based on the current cargo image. The invention improves the real-time performance and the accuracy of cargo monitoring.

Description

Camera shooting control method and device for cargo monitoring of freight vehicle
Technical Field
The invention relates to the technical field of camera control, in particular to a camera shooting control method and device for cargo monitoring of a freight vehicle.
Background
The conventional vehicle cargo transportation mode usually adopts a manual counting mode at two time points of before transportation and arrival to confirm whether the carried cargo is damaged or stolen during the transportation process. However, the above method cannot timely obtain information and feed back for all conditions in the transportation process. Therefore, the safety monitoring can be carried out on the goods of the freight vehicle in the transportation process in real time, and when the goods are stolen, the early warning can be effectively carried out in time while corresponding image data evidences are kept, so that the loss of the goods is avoided or reduced to the maximum extent.
The currently common cargo monitoring methods include two types: (1) Carrying out video monitoring on the carriage, transmitting real-time monitoring videos or images to a remote server for a server worker to analyze the monitoring videos or images and confirm the cargo state; (2) And setting a radio frequency tag for each cargo in the carriage, acquiring cargo information in real time, and uploading the cargo state to a remote server to confirm the cargo state. However, the method of monitoring the video of the car needs to transmit a large amount of video files or image files to the remote server through the network, and a certain transmission time is required to cause detection delay, and a large amount of network resources are consumed, so that severe transmission delay is caused at a geographical location with poor network conditions, and thus it is difficult to find the abnormal state of the goods in time, and the method of manually confirming the state of the goods is also subjectively influenced by mental states and the like, and omission is easily caused. In addition, the way of setting the rf tag for each cargo requires a large amount of hardware cost, which is difficult to put into practice in a scenario with many cargoes.
Disclosure of Invention
The invention provides a camera shooting control method and device for monitoring goods of a freight vehicle, which are used for solving the defects of untimely and inaccurate goods state detection in the prior art.
The invention provides a camera shooting control method for monitoring goods of a freight vehicle, which comprises the following steps:
acquiring the current driving condition of the freight vehicle at the current preset detection time point; wherein the current driving condition comprises a current driving speed, a current driving time and a current driving road section;
determining the state of a camera mounted on the freight vehicle based on the current running condition of the freight vehicle and the historical running condition of the freight vehicle acquired at the last preset detection time point; the state of the camera comprises a monitoring state, a reference updating state and a dormant state;
if the state of the camera is a monitoring state, determining a shooting interval based on the current running condition of the freight vehicle, and controlling the camera to shoot and upload a cargo state image based on the shooting interval;
if the state of the camera is a reference updating state, performing single shooting based on the camera and uploading a current cargo image, and updating a reference cargo image based on the current cargo image; the cargo state image and the reference cargo image are used for monitoring the state of the cargo carried by the freight vehicle.
According to the camera shooting control method for monitoring the goods of the freight vehicle, the method for determining the state of the camera installed on the freight vehicle based on the current running condition of the freight vehicle and the historical running condition of the freight vehicle acquired at the last preset detection time point specifically comprises the following steps:
determining whether the state of the camera is a monitoring state or not based on the current running condition of the freight vehicle;
if the state of the camera is not a monitoring state, determining the change degree of the running environment of the freight vehicle based on the current running time and the current running road section in the current running condition of the freight vehicle and the historical running time and the historical running road section in the historical running condition of the freight vehicle;
if the running environment change degree of the freight vehicle is greater than the environment change threshold value, determining that the state of the camera is a reference updating state;
and if the running environment change degree of the freight vehicle is smaller than or equal to the environment change threshold, determining that the state of the camera is a dormant state.
According to the camera shooting control method for cargo monitoring of the freight vehicle provided by the invention, whether the state of the camera is the monitoring state is determined based on the current running condition of the freight vehicle, and the method specifically comprises the following steps:
determining theft risk values corresponding to the current running speed, the current running time and the current running road section respectively based on the current running speed, the current running time and the current running road section; the lower the current running speed is, the higher the theft risk value corresponding to the current running speed is; the later the current running time is, the higher the theft risk value corresponding to the current running time is; the lower the pedestrian flow and/or the vehicle flow of the current driving road section is, the higher the theft risk value corresponding to the current driving road section is;
determining an overall risk value of the freight vehicle based on the current running speed, the current running time and the weight and theft risk value corresponding to the current running road section; the weights corresponding to the current running speed, the current running road section and the current running time are sequentially decreased;
and if the total risk value of the freight vehicle is greater than the preset risk value, determining that the state of the camera is a monitoring state.
According to the camera shooting control method for cargo monitoring of the freight vehicle provided by the invention, the shooting interval is determined based on the current running condition of the freight vehicle, and the method specifically comprises the following steps:
determining the shooting interval based on an overall risk value of the freight vehicle; wherein the higher the overall risk value of the freight vehicle, the smaller the shooting interval.
According to the camera shooting control method for cargo monitoring of the freight vehicle provided by the invention, the camera is controlled to shoot and upload the cargo state image based on the shooting interval, and then the method further comprises the following steps:
comparing the currently uploaded current cargo state image with the reference cargo image to obtain an image matching result, and determining the cargo state based on the image matching result;
if the cargo state is abnormal, triggering a buzzer alarm in the freight vehicle and/or pushing alarm information to a driver mobile device for alarming, and uploading the cargo state image and the reference cargo image together with alarm description information to a cloud platform;
and controlling the camera to upload the cargo state images of the shooting time in the built-in memory card and the current time point within a preset time interval to a local storage space.
According to the camera shooting control method for cargo monitoring of the freight vehicle provided by the invention, the currently uploaded current cargo state image is compared with the reference cargo image to obtain an image matching result, and the cargo state is determined based on the image matching result, specifically comprising the following steps:
respectively partitioning the current cargo state image and the reference cargo image based on the same image partitioning rule to obtain a plurality of current cargo state sub-images and a plurality of reference cargo sub-images;
if the environmental brightness uploaded by the camera together with the current cargo state image is lower than a brightness threshold, performing image enhancement on the multiple current cargo state sub-images and the multiple reference cargo sub-images in parallel, and replacing the corresponding current cargo state sub-images or the reference cargo sub-images based on the enhanced sub-images;
comparing the current cargo state sub-image and the reference cargo sub-image at the same position to obtain the image matching degree of the corresponding position; the image matching result comprises the image matching degree of each position; the current cargo state sub-image and the reference cargo sub-image at the same position are respectively at the same position in the current cargo state image and the reference cargo image;
determining the cargo state based on the first matching degree threshold value of each position and the image matching degree of each position; wherein the closer any position is to the edge of the image, the lower the first threshold of the degree of matching of said any position is; and if the image matching degree of any position is lower than the first matching degree threshold value of any position, determining that the cargo state is abnormal.
According to the camera shooting control method for monitoring the goods of the freight vehicle, provided by the invention, image enhancement is carried out on any sub-image, and the method specifically comprises the following steps:
decomposing any subgraph in an RGB color space to obtain channel images under an R channel, a G channel and a B channel;
performing image conversion on the channel images under the corresponding channels based on the image conversion vectors under the R channel, the G channel and the B channel respectively to obtain an enhanced image of each channel image;
fusing the enhanced images of each channel image in an RGB color space to obtain an enhanced sub-image corresponding to any sub-image;
wherein, the curve corresponding to the image conversion vector under any channel is a monotonically increasing concave curve; the image conversion vector under any channel is determined based on the following steps:
training an initial network based on the sample normal light ray diagram and the corresponding sample low-brightness diagram under any channel in combination with an image comparison network with fixed parameters to obtain a curve prediction network;
and predicting the channel image under any channel based on the curve prediction network to obtain an image conversion vector under any channel.
According to the camera shooting control method for cargo monitoring of freight vehicles provided by the invention, the channel image under any channel is predicted based on the curve prediction network to obtain the image conversion vector under any channel, and the method specifically comprises the following steps:
performing second derivative prediction on the channel image under any channel based on a second derivative prediction module in the curve prediction network to obtain a conversion negative second derivative corresponding to the channel image under any channel;
multiplying the conversion negative second-order derivative based on a preset matrix to obtain a conversion function corresponding to the conversion negative second-order derivative; the preset matrix is a product of a lower triangular matrix and an upper triangular matrix;
and carrying out standardization processing on the conversion function to obtain an image conversion vector under any channel.
According to the camera shooting control method for monitoring the goods of the freight vehicle, provided by the invention, the image enhancement is performed on the multiple current goods state sub-images and the multiple reference goods sub-images in parallel, and the camera shooting control method specifically comprises the following steps:
determining historical goods state sub-graphs with the image matching degree lower than a second matching degree threshold value of the corresponding position on the basis of the image matching degree between each historical goods state sub-graph in the historical goods state images shot by the camera at the moment and the reference goods sub-graph at the same position; the second matching degree threshold value of any position is larger than the first matching degree threshold value;
determining a first sub-graph to be enhanced in the plurality of current cargo state sub-graphs and a second sub-graph to be enhanced in the plurality of reference cargo sub-graphs based on the position of the historical cargo state sub-graph in the historical cargo state image, wherein the image matching degree is lower than a second matching degree threshold value of the corresponding position;
and carrying out image enhancement on the first sub-image to be enhanced and the second sub-image to be enhanced in parallel.
The invention also provides a camera shooting control device for monitoring goods of a freight vehicle, which comprises:
a driving condition acquisition unit for acquiring the current driving condition of the freight vehicle at the current preset detection time point; the current driving conditions comprise a current driving speed, a current driving time and a current driving road section;
the camera state determining unit is used for determining the state of a camera installed on the freight vehicle based on the current running condition of the freight vehicle and the historical running condition of the freight vehicle acquired at the last preset detection time point; the state of the camera comprises a monitoring state, a reference updating state and a dormant state;
the monitoring state control unit is used for determining a shooting interval based on the current running condition of the freight vehicle if the state of the camera is a monitoring state, controlling the camera to shoot and upload a cargo state image based on the shooting interval;
the reference updating state control unit is used for shooting and uploading a current cargo image once based on the camera if the state of the camera is the reference updating state, and updating the reference cargo image based on the current cargo image; the cargo state image and the reference cargo image are used for monitoring the state of the cargo carried by the freight vehicle.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the camera shooting control method for cargo monitoring of the freight vehicle.
The present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements the camera shooting control method for cargo monitoring of a cargo freight vehicle as described in any one of the above.
The invention also provides a computer program product comprising a computer program which, when executed by a processor, implements a camera shooting control method for cargo monitoring of a freight vehicle as described in any one of the above.
According to the camera shooting control method and device for cargo monitoring of the freight vehicle, the whole cargo monitoring process is executed in the local freight vehicle, so that the image transmission time between the camera and the control center is greatly reduced, and a foundation is provided for the real-time performance of cargo monitoring; considering that the local storage space and the computing resources of the freight vehicle are more limited than those of a remote server, in order to avoid untimely monitoring of goods due to insufficient storage space and computing resources, determining the goods theft risk through the current running condition of the freight vehicle and the historical running condition of the freight vehicle obtained at the last preset detection time point, placing a camera in a monitoring state when the goods theft risk is high, and controlling the camera to shoot, wherein the camera can confirm the goods state without frequent shooting and frequent image analysis when the goods theft risk is low; then, in order to further improve the real-time performance of cargo monitoring, the cargo state image and the reference cargo image are compared in an image comparison mode to monitor the state of the cargo, compared with other image analysis modes, such as target detection, target tracking and other technologies, the complexity is lower, the requirement on a computing unit is lower, and the computing efficiency is higher.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a camera shooting control method for cargo monitoring of a freight vehicle according to the present invention;
fig. 2 is a schematic flow chart of a camera state determination method provided by the present invention;
FIG. 3 is a schematic flow chart of a cargo state determination method provided by the present invention;
FIG. 4 is a flowchart illustrating an image transform vector prediction method according to the present invention;
FIG. 5 is a flow chart illustrating a method for selecting an image enhancement object according to the present invention;
FIG. 6 is a schematic structural diagram of a camera shooting control device for cargo monitoring of a freight vehicle according to the present invention;
fig. 7 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
Fig. 1 is a schematic flow chart of a camera shooting control method for cargo monitoring of a freight vehicle, which is provided by the present invention, and is applied to a control center local to the freight vehicle, as shown in fig. 1, the method includes:
step 110, acquiring the current running condition of the freight vehicle at the current preset detection time point; wherein the current driving condition comprises a current driving speed, a current driving time and a current driving road section;
step 120, determining the state of a camera mounted on the freight vehicle based on the current running condition of the freight vehicle and the historical running condition of the freight vehicle obtained at the last preset detection time point; the state of the camera comprises a monitoring state, a reference updating state and a dormant state;
step 130, if the state of the camera is a monitoring state, determining a shooting interval based on the current running condition of the freight vehicle, and controlling the camera to shoot and upload a cargo state image based on the shooting interval;
step 140, if the state of the camera is a reference updating state, performing single shooting based on the camera and uploading a current cargo image, and updating a reference cargo image based on the current cargo image; the cargo state image and the reference cargo image are used for monitoring the state of the cargo carried by the freight vehicle.
Specifically, the camera for monitoring the goods of the freight vehicle can be installed at a proper position of the carriage according to the actual carrying condition, and the camera is opened after the goods are loaded and the worker presses the theft prevention button. However, considering that intensive image shooting causes a large amount of storage space to be quickly occupied, more importantly, a large amount of monitoring images are difficult to automatically analyze images in time, and in order to improve the real-time performance of cargo monitoring and timely find and early warn when the cargo is abnormal, the embodiment of the invention monitors the current driving condition of the freight vehicle in real time in the vehicle transportation process to determine the current theft risk of the cargo, thereby further judging whether the camera needs to be controlled to enter the monitoring state. The control center may obtain the driving conditions of the freight vehicle at preset time intervals, for example, 5 minutes, 30 minutes, and the like, and the current driving conditions of the freight vehicle may include a current driving speed, a current driving time, and a current driving section. Here, the current travel speed and the current travel section may be acquired by the GPS module, and the current travel time may be acquired by the system clock.
The control center may determine a state of a camera mounted to the freight vehicle based on a current travel condition of the freight vehicle and a historical travel condition of the freight vehicle acquired at a previous preset detection time point. The state of the camera may include a monitoring state, a reference updating state and a sleep state. Here, the risk of theft of cargo carried by the freight vehicle at the current point in time can be confirmed from the current running condition of the freight vehicle. Wherein if the current driving speed is fast, for example greater than 20km/h, the risk of goods theft may be low; if the current driving time is daytime, such as two afternoons, the risk of goods theft may be low; if the current driving road section is a dense pedestrian flow road section, such as a city center road, the risk of goods theft may be low. If the cargo theft risk is lower or higher, the comprehensive analysis needs to be performed by combining the three factors, specifically, a risk coefficient (for example, a plurality of gears and risk coefficients corresponding to the gears are set for any factor, and the gear where the gear is located is determined according to the current numerical value of the factor so as to obtain a corresponding risk coefficient) may be determined according to the three factors (that is, the current running speed, the current running time, and the current running road section), the respective risk coefficients corresponding to the three factors are weighted based on the respective weights of the three factors, so as to obtain an overall risk coefficient, and the cargo theft risk is determined to be high or low based on the overall risk coefficient. Wherein the weight of the current driving speed may be the largest and the weight of the current driving section may be the smallest.
And if the fact that the risk of theft of the goods carried by the freight vehicle at the current time point is high is confirmed according to the current running conditions of the freight vehicle, the state of the camera can be determined to be a monitoring state. And if the goods carried by the freight vehicle at the current time point are confirmed to have low theft risk according to the current running condition of the freight vehicle, continuously judging whether the current running condition of the freight vehicle and the historical running condition of the freight vehicle obtained at the last preset detection time point have larger difference or not. If a large difference exists between the current driving condition of the freight vehicle and the historical driving condition, it indicates that the current driving environment of the freight vehicle has changed greatly relative to the last preset detection time point. Therefore, when there is a large difference between the current running condition and the historical running condition of the cargo vehicle, the camera may be determined to be in the reference update state, and when there is no large difference between the current running condition and the historical running condition of the cargo vehicle, the camera may be determined to be in the sleep state.
The shooting behavior of the camera can be controlled according to the state of the camera. And if the state of the camera is a monitoring state, determining a shooting interval based on the current running condition of the freight vehicle, and controlling the camera to shoot and upload a cargo state image based on the shooting interval. The shooting interval can be adjusted in real time according to the current running condition of the freight vehicle, the shooting interval can be adjusted to be smaller as the risk of goods theft is higher so as to carry out intensive monitoring and improve the accuracy of goods monitoring, and the shooting interval can be adjusted to be larger as the risk of goods theft is lower so as to reduce the image shooting frequency and the image analysis frequency and save system resources. And controlling the camera to shoot based on the current shooting interval, and uploading the shot goods state image to a local control center of the freight vehicle. Because the control center and the camera are located at the same place of the freight vehicle, the image transmission can be carried out through the local area network, so that the image transmission rate is greatly improved, and the negative influence on the real-time performance of cargo monitoring is avoided.
And if the state of the camera is the reference updating state, controlling the camera to carry out single-time shooting and upload the current cargo image, and updating the reference cargo image based on the current cargo image. The cargo state image uploaded by the camera in the monitoring state and the reference cargo image uploaded and updated in the reference updating state are used for monitoring the state of the cargo carried by the freight vehicle. Specifically, in consideration of the fact that the goods and the carriage are in a relatively static state under the condition of no touch by people in the transportation process, the difference between the images shot by the cameras in sequence in the normal state is small. Therefore, in order to improve the timeliness of cargo monitoring, the cargo state image and the reference cargo image can be subjected to image comparison, and therefore the cargo state is determined. If the cargo state image is greatly different from the reference cargo image, the cargo state can be determined to be abnormal and an alarm can be given. If the state of the camera is the dormant state, the camera does not need to shoot.
In conclusion, the whole cargo monitoring process is executed in the local freight vehicle, so that the image transmission time between the camera and the control center is greatly reduced, and a foundation is provided for the real-time performance of cargo monitoring; considering that the local storage space and the computing resources of the freight vehicle are more limited than those of a remote server, in order to avoid untimely monitoring of goods due to insufficient storage space and computing resources, determining the goods theft risk through the current running condition of the freight vehicle and the historical running condition of the freight vehicle obtained at the last preset detection time point, placing a camera in a monitoring state when the goods theft risk is high, and controlling the camera to shoot, wherein the camera can confirm the goods state without frequent shooting and frequent image analysis when the goods theft risk is low; then, in order to further improve the real-time performance of cargo monitoring, the cargo state image and the reference cargo image are compared in an image comparison mode to monitor the state of the cargo, compared with other image analysis modes, such as target detection, target tracking and other technologies, the complexity is lower, the requirement on a computing unit is lower, and the computing efficiency is higher.
Based on the foregoing embodiment, as shown in fig. 2, the determining a state of a camera mounted on the freight vehicle based on the current driving condition of the freight vehicle and the historical driving condition of the freight vehicle obtained at the previous preset detection time point specifically includes:
step 210, determining whether the state of the camera is a monitoring state or not based on the current running condition of the freight vehicle;
step 220, if the state of the camera is not a monitoring state, determining the variation degree of the running environment of the freight vehicle based on the current running time and the current running road section in the current running condition of the freight vehicle and the historical running time and the historical running road section in the historical running condition of the freight vehicle;
step 230, if the running environment change degree of the freight vehicle is greater than the environment change threshold, determining that the state of the camera is a reference update state;
step 240, if the running environment change degree of the freight vehicle is less than or equal to the environment change threshold, determining that the state of the camera is a dormant state.
Specifically, the current theft risk of the current cargo is judged according to the current running condition of the freight vehicle, so that whether the state of the camera is a monitoring state or not is determined. And if the state of the camera is determined not to be the monitoring state, determining the change degree of the running environment of the freight vehicle based on the current running time and the current running road section in the current running condition of the freight vehicle and the historical running time and the historical running road section in the historical running condition of the freight vehicle. The change of the driving time can cause the change of the ambient light, and the change of the ambient light can bring great interference to the image contrast, so when the ambient light is greatly changed, the driving environment of the freight vehicle can be considered to be greatly changed. In addition, in order to place all goods within the visual field of the camera, part of the background is usually shot under the shooting angle of the camera, and different types of driving road sections can cause the background shot by the camera to change dramatically, for example, the background of the road sections such as urban roads, high speed roads, river bridges, county roads, mountain roads and the like has great difference, when the image background changes dramatically, even if the goods do not change, the comparison result of the images is inconsistent, thereby causing false alarm. Therefore, the degree of change in the travel environment of the cargo vehicle can be determined in conjunction with the time difference between the current travel time and the historical travel time of the cargo vehicle, and the difference in the type of the link between the current travel link and the historical travel link.
If the running environment change degree of the freight vehicle is larger than the preset environment change threshold value, the running environment of the freight vehicle is indicated to be changed greatly, and the reference cargo image needs to be updated, so that the state of the camera can be determined to be a reference updating state; if the running environment change degree of the freight vehicle is smaller than or equal to the environment change threshold, the running environment of the freight vehicle is not changed greatly, and the reference cargo image does not need to be updated, so that the state of the camera can be determined to be a dormant state.
Based on any one of the embodiments, determining whether the state of the camera is the monitoring state based on the current running condition of the freight vehicle specifically includes:
determining theft risk values corresponding to the current running speed, the current running time and the current running road section respectively based on the current running speed, the current running time and the current running road section; the lower the current running speed is, the higher the theft risk value corresponding to the current running speed is; the later the current running time is, the higher the theft risk value corresponding to the current running time is; the lower the pedestrian flow and/or the vehicle flow of the current driving road section is, the higher the theft risk value corresponding to the current driving road section is;
determining an overall risk value of the freight vehicle based on the current running speed, the current running time and the weight and theft risk value corresponding to the current running road section; the weights corresponding to the current running speed, the current running road section and the current running time are sequentially decreased;
and if the total risk value of the freight vehicle is greater than a preset risk value, determining that the state of the camera is a monitoring state.
Specifically, the theft risk values corresponding to the current driving speed, the current driving time and the current driving road section may be determined according to the current driving speed, the current driving time and the current driving road section. The lower the current running speed is, the higher the theft risk value corresponding to the current running speed is, for example, the current running speed is lower, for example, 10km/h, the theft risk of goods may be higher; the later the current running time is, for example, three points in the morning, the higher the theft risk value corresponding to the current running time is; the lower the pedestrian volume and/or the traffic volume of the current driving road section, such as a county road or a mountain road, the higher the theft risk value corresponding to the current driving road section. And then, weighting the theft risk values corresponding to the current running speed, the current running time and the current running road section based on the weights corresponding to the current running speed, the current running time and the current running road section to obtain the total risk value of the freight vehicle. Here, the weights corresponding to the current travel speed, the current travel link, and the current travel time are sequentially decreased. If the total risk value of the freight vehicle is greater than the preset risk value, the state of the camera can be determined to be a monitoring state.
Based on any one of the embodiments, the determining a shooting interval based on the current running condition of the freight vehicle specifically includes:
determining the shooting interval based on an overall risk value of the freight vehicle; wherein the higher the overall risk value of the freight vehicle, the smaller the shooting interval.
Specifically, the shooting interval can be adjusted in real time according to the current running condition of the freight vehicle, the shooting interval can be adjusted to be smaller as the risk of goods theft is higher so as to carry out intensive monitoring and improve the accuracy of goods monitoring, and the shooting interval can be adjusted to be larger as the risk of goods theft is lower so as to reduce the image shooting frequency and the image analysis frequency and save system resources. Thus, the current photographing interval may be determined based on the overall risk value of the freight vehicle, the higher the overall risk value of the freight vehicle, the smaller the current photographing interval.
Based on any one of the above embodiments, the control of the camera to shoot and upload the cargo state image based on the shooting interval further comprises:
comparing the currently uploaded current cargo state image with the reference cargo image to obtain an image matching result, and determining the cargo state based on the image matching result;
if the cargo state is abnormal, triggering a buzzer alarm in the freight vehicle and/or pushing alarm information to a driver mobile device for alarming, and uploading the cargo state image and the reference cargo image together with alarm description information to a cloud platform;
and controlling the camera to upload the cargo state images of the shooting time in the built-in memory card and the current time point within a preset time interval to a local storage space.
Specifically, after receiving a current cargo state image uploaded currently by the camera, the control center compares the current cargo state image with a reference cargo image to obtain an image matching result, and determines the cargo state based on the image matching result. And if the image matching result shows that the current cargo state image and the reference cargo image have larger difference, determining that the cargo state is abnormal. If the goods state is abnormal, a buzzer alarm in the freight vehicle is triggered and/or alarm information is pushed to the mobile device of the driver to give an alarm, the goods state image and the reference goods image are uploaded to the cloud platform together with alarm description information, and meanwhile, the camera is controlled to upload the goods state image, which is shot in a storage card arranged in the camera and is within a preset time interval (for example, 5 minutes) from the current time point, to a local storage space for storage.
Based on any of the above embodiments, as shown in fig. 3, the image comparison is performed on the currently uploaded current cargo state image and the reference cargo image to obtain an image matching result, and the cargo state is determined based on the image matching result, which specifically includes:
step 310, respectively blocking the current cargo state image and the reference cargo image based on the same image blocking rule to obtain a plurality of current cargo state sub-images and a plurality of reference cargo sub-images;
step 320, if the environmental brightness uploaded by the camera together with the current cargo state image is lower than a brightness threshold, performing image enhancement on the multiple current cargo state sub-images and the multiple reference cargo sub-images in parallel, and replacing the corresponding current cargo state sub-images or the reference cargo sub-images based on the enhanced sub-images;
step 330, comparing the current cargo state sub-image and the reference cargo sub-image at the same position to obtain the image matching degree of the corresponding position; the image matching result comprises the image matching degree of each position; the current cargo state sub-graph and the reference cargo sub-graph at the same position are respectively at the same position in the current cargo state image and the reference cargo image;
step 340, determining the cargo state based on the first matching degree threshold value of each position and the image matching degree of each position; wherein the closer any position is to the edge of the image, the lower the first threshold of the degree of matching of said any position is; and if the image matching degree of any position is lower than the first matching degree threshold value of any position, determining that the cargo state is abnormal.
Specifically, in order to further improve the real-time performance of cargo monitoring, when image comparison is performed on the current cargo state image and the reference cargo image, a blocking mode may be adopted for parallel processing. The current cargo state image and the reference cargo image can be respectively partitioned by adopting the same image partitioning rule, so that a plurality of current cargo state sub-images and a plurality of reference cargo sub-images are obtained. Because the shooting visual angles and resolutions of the current cargo state image and the reference cargo image are the same (the shooting angle and shooting parameters of the camera are kept unchanged in the transportation process), after the image blocking rules are adopted for blocking, the current cargo state sub-image and the reference cargo sub-image at the same position are corresponding, and under the condition that the cargo is normal, the cargo in the current cargo state sub-image and the cargo in the reference cargo sub-image at the same position are consistent.
The camera can also upload the currently detected ambient brightness together when uploading the current cargo state image. If the environmental brightness uploaded by the camera together with the current cargo state image is lower than the brightness threshold, the current environmental brightness is low, and the brightness of the shot current cargo state image and the shot reference cargo image is low. And the image with lower brightness introduces more noise and blurs the detail of the goods in the image, and the accuracy of the subsequent image comparison is reduced, so that the image enhancement can be performed on a plurality of current goods state sub-images and a plurality of reference goods sub-images in parallel, and the corresponding current goods state sub-images or reference goods sub-images are replaced based on the enhanced sub-images. And then, comparing the current cargo state subgraph at the same position (namely the position of the subgraph in the original image before the partitioning) with the reference cargo subgraph to obtain the image matching degree of the corresponding position. The higher the image matching degree is, the smaller the difference between the corresponding sub-images is, the image matching result between the current cargo state image and the reference cargo image comprises the image matching degree of each position, and the positions of the current cargo state sub-image and the reference cargo sub-image at the same position in the current cargo state image and the reference cargo image are the same. When the current cargo state sub-image and the reference cargo sub-image at the same position are subjected to image comparison, a Hash algorithm can be adopted, so that the image comparison efficiency is further improved.
And determining the cargo state based on the first matching degree threshold value of each position and the image matching degree of each position. If the image matching degree of any position is smaller than the first matching degree threshold value of the position, the cargo state can be determined to be abnormal. Here, considering that the background captured by the camera may change with time, in order to improve the accuracy of cargo monitoring, it is necessary to reduce the influence of the background change on cargo state determination as much as possible. Therefore, the embodiment of the present invention determines different first matching degree thresholds based on different image positions, where the closer any position is to the edge of the image, the higher the background proportion contained in the current cargo state sub-image and the reference cargo sub-image of the position is, the greater the influence of the change of the background region on the image matching degree of the position is, and therefore, the lower the first matching degree threshold of the position can be set, so as to avoid that the cargo state is mistakenly considered to be abnormal due to the change of the background region.
Based on any of the above embodiments, performing image enhancement on any sub-image specifically includes:
decomposing any subgraph in an RGB color space to obtain channel images under an R channel, a G channel and a B channel;
respectively carrying out image conversion on channel images under corresponding channels based on image conversion vectors under an R channel, a G channel and a B channel to obtain enhanced images of the channel images;
fusing the enhanced images of each channel image in an RGB color space to obtain an enhanced sub-image corresponding to any sub-image;
the curve corresponding to the image conversion vector under any channel is a monotonically increasing concave curve; the image conversion vector under any channel is determined based on the following steps:
training an initial network based on the sample normal light ray diagram and the sample low-brightness diagram corresponding to the sample normal light ray diagram under any channel in combination with an image comparison network with fixed parameters to obtain a curve prediction network;
and predicting the channel image under any channel based on the curve prediction network to obtain an image conversion vector under any channel.
Specifically, when any subgraph (a current cargo state subgraph or a reference cargo subgraph) is subjected to image enhancement, the subgraph is decomposed in an RGB color space to obtain channel images under an R channel, a G channel and a B channel, and the channel images under all the channels are respectively processed. And then the enhanced images of the channel images are fused in an RGB color space, so that an enhanced sub-image corresponding to the sub-image can be obtained. Here, each channel corresponds to an image conversion vector, and is used to convert the channel image under the corresponding channel, so as to enhance the characteristics of the channel image under the corresponding channel, such as brightness and detail. When image conversion is performed on a channel image under any channel, a converted pixel value corresponding to any pixel in the channel image may be determined from an image conversion vector under the channel based on a pixel value p of the pixel, and specifically, a p +1 th element of the image conversion vector may be obtained as the converted pixel value corresponding to the pixel.
The curve corresponding to the image conversion vector under any channel is a monotonically increasing concave curve. In order to ensure the numerical range of the pixel values of the image pixels and maintain the sequence of the pixel values of the pixels, the curve corresponding to the image conversion vector under any channel is monotonically increased. In addition, since most camera response functions are concave (since human perception of brightness is more sensitive to relative differences between dark hues than between light hues), increasing illumination of irradiance results in a concave shift in intensity, it can be assumed that the curves corresponding to the image transformation vectors under each channel are concave. In order to automatically determine the image transformation vector under each channel, an initial network (a neural network, such as a convolutional neural network) may be trained based on a normal light ray diagram of a sample under each channel and a low-luminance diagram of the sample corresponding thereto, in combination with an image comparison network with fixed parameters, to obtain curve prediction networks corresponding to each channel, and then, the image of the channel under the corresponding channel may be predicted based on the curve prediction networks corresponding to each channel, to obtain the image transformation vector under each channel. When the initial network is trained to obtain the curve prediction network, the sample low-brightness image under any channel can be input into the initial network to obtain a predicted image conversion vector under the channel obtained by the initial network prediction, the sample low-brightness image is subjected to image enhancement based on the predicted image conversion vector to obtain a predicted enhanced image, the predicted enhanced image and a sample normal light ray diagram corresponding to the sample low-brightness image are compared based on the image comparison network to obtain a comparison result, and therefore parameters of the initial network are adjusted according to the difference between the real corresponding relation of the sample low-brightness image and the sample normal light ray diagram and the comparison result.
Because the collection of images with different brightness in the same scene (the content contained in the images is the same) is difficult, and the amount of samples is too small, which causes that the network training is difficult to learn enough knowledge to predict more accurate image conversion vectors, when the samples are collected, simulation can be performed on the basis of the normal light ray diagram of the samples, so as to generate the corresponding low-brightness image of the samples. Taking any normal light images, linearizing the normal light images through a randomly selected inverse camera response function, multiplying the linearized images by a randomly selected weight value to darken the linearized images, simulating a real low-light image by adding a random lens and reading noise, and converting the low-light image through another randomly selected camera response function to obtain a low-brightness image corresponding to the normal light image. And decomposing the normal light image and the low-brightness image thereof in an RGB color space to obtain a sample normal light ray diagram and a sample low-brightness diagram corresponding to the sample normal light ray diagram under each channel.
Based on any of the above embodiments, as shown in fig. 4, the predicting, based on the curve prediction network, the channel image under any channel to obtain the image transformation vector under any channel specifically includes:
step 410, based on a second derivative prediction module in the curve prediction network, performing second derivative prediction on the channel image under any channel to obtain a conversion negative second derivative corresponding to the channel image under any channel;
step 420, multiplying the conversion negative second-order derivative by a preset matrix to obtain a conversion function corresponding to the conversion negative second-order derivative; the preset matrix is a product of a lower triangular matrix and an upper triangular matrix;
and 430, performing standardization processing on the conversion function to obtain an image conversion vector under any channel.
Specifically, when the curve prediction network predicts the channel image in any channel, the image transformation vector in the channel is not directly predicted, because it is difficult to ensure that the curve corresponding to the image transformation vector is a monotonically increasing concave curve by directly predicting the image transformation vector. Therefore, the curve prediction network can firstly use the second derivative prediction module therein to predict the second derivative of the channel image under the channel to obtain the conversion negative second derivative corresponding to the channel image under the channel
Figure SMS_1
. Wherein a switched negative second derivative ^ is guaranteed to be output by setting the last layer of the second derivative prediction module to the RELU layer>
Figure SMS_2
Greater than or equal to 0, so as to ensure that the curve corresponding to the image conversion vector obtained by the subsequent conversion is concave.
Then, based on the preset matrix and the negative second derivative of the transformation
Figure SMS_3
And multiplying to obtain a conversion function c corresponding to the negative second derivative. The preset matrix is a product of a lower triangular matrix A and an upper triangular matrix B. Here, by converting the negative second derivative->
Figure SMS_4
Multiplied by the lower triangular matrix A (` or `)>
Figure SMS_5
) Realizing discrete integration to obtain the converted negative second derivative->
Figure SMS_6
Corresponding first derivative->
Figure SMS_7
This action can ensure that->
Figure SMS_8
Greater than or equal toAt 0, it is ensured that the curve corresponding to the image transformation vector obtained by the subsequent transformation is monotonically increasing. The first derivative is multiplied by an upper triangular matrix B (@)>
Figure SMS_9
) Thus, the conversion function (i.e. the original function) corresponding to the negative second derivative can be restored. And finally, carrying out standardization processing on the conversion function, and dividing the value of each discrete point in the conversion function by the maximum value to obtain an image conversion vector under the channel.
Based on any of the above embodiments, as shown in fig. 5, the performing image enhancement on the multiple current cargo state sub-images and the multiple reference cargo sub-images in parallel specifically includes:
step 510, determining historical goods state sub-graphs with the image matching degree lower than a second matching degree threshold value of a corresponding position based on the image matching degree between each historical goods state sub-graph in the historical goods state images shot by the camera at the previous moment and a reference goods sub-graph at the same position; the second matching degree threshold value of any position is larger than the first matching degree threshold value;
step 520, determining a first sub-graph to be enhanced in the plurality of current cargo state sub-graphs and a second sub-graph to be enhanced in the plurality of reference cargo sub-graphs based on the positions of the historical cargo state sub-graphs in the historical cargo state image, wherein the image matching degree of the historical cargo state sub-graphs is lower than a second matching degree threshold value of the corresponding positions;
step 530, performing image enhancement on the first sub-image to be enhanced and the second sub-image to be enhanced in parallel.
In particular, since the image enhancement consumes part of the time additionally, in order to minimize the additional time cost introduced by the image enhancement under the condition of low ambient brightness so as to ensure the real-time performance of cargo monitoring, part of the current cargo state subgraph and the reference cargo subgraph can be selectively enhanced. For this, the historical cargo state sub-graphs with the image matching degrees lower than the second matching degree threshold value of the corresponding positions can be determined based on the image matching degrees between each historical cargo state sub-graph in the historical cargo state image shot by the camera in the monitoring state at the last moment and the reference cargo sub-graph at the same position. And the second matching degree threshold value of any position is larger than the first matching degree threshold value. By setting the second matching degree threshold value of each position to be larger than the first matching degree threshold value, positions with certain differences (even if the differences are small) can be screened out to be used as objects to be enhanced, and the current cargo state sub-image of the position is enhanced and then is continuously compared, so that whether the current cargo state sub-image of the position has larger differences with the reference cargo sub-image or not is determined, detection is not omitted, and real-time performance and accuracy of cargo monitoring are both considered.
And then, based on the position of the historical goods state sub-image with the image matching degree lower than a second matching degree threshold value of the corresponding position in the historical goods state image, determining a first sub-image to be enhanced in the multiple current goods state sub-images and a second sub-image to be enhanced in the multiple reference goods sub-images, and then performing image enhancement on the first sub-image to be enhanced and the second sub-image to be enhanced in parallel. The position of the first sub-image to be enhanced in the current cargo state image, the position of the second sub-image to be enhanced in the reference cargo image and the position of the historical cargo state sub-image with the image matching degree lower than the second matching degree threshold value of the corresponding position in the historical cargo state image are the same.
The camera shooting control device for monitoring freight vehicles provided by the invention is described below, and the camera shooting control device for monitoring freight vehicles and the camera shooting control method for monitoring freight vehicles described above can be referred to correspondingly.
Based on any of the above embodiments, fig. 6 is a schematic structural diagram of a camera shooting control device for monitoring cargo of a freight vehicle, as shown in fig. 6, the device includes: a running condition acquisition unit 610, a camera state determination unit 620, a monitoring state control unit 630, and a reference update state control unit 640.
The driving condition obtaining unit 610 is configured to obtain a current driving condition of the freight vehicle at a current preset detection time point; the current driving conditions comprise a current driving speed, a current driving time and a current driving road section;
the camera state determination unit 620 is configured to determine a state of a camera mounted on the freight vehicle based on a current driving condition of the freight vehicle and a historical driving condition of the freight vehicle acquired at a previous preset detection time point; the state of the camera comprises a monitoring state, a reference updating state and a dormant state;
the monitoring state control unit 630 is configured to determine a shooting interval based on the current driving condition of the freight vehicle if the state of the camera is a monitoring state, and control the camera to shoot and upload a cargo state image based on the shooting interval;
the reference update state control unit 640 is configured to perform single shooting based on the camera and upload a current cargo image if the state of the camera is a reference update state, and update a reference cargo image based on the current cargo image; the cargo state image and the reference cargo image are used for monitoring the state of the cargo carried by the freight vehicle.
In the device provided by the embodiment of the invention, the whole cargo monitoring process is executed in the local freight vehicle, so that the image transmission time between the camera and the control center is greatly reduced, and a foundation is provided for the real-time cargo monitoring; considering that the local storage space and the computing resources of the freight vehicle are more limited than those of a remote server, in order to avoid untimely monitoring of goods due to insufficient storage space and computing resources, determining the goods theft risk through the current running condition of the freight vehicle and the historical running condition of the freight vehicle obtained at the last preset detection time point, placing a camera in a monitoring state when the goods theft risk is high, and controlling the camera to shoot, wherein the camera can confirm the goods state without frequent shooting and frequent image analysis when the goods theft risk is low; then, in order to further improve the real-time performance of cargo monitoring, the cargo state image and the reference cargo image are compared in an image comparison mode to monitor the state of the cargo, compared with other image analysis modes, such as target detection, target tracking and other technologies, the complexity is lower, the requirement on a computing unit is lower, and the computing efficiency is higher.
Based on any of the embodiments, the determining a state of a camera mounted on the freight vehicle based on the current driving condition of the freight vehicle and the historical driving condition of the freight vehicle obtained at the previous preset detection time point specifically includes:
determining whether the state of the camera is a monitoring state or not based on the current running condition of the freight vehicle;
if the state of the camera is not a monitoring state, determining the variation degree of the running environment of the freight vehicle based on the current running time and the current running road section in the current running condition of the freight vehicle and the historical running time and the historical running road section in the historical running condition of the freight vehicle;
if the running environment change degree of the freight vehicle is greater than the environment change threshold value, determining that the state of the camera is a reference updating state;
and if the running environment change degree of the freight vehicle is smaller than or equal to the environment change threshold, determining that the state of the camera is a dormant state.
Based on any of the embodiments, the determining whether the state of the camera is the monitoring state based on the current driving condition of the freight vehicle specifically includes:
determining theft risk values corresponding to the current running speed, the current running time and the current running road section respectively based on the current running speed, the current running time and the current running road section; the lower the current running speed is, the higher the theft risk value corresponding to the current running speed is; the later the current running time is, the higher the theft risk value corresponding to the current running time is; the lower the pedestrian flow and/or the vehicle flow of the current driving road section is, the higher the theft risk value corresponding to the current driving road section is;
determining an overall risk value of the freight vehicle based on the current running speed, the current running time and the weight and theft risk value corresponding to the current running road section; the weights corresponding to the current running speed, the current running road section and the current running time are sequentially decreased;
and if the total risk value of the freight vehicle is greater than a preset risk value, determining that the state of the camera is a monitoring state.
Based on any embodiment of the foregoing, the determining a shooting interval based on the current driving condition of the freight vehicle specifically includes:
determining the shooting interval based on an overall risk value of the freight vehicle; wherein the higher the overall risk value of the freight vehicle, the smaller the shooting interval.
Based on any one of the above embodiments, the monitoring state control unit, after controlling the camera to shoot and upload the cargo state image based on the shooting interval, is further configured to:
comparing the currently uploaded current cargo state image with the reference cargo image to obtain an image matching result, and determining the cargo state based on the image matching result;
if the cargo state is abnormal, triggering a buzzer alarm in the freight vehicle and/or pushing alarm information to a driver mobile device for alarming, and uploading the cargo state image and the reference cargo image together with alarm description information to a cloud platform;
and controlling the camera to upload the cargo state images of the shooting time in the built-in memory card and the current time point within a preset time interval to a local storage space.
Based on any of the above embodiments, the image comparison of the currently uploaded current cargo state image and the reference cargo image is performed to obtain an image matching result, and the cargo state is determined based on the image matching result, which specifically includes:
respectively blocking the current cargo state image and the reference cargo image based on the same image blocking rule to obtain a plurality of current cargo state sub-images and a plurality of reference cargo sub-images;
if the environmental brightness uploaded by the camera together with the current cargo state image is lower than a brightness threshold, performing image enhancement on the multiple current cargo state sub-images and the multiple reference cargo sub-images in parallel, and replacing the corresponding current cargo state sub-images or the reference cargo sub-images based on the enhanced sub-images;
comparing the current cargo state sub-image and the reference cargo sub-image at the same position to obtain the image matching degree of the corresponding position; the image matching result comprises the image matching degree of each position; the current cargo state sub-graph and the reference cargo sub-graph at the same position are respectively at the same position in the current cargo state image and the reference cargo image;
determining the cargo state based on the first matching degree threshold value of each position and the image matching degree of each position; wherein the closer any position is to the edge of the image, the lower the first threshold of the degree of matching of said any position is; and if the image matching degree of any position is lower than the first matching degree threshold value of any position, determining that the cargo state is abnormal.
Based on any embodiment, the image enhancement on any sub-image specifically includes:
decomposing any subgraph in an RGB color space to obtain channel images under an R channel, a G channel and a B channel;
performing image conversion on the channel images under the corresponding channels based on the image conversion vectors under the R channel, the G channel and the B channel respectively to obtain an enhanced image of each channel image;
fusing the enhanced images of all the channel images in an RGB color space to obtain an enhanced subgraph corresponding to any subgraph;
the curve corresponding to the image conversion vector under any channel is a monotonically increasing concave curve; the image conversion vector under any channel is determined based on the following steps:
training an initial network based on the sample normal light ray diagram and the corresponding sample low-brightness diagram under any channel in combination with an image comparison network with fixed parameters to obtain a curve prediction network;
and predicting the channel image under any channel based on the curve prediction network to obtain an image conversion vector under any channel.
Based on any of the above embodiments, the predicting, based on the curve prediction network, the channel image in any channel to obtain the image transformation vector in any channel specifically includes:
performing second derivative prediction on the channel image under any channel based on a second derivative prediction module in the curve prediction network to obtain a conversion negative second derivative corresponding to the channel image under any channel;
multiplying the conversion negative second-order derivative based on a preset matrix to obtain a conversion function corresponding to the conversion negative second-order derivative; the preset matrix is a product of a lower triangular matrix and an upper triangular matrix;
and carrying out standardization processing on the conversion function to obtain an image conversion vector under any channel.
Based on any of the above embodiments, the performing image enhancement on the plurality of current cargo state sub-images and the plurality of reference cargo sub-images in parallel specifically includes:
determining the historical goods state sub-images with the image matching degrees lower than a second matching degree threshold value of the corresponding position based on the image matching degrees between each historical goods state sub-image in the historical goods state images shot by the camera at the previous moment and the reference goods sub-image at the same position; the second matching degree threshold value of any position is larger than the first matching degree threshold value;
determining a first sub-graph to be enhanced in the plurality of current cargo state sub-graphs and a second sub-graph to be enhanced in the plurality of reference cargo sub-graphs based on the position of the historical cargo state sub-graph in the historical cargo state image, wherein the image matching degree is lower than a second matching degree threshold value of the corresponding position;
and carrying out image enhancement on the first sub-image to be enhanced and the second sub-image to be enhanced in parallel.
Fig. 7 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 7, the electronic device may include: a processor (processor) 710, a memory (memory) 720, a communication interface (communication interface) 730, and a communication bus 740, wherein the processor 710, the memory 720, and the communication interface 730 communicate with each other via the communication bus 740. The processor 710 may invoke logic instructions in the memory 720 to perform a camera shot control method for cargo monitoring of a cargo shipment vehicle, the method comprising: acquiring the current running condition of the freight vehicle at the current preset detection time point; the current driving conditions comprise a current driving speed, a current driving time and a current driving road section; determining the state of a camera mounted on the freight vehicle based on the current running condition of the freight vehicle and the historical running condition of the freight vehicle acquired at the last preset detection time point; the state of the camera comprises a monitoring state, a reference updating state and a dormant state; if the state of the camera is a monitoring state, determining a shooting interval based on the current running condition of the freight vehicle, and controlling the camera to shoot and upload a cargo state image based on the shooting interval; if the state of the camera is a reference updating state, performing single shooting based on the camera and uploading a current cargo image, and updating a reference cargo image based on the current cargo image; the cargo state image and the reference cargo image are used for monitoring the state of the cargo carried by the freight vehicle.
Furthermore, the logic instructions in the memory 720 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which when executed by a computer, enable the computer to execute the camera shooting control method for cargo monitoring of a freight vehicle provided by the above methods, the method comprising: acquiring the current driving condition of the freight vehicle at the current preset detection time point; wherein the current driving condition comprises a current driving speed, a current driving time and a current driving road section; determining the state of a camera mounted on the freight vehicle based on the current running condition of the freight vehicle and the historical running condition of the freight vehicle acquired at the last preset detection time point; the state of the camera comprises a monitoring state, a reference updating state and a dormant state; if the state of the camera is a monitoring state, determining a shooting interval based on the current running condition of the freight vehicle, and controlling the camera to shoot and upload a cargo state image based on the shooting interval; if the state of the camera is a reference updating state, performing single-time shooting based on the camera and uploading a current cargo image, and updating a reference cargo image based on the current cargo image; the cargo state image and the reference cargo image are used for monitoring the state of the cargo carried by the freight vehicle.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program being implemented by a processor to execute the camera shooting control method for cargo monitoring of a freight vehicle provided in each of the above, the method comprising: acquiring the current running condition of the freight vehicle at the current preset detection time point; wherein the current driving condition comprises a current driving speed, a current driving time and a current driving road section; determining the state of a camera mounted on the freight vehicle based on the current driving condition of the freight vehicle and the historical driving condition of the freight vehicle acquired at the last preset detection time point; the state of the camera comprises a monitoring state, a reference updating state and a dormant state; if the state of the camera is a monitoring state, determining a shooting interval based on the current running condition of the freight vehicle, and controlling the camera to shoot and upload a cargo state image based on the shooting interval; if the state of the camera is a reference updating state, performing single shooting based on the camera and uploading a current cargo image, and updating a reference cargo image based on the current cargo image; the cargo state image and the reference cargo image are used for monitoring the state of the cargo carried by the freight vehicle.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A camera shooting control method for cargo monitoring of a freight vehicle is characterized by comprising the following steps:
acquiring the current running condition of the freight vehicle at the current preset detection time point; wherein the current driving condition includes a current driving speed, a current driving time, and a current driving section;
determining the state of a camera mounted on the freight vehicle based on the current driving condition of the freight vehicle and the historical driving condition of the freight vehicle acquired at the last preset detection time point; the state of the camera comprises a monitoring state, a reference updating state and a dormant state;
if the state of the camera is a monitoring state, determining a shooting interval based on the current running condition of the freight vehicle, and controlling the camera to shoot and upload a cargo state image based on the shooting interval;
if the state of the camera is a reference updating state, performing single shooting based on the camera and uploading a current cargo image, and updating a reference cargo image based on the current cargo image; the cargo state image and the reference cargo image are used for monitoring the state of the cargo carried by the freight vehicle.
2. The camera shooting control method for cargo monitoring of a freight vehicle according to claim 1, wherein the determining of the state of the camera mounted on the freight vehicle based on the current driving condition of the freight vehicle and the historical driving condition of the freight vehicle obtained at the last preset detection time point specifically comprises:
determining whether the state of the camera is a monitoring state or not based on the current running condition of the freight vehicle;
if the state of the camera is not a monitoring state, determining the change degree of the running environment of the freight vehicle based on the current running time and the current running road section in the current running condition of the freight vehicle and the historical running time and the historical running road section in the historical running condition of the freight vehicle;
if the running environment change degree of the freight vehicle is greater than the environment change threshold value, determining that the state of the camera is a reference update state;
and if the running environment change degree of the freight vehicle is smaller than or equal to the environment change threshold, determining that the state of the camera is a dormant state.
3. The camera shooting control method for cargo monitoring of a freight vehicle according to claim 2, wherein the determining whether the state of the camera is a monitoring state based on the current driving condition of the freight vehicle specifically includes:
determining theft risk values corresponding to the current running speed, the current running time and the current running road section respectively based on the current running speed, the current running time and the current running road section; the lower the current running speed is, the higher the theft risk value corresponding to the current running speed is; the later the current running time is, the higher the theft risk value corresponding to the current running time is; the lower the pedestrian flow and/or the vehicle flow of the current driving road section is, the higher the theft risk value corresponding to the current driving road section is;
determining an overall risk value of the freight vehicle based on the current running speed, the current running time and the weight and theft risk value corresponding to the current running road section; the weights corresponding to the current running speed, the current running road section and the current running time are sequentially decreased;
and if the total risk value of the freight vehicle is greater than a preset risk value, determining that the state of the camera is a monitoring state.
4. The camera shooting control method for cargo monitoring of a freight vehicle according to claim 3, wherein the determining of the shooting interval based on the current driving condition of the freight vehicle specifically comprises:
determining the shooting interval based on an overall risk value of the freight vehicle; wherein the higher the overall risk value of the freight vehicle, the smaller the shooting interval.
5. The camera shooting control method for cargo monitoring of freight vehicles according to any one of claims 1 to 4, wherein the camera is controlled to shoot and upload cargo state images based on the shooting interval, and then further comprising:
comparing the currently uploaded current cargo state image with the reference cargo image to obtain an image matching result, and determining the cargo state based on the image matching result;
if the cargo state is abnormal, triggering a buzzer alarm in the freight vehicle and/or pushing alarm information to a driver mobile device for alarming, and uploading the cargo state image and the reference cargo image together with alarm description information to a cloud platform;
and controlling the camera to upload the cargo state images of the shooting time in the built-in memory card and the current time point within a preset time interval to a local storage space.
6. The camera shooting control method for cargo monitoring of a cargo freight vehicle according to claim 5, wherein the image comparison is performed between the currently uploaded current cargo state image and the reference cargo image to obtain an image matching result, and the cargo state is determined based on the image matching result, specifically comprising:
respectively partitioning the current cargo state image and the reference cargo image based on the same image partitioning rule to obtain a plurality of current cargo state sub-images and a plurality of reference cargo sub-images;
if the environmental brightness uploaded by the camera together with the current cargo state image is lower than a brightness threshold value, performing image enhancement on the multiple current cargo state sub-images and the multiple reference cargo sub-images in parallel, and replacing the corresponding current cargo state sub-images or the reference cargo sub-images based on the enhanced sub-images;
comparing the current cargo state sub-image and the reference cargo sub-image at the same position to obtain the image matching degree of the corresponding position; the image matching result comprises the image matching degree of each position; the current cargo state sub-image and the reference cargo sub-image at the same position are respectively at the same position in the current cargo state image and the reference cargo image;
determining the cargo state based on the first matching degree threshold value of each position and the image matching degree of each position; wherein the closer any position is to the edge of the image, the lower the first threshold of the degree of matching of said any position is; and if the image matching degree of any position is lower than the first matching degree threshold value of any position, determining that the cargo state is abnormal.
7. The camera shooting control method for cargo monitoring of a cargo transport vehicle according to claim 6, wherein the image enhancement of any sub-image specifically comprises:
decomposing any subgraph in an RGB color space to obtain channel images under an R channel, a G channel and a B channel;
respectively carrying out image conversion on channel images under corresponding channels based on image conversion vectors under an R channel, a G channel and a B channel to obtain enhanced images of the channel images;
fusing the enhanced images of each channel image in an RGB color space to obtain an enhanced sub-image corresponding to any sub-image;
wherein, the curve corresponding to the image conversion vector under any channel is a monotonically increasing concave curve; the image conversion vector under any channel is determined based on the following steps:
training an initial network based on the sample normal light ray diagram and the corresponding sample low-brightness diagram under any channel in combination with an image comparison network with fixed parameters to obtain a curve prediction network;
and predicting the channel image under any channel based on the curve prediction network to obtain an image conversion vector under any channel.
8. The camera shooting control method for monitoring freight vehicles and goods according to claim 7, wherein the predicting a channel image under any channel based on the curve prediction network to obtain an image transformation vector under any channel specifically includes:
performing second derivative prediction on the channel image under any channel based on a second derivative prediction module in the curve prediction network to obtain a conversion negative second derivative corresponding to the channel image under any channel;
multiplying the conversion negative second-order derivative based on a preset matrix to obtain a conversion function corresponding to the conversion negative second-order derivative; the preset matrix is a product of a lower triangular matrix and an upper triangular matrix;
and carrying out standardization processing on the conversion function to obtain an image conversion vector under any channel.
9. The camera shooting control method for cargo monitoring of a cargo transportation vehicle according to claim 6, wherein the image enhancement is performed on the plurality of current cargo state sub-images and the plurality of reference cargo sub-images in parallel, specifically comprising:
determining the historical goods state sub-images with the image matching degrees lower than a second matching degree threshold value of the corresponding position based on the image matching degrees between each historical goods state sub-image in the historical goods state images shot by the camera at the previous moment and the reference goods sub-image at the same position; the second matching degree threshold value of any position is larger than the first matching degree threshold value;
determining a first sub-graph to be enhanced in the plurality of current cargo state sub-graphs and a second sub-graph to be enhanced in the plurality of reference cargo sub-graphs based on the position of the historical cargo state sub-graph in the historical cargo state image, wherein the image matching degree is lower than a second matching degree threshold value of the corresponding position;
and carrying out image enhancement on the first sub-image to be enhanced and the second sub-image to be enhanced in parallel.
10. A camera capture control device for cargo monitoring of a freight vehicle, comprising:
a driving condition acquisition unit for acquiring the current driving condition of the freight vehicle at the current preset detection time point; wherein the current driving condition includes a current driving speed, a current driving time, and a current driving section;
the camera state determining unit is used for determining the state of a camera installed on the freight vehicle based on the current running condition of the freight vehicle and the historical running condition of the freight vehicle acquired at the last preset detection time point; the state of the camera comprises a monitoring state, a reference updating state and a dormant state;
the monitoring state control unit is used for determining a shooting interval based on the current running condition of the freight vehicle if the state of the camera is a monitoring state, and controlling the camera to shoot and upload a cargo state image based on the shooting interval;
the reference updating state control unit is used for shooting and uploading a current cargo image once based on the camera if the state of the camera is the reference updating state, and updating the reference cargo image based on the current cargo image; the cargo state image and the reference cargo image are used for monitoring the state of the cargo carried by the freight vehicle.
CN202310093523.4A 2023-02-10 2023-02-10 Camera shooting control method and device for cargo monitoring of freight vehicle Active CN115776610B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310093523.4A CN115776610B (en) 2023-02-10 2023-02-10 Camera shooting control method and device for cargo monitoring of freight vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310093523.4A CN115776610B (en) 2023-02-10 2023-02-10 Camera shooting control method and device for cargo monitoring of freight vehicle

Publications (2)

Publication Number Publication Date
CN115776610A CN115776610A (en) 2023-03-10
CN115776610B true CN115776610B (en) 2023-04-07

Family

ID=85393469

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310093523.4A Active CN115776610B (en) 2023-02-10 2023-02-10 Camera shooting control method and device for cargo monitoring of freight vehicle

Country Status (1)

Country Link
CN (1) CN115776610B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108973863A (en) * 2018-07-29 2018-12-11 合肥市智信汽车科技有限公司 A kind of transport vehicle carriage cargo real time monitoring apparatus and its application method
CN109270913A (en) * 2018-11-23 2019-01-25 深圳市富联芯微科技有限公司 A kind of monitor terminal and system for vehicle cargo transport
CN208953946U (en) * 2018-11-23 2019-06-07 深圳市富联芯微科技有限公司 A kind of monitor terminal and system for vehicle cargo transport
WO2019159519A1 (en) * 2018-02-13 2019-08-22 セイコーエプソン株式会社 Transportation vehicle travel control system and transportation vehicle travel control method
CN113361989A (en) * 2021-05-07 2021-09-07 深圳依时货拉拉科技有限公司 Cargo identification method, computer equipment and cargo monitoring system
CN115641033A (en) * 2022-10-27 2023-01-24 浪潮通用软件有限公司 Method, equipment and medium for monitoring vehicle transportation process

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019159519A1 (en) * 2018-02-13 2019-08-22 セイコーエプソン株式会社 Transportation vehicle travel control system and transportation vehicle travel control method
CN108973863A (en) * 2018-07-29 2018-12-11 合肥市智信汽车科技有限公司 A kind of transport vehicle carriage cargo real time monitoring apparatus and its application method
CN109270913A (en) * 2018-11-23 2019-01-25 深圳市富联芯微科技有限公司 A kind of monitor terminal and system for vehicle cargo transport
CN208953946U (en) * 2018-11-23 2019-06-07 深圳市富联芯微科技有限公司 A kind of monitor terminal and system for vehicle cargo transport
CN113361989A (en) * 2021-05-07 2021-09-07 深圳依时货拉拉科技有限公司 Cargo identification method, computer equipment and cargo monitoring system
CN115641033A (en) * 2022-10-27 2023-01-24 浪潮通用软件有限公司 Method, equipment and medium for monitoring vehicle transportation process

Also Published As

Publication number Publication date
CN115776610A (en) 2023-03-10

Similar Documents

Publication Publication Date Title
US20220245792A1 (en) Systems and methods for image quality detection
CN112417943A (en) Advanced Driver Assistance System (ADAS) operation with algorithmic skyline detection
WO2020131385A1 (en) Automated assessment of collision risk based on computer vision
US20160148383A1 (en) Estimating rainfall precipitation amounts by applying computer vision in cameras
US11436839B2 (en) Systems and methods of detecting moving obstacles
US10373316B2 (en) Images background subtraction for dynamic lighting scenarios
CN105554380A (en) Day and night switching method and day and night switching device
EP2447912B1 (en) Method and device for the detection of change in illumination for vision systems
WO2019127085A1 (en) Processing method, processing apparatus, control device and cloud server
CN111339808B (en) Vehicle collision probability prediction method, device, electronic equipment and storage medium
Lam et al. Real-time traffic status detection from on-line images using generic object detection system with deep learning
US11748664B1 (en) Systems for creating training data for determining vehicle following distance
CN115776610B (en) Camera shooting control method and device for cargo monitoring of freight vehicle
US20220171981A1 (en) Recognition of license plate numbers from bayer-domain image data
CN113221724A (en) Vehicle spray detection method and system
CN116363100A (en) Image quality evaluation method, device, equipment and storage medium
CN111553474A (en) Ship detection model training method and ship tracking method based on unmanned aerial vehicle video
Kumari et al. Artificial intelligent based smart system for safe mining during foggy weather
CN113283286B (en) Driver abnormal behavior detection method and device
CN114399671A (en) Target identification method and device
Pan et al. Adaptive ViBe background model for vehicle detection
US11625924B2 (en) Vehicle parking monitoring systems and methods
CN115762178B (en) Intelligent electronic police violation detection system and method
CN115866411B (en) Vehicle-mounted monitoring self-adaptive exposure method, device and equipment based on light correction
CN115861624B (en) Method, device, equipment and storage medium for detecting occlusion of camera

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant