CN110969859B - Automatic zooming method and device for vehicle snapshot - Google Patents

Automatic zooming method and device for vehicle snapshot Download PDF

Info

Publication number
CN110969859B
CN110969859B CN201811161165.1A CN201811161165A CN110969859B CN 110969859 B CN110969859 B CN 110969859B CN 201811161165 A CN201811161165 A CN 201811161165A CN 110969859 B CN110969859 B CN 110969859B
Authority
CN
China
Prior art keywords
magnification
license plate
ratio
monitoring picture
width
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
CN201811161165.1A
Other languages
Chinese (zh)
Other versions
CN110969859A (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.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview 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 Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201811161165.1A priority Critical patent/CN110969859B/en
Publication of CN110969859A publication Critical patent/CN110969859A/en
Application granted granted Critical
Publication of CN110969859B publication Critical patent/CN110969859B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/017Detecting movement of traffic to be counted or controlled identifying vehicles
    • G08G1/0175Detecting movement of traffic to be counted or controlled identifying vehicles by photographing vehicles, e.g. when violating traffic rules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Traffic Control Systems (AREA)
  • Image Processing (AREA)

Abstract

The application provides a vehicle snapshot automatic zooming method and device, and relates to the technical field of monitoring. The method comprises the following steps: detecting the width of a vehicle body of a target vehicle in a monitoring picture; calculating the ratio of the expected body width of the target vehicle to the body width, and calculating to obtain an initial variable magnification according to the ratio and the current magnification of the monitoring picture; calibrating the initial variable magnification ratio to obtain a calibrated variable magnification ratio; and zooming the monitoring picture according to the zooming magnification. According to the method and the device, the initial zoom magnification is calculated and calibrated, so that the workload required by device configuration is greatly reduced, errors caused in the measurement process are avoided, the calculation precision is improved, the target vehicle can be clearly displayed in a monitoring picture in a proper size, and the working efficiency and the law enforcement effect of law enforcement personnel are improved.

Description

Automatic zooming method and device for vehicle snapshot
Technical Field
The application relates to the technical field of monitoring, in particular to a vehicle snapshot automatic zooming method and device.
Background
At present, with the development of social economy and the improvement of the living standard of people, the quantity of urban motor vehicles is rapidly increased, the rapidly increased parking requirement is not suitable for the supply of parking places, meanwhile, due to the thin safety awareness of motor vehicle drivers, the illegal parking phenomenon of the motor vehicles is increasingly serious, and in order to standardize the parking behaviors of the drivers, a large amount of illegal parking automatic snapshot equipment needs to be arranged around a sensitive road by a traffic police so as to relieve the shortage of police strength, reduce the workload of law enforcement personnel and perfect the traffic management requirement.
However, the position of the target vehicle is changeable, and the target vehicle is far away or close to the automatic snapshot device, so that the snapshot details cannot be seen clearly when the target is far away, and the overall view of the target cannot be seen clearly when the target is too close, so that the penalty effect on illegal behaviors is influenced, and the working efficiency of law enforcement personnel is reduced.
Disclosure of Invention
In view of this, an object of the embodiments of the present application is to provide an automatic zooming method and apparatus for vehicle snapshot.
In a first aspect, an embodiment of the present application provides an automatic zooming method for vehicle snapshot, where the method includes:
detecting the width of a vehicle body of a target vehicle in a monitoring picture;
calculating the ratio of the expected body width of the target vehicle to the body width, and calculating to obtain an initial variable magnification according to the ratio and the current magnification of the monitoring picture;
calibrating the initial variable magnification ratio to obtain a calibrated variable magnification ratio;
and zooming the monitoring picture according to the zooming magnification.
Optionally, the method further comprises:
acquiring a first observation point which is closest to the image acquisition equipment and a second observation point which is farthest to the image acquisition equipment in the monitoring picture;
calculating the distance between the first observation point and the second observation point to obtain the longest observation distance;
and dividing the longest observation distance at equal intervals to obtain a plurality of regions.
Optionally, the method further comprises:
and dividing the monitoring picture into a plurality of areas according to the imported multiplying power segmentation model, and obtaining the reference multiplying power corresponding to each area.
Optionally, the method further comprises:
detecting a central point of the target vehicle in the monitoring picture, and judging an area where the central point is located;
and searching whether the area where the central point is located has a reference magnification, if so, taking the reference magnification as an initial variable magnification, and if not, setting the initial variable magnification obtained by calculation as the reference magnification of the area where the central point is located.
Optionally, calibrating the initial variable magnification ratio to obtain a calibrated variable magnification ratio, including:
detecting the license plate width and the license plate height of the target vehicle in the monitoring picture, judging whether the license plate width-height ratio meets a preset license plate width-height ratio, and if not, adjusting the license plate width to obtain the adjusted license plate width;
judging whether the difference between the adjusted license plate width and the expected license plate width is within a preset difference range, and if so, taking the initial zoom magnification as the zoom magnification;
and if the initial variable magnification ratio is not within the preset difference value range, multiplying the initial variable magnification ratio by a magnification ratio calibration coefficient to obtain the calibrated variable magnification ratio.
In a second aspect, an embodiment of the present invention further provides an automatic zoom apparatus for vehicle snapshot, where the apparatus includes:
the detection module is used for detecting the width of the target vehicle body in the monitoring picture;
the calculation module is used for calculating to obtain an initial variable magnification according to a preset ratio of the expected vehicle body width to the vehicle body width and the current magnification of the monitoring picture;
the calibration module is used for calibrating the initial zoom magnification to obtain the calibrated zoom magnification;
and the zooming module is used for zooming the monitoring picture according to the zooming magnification.
Optionally, the detection module is further configured to acquire a first observation point closest to the image acquisition device and a second observation point farthest from the image acquisition device in the monitoring picture; the calculation module is further configured to calculate a distance between the first observation point and the second observation point, and obtain a longest observation distance, where the apparatus further includes:
and the segmentation module is used for dividing the longest observation distance at equal intervals to obtain a plurality of regions.
Optionally, the segmentation module is further configured to divide the monitoring picture into a plurality of regions according to the imported magnification segmentation model, and obtain a reference magnification corresponding to each region.
Optionally, the detecting module is further configured to detect a central point of the target vehicle in the monitoring screen, and determine an area where the central point is located, where the apparatus further includes:
and the searching module is used for searching whether the area where the central point is located has a reference magnification, if so, the reference magnification is used as an initial variable magnification, and if not, the initial variable magnification obtained through calculation is set as the reference magnification of the area where the central point is located.
Optionally, the calibration module is specifically configured to:
detecting the license plate width and the license plate height of the target vehicle in the monitoring picture, judging whether the license plate width-height ratio meets a preset license plate width-height ratio, and if not, adjusting the license plate width to obtain the adjusted license plate width;
judging whether the difference between the adjusted license plate width and the expected license plate width is within a preset difference range, and if so, taking the initial zoom magnification as the zoom magnification;
and if the initial variable magnification ratio is not within the preset difference value range, multiplying the initial variable magnification ratio by a magnification ratio calibration coefficient to obtain the calibrated variable magnification ratio.
Compared with the prior art, the invention has the following beneficial effects:
according to the vehicle snapshot automatic zooming method and device, the zoom ratio is obtained by comparing the detected vehicle body width of the target vehicle in the monitoring picture with the preset expected vehicle body width, the initial zooming magnification is obtained by automatically calculating the ratio and the current magnification of the monitoring picture, the workload required by device configuration is greatly reduced, and errors caused in the processes of measuring the installation height of image acquisition equipment, obtaining the pitch angle, calibrating the magnification and the like are avoided. And the initial zoom magnification is calibrated, so that the precision of the calculated magnification is improved, the target vehicle can be clearly displayed in a monitoring picture in a proper size, law enforcement personnel can conveniently make more accurate judgment on illegal behaviors and make corresponding penalty, and the working efficiency and law enforcement effect of the law enforcement personnel are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope, and it will be apparent to those skilled in the art that other related drawings can be obtained according to these drawings without inventive effort.
Fig. 1 is a schematic block diagram of an image capturing apparatus according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of an automatic zooming method for vehicle snapshot provided by the embodiment of the present application;
fig. 3 is a schematic view of a monitoring screen area according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a sub-step of step S12 in FIG. 2;
fig. 5 is a functional module schematic diagram of the automatic zooming device for vehicle snapshot in fig. 1.
Icon: 100-an image acquisition device; 200-vehicle snapshot automatic zooming device; 110-a storage unit; 120-a processing unit; 130-a communication unit; 210-a detection module; 220-a calculation module; 230-a calibration module; 240-zoom module; 250-a segmentation module; 260-find module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the prior art, in order to avoid the influence of the distance change between a target vehicle and an image acquisition device on the shooting effect, the target vehicle can be subjected to zoom snapshot, the target vehicle is firstly assumed to be on the ground, the distance between the target vehicle and the image acquisition device is calculated according to the installation height of the image acquisition device relative to the ground and the pitch angle during shooting, then a proper zoom value is calculated by using an imaging principle according to the distance between the target vehicle and the image acquisition device and the detected size of the target vehicle, and the ideal shooting of the target vehicle is realized.
However, the applicant has found that the above-described solution requires obtaining the relative height difference in the vertical direction between the image pickup device and the target vehicle, and therefore the relative height difference to the target vehicle is determined by determining the installation height of the image pickup device, assuming that the target vehicle is on the ground. However, in actual situations, due to the limitation of field environments, the ground where the target is snapped may not be horizontal, and errors may also occur in the measurement process, so that height deviation often occurs, in addition, the pitch angle of the dome camera is required to be determined before zooming, but the pitch angle error often occurs due to non-horizontal installation of the dome camera and mechanical deviation, so that deviation of zoom magnification is caused, and the target vehicle after zooming is still too large or too small in the monitoring picture and cannot be clearly identified.
In order to overcome the above-mentioned drawbacks of the prior art, the applicant has studied to provide a solution given in the following examples.
Referring to fig. 1, an image capturing apparatus 100 is provided in an embodiment of the present application, and fig. 1 is a block diagram of the image capturing apparatus 100. The image capturing apparatus 100 provided in the embodiment of the present application may be various electronic devices for capturing illegal vehicles, for example, a high speed dome camera, an infrared monitoring camera, a high definition monitoring camera, and the like. As shown in fig. 1, the image pickup apparatus 100 includes: a storage unit 110, a processing unit 120, and a communication unit 130.
The storage unit 110, the processing unit 120 and the communication unit 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The storage unit 110 stores therein a vehicle snapshot automatic magnification change device 200, the vehicle snapshot automatic magnification change device 200 includes at least one software functional module that can be stored in the storage unit 110 in the form of software (software) or firmware (firmware), and the processing unit 120 executes various functional applications and data processing by running software programs and modules stored in the storage unit 110, such as the vehicle snapshot automatic magnification change device 200 in the embodiment of the present invention, so as to implement the vehicle snapshot automatic magnification change method in the embodiment of the present invention.
The storage unit 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The storage unit 110 is configured to store a program, and the processing unit 120 executes the program after receiving the execution instruction. Further, the software programs and modules in the storage unit 110 may also include an operating system. Which may include various software components and/or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.) and may communicate with various hardware or software components to provide an operating environment for other software components.
The processing unit 120 may be an integrated circuit chip having signal processing capabilities. The Processing Unit 120 may be a general-purpose Processor including a Central Processing Unit (CPU), a Network Processor (NP), and the like. But may also be a Digital Signal Processor (DSP)), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The communication unit 130 is configured to establish a communication connection between the image capturing apparatus 100 and an external communication terminal through a network, so as to implement transceiving operation of network signals and data. The network signal may include a wireless signal or a wired signal.
It will be appreciated that the configuration shown in fig. 1 is merely illustrative and that the image acquisition apparatus 100 may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Referring to fig. 2, an embodiment of the present application provides an automatic zooming method for vehicle snapshot, which is applied to the automatic zooming apparatus 200 for vehicle snapshot shown in fig. 1. The following describes a specific flow of the automatic zooming method for vehicle snapshot in detail.
The automatic zooming method for vehicle snapshot comprises the following steps:
and step S11, detecting the width of the target vehicle in the monitoring picture, calculating the ratio of the expected width of the target vehicle to the width of the vehicle, and calculating to obtain the initial variable magnification according to the ratio and the current magnification of the monitoring picture.
In this embodiment, a target detection algorithm may be used to detect a target vehicle in the monitoring picture, and information such as a contour, an area, a center point, a vehicle width, a vehicle height, and the like of the target vehicle may be obtained.
The expected vehicle body width is a preset value, the preset value can be obtained by analyzing and extracting historical monitoring video or image data, and when the vehicle body width presented by the target vehicle in the monitoring picture is close to or equal to the expected vehicle body width, the effect presented by the target vehicle in the monitoring picture is better, and vehicle feature recognition is facilitated. For example, in a general case, the width of a small-sized home car is generally 1700-2000mm, the width of a medium-sized passenger car and a large-sized freight car is generally not more than 2800mm, and according to the requirements of illegal parking snapshot service and vehicle license plate identification, the identification effect is better when the width of a vehicle license plate in a monitoring screen is about 100 pixels, and the width of a chinese standard license plate of a small-sized, medium-sized and large-sized car is 440mm, so that according to the imaging principle, the width of the license plate is taken as a reference, and the ratio of the width of the vehicle license plate to the width of an expected license plate in the screen is calculated, if the target vehicle is a small-sized car, the expected width of the car in the monitoring screen is about 386-454 pixels, and if the target vehicle is a medium-sized and large-sized car, the expected width of the.
The calculation process of the initial magnification ratio can be expressed by the following calculation formula:
Figure BDA0001820072190000081
wherein F is the initial magnification factor, WbexpTo a desired body width, WbThe method comprises the steps of obtaining the width of a vehicle body of a target vehicle in a monitoring picture, and obtaining the current multiplying power of the monitoring picture.
In this embodiment, the method further includes a step of partitioning the monitoring screen, and the following two specific implementations may be performed in this step.
The first embodiment:
first, a first observation point closest to the image capture device 100 and a second observation point farthest from the image capture device 100 in the monitoring screen are acquired.
Since the image capturing apparatus 100 is usually installed at a position relatively higher than the ground and performs the shooting monitoring of the top view angle for a certain range, according to the imaging principle, for example, when the monitoring picture is rectangular, the observation point closest to the image capturing apparatus 100 is the middle point of the lower boundary of the rectangular monitoring picture, and the farthest observation point is the top left corner vertex or the top right corner vertex opposite to the lower boundary.
And secondly, calculating the distance between the first observation point and the second observation point to obtain the longest observation distance.
Based on the above reasons, the longest observation distance is a straight line distance from a middle point of a lower boundary of the rectangular monitoring picture to a vertex at the upper left corner or the vertex at the upper right corner.
Then, the longest observation distance is divided at equal intervals to obtain a plurality of regions.
Referring to fig. 3, fig. 3 is a schematic view of a monitoring screen area. In the monitoring picture, segmenting the longest observation distance to obtain a plurality of regions S1、S2、……、Sn-1、SnEach region is separated by a certain pixel.
The second embodiment:
and dividing the monitoring picture into a plurality of areas according to the imported multiplying power segmentation model, and obtaining the reference multiplying power corresponding to each area.
For the monitoring picture divided into a plurality of areas, a magnification segmentation model containing the plurality of areas and the variable magnification reference magnifications corresponding to the respective areas can be extracted from the monitoring picture, and the model can be stored in any storage device or element, for example, in the storage unit 110 of the image acquisition device 100, or sent to a remote server by the communication unit 130 of the image acquisition device 100 for storage. In another case, for a monitoring picture that is not partitioned, a magnification segmentation model may be directly introduced to perform partitioning to obtain a plurality of regions and reference magnifications corresponding to the regions, where the reference magnifications are times of reference magnifications for performing magnification when a monitoring target is located in a certain region. Referring to FIG. 3, a plurality of regions S1、S2、……、Sn-1、SnRespectively corresponding to reference multiplying power F having approximately linear relation1、F2、……、Fn-1、Fn
In this embodiment, after the monitoring picture is partitioned, the initial variable magnification ratio may be obtained according to the reference magnification ratio of each region, or the reference magnification ratio of each region may be obtained through calculation, which may be specifically implemented by the following steps.
Firstly, detecting a central point of the target vehicle in the monitoring picture, and judging an area where the central point is located.
Specifically, the distance between the central point and the central point of the lower boundary of the rectangular monitoring picture, that is, the closest observation point, is calculated, and according to the calculation result, which area of the partitioned monitoring picture the central point is located in is determined.
And secondly, searching whether the area where the central point is located has a reference magnification, if so, taking the reference magnification as an initial variable magnification, and if not, setting the initial variable magnification obtained by calculation as the reference magnification of the area where the central point is located.
When the area where the center point of the target vehicle is located has the reference magnification, the reference magnification may be directly taken as the initial variable magnification, otherwise, the reference magnification of the area where the center point is located may be obtained through calculation, and the calculation method is the same as that of step S11.
Since the reference magnifications corresponding to the respective regions have a relationship close to linearity, if the reference magnifications of any two non-adjacent regions are known, the reference magnification of any one region between the two regions can be obtained by linear calculation, and the calculation formula may be:
Figure BDA0001820072190000101
wherein i, j, k are the number of the region, FiKnown reference magnification, F, for region ijKnown reference magnification, F, for region jkThe reference magnification of any region k between the region i and the region j.
After the initial magnification ratio is obtained, the process proceeds to step S12.
And step S12, calibrating the initial variable magnification ratio to obtain the calibrated variable magnification ratio.
Referring to fig. 4, step S12 in this embodiment can be implemented by the following sub-steps:
and a substep S121, detecting the width and the height of the license plate of the target vehicle in the monitoring picture, judging whether the width-height ratio of the license plate meets a preset width-height ratio of the license plate, and if not, adjusting the width of the license plate to obtain the adjusted width of the license plate.
If the original zooming magnification ratio calculated by the ratio of the expected vehicle body width to the vehicle body width of the target vehicle in the original monitoring picture and the current magnification ratio of the monitoring picture is directly adopted to zoom the monitoring picture, the target vehicle can basically see the overall view and the approximate details in the current monitoring picture. However, due to certain measurement errors or other influence factors, detailed features of a target vehicle, such as a license plate, which need to be identified may still be unclear, and the requirement for illegal behavior determination cannot be met, so that the license plate needs to be adjusted.
Since the width-to-height ratio of the license plate of the china standard automobile is 440/140, the width-to-height ratio of the preset license plate can be set to 440/140. And if the width-to-height ratio of the license plate of the target vehicle in the image subjected to primary zooming meets a preset width-to-height ratio, the width of the license plate does not need to be adjusted.
If not, adjusting the width of the license plate by taking the preset width-to-height ratio of the license plate as a reference, and multiplying the width of the license plate by a license plate width adjustment coefficient, wherein the calculation formula is as follows:
Wn′=cWn
wherein, Wn' adjusted license plate width, WnThe value of c is a license plate width, and c is a license plate width adjustment coefficient, and in a general case, the value of c may be set to 1.1, and may also be set to other values according to the adjustment requirement of the license plate aspect ratio, and is not particularly limited herein.
The substep S122 is to judge whether the difference value between the adjusted license plate width and the expected license plate width is within a preset difference value range, and if the difference value is within the preset difference value range, the initial zoom magnification is used as the zoom magnification;
based on the similar reasons as described above, the vehicle license plate has a better recognition effect when the number of pixels in the monitoring picture is about 100 pixels, that is, the value of the expected license plate width may be 100 pixels, and optionally, the preset range of the difference between the adjusted license plate width and the expected license plate width may be set to [95,105] pixels. When the difference value between the adjusted license plate width and the expected license plate width does not exceed the preset range, the adjusted license plate width is clear and can be completely identified, the initial zoom magnification can be directly used as the zoom magnification, and further calibration is not needed.
And a substep S123, if the difference is not within the preset difference range, multiplying the initial variable magnification ratio by a magnification ratio calibration coefficient to obtain a calibrated variable magnification ratio.
If the difference value between the adjusted license plate width and the expected license plate width is higher than the upper limit value of the preset range, reducing the initial zoom magnification; and if the difference value between the adjusted license plate width and the expected license plate width is lower than the lower limit value of the preset range, increasing the initial zoom magnification. The magnification calibration coefficient a can be described by the following formula:
Figure BDA0001820072190000111
wherein, WnexpThe desired license plate width.
The calibrated variable magnification F' can be calculated by the following formula:
F′=aF
the zoom magnification obtained after calibration is the zoom magnification meeting the identification requirement.
After the calibrated magnification ratio is obtained, the process proceeds to step S13.
And step S13, zooming the monitoring picture according to the zooming magnification.
In this embodiment, it should be noted that, if the monitored image is scaled according to the scaling factor obtained after calibration, part of the features of the target vehicle may still not be clearly and completely identified, and the scaling factor may be calibrated again by using the above procedure.
Fig. 5 is a schematic functional block diagram of the automatic zoom apparatus 200 for vehicle snapshot in fig. 1. It is to be understood that the specific functions of the respective modules of the apparatus have been described in the above method steps, and a brief description will now be made of the respective functional modules of the vehicle-snap automatic magnification change apparatus 200. The device comprises:
and the detection module 210 is used for detecting the width of the vehicle body of the target vehicle in the monitoring picture.
The calculating module 220 is configured to calculate an initial zoom magnification according to a preset ratio of the expected vehicle body width to the vehicle body width and the current magnification of the monitoring picture;
a calibration module 230, configured to calibrate the initial zoom magnification to obtain a calibrated zoom magnification;
the calibration module 230 is specifically configured to:
detecting the license plate width and the license plate height of the target vehicle in the monitoring picture, judging whether the license plate width-height ratio meets a preset license plate width-height ratio, and if not, adjusting the license plate width to obtain the adjusted license plate width;
judging whether the difference between the adjusted license plate width and the expected license plate width is within a preset difference range, and if so, taking the initial zoom magnification as the zoom magnification;
and if the initial variable magnification ratio is not within the preset difference value range, multiplying the initial variable magnification ratio by a magnification ratio calibration coefficient to obtain the calibrated variable magnification ratio.
And a zooming module 240, configured to zoom the monitoring picture according to the zooming magnification.
The detecting module 210 is further configured to obtain a first observation point closest to the image capturing device 100 and a second observation point farthest from the image capturing device 100 in the monitoring screen, and the calculating module 220 is further configured to calculate a distance between the first observation point and the second observation point to obtain a longest observation distance, where the apparatus further includes:
and a segmenting module 250, configured to divide the longest observation distance at equal intervals to obtain multiple regions.
The segmenting module 250 is further configured to divide the monitoring picture into a plurality of regions according to the imported magnification segmentation model, and obtain a reference magnification corresponding to each region, where the reference magnification corresponding to each region has a linear relationship.
The searching module 260 is configured to search whether a reference magnification exists in the area where the central point is located, if so, use the reference magnification as an initial magnification variation, and if not, set the initial magnification variation obtained through calculation as the reference magnification of the area where the central point is located.
In summary, the vehicle snapshot automatic zooming method and device provided by the embodiment of the application obtain the zoom ratio by comparing the detected vehicle body width of the target vehicle in the monitoring picture with the preset expected vehicle body width, and automatically calculate the ratio and the current magnification of the monitoring picture to obtain the initial zooming magnification, thereby greatly reducing the workload required by device configuration, and simultaneously avoiding errors caused in the processes of measuring the installation height of the image acquisition equipment, obtaining the pitch angle, calibrating the magnification and the like. And the initial zoom magnification is calibrated, so that the precision of the calculated magnification is improved, the target vehicle can be clearly displayed in a monitoring picture in a proper size, law enforcement personnel can conveniently make more accurate judgment on illegal behaviors and make corresponding penalty, and the working efficiency and law enforcement effect of the law enforcement personnel are improved.
In the embodiments provided in the present application, it should be understood that the disclosed system and method may be implemented in other ways. The system and method embodiments described above are merely illustrative, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application 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.
If the functions of the above method steps are implemented in the form of software functional modules and sold or used as separate products, they may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. Furthermore, the terms "first," "second," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying a relative importance of what is being referred to.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. An automatic zooming method for vehicle snapshot, characterized in that the method comprises:
detecting the width of a vehicle body of a target vehicle in a monitoring picture;
calculating the ratio of the expected body width of the target vehicle to the body width, and calculating to obtain an initial variable magnification according to the ratio and the current magnification of the monitoring picture;
calibrating the initial variable magnification ratio to obtain a calibrated variable magnification ratio;
zooming the monitoring picture according to the zooming magnification;
the calibrating the initial variable magnification ratio to obtain the calibrated variable magnification ratio comprises the following steps:
detecting the license plate width and the license plate height of the target vehicle in the monitoring picture, judging whether the license plate width-height ratio accords with a preset license plate width-height ratio, and if not, adjusting the license plate width to obtain the adjusted license plate width;
judging whether the difference between the adjusted license plate width and the expected license plate width is within a preset difference range, and if so, taking the initial zoom magnification as the zoom magnification;
and if the initial variable magnification ratio is not within the preset difference value range, multiplying the initial variable magnification ratio by a magnification ratio calibration coefficient to obtain the calibrated variable magnification ratio.
2. The vehicle snapshot automatic magnification change method as claimed in claim 1, wherein the method further comprises:
acquiring a first observation point which is closest to the image acquisition equipment and a second observation point which is farthest to the image acquisition equipment in the monitoring picture;
calculating the distance between the first observation point and the second observation point to obtain the longest observation distance;
and dividing the longest observation distance at equal intervals to obtain a plurality of regions.
3. The vehicle snapshot automatic magnification change method as claimed in claim 1, wherein the method further comprises:
and dividing the monitoring picture into a plurality of areas according to the imported multiplying power segmentation model, and obtaining the reference multiplying power corresponding to each area.
4. The vehicle snapshot automatic magnification change method according to claim 2 or 3, wherein the method further comprises:
detecting a central point of the target vehicle in the monitoring picture, and judging an area where the central point is located;
and searching whether the area where the central point is located has a reference magnification, if so, taking the reference magnification as an initial variable magnification, and if not, setting the initial variable magnification obtained by calculation as the reference magnification of the area where the central point is located.
5. An automatic zoom device for vehicle snapshot, the device comprising:
the detection module is used for detecting the width of the target vehicle body in the monitoring picture;
the calculation module is used for calculating to obtain an initial variable magnification according to a preset ratio of the expected vehicle body width to the vehicle body width and the current magnification of the monitoring picture;
the calibration module is used for calibrating the initial zoom magnification to obtain the calibrated zoom magnification;
the zooming module is used for zooming the monitoring picture according to the zooming magnification;
the calibration module is specifically configured to:
detecting the license plate width and the license plate height of the target vehicle in the monitoring picture, judging whether the license plate width-height ratio meets a preset license plate width-height ratio, and if not, adjusting the license plate width to obtain the adjusted license plate width;
judging whether the difference between the adjusted license plate width and the expected license plate width is within a preset difference range, and if so, taking the initial zoom magnification as the zoom magnification;
and if the initial variable magnification ratio is not within the preset difference value range, multiplying the initial variable magnification ratio by a magnification ratio calibration coefficient to obtain the calibrated variable magnification ratio.
6. The vehicle capturing automatic zooming device of claim 5, wherein the detection module is further configured to obtain a first observation point closest to the image capturing device and a second observation point farthest from the image capturing device in the monitoring screen, and the calculation module is further configured to calculate a distance between the first observation point and the second observation point to obtain a longest observation distance, and the device further comprises:
and the segmentation module is used for dividing the longest observation distance at equal intervals to obtain a plurality of regions.
7. The vehicle snapshot auto-scaling device of claim 6, wherein the segmentation module is further configured to:
and dividing the monitoring picture into a plurality of areas according to the imported multiplying power segmentation model, and obtaining the reference multiplying power corresponding to each area.
8. The vehicle snapshot automatic zooming device of claim 6 or 7, wherein the detection module is further configured to detect a center point of the target vehicle in the monitoring screen, and determine an area where the center point is located, and the device further comprises:
and the searching module is used for searching whether the area where the central point is located has a reference magnification, if so, the reference magnification is used as an initial variable magnification, and if not, the initial variable magnification obtained through calculation is set as the reference magnification of the area where the central point is located.
CN201811161165.1A 2018-09-30 2018-09-30 Automatic zooming method and device for vehicle snapshot Active CN110969859B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811161165.1A CN110969859B (en) 2018-09-30 2018-09-30 Automatic zooming method and device for vehicle snapshot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811161165.1A CN110969859B (en) 2018-09-30 2018-09-30 Automatic zooming method and device for vehicle snapshot

