Method, apparatus, electronic device, and storage medium for monitoring an image acquisition device
A method, an apparatus, an electronic device, and a storage medium for monitoring an image acquisition device are provided, which are related to a field of computer vision technology. The method for monitoring the image acquisition device includes: determining a stop position of each target vehicle from a first video image acquired by the image acquisition device; determining a marking line in the first video image according to the stop positions of their respective target vehicles, and determining a deviation amount of the marking line in the first video image from a reference making line, and determining that the image acquisition device has deviated in a case that the deviation amount reaches a predetermined condition. The workload of manual detection is reduced, and the accuracy of deviation amount monitoring is increased by comparing the marking line with the reference marking line.
1. A method for monitoring an image acquisition device, comprising: determining a stop position of each target vehicle from a first video image acquired by the image acquisition device; determining a marking line in the first video image according to the stop positions of their respective target vehicles, wherein the marking line comprises a stop line; and determining a deviation amount of the marking line in the first video image from a reference marking line, and determining that the image acquisition device has deviated in a case that the deviation amount reaches a predetermined condition, wherein the target vehicle is determined by: identifying each vehicle existed in each static image of the first video image to obtain a travelling trajectory of each vehicle; determining the vehicle that has experienced stopping during travelling, as a first vehicle, according to the travelling trajectory of each vehicle; and determining the first vehicle without another vehicle ahead within a predetermined range, as the target vehicle.
2. The method according to claim 1 , wherein the determining the vehicle that has experienced stopping during travelling, as the first vehicle, comprises:
obtaining a positional variation amount of each vehicle in each static image; and
determining the vehicle with the positional variation amount lower than a threshold, as the first vehicle.
3. The method according to claim 1 , wherein the determining the marking line in the first video image according to the stop positions of their respective target vehicles comprises:
performing a statistical analysis on coordinates of the stop positions of their respective target vehicles; and
determining the marking line in the first video image according to a result of the statistical analysis.
4. The method according to claim 1 , further comprising:
adjusting the reference marking line according to the marking line in the first video image, in a case that the deviation amount does not reach the predetermined condition.
5. An apparatus for monitoring an image acquisition device, comprising: a processor and a memory for storing one or more computer programs executable by the processor, wherein when executing at least one of the computer programs, the processor is configured to perform operations comprising: determining a stop position of each target vehicle from a first video image acquired by the image acquisition device; determining a marking line in the first video image according to the stop positions of their respective target vehicles, wherein the marking line comprises a stop line; and determining a deviation amount of the marking line in the first video image from a reference marking line, and determine that the image acquisition device has deviated in a case that the deviation amount reaches a predetermined condition, wherein the target vehicle is determined by: identifying each vehicle existed in each static image of the first video image to obtain a travelling trajectory of each vehicle; determining the vehicle that has experienced stopping during travelling, as a first vehicle, according to the travelling trajectory of each vehicle; and determining the first vehicle without another vehicle ahead within a predetermined range, as the target vehicle.
6. The apparatus according to claim 5 , wherein the determining the vehicle that has experienced stopping during travelling, as the first vehicle, comprises:
obtaining a positional variation amount of each vehicle in each static image, and determining the vehicle with the positional variation amount lower than a threshold, as the first vehicle.
7. The apparatus according to claim 5 , wherein the determining the marking line in the first video image according to the stop positions of their respective target vehicles comprises:
performing a statistical analysis on coordinates of the stop positions of their respective target vehicles; and
determining the marking line in the first video image according to a result of the statistical analysis.
8. The apparatus according to claim 5 , wherein when executing at least one of the computer programs, the processor is further configured to perform operations comprising:
adjusting the reference marking line according to the marking line in the first video image, in a case that the deviation amount does not reach the predetermined condition.
9. A non-transitory computer-readable storage medium having computer instructions stored therein, wherein the computer instructions, when executed by a computer, cause the computer to perform operations comprising: determining a stop position of each target vehicle from a first video image acquired by the image acquisition device; determining a marking line in the first video image according to the stop positions of their respective target vehicles, wherein the marking line comprises a stop line; and determining a deviation amount of the marking line in the first video image from a reference marking line, and determining that the image acquisition device has deviated in a case that the deviation amount reaches a predetermined condition, the target vehicle is determined by: identifying each vehicle existed in each static image of the first video image to obtain a travelling trajectory of each vehicle; determining the vehicle that has experienced stopping during travelling, as a first vehicle, according to the travelling trajectory of each vehicle; and determining the first vehicle without another vehicle ahead within a predetermined range, as the target vehicle.
10. The non-transitory computer-readable storage medium according to claim 9 , wherein the determining the vehicle that has experienced stopping during travelling, as the first vehicle, comprises:
obtaining a positional variation amount of each vehicle in each static image; and
determining the vehicle with the positional variation amount lower than a threshold, as the first vehicle.
11. The non-transitory computer-readable storage medium according to claim 9 , wherein the determining the marking line in the first video image according to the stop positions of their respective target vehicles comprises:
performing a statistical analysis on coordinates of the stop positions of their respective target vehicles; and
determining the marking line in the first video image according to a result of the statistical analysis.
12. The non-transitory computer-readable storage medium according to claim 9 , the computer instructions, when executed by a computer, cause the computer to further perform operations comprising:
adjusting the reference marking line according to the marking line in the first video image, in a case that the deviation amount does not reach the predetermined condition.