CN116668843A - Shooting state switching method and device, electronic equipment and storage medium - Google Patents

Shooting state switching method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116668843A
CN116668843A CN202211548276.4A CN202211548276A CN116668843A CN 116668843 A CN116668843 A CN 116668843A CN 202211548276 A CN202211548276 A CN 202211548276A CN 116668843 A CN116668843 A CN 116668843A
Authority
CN
China
Prior art keywords
state
shooting
switching
shooting state
current
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.)
Pending
Application number
CN202211548276.4A
Other languages
Chinese (zh)
Inventor
胡晶
王勇
吕乾坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202211548276.4A priority Critical patent/CN116668843A/en
Publication of CN116668843A publication Critical patent/CN116668843A/en
Pending legal-status Critical Current

Links

Landscapes

  • Studio Devices (AREA)

Abstract

The application discloses a shooting state switching method, a shooting state switching device, electronic equipment and a storage medium. The method comprises the following steps: acquiring the current shooting state of a shooting device, and determining a target video frame image according to the current shooting state; determining a dynamic range representation value according to brightness information of a target video frame image; if the current shooting state and the dynamic range representation value of the shooting device meet the switching conditions of the shooting state, switching the shooting state of the shooting device; the shooting state comprises a linear state, a dual-gain wide dynamic state and a multiple-exposure wide dynamic state. According to the technical scheme, the current shooting state and the dynamic range representation value of the shooting device are analyzed to accurately determine whether the shooting state of the shooting device is required to be switched, so that the adaptability of the shooting device to various application scenes is realized, and the optimal image effect can be obtained in various application scenes.

Description