Publications (2)

Publication Number Publication Date
CN110969859A CN110969859A (en) 2020-04-07
CN110969859B true CN110969859B (en) 2021-04-20

Family

ID=70029128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811161165.1A Active CN110969859B (en) 2018-09-30 2018-09-30 Automatic zooming method and device for vehicle snapshot

Country Status (1)

Country Link
CN (1) CN110969859B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112489020B (en) * 2020-12-01 2023-05-23 济南博观智能科技有限公司 Image screening method and device, electronic equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873477B (en) * 2010-02-26 2012-09-05 杭州海康威视数字技术股份有限公司 Method and device for realizing monitoring by fast ball tracking system
CN102291571A (en) * 2011-08-11 2011-12-21 杭州华三通信技术有限公司 Method and device for realizing frame-pulling scaling in monitoring system
CN103324920A (en) * 2013-06-27 2013-09-25 华南理工大学 Method for automatically identifying vehicle type based on vehicle frontal image and template matching
CN104717427B (en) * 2015-03-06 2018-06-08 广东欧珀移动通信有限公司 A kind of automatic zooming method, device and mobile terminal
US20170116488A1 (en) * 2015-10-23 2017-04-27 MAGNETI MARELLI S.p.A. Method for identifying an incoming vehicle and corresponding system
CN106664373A (en) * 2016-03-29 2017-05-10 深圳市红狐狸智能科技有限公司 An automatic zooming-based self-adaptive image tracking method
CN106375666B (en) * 2016-09-26 2019-04-16 成都臻识科技发展有限公司 A kind of Atomatic focusing method and device based on license plate

