A monitoring method, system, electronic device and computer readable storage medium
By analyzing video image information in real time, identifying vehicle track points and judging the docking situation, the blockage problem caused by vehicle occupation of fire passages is solved, automatic detection and alarm of fire passages is realized, and fire operation efficiency is improved.
Patent Information
- Application Number
- CN202110666979.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-16
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-06-16
AI Technical Summary
Fire passages are blocked due to vehicle occupation, resulting in blockage of fire rescue. The existing monitoring methods are difficult to monitor and automatically detect whether the vehicle is parked in the fire passage in real time, and management is difficult and consumes a lot of manpower.
By obtaining the video image information taken by the imaging device in real time, identifying the vehicle trajectory points, calculating the trajectory points spacing, combining the time threshold to determine whether the vehicle is parked in the fire passage, and issuing a drive-off alarm and road occupation information to realize automatic detection and alarm.
Real-time monitoring and automatic detection of fire protection passages are realized, the fire protection passages are smooth, the manpower monitoring needs are reduced, and the fire protection operation efficiency is improved.
Smart Images

Figure CN113378728B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a monitoring method, system, electronic device and computer-readable storage medium. Background Art
[0002] Fire passages are passages for firefighters to rescue and for trapped people to evacuate. They play an important auxiliary role in quickly putting out fires, saving the lives and property of owners, and reducing fire losses. Therefore, fire passages are also called life passages. However, in recent years, fire rescue, which is racing against time, has been "blocked" again and again due to debris, private cars, etc. occupying fire passages, which has hindered rescue efforts and caused serious consequences. Fire passages are difficult to manage, as reflected in the fact that "cars are there but people are not". It is difficult for property management to monitor this information as soon as a vehicle enters the fire passage to park. It takes a lot of manpower to send people to guard it 24 hours a day, and the work intensity of the guards is high, making management difficult. Summary of the invention
[0003] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, the following specifically cites preferred implementation modes and describes them in detail with reference to the attached drawings.
[0004] The purpose of the present application includes providing a monitoring method, system, electronic device and computer-readable storage medium, which can monitor the monitoring area related to the fire passage in real time, detect the vehicle entering the monitoring area at the first time, and process the video image information of the acquired monitoring area to timely determine whether the vehicle is about to stop at the fire passage or has stopped at the fire passage.
[0005] The implementation method of the present application can be implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a monitoring method, comprising:
[0007] Acquire video image information of the monitoring area captured by an imaging device in real time. If a vehicle is identified to enter the monitoring area, intercept multiple frames of the video image information at intervals of a time threshold to obtain the trajectory points of the vehicle. The monitoring area includes a fire passage and the area around the fire passage;
[0008] According to the imaging size of the vehicle in each frame of the image, the focal length of the imaging device, the measurement distance and the pixel size, the distance between the vehicle and the imaging device in each frame of the image is calculated to obtain the spacing between adjacent track points, wherein the measurement distance represents the proportional relationship between the size in the image and the actual space size;
[0009] According to each of the track points, the time threshold, and the distance between the track points, it is determined whether the vehicle is parked at the fire passage or is about to park at the fire passage.
[0010] Optionally, the step of calculating the distance between the vehicle and the imaging device in each frame of image according to the imaging size of the vehicle in each frame of image, the focal length, the measurement distance and the pixel size of the imaging device to obtain the spacing between adjacent track points includes:
[0011] Identify and process each frame of the image to obtain the number of pixels of the vehicle in each frame of the image, wherein the number of pixels of the vehicle includes horizontal pixel point data and vertical pixel point data;
[0012] Obtaining the actual size of the vehicle according to the number of pixels of the vehicle in each frame of the image, and the focal length and / or the measurement distance of the imaging device;
[0013] Obtaining the actual distance between the vehicle and the imaging device in each frame of the image according to the actual size of the vehicle, the pixel size, and the focal length of the imaging device;
[0014] The spacing between adjacent track points is obtained according to the actual distances between two adjacent frames of images.
[0015] Optionally, the step of identifying and processing each frame of image to obtain the number of pixels of the vehicle in each frame of image includes:
[0016] The number of pixels of the vehicle is obtained based on a pixel number calculation method, and the pixel number calculation method is:
[0017]
[0018] in, Represents the vertical pixel position data of the vehicle in the t-th frame image, represents the horizontal pixel data of the vehicle in the t-th frame image, i represents the vehicle in the image, t represents the frame number of the image, and x li The horizontal coordinate of the first vertex of the circumscribed rectangle of the vehicle in the t-th frame image, y li represents the ordinate of the first vertex of the circumscribed rectangle of the vehicle in the t-th frame image, x oi The horizontal coordinate of the second vertex of the circumscribed rectangle of the vehicle in the t-th frame image, y oi The ordinate of the second vertex of the circumscribed rectangle of the vehicle in the t-th frame image is represented, wherein the first vertex and the second vertex are opposite vertices of the circumscribed rectangle.
[0019] Optionally, the step of obtaining the actual size of the vehicle according to the number of pixels of the vehicle in each frame of the image, and the focal length and / or the measurement distance of the imaging device includes:
[0020] Based on the actual size algorithm, the actual horizontal length and the actual vertical length of the vehicle are obtained, and the actual size algorithm includes:
[0021]
[0022] in, represents the actual vertical length of the vehicle in the t-th frame image, represents the actual horizontal length of the vehicle in the t-th frame image, k H represents the vertical measurement distance represented by a single pixel, k W represents the horizontal measurement distance represented by a single pixel, k H Indicates the measured distance, Represents the vertical pixel position data of the vehicle in the t-th frame image, Represents the horizontal pixel position data of the vehicle in the t-th frame image;
[0023] The actual size of the vehicle is obtained according to the actual horizontal length and the actual vertical length of the vehicle.
[0024] Optionally, the step of determining the actual distance between the vehicle and the imaging device in each frame of the image according to the actual size of the vehicle, the pixel size and the focal length of the imaging device comprises:
[0025] Based on the distance algorithm, the actual distance between the vehicle and the imaging device in each frame of the image is obtained. The distance algorithm is:
[0026]
[0027] Among them, S t represents the actual distance between the vehicle and the imaging device in the t-th frame image, f represents the focal length of the imaging device, and L t represents the actual size of the vehicle in the t-th frame image, and m represents the pixel size of the imaging device.
[0028] Optionally, the step of determining whether the vehicle is parked at or about to park at a fire passage according to each of the trajectory points, the time threshold, and the distance between the trajectory points includes:
[0029] According to the running track formed by each track point, determine whether the vehicle enters the fire passage;
[0030] If the vehicle enters the fire passage, the speed of the vehicle is obtained according to the distance between each track point and the time threshold, and whether the vehicle is in a deceleration state is determined according to the change in speed;
[0031] If the vehicle is in a decelerating state, the vehicle will be parked in the fire lane;
[0032] If the vehicle's speed is zero, the vehicle has stopped at the fire lane.
[0033] Optionally, the method further includes:
[0034] If a vehicle is parked in a fire lane or is about to park in a fire lane, an eviction alarm will be issued for the vehicle;
[0035] If the vehicle parked in the fire passage has not left, the vehicle occupying the lane information is sent to the client of the property staff;
[0036] If the vehicle parked in the fire passage has not left and the parking time exceeds the time threshold, the vehicle occupying the road information will be sent to the client of the property staff again.
[0037] In a second aspect, the present application provides a monitoring system, which adopts the following technical solution:
[0038] A monitoring system, applied to an imaging device, comprising:
[0039] An image acquisition module is used to acquire video image information of a monitoring area captured in real time by an imaging device. If a vehicle is identified to enter the monitoring area, multiple frames of the video image information are intercepted at intervals of a time threshold to obtain the trajectory points of the vehicle. The monitoring area includes a fire passage and the area surrounding the fire passage;
[0040] A data processing module, for calculating the distance between the vehicle and the imaging device in each frame of the image according to the imaging size of the vehicle in each frame of the image, the focal length of the imaging device, the measurement distance and the pixel size, so as to obtain the spacing between adjacent track points, wherein the measurement distance represents the proportional relationship between the size in the image and the actual space size;
[0041] The alarm processing module is used to determine whether the vehicle is parked in the fire passage or is about to park in the fire passage according to each of the trajectory points, the time threshold, and the distance between the trajectory points.
[0042] In a third aspect, the present application provides an electronic device, which adopts the following technical solution:
[0043] An electronic device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.
[0044] In a third aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:
[0045] A computer-readable storage medium includes a computer program. When the computer program is executed, the electronic device where the computer-readable storage medium is located is controlled to execute the method according to the first aspect.
[0046] The beneficial effects of the embodiments of the present application include, for example:
[0047] The monitoring method, monitoring system, electronic device and computer-readable storage medium provided in the embodiments of the present application can monitor the monitoring area related to the fire passage in real time, detect vehicles entering the monitoring area at the first time, and process the video image information of the acquired monitoring area to promptly determine whether the vehicle is about to stop at the fire passage or has stopped at the fire passage. It can automatically detect whether the fire passage will be or has been blocked by objects such as vehicles, realize automatic detection and alarm of fire passage blockage, and automatically alarm potential safety risks, thereby keeping the fire passage unobstructed to a certain extent, and thus helping to ensure the efficiency of firefighting operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solution of the present disclosure, the drawings required for use in the implementation mode will be briefly introduced below. It should be understood that the following drawings only show certain implementation modes of the present disclosure and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application.
[0050] Figure 2 This is a first flow chart of the monitoring method according to the embodiment of the present application.
[0051] Figure 3 for Figure 2 Schematic diagram of the flow chart of the sub-steps of step S20.
[0052] Figure 4 for Figure 2 Schematic diagram of the flow chart of the sub-steps of step S30.
[0053] Figure 5 This is a second flow chart of the monitoring method according to the embodiment of the present application.
[0054] Figure 6 A block diagram of a monitoring system according to an embodiment of the present application.
[0055] Explanation of the reference numerals: 01 - electronic device; 02 - processor; 03 - memory; 04 - image acquisition module; 05 - data processing module; 06 - alarm processing module. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in different configurations.
[0057] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0058] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. In addition, if the terms "first", "second", etc. appear, they are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0059] Reference Figure 1 , is a schematic diagram of a block structure of an electronic device provided in an embodiment of the present application, wherein the electronic device 01 may include but is not limited to a memory 03 and a processor 02.
[0060] The processor 02 and the memory 03 are both located in the electronic device 01 but are separately arranged. However, it should be understood that the memory 03 can be replaced by a computer-readable storage medium, and both the memory 03 and the computer-readable storage medium can be independent of the electronic device 01 and can be accessed by the processor 02 through a bus interface. In addition, the memory 03 can be integrated into the processor 02, for example, it can be a cache and / or a general register.
[0061] In this embodiment, both the computer-readable storage medium and the memory 03 can be used to store computer programs. When the processor 02 executes the computer program, the monitoring method given in the embodiment of the present application can be implemented.
[0062] It should be noted that Figure 1 The electronic device 01 is a schematic diagram of a structure of the electronic device 01 shown in FIG. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 1Each component shown in the figure can be implemented by hardware, software or a combination thereof. The electronic device 01 can be, but is not limited to, a computer, a mobile phone, an IPad, a server, a notebook computer, a mobile Internet device, etc.
[0063] Reference Figure 2 , is a first flow chart of a monitoring method provided in the embodiment of the present application, and the monitoring method is applied to the electronic device 01. It should be noted that the monitoring method provided in the present application is not necessarily Figure 2 It should be understood that the order of some steps in the monitoring method provided in the embodiment of the present application can be interchanged according to actual needs, or some steps can be omitted or deleted.
[0064] Reference Figure 2 , step S10, obtaining the video image information of the monitoring area captured by the imaging device in real time, if a vehicle is identified to enter the monitoring area, multiple frames of the video image information are intercepted at intervals of a time threshold to obtain the trajectory points of the vehicle.
[0065] Step S20, calculating the distance between the vehicle and the imaging device in each frame of image according to the imaging size of the vehicle in each frame of image, the focal length of the imaging device, the measurement distance and the pixel size, so as to obtain the spacing between adjacent track points.
[0066] Step S30, judging whether the vehicle is parked at the fire passage or is about to park at the fire passage according to each track point, the time threshold, and the distance between the track points.
[0067] The monitoring area includes the fire escape and the area around the fire escape. The measured distance represents the proportional relationship between the size in the image and the actual space size. The monitoring area is an area defined according to the position of the imaging device. All objects in the monitoring area can be photographed by the imaging device. The measured distance is a fixed value calculated when the imaging device is installed based on the distance between each stationary object in the monitoring area and the imaging device, the actual size of the monitoring area, and the image size of the monitoring area in the imaging device.
[0068] The monitoring area of the fire passage is monitored in real time, and vehicles entering the monitoring area are detected at the first time. The video image information of the monitoring area is processed to obtain the distance between adjacent trajectory points of the vehicle. Therefore, according to each trajectory point, time threshold, and the distance between trajectory points, it is possible to judge in real time whether the vehicle is about to stop at the fire passage or has stopped at the fire passage, and then it is possible to automatically detect whether the fire passage will be or has been occupied and blocked by vehicles and other objects.
[0069] It should be noted that the imaging device may have a timing function, for example, by connecting to a network to synchronize time, so that when shooting video image information, the shooting time can be obtained at the same time, and the timing can be performed at the same time, and a frame of image is captured at each time threshold interval to obtain multiple frames of image. It should be noted that the value of the time threshold can be set according to actual usage. For example, the time threshold can be set to 1 second, and the distance between adjacent track points is the speed of the vehicle.
[0070] Reference Figure 3 , which is a flowchart of the sub-steps of step S20, including step S201, step S202, step S203 and step S204.
[0071] Step S201, identifying and processing each frame of image to obtain the number of pixels of the vehicle in each frame of image.
[0072] Step S202, obtaining the actual size of the vehicle according to the number of pixels of the vehicle in each frame of image, and the focal length and / or measurement distance of the imaging device.
[0073] Step S203, obtaining the actual distance between the vehicle and the imaging device in each frame of the image according to the actual size of the vehicle, the pixel size and the focal length of the imaging device.
[0074] Step S204, obtaining the distance between adjacent track points according to the actual distances between two adjacent image frames.
[0075] The number of pixels of the vehicle includes horizontal pixel point data and vertical pixel point data.
[0076] All actual distances are the distances from the vehicle to the imaging device, and the position of the imaging device remains unchanged, so the actual distances of two adjacent frames of images are subtracted to obtain the spacing between adjacent track points. Through a series of calculations from step S201 to step S204, the motion track of the vehicle in the image is detected to achieve real-time position tracking of the vehicle.
[0077] It should be understood that the "actual size of the vehicle" described in the embodiments of the present application refers to the size of the portion of the vehicle exposed to the shooting range of the imaging device, that is, the local size of the vehicle exposed to the imaging device, rather than the actual size of the vehicle as a whole. Similarly, the number of pixels of the vehicle in each frame of the image refers to the number of pixels corresponding to the local size of the vehicle.
[0078] Further, as a specific implementation of step S201, it includes:
[0079] Based on the pixel number calculation method, the number of pixels of the vehicle is obtained. The pixel number calculation method is:
[0080]
[0081] in, Represents the vertical pixel position data of the vehicle in the t-th frame image, represents the horizontal pixel data of the vehicle in the t-th frame image, i represents the vehicle in the image, t represents the frame number of the image, and x li The horizontal coordinate of the first vertex of the circumscribed rectangle of the vehicle in the t-th frame image, y li represents the ordinate of the first vertex of the circumscribed rectangle of the vehicle in the t-th frame image, x oi The horizontal coordinate of the second vertex of the circumscribed rectangle of the vehicle in the t-th frame image, y oi It represents the ordinate of the second vertex of the circumscribed rectangle of the vehicle in the t-th frame image, and the first vertex and the second vertex are the opposite vertices of the circumscribed rectangle.
[0082] Further, as a specific implementation of step S202, it includes:
[0083] Based on the actual size algorithm, the actual horizontal length and actual vertical length of the vehicle are obtained. The actual size algorithm includes:
[0084]
[0085] in, represents the actual vertical length of the vehicle in the t-th frame image, represents the actual horizontal length of the vehicle in the t-th frame image, k H represents the vertical measurement distance represented by a single pixel, k W Indicates the horizontal measurement distance represented by a single pixel, N represents the measurement distance, Represents the vertical pixel position data of the vehicle in the t-th frame image, Represents the horizontal pixel position data of the vehicle in the t-th frame image;
[0086] The actual size of the vehicle is obtained according to the actual horizontal length and the actual vertical length of the vehicle.
[0087] By introducing the vertical measurement distance represented by a single pixel and the horizontal measurement distance represented by a single pixel, the actual vertical length and the actual horizontal length of the vehicle in the obtained image can be made more accurate, thereby helping to improve the accuracy of the actual size of the vehicle.
[0088] As another specific implementation of the actual size algorithm, the actual size algorithm further includes:
[0089]
[0090] Among them, ω H =R×r H / 17.45,ω W =R×r W / 17.45, represents the actual vertical length of the vehicle in the t-th frame image, represents the actual horizontal length of the vehicle in the t-th frame image, N represents the measured distance, ω H represents the vertical field of view, ω W represents the horizontal field of view, R represents the spatial resolution of the imaging device, and r H Indicates the vertical resolution, r W represents the horizontal resolution and f represents the focal length.
[0091] By introducing the vertical field of view angle and the horizontal field of view angle, the actual horizontal length and the actual length of the vehicle in the image can be obtained respectively, so that the actual size of the vehicle can be obtained more accurately.
[0092] Further, as a specific implementation of step S203, it includes:
[0093] Based on the distance algorithm, the actual distance between the vehicle and the imaging device in each frame of the image is obtained. The distance algorithm is:
[0094]
[0095] Among them, S t represents the actual distance between the vehicle and the imaging device in the t-th frame image, f represents the focal length of the imaging device, and L t represents the actual size of the vehicle in the t-th frame image, and m represents the pixel size of the imaging device.
[0096] Reference Figure 4 , is a flow chart of the sub-steps of step S30, including:
[0097] If the vehicle enters the fire lane, the speed of the vehicle is obtained based on the distance between each trajectory point and the time threshold, and whether the vehicle is in a deceleration state is determined based on the change in speed;
[0098] If the vehicle is in a decelerating state, the vehicle will be parked in the fire lane;
[0099] If the vehicle's speed is zero, the vehicle has stopped at the fire lane.
[0100] The speed of the vehicle can be obtained by dividing the distance between adjacent trajectory points by the time threshold. And only monitoring the speed of vehicles entering the fire lane can reduce the amount of calculation and improve accuracy.
[0101] Reference Figure 5 , which is a second flow chart of a further monitoring method provided in an embodiment of the present application, including step S40, step S50 and step S60.
[0102] Step S40: If the vehicle is parked in the fire passage or is about to park in the fire passage, an exit alarm is issued for the vehicle.
[0103] Step S50: If the vehicle parked in the fire passage has not left, the vehicle occupying the road information is sent to the client of the property staff.
[0104] Step S60: If the vehicle parked in the fire passage has not left and the parking time exceeds the time threshold, the vehicle occupying the road information is sent to the client of the property staff again.
[0105] Once a vehicle is about to park or has parked in the fire passage, an eviction alarm will be issued for the vehicle. After the eviction alarm is issued, if the vehicle still does not leave the fire passage, the vehicle occupying the road information will be sent to the property staff's client to allow the property staff to intervene. In addition, if the vehicle is still parked in the fire passage and the parking time exceeds the time threshold, the vehicle occupying the road information will be sent to the property staff's client again to allow the property staff to intervene and forcibly evict the vehicle. During this period, if the vehicle leaves, the alarm will automatically stop.
[0106] In this embodiment, the license plate number of the vehicle parked in the fire passage can be identified from the image or video image information, and the license plate number and the driving away information of the vehicle can be displayed on the display screen through the display set in the monitoring area. The driving away alarm can also be issued through the alarm sound. It can also be a combination of the above two methods.
[0107] It should be understood that the eviction alarm may include any one or more of a broadcast voice alarm, a whistle alarm, and a display alarm.
[0108] In this embodiment, the captured video image information and the information obtained in the above data processing process can be sent to the data cloud platform for storage via 4G, 5G, and Lora, so as to facilitate subsequent management and query for client data storage and retrieval.
[0109] Although the monitoring method provided in the embodiment of the present application is aimed at monitoring vehicles, it should be understood that the above monitoring method is also applicable to other debris. If there are debris piled up on the fire passage, an alarm can also be issued.
[0110] Reference Figure 6 The embodiment of the present application also discloses a monitoring system, which is applied to an imaging device and includes an image acquisition module 04 , a data processing module 05 and an alarm processing module 06 .
[0111] The image acquisition module 04 is used to acquire the video image information of the monitoring area captured by the imaging device in real time. If a vehicle is identified to enter the monitoring area, multiple frames of the video image information are intercepted at intervals of a time threshold to obtain the trajectory points of the vehicle. The monitoring area includes the fire passage and the area around the fire passage. That is, the image acquisition module 04 can execute and implement the method of step S10 above.
[0112] The data processing module 05 is used to calculate the distance between the vehicle and the imaging device in each frame of the image according to the imaging size of the vehicle in each frame of the image, the focal length of the imaging device, the measurement distance and the pixel size, so as to obtain the spacing between adjacent track points. The measurement distance represents the proportional relationship between the size in the image and the actual space size. That is, the data processing module 05 can execute and implement the method of the above step S20.
[0113] The alarm processing module 06 is used to determine whether the vehicle is parked at the fire passage or is about to park at the fire passage according to each track point, the time threshold, and the distance between the track points. That is, the alarm processing module 06 can execute and implement the method of step S30 above.
[0114] In this embodiment, the imaging device can be an intelligent light energy camera based on Beidou positioning, which is powered by solar panels and automatically analyzes, identifies and measures the distance of the video image information in the monitoring area without human intervention, so as to predict whether the fire passage in the monitoring area is blocked, and then effectively manage the fire passage to prevent it from being occupied and keep it unobstructed at all times.
[0115] In several embodiments provided in the present disclosure, it should be understood that the disclosed devices, system diagrams and methods can also be implemented in other ways. The above-described device, system and method embodiments are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0116] In addition, the functional modules in each embodiment of the present disclosure may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0117] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, an electronic device 01, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory 03 (ROM, Read-Only Memory), random access memory 03 (RAM, Random Access Memory), disk or optical disk and other media that can store program code. It should be noted that in this article, the term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.
[0118] The above description is only an optional implementation mode of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A monitoring method, characterized in that: include: Acquire video image information of the monitoring area captured by an imaging device in real time. If a vehicle is identified to enter the monitoring area, intercept multiple frames of the video image information at intervals of a time threshold to obtain the trajectory points of the vehicle. The monitoring area includes a fire passage and the area around the fire passage; According to the imaging size of the vehicle in each frame of the image, the focal length of the imaging device, the measurement distance and the pixel size, the distance between the vehicle and the imaging device in each frame of the image is calculated to obtain the spacing between adjacent track points, wherein the measurement distance represents the proportional relationship between the size in the image and the actual space size; Determining whether the vehicle is parked at or about to park at a fire passage according to each of the track points, the time threshold, and the distance between the track points; The step of calculating the distance between the vehicle and the imaging device in each frame of image according to the imaging size of the vehicle in each frame of image, the focal length, the measurement distance and the pixel size of the imaging device to obtain the spacing between adjacent track points includes: Identify and process each frame of the image to obtain the number of pixels of the vehicle in each frame of the image, wherein the number of pixels of the vehicle includes horizontal pixel point data and vertical pixel point data; Obtaining the actual size of the vehicle according to the number of pixels of the vehicle in each frame of the image, and the focal length and / or the measurement distance of the imaging device; Obtaining the actual distance between the vehicle and the imaging device in each frame of the image according to the actual size of the vehicle, the pixel size, and the focal length of the imaging device; The spacing between adjacent track points is obtained according to the actual distances between two adjacent frames of images.
2. The method according to claim 1, characterized in that The step of identifying and processing each frame of image to obtain the number of pixels of the vehicle in each frame of image comprises: The number of pixels of the vehicle is obtained based on a pixel number calculation method, and the pixel number calculation method is: in, represents the vertical pixel position data of the vehicle in the t-th frame image, W t i represents the horizontal pixel data of the vehicle in the t-th frame image, i represents the vehicle in the image, t represents the frame number of the image, and x li The horizontal coordinate of the first vertex of the circumscribed rectangle of the vehicle in the t-th frame image, y li represents the ordinate of the first vertex of the circumscribed rectangle of the vehicle in the t-th frame image, x oi The horizontal coordinate of the second vertex of the circumscribed rectangle of the vehicle in the t-th frame image, y oi The ordinate of the second vertex of the circumscribed rectangle of the vehicle in the t-th frame image is represented, wherein the first vertex and the second vertex are opposite vertices of the circumscribed rectangle.
3. The method according to claim 1, characterized in that The step of obtaining the actual size of the vehicle according to the number of pixels of the vehicle in each frame of the image, and the focal length and / or the measurement distance of the imaging device comprises: Based on the actual size algorithm, the actual horizontal length and the actual vertical length of the vehicle are obtained, and the actual size algorithm includes: in, represents the actual vertical length of the vehicle in the t-th frame image, represents the actual horizontal length of the vehicle in the t-th frame image, k H represents the vertical measurement distance represented by a single pixel, k W represents the horizontal measurement distance represented by a single pixel, k H Indicates the measured distance, Represents the vertical pixel position data of the vehicle in the t-th frame image, Represents the horizontal pixel position data of the vehicle in the t-th frame image; The actual size of the vehicle is obtained according to the actual horizontal length and the actual vertical length of the vehicle.
4. The method according to claim 1, characterized in that The step of determining the actual distance between the vehicle and the imaging device in each frame of the image according to the actual size of the vehicle, the pixel size and the focal length of the imaging device comprises: Based on the distance algorithm, the actual distance between the vehicle and the imaging device in each frame of the image is obtained. The distance algorithm is: Among them, S t represents the actual distance between the vehicle and the imaging device in the t-th frame image, f represents the focal length of the imaging device, and L t represents the actual size of the vehicle in the t-th frame image, and m represents the pixel size of the imaging device.
5. The method according to any one of claims 1 to 4, characterized in that: The step of determining whether the vehicle is parked at or about to park at a fire passage according to each of the track points, the time threshold, and the distance between the track points comprises: According to the running track formed by each track point, determine whether the vehicle enters the fire passage; If the vehicle enters the fire passage, the speed of the vehicle is obtained according to the distance between each track point and the time threshold, and whether the vehicle is in a deceleration state is determined according to the change in speed; If the vehicle is in a decelerating state, the vehicle will be parked in the fire lane; If the vehicle's speed is zero, the vehicle has stopped at the fire lane.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If a vehicle is parked in a fire lane or is about to park in a fire lane, an eviction alarm will be issued for the vehicle; If the vehicle parked in the fire passage has not left, the vehicle occupying the lane information is sent to the client of the property staff; If the vehicle parked in the fire passage has not left and the parking time exceeds the time threshold, the vehicle occupying the road information will be sent to the client of the property staff again.
7. A monitoring system, applied to an imaging device, characterized in that: include: An image acquisition module is used to acquire video image information of a monitoring area captured in real time by an imaging device. If a vehicle is identified to enter the monitoring area, multiple frames of the video image information are intercepted at intervals of a time threshold to obtain the trajectory points of the vehicle. The monitoring area includes a fire passage and the area surrounding the fire passage; A data processing module, for calculating the distance between the vehicle and the imaging device in each frame of the image according to the imaging size of the vehicle in each frame of the image, the focal length of the imaging device, the measurement distance and the pixel size, so as to obtain the spacing between adjacent track points, wherein the measurement distance represents the proportional relationship between the size in the image and the actual space size; An alarm processing module, used for judging whether the vehicle is parked in a fire passage or is about to park in a fire passage according to each of the track points, the time threshold, and the distance between the track points; The data processing module is also used for: Identify and process each frame of the image to obtain the number of pixels of the vehicle in each frame of the image, wherein the number of pixels of the vehicle includes horizontal pixel point data and vertical pixel point data; Obtaining the actual size of the vehicle according to the number of pixels of the vehicle in each frame of the image, and the focal length and / or the measurement distance of the imaging device; Obtaining the actual distance between the vehicle and the imaging device in each frame of the image according to the actual size of the vehicle, the pixel size, and the focal length of the imaging device; The spacing between adjacent track points is obtained according to the actual distances between two adjacent frames of images.
8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises a computer program, and when the computer program is executed, the electronic device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 6.