Shooting state switching method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and apparatus for switching shooting states, an electronic device, and a storage medium.
Background
Along with the change of conditions such as scenes, illumination and the like, the dynamic range of a video frame image shot by the shooting device also changes, wherein the dynamic range refers to the relative ratio between the brightest part and the darkest part in the image, and the adaptability of the shooting device to the illumination reflection of a scene in the shooting scene can be reflected. In order to obtain the best image effect, the photographing device needs to automatically switch the photographing state according to the ambient light and the scene change.
Shooting states in the prior art mainly comprise a linear state and a wide dynamic state, application scenes of the shooting device are various, and under certain complex scenes, the two shooting states can be difficult to obtain the best image effect.
Disclosure of Invention
The application provides a shooting state switching method, a shooting state switching device, electronic equipment and a storage medium, so as to realize the adaptability of a shooting device to various application scenes and ensure that the optimal image effect can be obtained in the various application scenes.
In a first aspect, an embodiment of the present application provides a method for switching a shooting state, where the method includes:
acquiring the current shooting state of a shooting device, and determining a target video frame image according to the current shooting state;
determining a dynamic range representation value according to brightness information of a target video frame image;
if the current shooting state and the dynamic range representation value of the shooting device meet the switching conditions of the shooting state, switching the shooting state of the shooting device;
the shooting state comprises a linear state, a dual-gain wide dynamic state and a multiple-exposure wide dynamic state.
In a second aspect, an embodiment of the present application further provides a device for switching a shooting state, where the device includes:
the image determining module is used for acquiring the current shooting state of the shooting device and determining a target video frame image according to the current shooting state;
the characterization value determining module is used for determining a dynamic range characterization value according to the brightness information of the target video frame image;
the switching module is used for switching the shooting state of the shooting device if the current shooting state and the dynamic range representation value of the shooting device meet the switching conditions of the shooting state;
the shooting state comprises a linear state, a dual-gain wide dynamic state and a multiple-exposure wide dynamic state.
In a third aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements a method for switching a shooting state according to any one of the embodiments of the present application when the processor executes the program.
In a fourth aspect, embodiments of the present application further provide a storage medium storing computer-executable instructions that, when executed by a computer processor, are configured to perform a method for switching a shooting state according to any one of the embodiments of the present application.
According to the technical scheme, the current shooting state of the shooting device is obtained, and a target video frame image is determined according to the current shooting state; determining a dynamic range representation value according to the brightness information of the target video frame image; finally, if the current shooting state and the dynamic range representation value of the shooting device meet the switching conditions of the shooting state, switching the shooting state of the shooting device; the shooting state comprises a linear state, a dual-gain wide dynamic state and a multiple-exposure wide dynamic state. According to the technical scheme, the current shooting state and the dynamic range representation value of the shooting device are analyzed to accurately determine whether the shooting state of the shooting device is required to be switched, so that the adaptability of the shooting device to various application scenes is realized, and the optimal image effect can be obtained in various application scenes.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for switching shooting states according to a first embodiment of the present application;
fig. 2 is a flowchart of a method for switching shooting states according to a second embodiment of the present application;
fig. 3 is a schematic diagram of shooting status switching conditions applicable to the embodiment of the present application;
fig. 4 is a schematic structural diagram of a switching device for shooting status according to a third embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," "third," "fourth," and "object" in the description of the present application and the claims and the above drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a method for switching a shooting status according to a first embodiment of the present application, where the method may be performed by a shooting status switching device, and the shooting status switching device may be implemented in hardware and/or software, and the shooting status switching device may be configured in an electronic device having the shooting status switching method.
As shown in fig. 1, the method includes:
s110, acquiring the current shooting state of the shooting device, and determining a target video frame image according to the current shooting state.
The shooting state comprises a linear state, a dual-gain wide dynamic state and a multiple-exposure wide dynamic state. The target video frame image may be an image having image brightness information in a current photographing state.
Specifically, the shooting device can be set to be in a linear state when being started, the shooting state can be dynamically adjusted in the shooting process, and different shooting states can output images after different processing is performed on the shot images, so that the current shooting state of the shooting device needs to be determined, and the target video frame image can be accurately determined.
In a possible embodiment, optionally, determining the target video frame image according to the current shooting state includes steps A1-A3:
and step A1, if the current shooting state is determined to be a linear state, determining the current video frame image as a target video frame image.
And step A2, if the current shooting state is determined to be a dual-gain wide dynamic state, determining the video frame image before the dual-gain action as a target video frame image.
And step A3, if the current shooting state is determined to be a multiple exposure wide dynamic state, determining the long-frame video frame image as the target video frame image.
Specifically, when the current shooting state is a linear state, it is indicated that the current video frame image is output after the preceding processing, but the acquisition of the brightness information is not affected, so that the current video frame image is taken as the target video frame image.
When the current shooting state is a dual-gain wide dynamic state, namely a DCG (Dual Conversion Gain, dual-conversion gain) wide dynamic state, the current video frame image output at the moment is an image obtained by fusing the reference video frame image shot by the shooting device with an image subjected to dual-gain action on the reference video frame image, and the brightness information of the current video frame image is overlapped, so that the brightness information of the current video frame image cannot well represent the brightness information of the image in the current shooting state, and the reference video frame image is taken as a target video frame image. The reference video frame image is a video frame image before the dual gain action.
When the current shooting state is a multiple exposure wide dynamic state, the shooting device is indicated to shoot at least two images with different exposure degrees in the current scene, the images are fused together to output a current video frame image, and the brightness information of the current video frame image is processed brightness information, so that in order to accurately obtain the brightness information, an image with the longest exposure time in the at least two images with different exposure degrees can be selected as a target video frame image, namely, a long frame video frame image is selected as the target video frame image.
According to the technical scheme, the current shooting state of the shooting device is determined, and the proper video frame image in the current shooting state is selected as the target video frame image, so that accurate brightness information in the current shooting state can be obtained through processing the target video frame image.
S120, determining a dynamic range representation value according to the brightness information of the target video frame image.
The dynamic range characterization value is used for describing the brightness level of the shooting device recorded when shooting a scene.
Specifically, a target video frame image is obtained, information contained in the target video frame image is extracted, the extracted information is analyzed to determine brightness information of the target video frame image, and then the brightness information of the target video frame image is analyzed, for example, the brightness information is analyzed and calculated to determine a dynamic range representation value.
In a possible embodiment, optionally, determining the dynamic range characterizing value according to the luminance information of the target video frame image includes steps B1-B4:
and B1, dividing the target video frame image into a preset first number of image blocks, and acquiring the brightness of each image block and a first average value of the brightness of each image block.
And B2, dividing each image block into a bright block and a dark block according to a preset brightness threshold matched with the current shooting state and the brightness of each image block.
And B3, calculating a second average value of the absolute value of the difference between the brightness of each bright block and the first average value, and a third average value of the absolute value of the difference between the brightness of each dark block and the first average value.
And B4, determining a dynamic range representation value according to the second average value and the third average value.
The dividing of the target video frame image may be performed according to pixel values of the images, for example, the number of pixels of the target video frame image is G, and the dividing of the target video frame image is performed according to the number of pixels of each image block is G, so that the first number is preset to be G/G; alternatively, the target video frame image may be equally divided into m×n blocks in a manner of equally dividing in the horizontal direction m and equally dividing in the vertical direction n, that is, the first number is preset to be m×n.
The preset luminance threshold may be a luminance threshold determined according to a photographing state, and the luminance threshold of the dark block and the luminance threshold of the bright block are different.
Specifically, in order to accurately obtain luminance information of a target video frame image, the target video frame image needs to be divided to obtain a preset first number of image blocks, and then the luminance information of the image blocks is calculated to determine the luminance of each image block and a first average value of the luminance of each image block.
Taking the division mode of dividing the target video frame image into m x n image blocks as an example, calculating the brightness Luma of the image blocks, and then calculating the first average value Luma of the brightness of each image block according to the following formula avr
Wherein Luma i,j Representing the brightness of the ith row, jth column image block.
And dividing each image block into a bright block and a dark block according to a preset brightness threshold matched with the current shooting state and the brightness of each image block. For example, if the current shooting state is a linear state or a dual gain wide dynamic state, the brightness threshold of the dark block is P 1 The brightness threshold value of the bright block is Q 1 And when 0<Luma i,j ≤P 1 Is a dark block, Q 1 <Luma i,j The image block of (2) is a bright block; if the current shooting state is a multiple exposure wide dynamic state, the brightness threshold of the dark block is P 2 The brightness threshold value of the bright block is Q 2 And when 0<Luma i,j ≤P 2 Is a dark block, Q 2 <Luma i,j Is a bright block.
Then, a second average value Lumadiffbright of the absolute value of the difference between the brightness of each bright block and the first average value is calculated according to the following formula aver And a third average value Lumadiffdark of the absolute value of the difference between the brightness of each dark block and the first average value aver The formula is:
where H is the number of bright blocks and T is the number of dark blocks.
And determining a dynamic range characterization value Dyrange according to the second average value and the third average value by the following formula:
Dyrange=Lumadiffdark aver *:i,adoffbright aver *k
where k is a coefficient, k=k in the linear state and the dual gain wide dynamic state 1 In the multiple exposure wide dynamic state, k=k 2
According to the technical scheme, after a target video frame image is divided into a preset first number of image blocks, the brightness of each image block and the first average value of the brightness of each image block are accurately obtained through calculation, then a preset brightness threshold matched with the current shooting state is compared with the brightness of each image block, the image block is accurately divided into a bright block and a dark block, the second average value of the bright block and the third average value of the dark block are respectively calculated, and finally the dynamic range representation value is accurately obtained through a formula by the second average value and the third average value, so that whether the shooting device meets the switching condition of the shooting state or not can be accurately judged according to the dynamic range representation value.
And S130, if the current shooting state and the dynamic range representation value of the shooting device meet the switching conditions of the shooting state, switching the shooting state of the shooting device.
Specifically, after the current shooting state and the dynamic range representation value of the shooting device are obtained, comparing the current shooting state and the dynamic range representation value of the shooting device with the switching conditions of the shooting state, further accurately determining whether to switch the shooting state of the shooting device, and if the switching conditions are not met, directly returning to the step of determining the target video frame image; if the switching condition is met, switching the shooting state of the shooting device, and then returning to the step of determining the target video frame image so as to accurately switch the shooting state of the shooting device.
According to the technical scheme, the current shooting state of the shooting device is obtained, and the target video frame image is determined according to the current shooting state; determining a dynamic range representation value according to the brightness information of the target video frame image; finally, if the current shooting state and the dynamic range representation value of the shooting device meet the switching conditions of the shooting state, switching the shooting state of the shooting device; the shooting state comprises a linear state, a dual-gain wide dynamic state and a multiple-exposure wide dynamic state. According to the technical scheme, the current shooting state and the dynamic range representation value of the shooting device are analyzed to accurately determine whether the shooting state of the shooting device is required to be switched, so that the adaptability of the shooting device to various application scenes is realized, and the optimal image effect can be obtained in various application scenes.
Example two
Fig. 2 is a flowchart of a method for switching a shooting status according to a second embodiment of the present application, where the judgment of the switching condition of the shooting status is further embodied based on the above embodiment.
As shown in fig. 2, the method includes:
s210, acquiring the current shooting state of the shooting device, determining a target video frame image according to the current shooting state, and determining a dynamic range representation value according to brightness information of the target video frame image.
The manner of determining different target video frame images according to different shooting states and the manner of calculating the dynamic range characterization value based on the brightness information of the target video frame images have been described in the above embodiments, which are not described herein.
S220, determining a preset second number of target video frame images according to the shooting state and the preset frequency, and determining the change trend of the dynamic range representation value according to the dynamic range representation value of each target video frame image.
The trend of the dynamic range characterization value may be classified into an increasing trend and a decreasing trend.
Specifically, calculating a dynamic range representation value of a second number of target video frame images which are continuously preset, then analyzing the preset second number of dynamic range representation values, and determining the change trend of the dynamic range representation values. The specific numerical values of the second number are preset, so that the change trend of the dynamic range representation value can be accurately determined. The term "continuous" in this embodiment does not refer to a strict reference number or sequential relationship, but merely to be able to represent the rationality of reflecting the trend of the change in time, for example, selecting 1,2,3,4,5,6 frames for frame-by-frame analysis or 1,3,5 frames for analysis may be used as an embodiment.
S230, judging whether a switching condition of the shooting state is met or not according to the current shooting state, the change trend, the dynamic range representation value and a threshold value matched with the change trend; if the shooting state switching condition is satisfied, the shooting state of the shooting device is switched.
Specifically, referring to fig. 3, if the trend is an increasing trend, a judgment condition 1 is adopted, that is, when 0 is equal to or less than Dyrange is less than t1, the photographing device works in a linear state; when t1 is less than or equal to Dyrange and less than t2, the shooting device works in a dual-gain wide dynamic state; when t2 is less than or equal to Dyrange, the shooting device works in a multiple exposure wide dynamic state. If the change trend is a decreasing trend, adopting a condition 2, and when Dyrange is more than or equal to 0 and less than t3, the shooting device works in a linear state; when t3 is less than or equal to Dyrange and less than t4, the shooting device works in a dual-gain wide dynamic state; when t4 is less than or equal to Dyrange, the shooting device works in a multiple exposure wide dynamic state.
Therefore, a proper threshold value matched with the variation trend can be matched for the dynamic range representation value of the shooting device according to the variation trend and the shooting state, and then the dynamic range representation value is compared with the threshold value matched with the variation trend, so that whether the switching condition of the shooting state is met or not can be accurately judged.
Optionally, whether the switching condition of the shooting state is met or not is judged according to the current shooting state, the change trend, the dynamic range representation value and the threshold value matched with the change trend, and the following four situations can be classified:
1) If the current shooting state is determined to be a linear state, the change trend is an increasing trend, and the dynamic range representation value is greater than or equal to a first threshold value, determining that the switching condition of the shooting state is met; the current photographing state of the photographing state is switched from the linear state to the dual gain wide dynamic state.
2) If the current shooting state is determined to be a dual-gain wide dynamic state, the change trend is an increasing trend, and the dynamic range representation value is greater than or equal to a second threshold value, determining that the switching condition of the shooting state is met; the current photographing state of the photographing state is switched from the dual gain wide dynamic state to the multiple exposure wide dynamic state.
3) If the current shooting state is determined to be a dual-gain wide dynamic state, the change trend is a decreasing trend, and the dynamic range representation value is smaller than or equal to a third threshold value, determining that the switching condition of the shooting state is met; then the current shooting state of the shooting state is switched from the dual gain wide dynamic state to the linear state; wherein the second threshold is greater than the first threshold, and the first threshold is different from the third threshold.
4) If the current shooting state is determined to be a multiple exposure wide dynamic state, the change trend is a decreasing trend, and the dynamic range representation value is smaller than or equal to a fourth threshold value, determining that the switching condition of the shooting state is met; then the current shooting state of the shooting state is switched from the multiple exposure wide dynamic state to the dual gain wide dynamic state; wherein the fourth threshold is greater than the third threshold, and the second threshold is different from the fourth threshold.
According to the technical scheme, the dynamic range representation value is determined according to the brightness information of the target video frame image determined according to the current shooting state; determining a preset second number of target video frame images according to the shooting state and the preset frequency, and determining the change trend of the dynamic range representation value according to the dynamic range representation value of each target video frame image; and finally judging whether the switching condition of the shooting state is met or not according to the current shooting state, the change trend, the dynamic range representation value and the threshold value matched with the change trend, and if the switching condition of the shooting state is met, switching the shooting state of the shooting device, so that the adaptability of the shooting device to various application scenes is realized, and the optimal image effect can be obtained in various application scenes.
Example III
Fig. 4 is a schematic structural diagram of a switching device for shooting status according to a third embodiment of the present application. As shown in fig. 4, the apparatus includes:
an image determining module 310, configured to obtain a current shooting state of a shooting device, and determine a target video frame image according to the current shooting state;
the characterization value determining module 320 is configured to determine a dynamic range characterization value according to luminance information of the target video frame image;
the switching module 330 is configured to switch the shooting status of the shooting device if the current shooting status and the dynamic range characterization value of the shooting device meet the switching conditions of the shooting status;
the shooting state comprises a linear state, a dual-gain wide dynamic state and a multiple-exposure wide dynamic state.
Optionally, the image determining module is specifically configured to:
if the current shooting state is determined to be a linear state, determining that the current video frame image is a target video frame image;
if the current shooting state is determined to be a dual-gain wide dynamic state, determining a video frame image before dual-gain action as a target video frame image;
and if the current shooting state is determined to be the multiple exposure wide dynamic state, determining the long-frame video frame image as the target video frame image.
Optionally, the characterization value determining module is specifically configured to:
dividing a target video frame image into a preset first number of image blocks, and obtaining the brightness of each image block and a first average value of the brightness of each image block;
dividing each image block into a bright block and a dark block according to a preset brightness threshold matched with the current shooting state and the brightness of each image block;
calculating a second average value of the absolute values of the differences between the brightness of each bright block and the first average value, and a third average value of the absolute values of the differences between the brightness of each dark block and the first average value;
and determining a dynamic range characterization value according to the second average value and the third average value.
Optionally, the switching module includes a judging unit, specifically configured to:
determining a preset second number of target video frame images according to the shooting state and the preset frequency, and determining the change trend of the dynamic range representation value according to the dynamic range representation value of each target video frame image;
and judging whether the switching condition of the shooting state is met or not according to the current shooting state, the change trend, the dynamic range representation value and the threshold value matched with the change trend.
Optionally, the judging unit includes a first judging condition unit, specifically configured to:
if the current shooting state is determined to be a linear state, the change trend is an increasing trend, and the dynamic range representation value is greater than or equal to a first threshold value, determining that the switching condition of the shooting state is met;
switching shooting states of the shooting device comprises the following steps:
and switching the current shooting state of the shooting state from a linear state to a dual-gain wide dynamic state.
Optionally, the judging unit includes a second judging condition unit, specifically configured to:
if the current shooting state is determined to be a dual-gain wide dynamic state, the change trend is an increasing trend, and the dynamic range representation value is greater than or equal to a second threshold value, determining that the switching condition of the shooting state is met;
switching shooting states of the shooting device comprises the following steps:
switching the current shooting state of the shooting state from a dual-gain wide dynamic state to a multiple-exposure wide dynamic state;
if the current shooting state is determined to be a dual-gain wide dynamic state, the change trend is a decreasing trend, and the dynamic range representation value is smaller than or equal to a third threshold value, determining that the switching condition of the shooting state is met;
switching shooting states of the shooting device comprises the following steps:
switching the current shooting state of the shooting state from a dual-gain wide dynamic state to a linear state;
wherein the second threshold is greater than the first threshold, and the first threshold is different from the third threshold.
Optionally, the judging unit includes a third judging condition unit, specifically configured to:
if the current shooting state is determined to be a multiple exposure wide dynamic state, the change trend is a decreasing trend, and the dynamic range representation value is smaller than or equal to a fourth threshold value, determining that the switching condition of the shooting state is met;
switching shooting states of the shooting device comprises the following steps:
switching the current shooting state of the shooting state from a multiple exposure wide dynamic state to a dual gain wide dynamic state;
wherein the fourth threshold is greater than the third threshold, the second threshold being different from the fourth threshold.
The shooting state switching device provided by the embodiment of the application can execute the shooting state switching method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 5 shows a schematic structural diagram of an electronic device that may be used in the fourth embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (central processor), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, for example, a switching method of the photographing state.
In some embodiments, the method of switching the photographing state may be implemented as a computer program, which is tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the above-described shooting status switching method may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the switching method of the shooting status by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present application, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present application are achieved, and the present application is not limited herein.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.

