CN111031254B - Camera mode switching method and device, computer device and readable storage medium - Google Patents

Camera mode switching method and device, computer device and readable storage medium Download PDF

Info

Publication number
CN111031254B
CN111031254B CN202010040835.5A CN202010040835A CN111031254B CN 111031254 B CN111031254 B CN 111031254B CN 202010040835 A CN202010040835 A CN 202010040835A CN 111031254 B CN111031254 B CN 111031254B
Authority
CN
China
Prior art keywords
brightness
mode
scene
current
license plate
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
CN202010040835.5A
Other languages
Chinese (zh)
Other versions
CN111031254A (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 Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology 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 Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202010040835.5A priority Critical patent/CN111031254B/en
Publication of CN111031254A publication Critical patent/CN111031254A/en
Application granted granted Critical
Publication of CN111031254B publication Critical patent/CN111031254B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • 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
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Traffic Control Systems (AREA)
  • Lighting Device Outwards From Vehicle And Optical Signal (AREA)
  • Studio Devices (AREA)

Abstract

The invention provides a method and a device for switching a camera shooting mode, a computer device and a readable storage medium, wherein the switching method comprises the following steps: judging the size relation between the current shooting environment brightness of the M target vehicles and a preset environment brightness range, wherein the preset environment brightness range is [ lumaThr1, lumaThr2], including end point values, and M is a positive integer; if the current shooting environment brightness is determined to be greater than lumaThr2 according to the size relationship, judging whether the current shooting mode is switched to a linear mode or a wide dynamic mode according to the license plate brightness and the current illumination scene of each target vehicle in the M target vehicles; and if the current shooting environment brightness is determined to be smaller than lumaThr1 according to the size relationship, judging whether the current shooting mode is switched to the linear mode or the wide dynamic mode according to the vehicle body brightness and the vehicle body color of each target vehicle in the M target vehicles. For improving the quality of the overall monitoring.

Description

Camera mode switching method and device, computer device and readable storage medium
Technical Field
The present invention relates to the field of monitoring technologies, and in particular, to a method and an apparatus for switching a camera mode, a computer apparatus, and a readable storage medium.
Background
Safety has become a key concern for people, and security monitoring systems play an important role in supervision and deterrence. The monitoring equipment applied to the traffic scene needs to identify and shoot passing vehicles, and provides referential evidence for traffic police and public security. Therefore, the license plate in the picture shot in various weather environments is required to be clear, and particularly, the recognition of the license plate cannot be influenced by over-bright and over-dark license plates or large car light halo.
The existing traffic monitoring mainly comprises the following steps: the first method is to control the shutter and gain of the camera according to the contrast of the license plate brightness, and although the license plate brightness is ensured, the brightness of the whole picture is easy to be too dark or too dark. The second method specifically is to judge whether to switch wide dynamic according to the dynamic range value of the whole picture, and cannot ensure that the brightness of the license plate which is mainly concerned is in a proper brightness range, so that the license plate recognition rate is low. The third method is to perform statistics based on global overexposure blocks to switch between linear and wide dynamic states, which only can ensure the whole dynamic range and cannot ensure that the brightness of the license plate concerned mainly is in a proper brightness range, so that the license plate recognition rate is low. And the fourth step is specifically that the switching of the shooting state is judged according to the histogram of the frame image and the number of the total pixel points of the frame image, so that the brightness of the license plate which is focused on is not ensured to be in a proper range.
Therefore, the existing monitoring cannot simultaneously consider that the brightness of the license plate which is focused on is in a proper brightness range and the brightness of the whole picture is also in a proper range, so that the existing comprehensive monitoring quality is poor.
Disclosure of Invention
The invention provides a method and a device for switching a camera mode, a computer device and a readable storage medium, which are used for improving the quality of overall monitoring.
In a first aspect, an embodiment of the present invention provides a method for switching an image capturing mode, including:
judging the size relation between the current shooting environment brightness of the M target vehicles and a preset environment brightness range, wherein the preset environment brightness range is [ lumaThr1, lumaThr2], including end point values, and M is a positive integer;
if the current shooting environment brightness is determined to be greater than lumaThr2 according to the size relationship, judging whether the current shooting mode is switched to a linear mode or a wide dynamic mode according to the license plate brightness and the current illumination scene of each target vehicle in the M target vehicles;
and if the current shooting environment brightness is determined to be smaller than lumaThr1 according to the size relationship, judging whether the current shooting mode is switched to the linear mode or the wide dynamic mode according to the vehicle body brightness and the vehicle body color of each target vehicle in the M target vehicles.
Optionally, the determining, according to the license plate brightness and the current illumination scene of each target vehicle of the M target vehicles, whether the current camera shooting mode is switched to the linear mode or the wide dynamic mode includes:
determining the license plate brightness of each target vehicle in the M target vehicles;
determining N license plate brightness within a preset license plate brightness range from the license plate brightness of each target vehicle in the M target vehicles, wherein the preset license plate brightness range is [ placeMinY, placeMaxY ], including end point values, and N is a positive integer not greater than M;
determining a first size relationship between each license plate brightness of the N license plate brightness and a first environment brightness range, wherein the first environment brightness range is [ blThr1, blThr2], including endpoint values;
judging whether to switch the current illumination scene according to the first size relation so as to obtain a switched illumination scene;
determining the maintaining time length of the switched illumination scene;
and judging whether the current shooting mode is switched to a linear mode or a wide dynamic mode according to the maintaining duration of the switched illumination scene.
Optionally, if the current illumination scene is a normal scene, the determining whether to switch the current illumination scene according to the first size relationship includes:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the continuous P license plate brightness in the N license plate brightness is less than blThr1, switching the current illumination scene from the normal scene to an inverse light scene, wherein P is a positive integer not greater than N.
Optionally, if the current illumination scene is a backlight scene, the determining whether to switch the current illumination scene according to the first magnitude relationship includes:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of R continuous license plates in the N license plate brightness is greater than blThr2, switching the current shooting scene from the backlight scene to a normal scene, wherein R is a positive integer not greater than N.
Optionally, after determining N license plate luminances located in a preset license plate luminance range from the license plate luminances of each of the M target vehicles, the method further includes:
determining a second magnitude relationship between each of the N license plate luminances and a second ambient luminance range, wherein the second ambient luminance range is [ olth 1, olth 2], inclusive, olth 1> blThr 2;
and judging whether to switch the current illumination scene according to the second size relation so as to obtain the switched illumination scene.
Optionally, if the current illumination scene is a normal scene, the determining whether to switch the current illumination scene according to the second size relationship includes:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of S continuous license plates in the N license plate brightness is greater than olthre 2, switching the current shooting scene from the normal scene to a front scene, wherein S is a positive integer not greater than N.
Optionally, if the current illumination scene is a front-light scene, the determining whether to switch the current illumination scene according to the second magnitude relationship includes:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of T continuous license plates in the N license plate brightness is less than olthre 1, switching the current illumination scene from the front scene to a normal scene, wherein T is a positive integer not greater than N.
Optionally, if the current shooting mode is the linear mode, the determining, according to the duration of the switched illumination scene, whether the current shooting mode is the linear mode or the wide dynamic mode includes:
judging whether the maintaining time length of the switched illumination scene is greater than a preset time length or not;
and if the switched illumination scene is a backlight scene or a frontlight scene, and the maintaining time length of the switched illumination scene is longer than the preset time length, switching the current shooting mode from the linear mode to the wide dynamic mode.
Optionally, if the current shooting mode is the wide dynamic mode, the determining whether the current shooting mode is switched to the linear mode or the wide dynamic mode according to the duration of the switched illumination scene includes:
and if the switched illumination scene is a normal scene and the maintaining time of the switched illumination scene is longer than the preset time, switching the current shooting mode from the wide dynamic mode to the linear mode.
Optionally, if the current camera shooting mode is the wide dynamic mode, the determining, according to the body brightness and the body color of each of the M target vehicles, whether the current camera shooting mode is switched to the linear mode or the wide dynamic mode includes:
determining U target vehicles with black body colors from the M target vehicles, wherein U is a positive integer not greater than M;
determining the body brightness of each of the U target vehicles;
determining V body brightness located in a preset body brightness range from the body brightness of each target vehicle in the U target vehicles, wherein the preset body brightness range is [ vehicle Ythr1, V vehicle Ythr2], including end points, and V is a positive integer not greater than U;
according to the time sequence of determining the brightness of each target vehicle in the U target vehicles, if the brightness of continuous W vehicle bodies in the V vehicle body brightness is smaller than the vehicle Ythr1, the current image pickup mode is switched from the wide dynamic mode to the linear mode, wherein W is a positive integer not larger than V.
Optionally, if the current image capturing mode is the linear mode, after V vehicle body luminances within a preset vehicle body luminance range are determined from the vehicle body luminances of each of the U target vehicles, the method further includes:
determining V conversion brightness obtained by multiplying the V vehicle body brightness by a brightness conversion coefficient, wherein the brightness conversion coefficient is used for representing a coefficient for converting the linear mode into the wide dynamic mode;
and according to the time sequence of determining the brightness of each target vehicle in the U target vehicles, if all X continuous conversion brightness in the V conversion brightness are greater than V ehicle Ythr2, switching the current image pickup mode from the linear mode to the wide dynamic mode.
Optionally, the determining a size relationship between the current shooting environment brightness for the M target vehicles and a preset environment brightness range includes:
when shooting the same scene through image acquisition equipment, determining the exposure time, the brightness gain and the aperture conversion coefficient of the image acquisition equipment and acquiring the image brightness of each target vehicle in the M target vehicles;
determining the brightness of the current shooting environment according to the exposure duration, the brightness gain, the aperture conversion coefficient and the image brightness;
and judging the size relation between the current shooting environment brightness and the preset environment brightness range.
In a second aspect, an embodiment of the present invention provides an apparatus for switching an image capturing mode, including:
the first judgment unit is used for judging the size relationship between the current shooting environment brightness of the M target vehicles and a preset environment brightness range, wherein the preset environment brightness range is [ lumaThr1, lumaThr2], comprises end point values, and M is a positive integer;
a second judging unit, configured to, if it is determined according to the magnitude relationship that the current shooting environment brightness is greater than lumath 2, judge, according to the license plate brightness and the current illumination scene of each of the M target vehicles, whether the current shooting mode is switched to the linear mode or the wide dynamic mode;
and a third judging unit, configured to, if it is determined that the current shooting environment brightness is less than lumath 1 according to the magnitude relationship, judge, according to the vehicle body brightness and the vehicle body color of each of the M target vehicles, whether the current shooting mode is switched to the linear mode or the wide dynamic mode.
Optionally, the second determining unit is configured to:
determining the license plate brightness of each target vehicle in the M target vehicles;
determining N license plate brightness within a preset license plate brightness range from the license plate brightness of each target vehicle in the M target vehicles, wherein the preset license plate brightness range is [ placeMinY, placeMaxY ], including end point values, and N is a positive integer not greater than M;
determining a first size relationship between each license plate brightness of the N license plate brightness and a first environment brightness range, wherein the first environment brightness range is [ blThr1, blThr2], including endpoint values;
judging whether to switch the current illumination scene according to the first size relation so as to obtain a switched illumination scene;
determining the maintaining time length of the switched illumination scene;
and judging whether the current shooting mode is a linear mode or a wide dynamic mode according to the maintaining duration of the switched illumination scene.
Optionally, if the current illumination scene is a normal scene, the second determining unit is configured to:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the continuous P license plate brightness in the N license plate brightness is less than blThr1, switching the current illumination scene from the normal scene to an inverse light scene, wherein P is a positive integer not greater than N.
Optionally, if the current illumination scene is a backlight scene, the second determining unit is configured to:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of R continuous license plates in the N license plate brightness is greater than blThr2, switching the current shooting scene from the backlight scene to a normal scene, wherein R is a positive integer not greater than N.
Optionally, after determining N license plate luminances located in a preset license plate luminance range from the license plate luminances of each of the M target vehicles, the second determining unit is further configured to:
determining a second magnitude relationship between each of the N license plate luminances and a second ambient luminance range, wherein the second ambient luminance range is [ olth 1, olth 2], inclusive, olth 1> blThr 2;
and judging whether to switch the current illumination scene according to the second size relation so as to obtain the switched illumination scene.
Optionally, if the current illumination scene is a normal scene, the second determining unit is configured to:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of S continuous license plates in the N license plate brightness is greater than olthre 2, switching the current shooting scene from the normal scene to a front scene, wherein S is a positive integer not greater than N.
Optionally, if the current illumination scene is a front-light scene, the second determining unit is configured to:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of T continuous license plates in the N license plate brightness is less than olthre 1, switching the current illumination scene from the front scene to a normal scene, wherein T is a positive integer not greater than N.
Optionally, if the current image capturing mode is the linear mode, the second determining unit is configured to:
judging whether the maintaining time length of the switched illumination scene is greater than a preset time length or not;
and if the switched illumination scene is a backlight scene or a frontlight scene, and the maintaining time length of the switched illumination scene is longer than the preset time length, switching the current shooting mode from the linear mode to the wide dynamic mode.
Optionally, if the current image capturing mode is the wide dynamic mode, the second determining unit is configured to:
and if the switched illumination scene is a normal scene and the maintaining time of the switched illumination scene is longer than the preset time, switching the current shooting mode from the wide dynamic mode to the linear mode.
Optionally, if the current image capturing mode is the wide dynamic mode, the third determining unit is configured to:
determining U target vehicles with black body colors from the M target vehicles, wherein U is a positive integer not greater than M;
determining the body brightness of each of the U target vehicles;
determining V body brightness located in a preset body brightness range from the body brightness of each target vehicle in the U target vehicles, wherein the preset body brightness range is [ vehicle Ythr1, V vehicle Ythr2], including end points, and V is a positive integer not greater than U;
according to the time sequence of determining the brightness of each target vehicle in the U target vehicles, if the brightness of continuous W vehicle bodies in the V vehicle body brightness is smaller than the vehicle Ythr1, the current image pickup mode is switched from the wide dynamic mode to the linear mode, wherein W is a positive integer not larger than V.
Optionally, if the current image capturing mode is the linear mode, after V vehicle body luminances located in a preset vehicle body luminance range are determined from the vehicle body luminances of each of the U target vehicles, the third determining unit is configured to:
determining V conversion brightness obtained by multiplying the V vehicle body brightness by a brightness conversion coefficient, wherein the brightness conversion coefficient is used for representing a coefficient for converting the linear mode into the wide dynamic mode;
and according to the time sequence of determining the brightness of each target vehicle in the U target vehicles, if all X continuous conversion brightness in the V conversion brightness are greater than V ehicle Ythr2, switching the current image pickup mode from the linear mode to the wide dynamic mode.
Optionally, the third judging unit is configured to:
when shooting the same scene through image acquisition equipment, determining the exposure time, the brightness gain and the aperture conversion coefficient of the image acquisition equipment and acquiring the image brightness of each target vehicle in the M target vehicles;
determining the brightness of the current shooting environment according to the exposure duration, the brightness gain, the aperture conversion coefficient and the image brightness;
and judging the size relation between the current shooting environment brightness and the preset environment brightness range.
In a third aspect, an embodiment of the present invention further provides a computer apparatus, where the computer apparatus includes a processor, and the processor is configured to implement the steps of the method for switching the image capturing mode as described above when executing the computer program stored in the memory.
In a fourth aspect, embodiments of the present invention further provide a readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method for switching the image capturing mode as described above.
The invention has the following beneficial effects:
the embodiment of the invention provides a method and a device for switching a camera shooting mode, a computer device and a readable storage medium, wherein the method comprises the steps of firstly, judging the size relation between the current shooting environment brightness aiming at M target vehicles and a preset environment brightness range, and then, if the current shooting environment brightness is larger than the maximum value of the preset environment brightness range, judging whether the current camera shooting mode is switched into a linear mode or a wide dynamic mode according to the license plate brightness and the current illumination scene of each target vehicle in the M target vehicles; and if the current shooting environment brightness is larger than the minimum value of the preset environment brightness range, judging whether the current shooting mode is switched to the linear mode or the wide dynamic mode according to the body brightness and the body color of each target vehicle in the M target vehicles. That is, different image capturing mode switching strategies are adopted according to different conditions of the current shooting environment brightness. Specifically, when the current shooting environment brightness is larger than the preset environment brightness range, the shooting mode is switched by combining the license plate brightness and the illumination scene, and when the current shooting environment brightness is smaller than the preset environment brightness range, the shooting mode is switched by combining the vehicle body brightness and the vehicle body color, so that the target vehicle and the whole picture are comprehensively monitored under all weather conditions, and the quality of comprehensive monitoring is improved.
Drawings
Fig. 1 is a flowchart of a method for switching a shooting mode according to an embodiment of the present invention;
fig. 2 is a flowchart of a method in step S102 in the method for switching the image capturing mode according to the embodiment of the present invention;
fig. 3 is a flowchart of a method in step S202 of a method for switching a shooting mode according to an embodiment of the present invention;
fig. 4 is a flowchart of a method in step S206 of the method for switching the image capturing mode according to the embodiment of the present invention;
fig. 5 is a flowchart of a method in step S103 of a method for switching an image capturing mode according to an embodiment of the present invention;
fig. 6 is a flowchart of a method after step S503 in the method for switching the image capturing mode according to the embodiment of the present invention;
fig. 7 is a flowchart of a method in step S101 of a method for switching an image capturing mode according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a device for switching an image capturing mode according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprises" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to better understand the technical solutions of the present invention, the technical solutions of the present invention are described in detail below with reference to the drawings and the specific embodiments, and it should be understood that the specific features in the embodiments and the embodiments of the present invention are detailed descriptions of the technical solutions of the present invention, and are not limitations of the technical solutions of the present invention, and the technical features in the embodiments and the embodiments of the present invention may be combined with each other without conflict.
At present, in daytime, if the current illumination scene is a backlight condition, the brightness of the license plate in the image collected by the monitoring camera is often lower than the background brightness, and if the current illumination scene is a frontlight condition, the brightness of the license plate in the image collected by the monitoring camera is often higher than the background brightness. The large difference between the brightness of the license plate and the background brightness will influence the monitoring quality of the vehicle. In addition, at night, vehicle driver often need open the night-light and assist the vehicle and travel, and in case the night-light is opened, the great lamp of night-light is dizzy will influence vehicle monitoring quality. Therefore, the existing comprehensive monitoring quality is poor.
In view of this, an embodiment of the present invention provides a method for switching an image capturing mode, as shown in fig. 1, the method for switching an image capturing mode includes:
s101: judging the size relation between the current shooting environment brightness of the M target vehicles and a preset environment brightness range, wherein the preset environment brightness range is [ lumaThr1, lumaThr2], including end point values, and M is a positive integer;
in the embodiment of the present invention, the M target vehicles may be vehicles passing through a preset monitoring area. The preset ambient brightness range may be a brightness interval set according to an empirical value. That is, lumaThr1 and lumaThr2 in the preset ambient brightness range may be values set according to empirical values, wherein lumaThr1< lumaThr 2. For example, if the brightness of the current shooting environment is greater than lumath 2, the current shooting environment is considered to be daytime. And if the brightness of the current shooting environment is less than lumath 1, the current shooting environment is considered to be night. When the current shooting environment brightness is within the preset environment brightness range, the current shooting environment corresponds to evening or dawn. In the specific implementation process, the judgment precision of the day and night conditions is improved by setting the preset environment brightness range, so that the monitoring quality is improved.
S102: if the current shooting environment brightness is determined to be greater than lumaThr2 according to the size relationship, judging whether the current shooting mode is switched to a linear mode or a wide dynamic mode according to the license plate brightness and the current illumination scene of each target vehicle in the M target vehicles;
in the embodiment of the present invention, if the current shooting environment brightness is greater than lumath 2, the current environment may be daytime, and usually in the daytime, the environment brightness is brighter, and the illumination scene may include a normal scene, a backlight scene, and a frontlight scene. In a normal scene, the difference between the license plate brightness and the background brightness is small, in a backlight scene, the license plate brightness is far lower than the background brightness, and in a frontlight scene, the license plate brightness is far higher than the background brightness. In an initial situation, an image capture device for vehicle monitoring is in a normal scene by default. In addition, when the brightness of the current shooting environment is greater than lumaThr2, the current shooting mode is judged to be switched to the linear mode or the wide dynamic mode by combining the license plate brightness and the current illumination scene, and then the license plate brightness which is focused and the illumination scene related to the whole monitoring picture are combined together to judge whether the current shooting mode is switched, so that the consistency between the license plate brightness which is focused and the whole picture brightness is ensured, and the comprehensive monitoring quality is improved.
S103: and if the current shooting environment brightness is determined to be smaller than lumaThr1 according to the size relationship, judging whether the current shooting mode is switched to the linear mode or the wide dynamic mode according to the vehicle body brightness and the vehicle body color of each target vehicle in the M target vehicles.
In the embodiment of the invention, if the brightness of the current shooting environment is less than lumath 1, the current environment can be at night, usually at night, the environment brightness is darker, the lamp halo of the vehicle is larger, at the moment, the brightness of the vehicle body and the color of the vehicle body are combined together to judge whether to switch the current shooting mode, so that the consistency between the vehicle which is focused on and the brightness of the whole picture is ensured, and the comprehensive monitoring quality is improved.
In the embodiment of the invention, firstly, the size relation between the current shooting environment brightness of M target vehicles and the preset environment brightness range is judged, and then, if the current shooting environment brightness is larger than the maximum value of the preset environment brightness range, the current shooting mode is judged to be switched into a linear mode or a wide dynamic mode according to the license plate brightness and the current illumination scene of each target vehicle in the M target vehicles; and if the current shooting environment brightness is larger than the minimum value of the preset environment brightness range, judging whether the current shooting mode is switched to the linear mode or the wide dynamic mode according to the body brightness and the body color of each target vehicle in the M target vehicles. That is, different image capturing mode switching strategies are adopted according to different conditions of the current shooting environment brightness. Specifically, when the current shooting environment brightness is larger than the preset environment brightness range, the shooting mode is switched by combining the license plate brightness and the illumination scene, and when the current shooting environment brightness is smaller than the preset environment brightness range, the shooting mode is switched by combining the vehicle body brightness and the vehicle body color, so that the target vehicle and the whole picture are comprehensively monitored under all weather conditions, and the quality of comprehensive monitoring is improved.
In the embodiment of the present invention, as shown in fig. 2, step S102: if the current shooting environment brightness is determined to be greater than lumaThr2 according to the size relationship, judging whether the current shooting mode is switched to a linear mode or a wide dynamic mode according to the license plate brightness and the current illumination scene of each target vehicle in the M target vehicles, wherein the judgment comprises the following steps:
s201: determining the license plate brightness of each target vehicle in the M target vehicles;
s202: determining N license plate brightness within a preset license plate brightness range from the license plate brightness of each target vehicle in the M target vehicles, wherein the preset license plate brightness range is [ placeMinY, placeMaxY ], including end point values, and N is a positive integer not greater than M;
s203: determining a first size relationship between each license plate brightness of the N license plate brightness and a first environment brightness range, wherein the first environment brightness range is [ blThr1, blThr2], including endpoint values;
s204: judging whether to switch the current illumination scene according to the first size relation so as to obtain a switched illumination scene;
s205: determining the maintaining time length of the switched illumination scene;
s206: and judging whether the current shooting mode is switched to a linear mode or a wide dynamic mode according to the maintaining duration of the switched illumination scene.
In the specific implementation process, the specific implementation process from step S201 to step S206 is as follows:
firstly, determining the license plate brightness of each target vehicle in M target vehicles; then, N license plate luminances within a preset license plate luminance range are determined from the license plate luminances of each target vehicle in the M target vehicles, the preset license plate luminance range is [ placeMinY, placeMaxY ], including end point values, the placeMinY < placeMaxY, and N is a positive integer not greater than M. That is to say, N license plate luminances within the preset license plate luminance range are screened from the M license plate luminances, for example, 2 license plate luminances within the preset license plate luminance range are screened from the 5 license plate luminances. The preset license plate brightness range may be a range value preset according to an empirical value. Then, a first size relation between each license plate brightness in the N license plate brightness and a first environment brightness range is determined, namely, only the N license plate brightness which accords with the preset license plate brightness range is used for switching judgment of a subsequent shooting mode, so that mistaken switching of the shooting mode is avoided, and the switching precision of the shooting mode is improved. The first ambient brightness range is [ blThr1, blThr2], including end point values, blThr1< blThr2, and the first ambient brightness range may be a range value preset according to an empirical value, and according to a first size relationship, whether to switch the current illumination scene is determined, so as to obtain the switched illumination scene. That is, whether the current illumination scene is switched or not is judged according to the first size relation between the license plate brightness and the first environment brightness range. Then, the duration of the switched illumination scene is determined. And judging whether the current shooting mode is switched to a linear mode or a wide dynamic mode according to the maintaining duration of the switched illumination scene. Whether the current shooting mode is switched or not is judged through the maintaining time length of the switched illumination scene, so that the error switching of the current shooting mode is avoided, and the switching precision of the shooting mode is improved.
In the embodiment of the present invention, if the current illumination scene is a normal scene, step S204: judging whether to switch the current illumination scene according to the first size relationship to obtain a switched illumination scene, wherein the judging step comprises the following steps: and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the continuous P license plate brightness in the N license plate brightness is less than blThr1, switching the current illumination scene from the normal scene to an inverse light scene, wherein P is a positive integer not greater than N.
In a specific implementation process, an illumination scene where the monitoring camera is in a default condition is a normal scene, and according to a time sequence for determining the license plate brightness of each target vehicle in the M target vehicles, if the brightness of continuous P license plates in the N license plate brightness is less than blThr1, the current illumination scene is switched from the normal scene to a backlight scene. That is to say, only if the brightness of the continuous P license plates is less than blThr1, the current illumination scene can be switched from the normal scene to the backlight scene, thereby avoiding the false switching of the illumination scene and improving the switching precision of the illumination scene. For example, the current illumination scene may be represented by a mark bit, the current illumination scene may be represented by "00" in the mark bit, the current illumination scene may be represented by "01" in the mark bit, the current illumination scene may be represented by "10" in the mark bit, and the current illumination scene may be switched from the normal scene to the backlight scene by adjusting the mark bit from "00" to "01 in the mark bit.
In the embodiment of the present invention, if the current illumination scene is a backlight scene, step S204: judging whether to switch the current illumination scene according to the first size relationship to obtain a switched illumination scene, wherein the judging step comprises the following steps:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of R continuous license plates in the N license plate brightness is greater than blThr2, switching the current shooting scene from the backlight scene to a normal scene, wherein R is a positive integer not greater than N.
In a specific implementation process, if the current illumination scene is a backlight scene, for example, the mark bit is "01", according to a time sequence of determining the license plate brightness of each target vehicle in the M target vehicles, if the brightness of R continuous license plates in the N license plate brightness is greater than blThr2, the current illumination scene is switched from the backlight scene to a normal scene. For example, the flag bit is switched from "01" to "00". That is to say, only if the brightness of the R continuous license plates is less than blThr1, the current illumination scene can be switched from the backlight scene to the normal scene, thereby avoiding the false switching of the illumination scene and improving the switching precision of the illumination scene. R and P may be the same positive integer or different positive integers.
In the embodiment of the present invention, referring to fig. 3, in step S202: after determining N license plate brightness within a preset license plate brightness range from the license plate brightness of each target vehicle in the M target vehicles, the method further comprises the following steps:
s301: determining a second magnitude relationship between each of the N license plate luminances and a second ambient luminance range, wherein the second ambient luminance range is [ olth 1, olth 2], inclusive, olth 1> blThr 2;
s302: and judging whether to switch the current illumination scene according to the second size relation so as to obtain the switched illumination scene.
In the specific implementation process, the specific implementation process from step S301 to step S302 is as follows:
first, a second magnitude relationship between each of the N license plate luminances and a second ambient luminance range [ olth 1, olth 2], including end points, olth 1< olth 2, which may be a predetermined range of values based on empirical values, is determined. Wherein olth 1> blThr2, that is, the second ambient brightness range is non-overlapping with the first ambient brightness range, and the minimum value of the second ambient brightness range is greater than the maximum value of the first ambient brightness range. And then, judging whether to switch the current illumination scene according to the second size relation, thereby obtaining the switched illumination scene. That is, whether the current illumination scene is switched or not is judged according to the second size relation between the license plate brightness and the second environment brightness range. Therefore, the error switching of the illumination scene is avoided, and the accuracy of the switching of the illumination scene is improved. After the switching judgment of the illumination scene is carried out, whether the shooting mode is switched or not can be further judged according to the maintaining time length of the illumination scene, so that the switching precision of the shooting mode is improved.
In the embodiment of the present invention, if the current illumination scene is a normal scene, step S302: judging whether to switch the current illumination scene according to the second magnitude relation so as to obtain a switched illumination scene, wherein the judging step comprises the following steps:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of S continuous license plates in the N license plate brightness is greater than olthre 2, switching the current illumination scene from the normal scene to a front scene, wherein S is a positive integer not greater than N.
In a specific implementation process, if the current illumination scene is a normal scene, for example, the mark position is "00", according to the time sequence of determining the license plate brightness of each target vehicle in the M target vehicles, if the intensity of S continuous license plates in the N license plate brightness is greater than olThr2, the current illumination scene is switched from the normal scene to the front scene. For example, the flag bit is switched from "00" to "10". That is to say, only if the brightness of the S continuous license plates is greater than olthre 2, the current illumination scene can be switched from the normal scene to the taillight scene, so that the false switching of the illumination scene is avoided, and the switching precision of the illumination scene is improved.
In the embodiment of the present invention, if the current illumination scene is a front-lighting scene, step S302: judging whether to switch the current illumination scene according to the second magnitude relation so as to obtain a switched illumination scene, wherein the judging step comprises the following steps:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of T continuous license plates in the N license plate brightness is less than olthre 1, switching the current illumination scene from the front scene to a normal scene, wherein T is a positive integer not greater than N.
In a specific implementation process, if the current illumination scene is a front-lighting scene, for example, the mark position is "10", according to the time sequence of determining the license plate brightness of each target vehicle in the M target vehicles, if the intensity of T continuous license plates in the N license plate brightness is less than olthre 1, the current illumination scene is switched from the front-lighting scene to a normal scene. For example, the flag bit is switched from "10" to "00". That is to say, only if the brightness of the T continuous license plates is less than olthre 1, the current illumination scene can be switched from the front scene to the normal scene, thereby avoiding the false switching of the illumination scene and improving the switching precision of the illumination scene.
In the embodiment of the present invention, referring to fig. 4, if the current image capturing mode is the linear mode, step S206: judging whether the current shooting mode is switched to a linear mode or a wide dynamic mode according to the maintaining duration of the switched illumination scene, and the judging comprises the following steps:
s401: judging whether the maintaining time length of the switched illumination scene is greater than a preset time length or not;
s402: and if the switched illumination scene is a backlight scene or a frontlight scene, and the maintaining time length of the switched illumination scene is longer than the preset time length, switching the current shooting mode from the linear mode to the wide dynamic mode.
In a specific implementation process, first, the duration of the current illumination scene is determined, and if the current illumination scene is switched, the duration of the current illumination scene is determined, that is, the duration of the switched illumination scene is determined. Then, whether the duration of the switched illumination scene is longer than a preset duration is judged, and the preset duration can be preset according to experience or can be set randomly. And if the switched illumination scene is a backlight scene and the maintaining time of the switched illumination scene is longer than the preset time, switching the current shooting mode from the linear mode to the wide dynamic mode. That is, only when the duration of the switched illumination scene is longer than the preset duration, the current shooting mode is switched, so that the switching efficiency of the shooting mode is improved. Because the current illumination scene is a backlight scene and is maintained for a long time, the current camera shooting mode is switched from the linear mode to the wide dynamic mode, the effect of the license plate brightness mainly concerned in vehicle monitoring in the backlight scene is ensured, the whole picture brightness is considered, and the quality of comprehensive monitoring is ensured. If the switched illumination scene is a forward-light scene, the specific implementation process of switching the current camera shooting mode from the linear mode to the wide dynamic mode is the same as the case that the switched illumination scene is a backward-light scene through judging the maintaining time length of the forward-light scene when the maintaining time length of the forward-light scene is longer than the preset time length, and the description is omitted here. Generally, when the illumination scene is a backlight scene or a frontlight scene, the shooting mode is a wide dynamic mode, and the monitoring effect is better.
In this embodiment of the present invention, if the current image capturing mode is the wide dynamic mode, step S206: judging whether the current shooting mode is switched to a linear mode or a wide dynamic mode according to the maintaining duration of the switched illumination scene, and the judging comprises the following steps:
and if the switched illumination scene is a normal scene and the maintaining time of the switched illumination scene is longer than the preset time, switching the current shooting mode from the wide dynamic mode to the linear mode.
In the embodiment of the present invention, if the switched illumination scene is a normal scene, by determining the duration of the normal scene, when the duration of the normal scene is longer than the preset duration, the specific implementation process of switching the current shooting mode from the wide dynamic mode to the linear mode is the same as the case where the switched illumination scene is a backlight scene, which is not described herein again. Generally, when the illumination scene is a normal scene, the shooting mode is a linear mode, and the monitoring effect is better.
In the embodiment of the present invention, as shown in fig. 5, if the current image capturing mode is the wide dynamic mode, step S103: judging whether the current shooting mode is switched to the linear mode or the wide dynamic mode according to the body brightness and the body color of each target vehicle in the M target vehicles, wherein the judging step comprises the following steps:
s501: determining U target vehicles with black body colors from the M target vehicles, wherein U is a positive integer not greater than M;
s502: determining the body brightness of each of the U target vehicles;
s503: determining V body brightness located in a preset body brightness range from the body brightness of each target vehicle in the U target vehicles, wherein the preset body brightness range is [ vehicle Ythr1, V vehicle Ythr2], including end points, and V is a positive integer not greater than U;
s504: according to the time sequence of determining the brightness of each target vehicle in the U target vehicles, if the brightness of continuous W vehicle bodies in the V vehicle body brightness is smaller than the vehicle Ythr1, the current image pickup mode is switched from the wide dynamic mode to the linear mode, wherein W is a positive integer not larger than V.
In the specific implementation process, the specific implementation process from step S501 to step S504 is as follows:
firstly, determining U target vehicles with black body colors from M target vehicles, and then, judging whether the current camera shooting mode is switched or not according to the U target vehicles with black color, wherein the overall brightness is darker when the current shooting environment brightness is less than lumaThr1, once the monitoring effect of the black vehicle is good, the monitoring effect of the vehicles with other colors is also good, so that the judgment on whether the current camera shooting mode is switched or not is carried out by determining the U target vehicles with black body colors from the M target vehicles, and the precision of camera shooting mode switching can be ensured. Then, the body brightness of each of the U target vehicles is determined, and V body brightnesses within a preset body brightness range [ vehicle Ythr1, V ehicle Ythr2], including end point values, which may be preset according to an empirical value or any value, are determined from the body brightness of each of the U target vehicles. Then, according to the time sequence of determining the brightness of each target vehicle in the U target vehicles, if the brightness of the continuous W vehicles in the V vehicles is less than the vehicle Ythr1, the current shooting mode is switched from the wide dynamic mode to the linear mode, so that the mistaken switching of the shooting mode is avoided. In addition, when the brightness is low, the current shooting mode is switched from the wide dynamic mode to the linear mode, so that the brightness of the vehicle body can be ensured, and the recognition accuracy of the license plate can be further ensured.
In the embodiment of the present invention, as shown in fig. 6, if the current imaging mode is the linear mode, in S503: after determining V body luminances located in a preset body luminance range from the body luminances of each of the U target vehicles, the method further comprises:
s601: determining V conversion brightness obtained by multiplying the V vehicle body brightness by a brightness conversion coefficient, wherein the brightness conversion coefficient is used for representing a coefficient for converting the linear mode into the wide dynamic mode;
s602: and according to the time sequence of determining the brightness of each target vehicle in the U target vehicles, if all X continuous conversion brightness in the V conversion brightness are greater than V ehicle Ythr2, switching the current image pickup mode from the linear mode to the wide dynamic mode.
In the specific implementation process, the specific implementation process of step S601 to step S602 is as follows:
firstly, V conversion brightness obtained by multiplying V automobile body brightness by a brightness conversion coefficient is determined, wherein the brightness conversion coefficient is used for representing a coefficient for converting a linear mode into a wide dynamic mode, and the overall brightness in the wide dynamic mode is smaller than that in the linear mode. The luminance conversion coefficient may be preset empirically, and a person skilled in the art may set a specific value of the luminance conversion coefficient according to the needs of an application scenario, which is not limited herein. Then, according to the time sequence of determining the vehicle body brightness of each target vehicle in the U target vehicles, if X continuous conversion brightness in the V conversion brightness are all larger than V ehicle Ythr2, the current image pickup mode is switched from the linear mode to the wide dynamic mode. That is to say, only when the X continuous conversion luminances are all greater than v ehicle Ythr2, the current image capturing mode is switched from the linear mode to the wide dynamic mode, so that the false switching of the image capturing mode is avoided, and the switching precision of the image capturing mode is improved.
In the embodiment of the present invention, as shown in fig. 7, step S101: judging the size relation between the current shooting environment brightness and the preset environment brightness range aiming at the M target vehicles, wherein the method comprises the following steps:
s701: when shooting the same scene through image acquisition equipment, determining the exposure time, the brightness gain and the aperture conversion coefficient of the image acquisition equipment and acquiring the image brightness of each target vehicle in the M target vehicles;
s702: determining the brightness of the current shooting environment according to the exposure duration, the brightness gain, the aperture conversion coefficient and the image brightness;
s703: and judging the size relation between the current shooting environment brightness and the preset environment brightness range.
In the specific implementation process, the specific implementation processes of steps S701 to S703 are as follows:
in the embodiment of the invention, firstly, when shooting the same scene through image acquisition equipment, determining the exposure time, the brightness gain and the aperture conversion coefficient of the image acquisition equipment and acquiring the image brightness of each target vehicle in M target vehicles; the exposure duration, the brightness gain, and the aperture conversion coefficient are intrinsic parameters of the image capturing device, and may be related parameters set according to actual application requirements, which are not limited herein. After the exposure time, the brightness gain, the aperture conversion coefficient and the image brightness are determined, the brightness of the current shooting environment can be determined. The current shooting environment brightness is determined according to a plurality of parameters, so that the detection efficiency of the current shooting environment brightness is improved. And then, according to the size relationship between the current shooting environment brightness and the preset environment brightness range, judging whether the subsequent shooting mode is switched or not, wherein the relationship between the current shooting environment brightness and the preset environment brightness range can be a greater relationship, an equal relationship or a smaller relationship, and according to different size relationships, different judgment strategies for judging whether the shooting mode is switched or not are adopted, so that the switching precision of the shooting mode is improved, and the comprehensive monitoring quality is ensured.
Based on the same inventive concept, as shown in fig. 8, an embodiment of the present invention provides a switching apparatus of an image capturing mode, including:
a first judging unit 10, configured to judge a magnitude relationship between current shooting ambient brightness for M target vehicles and a preset ambient brightness range, where the preset ambient brightness range is [ lumaThr1, lumaThr2], including end points, and M is a positive integer;
a second determining unit 20, configured to determine, if it is determined according to the magnitude relationship that the current shooting environment brightness is greater than lumath 2, according to the license plate brightness and the current illumination scene of each of the M target vehicles, whether the current shooting mode is switched to the linear mode or the wide dynamic mode;
a third determining unit 30, configured to determine, if it is determined according to the magnitude relationship that the current shooting environment brightness is less than lumath 1, according to the vehicle body brightness and the vehicle body color of each of the M target vehicles, whether the current shooting mode is switched to the linear mode or the wide dynamic mode.
Since the functional description of each functional module in the image capturing mode switching device according to the embodiment of the present invention has been described in detail in the foregoing, detailed description thereof is omitted here.
The division of the modules in the embodiments of the present application is schematic, and only one logical function division is provided, and in actual implementation, there may be another division manner, and in addition, each functional module in each embodiment of the present application may be integrated in one processor, may also exist alone physically, or may also be integrated in one module by two or more modules. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
In some possible embodiments, the aspects of the method for switching the image capturing mode provided by the present application may also be implemented in the form of a program product including program code for causing a master device to perform the steps in the method for switching the image capturing mode according to various exemplary embodiments of the present invention described above in this specification when the program product is run on a computing device.
In the embodiment of the present invention, the second judging unit 20 is configured to:
determining the license plate brightness of each target vehicle in the M target vehicles;
determining N license plate brightness within a preset license plate brightness range from the license plate brightness of each target vehicle in the M target vehicles, wherein the preset license plate brightness range is [ placeMinY, placeMaxY ], including end point values, and N is a positive integer not greater than M;
determining a first size relationship between each license plate brightness of the N license plate brightness and a first environment brightness range, wherein the first environment brightness range is [ blThr1, blThr2], including endpoint values;
judging whether to switch the current illumination scene according to the first size relation so as to obtain a switched illumination scene;
determining the maintaining time length of the switched illumination scene;
and judging whether the current shooting mode is a linear mode or a wide dynamic mode according to the maintaining duration of the switched illumination scene.
In this embodiment of the present invention, if the current illumination scene is a normal scene, the second determining unit 20 is configured to:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the continuous P license plate brightness in the N license plate brightness is less than blThr1, switching the current illumination scene from the normal scene to an inverse light scene, wherein P is a positive integer not greater than N.
In this embodiment of the present invention, if the current illumination scene is a backlight scene, the second determining unit 20 is configured to:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of R continuous license plates in the N license plate brightness is greater than blThr2, switching the current shooting scene from the backlight scene to a normal scene, wherein R is a positive integer not greater than N.
In this embodiment of the present invention, after determining N license plate luminances located in a preset license plate luminance range from the license plate luminances of each of the M target vehicles, the second determining unit 20 is further configured to:
determining a second magnitude relationship between each of the N license plate luminances and a second ambient luminance range, wherein the second ambient luminance range is [ olth 1, olth 2], inclusive, olth 1> blThr 2;
and judging whether to switch the current illumination scene according to the second size relation so as to obtain the switched illumination scene.
In this embodiment of the present invention, if the current illumination scene is a normal scene, the second determining unit 20 is configured to:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of S continuous license plates in the N license plate brightness is greater than olthre 2, switching the current shooting scene from the normal scene to a front scene, wherein S is a positive integer not greater than N.
In this embodiment of the present invention, if the current illumination scene is a front-light scene, the second determining unit 20 is configured to:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of T continuous license plates in the N license plate brightness is less than olthre 1, switching the current illumination scene from the front scene to a normal scene, wherein T is a positive integer not greater than N.
In this embodiment of the present invention, if the current image capturing mode is the linear mode, the second determining unit 20 is configured to:
judging whether the maintaining time length of the switched illumination scene is greater than a preset time length or not;
and if the switched illumination scene is a backlight scene or a frontlight scene, and the maintaining time length of the switched illumination scene is longer than the preset time length, switching the current shooting mode from the linear mode to the wide dynamic mode.
In this embodiment of the present invention, if the current image capturing mode is the wide dynamic mode, the second determining unit 20 is configured to:
and if the switched illumination scene is a normal scene and the maintaining time of the switched illumination scene is longer than the preset time, switching the current shooting mode from the wide dynamic mode to the linear mode.
In this embodiment of the present invention, if the current image capturing mode is the wide dynamic mode, the third determining unit 30 is configured to:
determining U target vehicles with black body colors from the M target vehicles, wherein U is a positive integer not greater than M;
determining the body brightness of each of the U target vehicles;
determining V body brightness located in a preset body brightness range from the body brightness of each target vehicle in the U target vehicles, wherein the preset body brightness range is [ vehicle Ythr1, V vehicle Ythr2], including end points, and V is a positive integer not greater than U;
according to the time sequence of determining the brightness of each target vehicle in the U target vehicles, if the brightness of continuous W vehicle bodies in the V vehicle body brightness is smaller than the vehicle Ythr1, the current image pickup mode is switched from the wide dynamic mode to the linear mode, wherein W is a positive integer not larger than V.
In the embodiment of the present invention, if the current image capturing mode is the linear mode, after V vehicle body luminances located in a preset vehicle body luminance range are determined from the vehicle body luminances of each of the U target vehicles, the third determining unit 30 is configured to:
determining V conversion brightness obtained by multiplying the V vehicle body brightness by a brightness conversion coefficient, wherein the brightness conversion coefficient is used for representing a coefficient for converting the linear mode into the wide dynamic mode;
and according to the time sequence of determining the brightness of each target vehicle in the U target vehicles, if all X continuous conversion brightness in the V conversion brightness are greater than V ehicle Ythr2, switching the current image pickup mode from the linear mode to the wide dynamic mode.
In the embodiment of the present invention, the third determining unit 30 is configured to:
when shooting the same scene through image acquisition equipment, determining the exposure time, the brightness gain and the aperture conversion coefficient of the image acquisition equipment and acquiring the image brightness of each target vehicle in the M target vehicles;
determining the brightness of the current shooting environment according to the exposure duration, the brightness gain, the aperture conversion coefficient and the image brightness;
and judging the size relation between the current shooting environment brightness and the preset environment brightness range.
Based on the same inventive concept, as shown in fig. 9, an embodiment of the present invention further provides a computer apparatus, which includes a processor 40, and the processor 40 is configured to implement the steps of the method for switching the image capturing mode as described above when executing the computer program stored in the memory 50.
The processor 40 may be a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like that implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method for generating a medical image text report disclosed by the embodiment of the invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 50, and the processor 40 reads the information in the memory 50 and completes the steps of the signal processing flow in combination with the hardware thereof.
Specifically, the processor 40 is configured to read a program in the memory 50 and execute any one of the steps described in the method for switching the image capturing mode.
Based on the same inventive concept, embodiments of the present invention also provide a readable storage medium on which a computer program is stored, which, when executed by a processor, implements the method for switching the image capturing mode as described above.
The embodiment of the invention provides a method and a device for switching a camera shooting mode, a computer device and a readable storage medium, wherein the method comprises the steps of firstly, judging the size relation between the current shooting environment brightness aiming at M target vehicles and a preset environment brightness range, and then, if the current shooting environment brightness is larger than the maximum value of the preset environment brightness range, judging whether the current camera shooting mode is switched into a linear mode or a wide dynamic mode according to the license plate brightness and the current illumination scene of each target vehicle in the M target vehicles; and if the current shooting environment brightness is larger than the minimum value of the preset environment brightness range, judging whether the current shooting mode is switched to the linear mode or the wide dynamic mode according to the body brightness and the body color of each target vehicle in the M target vehicles. That is, different image capturing mode switching strategies are adopted according to different conditions of the current shooting environment brightness. Specifically, when the current shooting environment brightness is larger than the preset environment brightness range, the shooting mode is switched by combining the license plate brightness and the illumination scene, and when the current shooting environment brightness is smaller than the preset environment brightness range, the shooting mode is switched by combining the vehicle body brightness and the vehicle body color, so that the target vehicle and the whole picture are comprehensively monitored under all weather conditions, and the quality of comprehensive monitoring is improved.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (15)

1. A method for switching an image capturing mode, comprising:
judging the size relation between the current shooting environment brightness of the M target vehicles and a preset environment brightness range, wherein the preset environment brightness range is [ lumaThr1, lumaThr2], including end point values, and M is a positive integer;
if the current shooting environment brightness is determined to be greater than lumaThr2 according to the size relationship, determining a current illumination scene according to the license plate brightness of each target vehicle in the M target vehicles, and judging whether the current shooting mode is switched to a linear mode or a wide dynamic mode according to the current illumination scene;
and if the current shooting environment brightness is determined to be smaller than lumaThr1 according to the size relationship, judging whether the current shooting mode is switched to the linear mode or the wide dynamic mode according to the vehicle body brightness and the vehicle body color of each target vehicle in the M target vehicles.
2. The switching method according to claim 1, wherein said determining whether the current camera mode is switched to the linear mode or the wide dynamic mode according to the license plate brightness and the current illumination scene of each of the M target vehicles comprises:
determining the license plate brightness of each target vehicle in the M target vehicles;
determining N license plate brightness within a preset license plate brightness range from the license plate brightness of each target vehicle in the M target vehicles, wherein the preset license plate brightness range is [ placeMinY, placeMaxY ], including end point values, and N is a positive integer not greater than M;
determining a first size relationship between each license plate brightness of the N license plate brightness and a first environment brightness range, wherein the first environment brightness range is [ blThr1, blThr2], including endpoint values;
judging whether to switch the current illumination scene according to the first size relation so as to obtain a switched illumination scene;
determining the maintaining time length of the switched illumination scene;
and judging whether the current shooting mode is switched to a linear mode or a wide dynamic mode according to the maintaining duration of the switched illumination scene.
3. The switching method according to claim 2, wherein if the current illumination scene is a normal scene, said determining whether to switch the current illumination scene according to the first magnitude relationship comprises:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the continuous P license plate brightness in the N license plate brightness is less than blThr1, switching the current illumination scene from the normal scene to an inverse light scene, wherein P is a positive integer not greater than N.
4. The switching method according to claim 2, wherein if the current illumination scene is a backlight scene, said determining whether to switch the current illumination scene according to the first magnitude relationship comprises:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of R continuous license plates in the N license plate brightness is greater than blThr2, switching the current shooting scene from the backlight scene to a normal scene, wherein R is a positive integer not greater than N.
5. The switching method according to claim 2, wherein after said determining N license plate luminances located within a preset license plate luminance range from among the license plate luminances of respective ones of the M target vehicles, the method further comprises:
determining a second magnitude relationship between each of the N license plate luminances and a second ambient luminance range, wherein the second ambient luminance range is [ olth 1, olth 2], inclusive, olth 1> blThr 2;
and judging whether to switch the current illumination scene according to the second size relation so as to obtain the switched illumination scene.
6. The switching method according to claim 5, wherein if the current illumination scene is a normal scene, said determining whether to switch the current illumination scene according to the second magnitude relationship comprises:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of S continuous license plates in the N license plate brightness is greater than olthre 2, switching the current shooting scene from the normal scene to a front scene, wherein S is a positive integer not greater than N.
7. The switching method according to claim 5, wherein if the current illumination scene is a front-lighting scene, said determining whether to switch the current illumination scene according to the second magnitude relationship comprises:
and according to the time sequence of the license plate brightness of each target vehicle in the M target vehicles, if the brightness of T continuous license plates in the N license plate brightness is less than olthre 1, switching the current illumination scene from the front scene to a normal scene, wherein T is a positive integer not greater than N.
8. The switching method according to claim 2, wherein if the current image capturing mode is the linear mode, the determining whether the current image capturing mode is switched to the linear mode or the wide dynamic mode according to the duration of the switched illumination scene includes:
judging whether the maintaining time length of the switched illumination scene is greater than a preset time length or not;
and if the switched illumination scene is a backlight scene or a frontlight scene, and the maintaining time length of the switched illumination scene is longer than the preset time length, switching the current shooting mode from the linear mode to the wide dynamic mode.
9. The switching method according to claim 2, wherein if the current image capturing mode is the wide dynamic mode, the determining whether the current image capturing mode is switched to the linear mode or the wide dynamic mode according to the duration of the switched illumination scene includes:
and if the switched illumination scene is a normal scene and the maintaining time of the switched illumination scene is longer than the preset time, switching the current shooting mode from the wide dynamic mode to the linear mode.
10. The switching method according to claim 1, wherein if the current image capturing mode is the wide dynamic mode, the determining whether the current image capturing mode is switched to the linear mode or the wide dynamic mode according to the body brightness and the body color of each of the M target vehicles comprises:
determining U target vehicles with black body colors from the M target vehicles, wherein U is a positive integer not greater than M;
determining the body brightness of each of the U target vehicles;
determining V body brightness located in a preset body brightness range from the body brightness of each target vehicle in the U target vehicles, wherein the preset body brightness range is [ vehicle Ythr1, V vehicle Ythr2], including end points, and V is a positive integer not greater than U;
according to the time sequence of determining the brightness of each target vehicle in the U target vehicles, if the brightness of continuous W vehicle bodies in the V vehicle body brightness is smaller than the vehicle Ythr1, the current image pickup mode is switched from the wide dynamic mode to the linear mode, wherein W is a positive integer not larger than V.
11. The switching method according to claim 10, wherein if the current image capturing mode is the linear mode, after V body luminances within a preset body luminance range are determined from the body luminances of the respective U target vehicles, the method further comprises:
determining V conversion brightness obtained by multiplying the V vehicle body brightness by a brightness conversion coefficient, wherein the brightness conversion coefficient is used for representing a coefficient for converting the linear mode into the wide dynamic mode;
and according to the time sequence of determining the brightness of each target vehicle in the U target vehicles, if all X continuous conversion brightness in the V conversion brightness are greater than V ehicle Ythr2, switching the current image pickup mode from the linear mode to the wide dynamic mode.
12. The switching method according to claim 1, wherein the determining a magnitude relationship between the current photographing ambient brightness and the preset ambient brightness range for the M target vehicles includes:
when shooting the same scene through image acquisition equipment, determining the exposure time, the brightness gain and the aperture conversion coefficient of the image acquisition equipment and acquiring the image brightness of each target vehicle in the M target vehicles;
determining the brightness of the current shooting environment according to the exposure duration, the brightness gain, the aperture conversion coefficient and the image brightness;
and judging the size relation between the current shooting environment brightness and the preset environment brightness range.
13. An apparatus for switching an image pickup mode, comprising:
the first judgment unit is used for judging the size relationship between the current shooting environment brightness of the M target vehicles and a preset environment brightness range, wherein the preset environment brightness range is [ lumaThr1, lumaThr2], comprises end point values, and M is a positive integer;
a second judging unit, configured to determine, if it is determined according to the magnitude relationship that the current shooting environment brightness is greater than lumath 2, a current illumination scene according to license plate brightness of each of the M target vehicles, and judge, according to the current illumination scene, whether a current shooting mode is switched to a linear mode or a wide dynamic mode;
and a third judging unit, configured to, if it is determined that the current shooting environment brightness is less than lumath 1 according to the magnitude relationship, judge, according to the vehicle body brightness and the vehicle body color of each of the M target vehicles, whether the current shooting mode is switched to the linear mode or the wide dynamic mode.
14. A computer arrangement, characterized in that the computer arrangement comprises a processor for implementing the steps of the method for switching camera modes according to any one of claims 1-12 when executing a computer program stored in a memory.
15. A readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the method of switching image capturing modes according to any one of claims 1 to 12.
CN202010040835.5A 2020-01-15 2020-01-15 Camera mode switching method and device, computer device and readable storage medium Active CN111031254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010040835.5A CN111031254B (en) 2020-01-15 2020-01-15 Camera mode switching method and device, computer device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010040835.5A CN111031254B (en) 2020-01-15 2020-01-15 Camera mode switching method and device, computer device and readable storage medium

Publications (2)

Publication Number Publication Date
CN111031254A CN111031254A (en) 2020-04-17
CN111031254B true CN111031254B (en) 2021-02-26

Family

ID=70202859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010040835.5A Active CN111031254B (en) 2020-01-15 2020-01-15 Camera mode switching method and device, computer device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111031254B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111586292B (en) * 2020-04-23 2021-10-22 浙江大华技术股份有限公司 Camera shooting state switching method and device and computer equipment
CN112217999B (en) * 2020-09-23 2022-02-18 浙江大华技术股份有限公司 Wide dynamic mode adjusting method and device, electronic equipment and storage medium
CN112183346A (en) * 2020-09-28 2021-01-05 浙江大华技术股份有限公司 Scene judgment method and device and electronic device
CN113343859A (en) * 2021-06-10 2021-09-03 浙江大华技术股份有限公司 Smoking behavior detection method and device, storage medium and electronic device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN203812397U (en) * 2014-03-19 2014-09-03 深圳市贝尔信科技有限公司 Urban road video monitor system
CN104345523A (en) * 2013-08-05 2015-02-11 杭州海康威视数字技术股份有限公司 Method and device for automatically controlling local lighting amount of intelligent traffic camera
CN104978746A (en) * 2015-06-26 2015-10-14 西安理工大学 Running vehicle body color identification method
CN105227843A (en) * 2015-10-20 2016-01-06 宇龙计算机通信科技(深圳)有限公司 The filming control method of terminal, the imaging control device of terminal and terminal
CN105959566A (en) * 2016-06-21 2016-09-21 北京奇虎科技有限公司 Image pickup mode switching method and device, and automobile data recorder
CN108322669A (en) * 2018-03-06 2018-07-24 广东欧珀移动通信有限公司 The acquisition methods and device of image, imaging device, computer readable storage medium and computer equipment
CN110329156A (en) * 2019-07-22 2019-10-15 浙江鸿泉车联网有限公司 The recognition methods of vehicle backlight blind area Chinese herbaceous peony information and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8699821B2 (en) * 2010-07-05 2014-04-15 Apple Inc. Aligning images
CN103905731B (en) * 2014-03-26 2017-11-28 武汉烽火众智数字技术有限责任公司 A kind of wide dynamic images acquisition method and system
KR101873576B1 (en) * 2016-10-31 2018-07-03 한국전자통신연구원 System and method for recognizing information from vehicle license plate
CN110049250B (en) * 2019-05-15 2020-11-27 重庆紫光华山智安科技有限公司 Camera shooting state switching method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104345523A (en) * 2013-08-05 2015-02-11 杭州海康威视数字技术股份有限公司 Method and device for automatically controlling local lighting amount of intelligent traffic camera
CN203812397U (en) * 2014-03-19 2014-09-03 深圳市贝尔信科技有限公司 Urban road video monitor system
CN104978746A (en) * 2015-06-26 2015-10-14 西安理工大学 Running vehicle body color identification method
CN105227843A (en) * 2015-10-20 2016-01-06 宇龙计算机通信科技(深圳)有限公司 The filming control method of terminal, the imaging control device of terminal and terminal
CN105959566A (en) * 2016-06-21 2016-09-21 北京奇虎科技有限公司 Image pickup mode switching method and device, and automobile data recorder
CN108322669A (en) * 2018-03-06 2018-07-24 广东欧珀移动通信有限公司 The acquisition methods and device of image, imaging device, computer readable storage medium and computer equipment
CN110329156A (en) * 2019-07-22 2019-10-15 浙江鸿泉车联网有限公司 The recognition methods of vehicle backlight blind area Chinese herbaceous peony information and device

Also Published As

Publication number Publication date
CN111031254A (en) 2020-04-17

Similar Documents

Publication Publication Date Title
CN111031254B (en) Camera mode switching method and device, computer device and readable storage medium
US20200333796A1 (en) Image processing method for autonomous driving and apparatus thereof
CN108206918B (en) Optical compensation method and device
JP4738778B2 (en) Image processing device, driving support device, and driving support system
US11425337B2 (en) Camera system, event recording system and event recording method
CN107709096B (en) System and method for processing streaming video images to correct for flicker of amplitude modulated light
US20150371097A1 (en) Image recognition system for vehicle for traffic sign board recognition
CN101893804A (en) Exposure control method and device
CN108860045B (en) Driving support method, driving support device, and storage medium
US8395698B2 (en) Exposure determining device and image processing apparatus
CN110837826B (en) License plate recognition method and related device based on self-adaptive strong light irradiation
WO2023124387A1 (en) Photographing apparatus obstruction detection method and apparatus, electronic device, storage medium, and computer program product
CN113747008B (en) Camera and light supplementing method
KR100878491B1 (en) Camera monitor system and method for controling the same
CN111435972B (en) Image processing method and device
JP2021527860A (en) Warning light detection method
Deegan LED flicker: Root cause, impact and measurement for automotive imaging applications
CN113994391B (en) Vehicle passing reminding method and device and vehicle-mounted terminal
US11882367B2 (en) Image processing method for producing a high dynamic range image of a scene
CN112565618B (en) Exposure control device
CN115482684A (en) Safe driving control method and system
JP2013257630A (en) Image processing apparatus
EP3484144B1 (en) Captured image display system, electronic mirror system, and captured image display method
CN112906791A (en) Event matching method and device, storage medium and electronic device
JP2012118929A (en) Outside environment determination device and outside environment determination program

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