Also Published As

Publication number Publication date
CN110969859A (en) 2020-04-07

Similar Documents

Publication Publication Date Title
EP2851841A2 (en) System and method of alerting a driver that visual perception of pedestrian may be difficult
CN112912932B (en) Calibration method and device for vehicle-mounted camera and terminal equipment
CN113240756B (en) Pose change detection method and device for vehicle-mounted BSD camera and storage medium
CN110388928B (en) Navigation system and updating method and device of navigation map
CN109828250B (en) Radar calibration method, calibration device and terminal equipment
CN112562093B (en) Object detection method, electronic medium, and computer storage medium
CN104167109A (en) Detection method and detection apparatus for vehicle position
KR20170039465A (en) System and Method for Collecting Traffic Information Using Real time Object Detection
CN108292469B (en) Position information determining method, position information determining device and computer storage medium
CN105809669A (en) Method and apparatus of calibrating an image detecting device
CN110969859B (en) Automatic zooming method and device for vehicle snapshot
CN116068507A (en) Alignment verification in-vehicle sensors
CN114882470A (en) Vehicle-mounted anti-collision early warning method and device, computer equipment and storage medium
CN111316135B (en) System for calculating atmospheric precipitation rate in real time according to digital image of environment in which atmospheric precipitation is occurring
CN113869440A (en) Image processing method, apparatus, device, medium, and program product
CN112255604A (en) Method and device for judging accuracy of radar data and computer equipment
CN110660229A (en) Vehicle speed measuring method and device and vehicle
CN110188665B (en) Image processing method and device and computer equipment
CN112183382A (en) Unmanned traffic light detection and classification method and device
NO20210870A1 (en) Fog detection device using coordinate system, and method therefor
CN110659551A (en) Motion state identification method and device and vehicle
CN110930455B (en) Positioning method, positioning device, terminal equipment and storage medium
CN108416305B (en) Pose estimation method and device for continuous road segmentation object and terminal
CN111125271B (en) Vehicle position judging method, device and computer readable storage medium
CN114694107A (en) Image processing method and device, electronic equipment and storage medium

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