Claims (10)

1. A method for switching shooting states, comprising:
acquiring the current shooting state of a shooting device, and determining a target video frame image according to the current shooting state;
determining a dynamic range representation value according to brightness information of a target video frame image;
if the current shooting state and the dynamic range representation value of the shooting device meet the switching conditions of the shooting state, switching the shooting state of the shooting device;
the shooting state comprises a linear state, a dual-gain wide dynamic state and a multiple-exposure wide dynamic state.
2. The method of claim 1, wherein determining a target video frame image based on the current capture state comprises:
if the current shooting state is determined to be a linear state, determining that the current video frame image is a target video frame image;
if the current shooting state is determined to be a dual-gain wide dynamic state, determining a video frame image before dual-gain action as a target video frame image;
and if the current shooting state is determined to be the multiple exposure wide dynamic state, determining the long-frame video frame image as the target video frame image.
3. The method of claim 1, wherein determining the dynamic range characterization value based on luminance information of the target video frame image comprises:
dividing a target video frame image into a preset first number of image blocks, and obtaining the brightness of each image block and a first average value of the brightness of each image block;
dividing each image block into a bright block and a dark block according to a preset brightness threshold matched with the current shooting state and the brightness of each image block;
calculating a second average value of the absolute values of the differences between the brightness of each bright block and the first average value, and a third average value of the absolute values of the differences between the brightness of each dark block and the first average value;
and determining a dynamic range characterization value according to the second average value and the third average value.
4. The method of claim 1, wherein the current photographing state of the photographing device and the dynamic range characterization value satisfy a switching condition of the photographing state, comprising:
determining a preset second number of target video frame images according to the shooting state and the preset frequency, and determining the change trend of the dynamic range representation value according to the dynamic range representation value of each target video frame image;
and judging whether the switching condition of the shooting state is met or not according to the current shooting state, the change trend, the dynamic range representation value and the threshold value matched with the change trend.
5. The method of claim 4, wherein determining whether a switching condition of a photographing state is satisfied based on a current photographing state, the change trend, a dynamic range characterization value, and a threshold value matched with the change trend, comprises:
if the current shooting state is determined to be a linear state, the change trend is an increasing trend, and the dynamic range representation value is greater than or equal to a first threshold value, determining that the switching condition of the shooting state is met;
switching shooting states of the shooting device comprises the following steps:
and switching the current shooting state of the shooting state from a linear state to a dual-gain wide dynamic state.
6. The method of claim 5, wherein determining whether a switching condition of a photographing state is satisfied based on a current photographing state, the change trend, a dynamic range characterization value, and a threshold value matched with the change trend, comprises:
if the current shooting state is determined to be a dual-gain wide dynamic state, the change trend is an increasing trend, and the dynamic range representation value is greater than or equal to a second threshold value, determining that the switching condition of the shooting state is met;
switching shooting states of the shooting device comprises the following steps:
switching the current shooting state of the shooting state from a dual-gain wide dynamic state to a multiple-exposure wide dynamic state;
if the current shooting state is determined to be a dual-gain wide dynamic state, the change trend is a decreasing trend, and the dynamic range representation value is smaller than or equal to a third threshold value, determining that the switching condition of the shooting state is met;
switching shooting states of the shooting device comprises the following steps:
switching the current shooting state of the shooting state from a dual-gain wide dynamic state to a linear state;
wherein the second threshold is greater than the first threshold, and the first threshold is different from the third threshold.
7. The method of claim 6, wherein determining whether a switching condition of a photographing state is satisfied based on a current photographing state, the change trend, a dynamic range characterization value, and a threshold value matched with the change trend, comprises:
if the current shooting state is determined to be a multiple exposure wide dynamic state, the change trend is a decreasing trend, and the dynamic range representation value is smaller than or equal to a fourth threshold value, determining that the switching condition of the shooting state is met;
switching shooting states of the shooting device comprises the following steps:
switching the current shooting state of the shooting state from a multiple exposure wide dynamic state to a dual gain wide dynamic state;
wherein the fourth threshold is greater than the third threshold, the second threshold being different from the fourth threshold.
8. A switching device for photographing states, comprising:
the image determining module is used for acquiring the current shooting state of the shooting device and determining a target video frame image according to the current shooting state;
the characterization value determining module is used for determining a dynamic range characterization value according to the brightness information of the target video frame image;
the switching module is used for switching the shooting state of the shooting device if the current shooting state and the dynamic range representation value of the shooting device meet the switching conditions of the shooting state;
the shooting state comprises a linear state, a dual-gain wide dynamic state and a multiple-exposure wide dynamic state.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements a method for switching a shooting state according to any one of claims 1-7 when executing the program.
10. A storage medium storing computer executable instructions which, when executed by a computer processor, are adapted to perform a method of switching a shooting status according to any one of claims 1 to 7.
CN202211548276.4A 2022-12-05 2022-12-05 Shooting state switching method and device, electronic equipment and storage medium Pending CN116668843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211548276.4A CN116668843A (en) 2022-12-05 2022-12-05 Shooting state switching method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211548276.4A CN116668843A (en) 2022-12-05 2022-12-05 Shooting state switching method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116668843A true CN116668843A (en) 2023-08-29

Family

ID=87717770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211548276.4A Pending CN116668843A (en) 2022-12-05 2022-12-05 Shooting state switching method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116668843A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117241134A (en) * 2023-11-15 2023-12-15 杭州海康威视数字技术股份有限公司 Shooting mode switching method for camera

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117241134A (en) * 2023-11-15 2023-12-15 杭州海康威视数字技术股份有限公司 Shooting mode switching method for camera
CN117241134B (en) * 2023-11-15 2024-03-08 杭州海康威视数字技术股份有限公司 Shooting mode switching method for camera

Similar Documents

Publication Publication Date Title
CN113436100B (en) Method, apparatus, device, medium, and article for repairing video
US20220270266A1 (en) Foreground image acquisition method, foreground image acquisition apparatus, and electronic device
CN105554380A (en) Day and night switching method and day and night switching device
CN112995535A (en) Method, apparatus, device and storage medium for processing video
CN116668843A (en) Shooting state switching method and device, electronic equipment and storage medium
CN111917986A (en) Image processing method, medium thereof, and electronic device
CN113628192B (en) Image blur detection method, apparatus, device, storage medium, and program product
CN114913471B (en) Image processing method, device and readable storage medium
WO2022111269A1 (en) Method and device for enhancing video details, mobile terminal, and storage medium
CN114764821A (en) Moving object detection method, moving object detection device, electronic apparatus, and storage medium
CN113988294A (en) Method for training prediction network, image processing method and device
CN112085002A (en) Portrait segmentation method, portrait segmentation device, storage medium and electronic equipment
CN113643257B (en) Image noise detection method, device, equipment, storage medium and program product
CN111970501A (en) Pure color scene AE color processing method and device, electronic equipment and storage medium
CN117676324A (en) Video camera state switching method and device, electronic equipment and storage medium
CN115953723B (en) Static frame detection method and device, electronic equipment and storage medium
CN114219744B (en) Image generation method, device, equipment and storage medium
CN115148161B (en) Automatic backlight adjustment method, device, equipment and storage medium
CN113160377B (en) Method, apparatus, device and storage medium for processing image
CN117528141A (en) Video encoding method, video encoding device, electronic device, storage medium, and program product
CN118175429A (en) Method, device, equipment and medium for improving image quality of human-vehicle mixed scene
CN117969546A (en) Imaging method and device of film material, electronic equipment and storage medium
CN116229553A (en) Target identification method, device, equipment and storage medium
CN118212668A (en) Target identification method, device, electronic equipment and medium
CN117557777A (en) Sample image determining method and device, electronic equipment and storage medium

Legal Events

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