A working state switching method and device, electronic device, and storage medium
Patent Information
- Application Number
- CN202211664048.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-22
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2042-12-22
AI Technical Summary
[0005]本申请实施例提供了一种工作状态切换方法、装置、电子装置和存储介质,以至少解决相关技术中无法准确高效切换双滤光片切换器工作状态的问题
[0035] Compared to related technologies, the working state switching method, apparatus, electronic device, and storage medium provided in this application, by acquiring a target image and determining the current working state of the dual filter switcher based on the target image, and determining the image quality degradation parameters of the target image when the current working state is daytime working state, and determining whether to switch the working state of the dual filter switcher based on the image quality degradation parameters; and, when the current working state is nighttime working state, determining the gain difference parameters of the target image, and determining whether to switch the working state of the dual filter switcher based on the gain difference parameters, makes the switching basis more realistic and the statistical characteristics more accurate and effective, solving the problem of not being able to accurately and efficiently switch the working state of the dual filter switcher in related technologies, and improving the image presentation effect.
Smart Images

Figure CN116074613B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image acquisition and processing technology, and in particular to a method, apparatus, electronic device and storage medium for switching the working state of a dual filter switcher. Background Technology
[0002] Currently, most camera equipment on the market typically includes filter assemblies in its optical components. A filter is a small, flat, transparent window, and a single filter may have several windows arranged side by side. At any given time, only one window is positioned between the lens and the sensor. In filters with two windows, one window has a coating that effectively blocks infrared light; this is commonly referred to as a day filter. The other window is completely transparent and is typically called a night filter. The general practice is that daytime cameras use the coated window to block infrared light, while nighttime cameras use the fully transparent window to allow all light wavelengths to be detected by the camera's sensor. In practical applications, it is often necessary to determine the appropriate operating mode for the camera based on the current environment—whether it should operate under daylight or nightlight conditions.
[0003] In related technologies, common methods for determining when to switch include switching based on the photoelectric conversion signal strength of a photoresistor and switching based on statistical information about the current scene brightness. If switching is based on the photoelectric conversion signal strength of the photoresistor, the photoresistor can only sense the ambient light around the device. However, the scene brightness seen by the camera may differ from the scene brightness around the camera itself. In this case, the photoelectric conversion signal of the photoresistor cannot accurately represent the filter's operating state under the scene brightness seen by the camera. On the other hand, switching based on statistical information about the current scene brightness depends on the overall hardware condition of the camera device. Different devices have different hardware capabilities, resulting in different numerical representations under the same scene brightness, thus making it impossible to accurately find the appropriate switching threshold.
[0004] Currently, no effective solution has been proposed to address the problem of the inability to accurately and efficiently switch the working state of dual filter switchers in related technologies. Summary of the Invention
[0005] This application provides a working state switching method, apparatus, electronic device, and storage medium to at least solve the problem in the related art of not being able to accurately and efficiently switch the working state of a dual filter switcher.
[0006] Firstly, embodiments of this application provide a method for switching working states.
[0007] In some embodiments, the method includes:
[0008] Acquire the target image and determine the current operating state of the dual filter switcher based on the target image;
[0009] When the current working state is the daytime working state, determine the image quality degradation parameters of the target image; based on the image quality degradation parameters, determine whether to switch the working state of the dual filter switcher;
[0010] When the current working state is night film working state, determine the gain difference parameter of the target image; based on the gain difference parameter, determine whether to switch the working state of the dual filter switcher.
[0011] In some embodiments, when the current working state is a daytime film working state, determining the image quality degradation parameters of the target image includes:
[0012] When the current working state is the daytime working state, the image sharpness information and image noise reduction information of the target image are obtained;
[0013] Based on the image sharpness information and the image noise reduction information, the image quality degradation parameters of the target image are determined.
[0014] In some embodiments, determining whether to switch the operating state of the dual filter switcher based on the image quality degradation parameter includes:
[0015] When the image quality degradation parameter is greater than the preset image quality degradation threshold, the working state of the dual filter switcher is switched to night film working state.
[0016] In some embodiments, when the current working state is a daytime film working state, obtaining the image sharpness information and image noise reduction information of the target image includes:
[0017] When the current working state is the daytime working state, determine the image gain value of the target image;
[0018] When the image gain value is greater than a preset gain threshold, the image sharpness information and image noise reduction information of the target image are obtained.
[0019] In some embodiments, determining the gain difference parameter of the target image when the current working state is a night film working state includes:
[0020] When the current working state is night film working state, acquire the red gain information and blue gain information of the target image;
[0021] The gain difference parameter of the target image is determined based on the red gain information and the blue gain information.
[0022] In some embodiments, determining whether to switch the operating state of the dual filter switch based on the gain difference parameter includes:
[0023] When the gain difference parameter is greater than the preset gain difference threshold, the working state of the dual filter switcher is switched to the daytime working state.
[0024] In some embodiments, acquiring the target image and determining the current operating state of the dual filter switcher based on the target image includes:
[0025] Acquire the target image and determine the color information of the target image;
[0026] If the color information is in color, the current working state is determined to be the daytime working state;
[0027] If the color information is black and white, the current working state is determined to be the night film working state.
[0028] Secondly, embodiments of this application provide a working state switching device.
[0029] In some embodiments, the device includes a current operating state determination module, a first operating state switching module, and a second operating state switching module:
[0030] The current working state determination module is used to acquire the target image and determine the current working state of the dual filter switcher based on the target image.
[0031] The first working state switching module is used to determine the image quality degradation parameters of the target image when the current working state is the daytime working state; and to determine whether to switch the working state of the dual filter switcher based on the image quality degradation parameters.
[0032] The second working state switching module is used to determine the gain difference parameter of the target image when the current working state is the night film working state; and to determine whether to switch the working state of the dual filter switcher based on the gain difference parameter.
[0033] Thirdly, embodiments of this application provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the working state switching method described in the first aspect above.
[0034] Fourthly, embodiments of this application provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the working state switching method described in the first aspect above.
[0035] Compared to related technologies, the working state switching method, apparatus, electronic device, and storage medium provided in this application, by acquiring a target image and determining the current working state of the dual filter switcher based on the target image, and determining the image quality degradation parameters of the target image when the current working state is daytime working state, and determining whether to switch the working state of the dual filter switcher based on the image quality degradation parameters; and, when the current working state is nighttime working state, determining the gain difference parameters of the target image, and determining whether to switch the working state of the dual filter switcher based on the gain difference parameters, makes the switching basis more realistic and the statistical characteristics more accurate and effective, solving the problem of not being able to accurately and efficiently switch the working state of the dual filter switcher in related technologies, and improving the image presentation effect.
[0036] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0037] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0038] Figure 1 This is a hardware structure block diagram of a terminal according to the working state switching method of the present application embodiment;
[0039] Figure 2 This is a flowchart of a working state switching method according to an embodiment of this application;
[0040] Figure 3 This is a flowchart of a working state switching method according to a preferred embodiment of this application;
[0041] Figure 4 This is a structural block diagram of a working state switching device according to an embodiment of this application. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application. Furthermore, it is understood that although the efforts made in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, modifications to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0043] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0044] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application means two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The terms “first,” “second,” “third,” etc., used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0045] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. Taking running on a terminal as an example, Figure 1 This is a hardware structure block diagram of the terminal for the working state switching method according to an embodiment of the present invention. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0046] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the working state switching method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory that can be remotely switched relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0047] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0048] This embodiment provides a working state switching method for a dual filter switcher. Figure 2 This is a flowchart of a working state switching method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0049] Step S201: Acquire the target image and determine the current working state of the dual filter switcher based on the target image.
[0050] After acquiring the target image captured by the camera, the first image information of the target image can be further determined and analyzed. The first image information can be color information, which is used to determine the current operating state of the dual filter switcher. Typically, the dual filter switcher operates in two states: daytime and nighttime. Whether a user prefers to use the camera in daytime color or nighttime black and white depends not so much on the ambient brightness, but rather on the image quality presented by the camera. Currently, with continuous advancements in hardware technology, better apertures, better sensors, and better image signal processing capabilities, cameras are increasingly capable of operating in low light. Even scenes that appear very dark to the human eye can remain clearly visible with the help of camera hardware. In such cases, users prefer to continue observing and using the camera in daytime color. However, when the image presented by the camera exhibits significant noise or motion blur, users prefer to observe and use the camera in nighttime black and white.
[0051] Step S202: If the current working state is the daytime working state, determine the image quality degradation parameters of the target image; based on the image quality degradation parameters, determine whether to switch the working state of the dual filter switcher.
[0052] When the dual filter switcher is currently operating in daytime mode, the image quality degradation parameters of the target image can be determined based on the second image information of the target image. This second image information includes image sharpness information and image noise reduction information. The image quality degradation parameters indicate the degree of image quality perceived by the human eye. For example, if the degradation parameters exceed a certain threshold, it indicates that problems such as noise and motion blur have appeared, affecting image quality. The current operating state is no longer sufficient, and a switch to a different operating state is necessary. Therefore, based on the image quality degradation parameters, it can be determined when to switch the dual filter switcher from daytime mode to nighttime mode to improve image quality.
[0053] Step S203: When the current working state is night film working state, determine the gain difference parameter of the target image; based on the gain difference parameter, determine whether to switch the working state of the dual filter switcher.
[0054] When the dual filter switcher is currently operating in night mode, the gain difference parameter of the target image can be determined based on the third image information, which includes red and blue gain information. Based on the physical characteristics that daytime infrared components are submerged in the basic daytime spectrum while nighttime infrared components are prominent in the basic nighttime spectrum, and considering the sensor's own photosensitivity, the gain difference parameter can be used to characterize the degree of approximation between the current environment and daytime conditions. Therefore, based on the gain difference parameter, it can be determined when to switch the dual filter switcher from night mode to day mode to improve image quality.
[0055] Through the above steps, this application proposes a scheme for switching the working state of a dual filter switcher. Based on the human eye's perception of image quality, the image quality degradation parameter of the image captured by the camera is used as a threshold condition for switching from daytime to nighttime mode. Furthermore, based on the strong infrared spectral response characteristic of nighttime mode, the gain difference parameter of the image captured by the camera is used as a threshold condition for switching from nighttime to daytime mode. The image quality degradation parameter indicates the degree of image quality perceived by the human eye, while the gain difference parameter characterizes the degree of similarity between the current environment and daytime conditions. Therefore, this judgment condition enables the switching of the dual filter switcher to be independent of the influence of external ambient light, making the switching basis more realistic and the statistical characteristics more accurate and effective. This solves the problem in related technologies where the working state of the dual filter switcher cannot be switched accurately and efficiently, thus improving the image presentation effect.
[0056] In some embodiments, step S202 includes:
[0057] Step S2021: Under the current working state of daytime film working state, obtain the image sharpness information and image noise reduction information of the target image.
[0058] The camera equipment includes an image signal processing unit, which comprises a sharpness module and a noise reduction module. Image sharpness information can be obtained from the sharpness module, and image noise reduction information can be obtained from the noise reduction module. As mentioned earlier, the second image information includes image sharpness information and image noise reduction information. Image sharpness information includes large edge intensity values and small edge intensity values. Large edge intensity is used to control the intensity of low-frequency information in the image, commonly used to depict the outlines of objects. Small edge intensity is used to control the intensity of high-frequency information in the image, commonly used to depict fine details of objects. Image noise reduction information includes temporal noise reduction intensity values, which are used to control the intensity of inter-frame noise. Image noise reduction information may also include spatial noise reduction intensity values, which are used to control the intensity of intra-frame noise. Furthermore, it is worth mentioning that during the pre-shipment debugging of the camera equipment, developers will perform targeted adjustments to the image signal processing unit based on the camera's image quality performance at different gains. During the debugging process, to ensure high image quality in low-light environments with high gain, the general rule is that as gain increases, edge sharpness gradually increases, while edge sharpness gradually decreases, and the spatial and temporal noise reduction intensities gradually increase. This debugging rule is mainly because higher gain results in higher noise, and the edge sharpness in the sharpness module only exacerbates the increase in fine noise. Therefore, at high gain, the rendering of fine details of objects is sacrificed, and the sharpness of large edges of objects is used to depict their outlines. At the same time, higher gain requires stronger spatial and temporal noise reduction intensities to eliminate noise. From the perspective of image phenomena, the visual impact of higher spatial noise reduction intensity is not as strong as that of higher temporal noise reduction intensity. With higher temporal noise reduction intensity, the image will show motion blur, which is more easily perceived by the human eye.
[0059] Step S2022: Determine the image quality degradation parameters of the target image based on the image sharpness information and image noise reduction information.
[0060] The image quality degradation parameter B of the target image can be calculated using the following formula:
[0061] B = E * Nr / e
[0062] Where E refers to the large edge intensity value in the sharpness module of the image signal processing unit, Nr refers to the temporal noise reduction intensity value in the noise reduction module of the image signal processing unit, and e refers to the small edge intensity value in the sharpness module of the image signal processing unit.
[0063] Through the above steps, based on the principle that the intensity of image sharpness information and image noise reduction information from the image signal processing unit affects the level of image noise and motion blur, and that the level of noise and motion blur affects the human eye's perception of image quality, a comprehensive calculation result combining the large edge intensity value, the temporal noise reduction intensity value, and the small edge intensity value is proposed as the basis for determining whether to switch the working state of the dual filter switcher to the night film working state. Furthermore, the acquisition of image sharpness information and image noise reduction information is simple and accurate, further improving the accuracy and efficiency of switching.
[0064] In some embodiments, step S202 includes:
[0065] Step S2023: When the image quality damage parameter is greater than the preset image quality damage threshold, switch the working state of the dual filter switcher to night film working state.
[0066] Following the steps above, the higher the value of the image quality degradation parameter B, the higher the probability of poorer image quality. When it exceeds a certain threshold, it can be considered to have reached a visually poor image quality. Therefore, the working state of the dual filter switcher is switched to night film working state to improve the image presentation quality.
[0067] Through the above steps, the data distribution characteristics of increased sharpness at large edges, increased temporal noise reduction, and decreased sharpness at small edges in the corresponding image signal processing unit are comprehensively considered as illumination decreases. The image quality impairment parameters that affect the human eye's perception of image quality are calculated. Based on the image quality impairment parameters, it is determined whether to switch the dual filter switcher from color to black and white, thereby further improving the accuracy and efficiency of the dual filter switcher switching.
[0068] In some embodiments, step S2021 includes:
[0069] Step S2121: Under the condition that the current working state is the daytime working state, determine the image gain value of the target image.
[0070] When the current working state is the daytime working state, the current image gain value of the target image is calculated. Generally, the higher the image gain value, the worse the image quality.
[0071] Step S2221: When the image gain value is greater than the preset gain threshold, obtain the image sharpness information and image noise reduction information of the target image.
[0072] Only when the image gain value reaches the preset gain threshold is the image sharpness information and image noise reduction information of the target image obtained and then processed. This reduces unnecessary calculations and saves resources.
[0073] In some embodiments, step S203 includes:
[0074] Step S2031: Under the condition that the current working state is night film working state, acquire the red gain information and blue gain information of the target image.
[0075] Specifically, under the current working state of night film, the three color channel information of all blocks in the target image is statistically analyzed, denoted as r, g, and b respectively. The red gain information rGain and blue gain information bGain of all blocks are calculated, where rGain = r / g and bGain = b / g. Statistically analyzing the rGain and bGain of all blocks in the target image means calculating the rGain and bGain values of all statistically divisible blocks in the entire image. This can be done by dividing the image into pixels, thus dividing the image into all statistically divisible blocks, or by using larger blocks, such as 17*15 blocks. The third image information, as mentioned earlier, includes red gain information and blue gain information.
[0076] Step S2032: Determine the gain difference parameter of the target image based on the red gain information and the blue gain information.
[0077] Histogram statistics are performed on the rGain and bGain values calculated for all pixels / blocks of the target image. After obtaining the histogram statistics, the rGain and bGain corresponding to the highest block (peak) in the histogram are selected, that is, the corresponding values with the largest cumulative quantity in their respective histograms are found and denoted as rGainMax and bGainMax. Then, the absolute value of the difference between the obtained rGainMax and bGainMax is taken according to the following formula to obtain the gain difference parameter Δgain:
[0078] Δgain=|rGainMax-bGainMax|
[0079] Regardless of whether it's daytime, nighttime, or darkness, green plants always appear purple. This is a phenomenon caused by the camera's sensors detecting the infrared spectrum. The phenomenon becomes more pronounced as illumination decreases because during the day, ambient light is abundant, and the infrared component is less prominent. At night, the camera's built-in infrared illumination further enhances the infrared effect, making it more prevalent. This obvious physical difference allows us to identify the true ambient light level. Statistical abstraction of the data yields histograms of rGain and bGain values. Furthermore, calculating the distance between the two peaks in the histogram provides the gain difference parameter, which shows a larger gain difference parameter as the environment approaches daytime conditions.
[0080] Therefore, the gain difference parameter can be used as the basis for deciding whether to switch the dual filter switcher from night film mode to day film mode, further improving the accuracy of switching and enhancing image quality.
[0081] In some embodiments, step S203 includes:
[0082] Step S2033: When the gain difference parameter is greater than the preset gain difference threshold, switch the working state of the dual filter switcher to the daytime working state.
[0083] The larger the gain gap parameter, the closer the current environment is to daytime. The magnitude of the gain gap parameter is compared with the preset gain gap threshold. When the gain gap parameter is greater than the preset gain gap threshold, the working state of the dual filter switcher is switched to daytime working state.
[0084] Setting a reasonable gain gap threshold and quantifying the standard for switching based on the gain gap parameter can further improve the accuracy and feasibility of switching.
[0085] In some embodiments, step S201 includes:
[0086] Step S2011: Acquire the target image and determine the color information of the target image.
[0087] Based on the acquired target image, the first image information of the target image as described above is determined, and the first image information includes color information.
[0088] Step S2012: If the color information is in color, determine the current working state as the day film working state.
[0089] The color information is in color, indicating that the dual filter switcher is currently operating in daylight mode.
[0090] Step S2013: If the color information is black and white, determine the current working state as night film working state.
[0091] The color information is black and white, indicating that the dual filter switcher is currently operating in night mode.
[0092] Through the above steps, this embodiment of the application determines whether the current working state of the dual filter switcher is daytime or nighttime based on the color information of the target image. This method is highly feasible, simple to calculate, and highly efficient.
[0093] The embodiments of this application will be described and illustrated below through preferred embodiments.
[0094] Figure 3 This is a flowchart of a working state switching method according to a preferred embodiment of this application. For example... Figure 3As shown, the working state switching method includes the following steps:
[0095] Step S301: Obtain the target image and determine the color information based on the target image.
[0096] Step S302: When the color information is color, determine that the current working state of the dual filter switcher is the daytime working state, and determine the image gain value of the target image.
[0097] Step S303: When the image gain value is greater than the preset gain threshold, obtain the image sharpness information and image noise reduction information of the target image.
[0098] Step S304: Determine the image quality degradation parameters of the target image based on the image sharpness information and image noise reduction information.
[0099] Step S305: When the image quality damage parameter is greater than the preset image quality damage threshold, switch the working state of the dual filter switcher to night film working state.
[0100] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0101] This embodiment also provides a working state switching device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as described thereon. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0102] Figure 4 This is a structural block diagram of the working state switching device according to an embodiment of this application, such as... Figure 4 As shown, the device includes a current working state determination module 10, a first working state switching module 20, and a second working state switching module 30.
[0103] The current working state determination module 10 is used to acquire the target image and determine the current working state of the dual filter switcher based on the target image;
[0104] The first working state switching module 20 is used to determine the image quality degradation parameters of the target image when the current working state is the daytime working state; and to determine whether to switch the working state of the dual filter switcher based on the image quality degradation parameters.
[0105] The second working state switching module 30 is used to determine the gain difference parameter of the target image when the current working state is night film working state; and to determine whether to switch the working state of the dual filter switcher based on the gain difference parameter.
[0106] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0107] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is switched to run the computer program to perform the steps in any of the above method embodiments.
[0108] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0109] Optionally, in this embodiment, the processor can be switched to perform the following steps via a computer program:
[0110] Acquire the target image and determine the current working state of the dual filter switcher based on the target image;
[0111] If the current working state is the daytime working state, determine the image quality degradation parameters of the target image; based on the image quality degradation parameters, determine whether to switch the working state of the dual filter switcher.
[0112] Given that the current working state is night film mode, determine the gain difference parameter of the target image; based on the gain difference parameter, determine whether to switch the working state of the dual filter switcher.
[0113] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0114] Furthermore, in conjunction with the working state switching methods in the above embodiments, this application embodiment can provide a storage medium for implementation. This storage medium stores a computer program; when the computer program is executed by a processor, it implements any of the working state switching methods in the above embodiments.
[0115] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0116] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0117] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for switching working states, characterized in that, Includes the following steps: Acquire the target image and determine the current operating state of the dual filter switcher based on the target image; When the current working state is the daytime working state, image sharpness information and image noise reduction information of the target image are acquired, wherein the image sharpness information includes large edge intensity value and small edge intensity value, and the image noise reduction information includes temporal noise reduction intensity value; based on the large edge intensity value, the small edge intensity value, and the temporal noise reduction intensity value, the image quality degradation parameter of the target image is determined; based on the image quality degradation parameter, it is determined whether to switch the working state of the dual filter switcher; When the current working state is night film working state, acquire the red gain information and blue gain information of the target image; Calculate the histogram statistics corresponding to the red gain information and the blue gain information respectively, and determine the peak value rGainMax corresponding to the red gain information and the peak value bGainMax corresponding to the blue gain information based on the histogram statistics; take the absolute value of the difference between rGainMax and bGainMax to determine the gain difference parameter of the target image; determine whether to switch the working state of the dual filter switcher based on the gain difference parameter.
2. The working state switching method according to claim 1, characterized in that, The step of determining whether to switch the operating state of the dual filter switcher based on the image quality degradation parameters includes: When the image quality degradation parameter is greater than the preset image quality degradation threshold, the working state of the dual filter switcher is switched to night film working state.
3. The working state switching method according to claim 2, characterized in that, When the current working state is the daytime working state, obtaining the image sharpness information and image noise reduction information of the target image includes: When the current working state is the daytime working state, determine the image gain value of the target image; When the image gain value is greater than a preset gain threshold, the image sharpness information and image noise reduction information of the target image are obtained.
4. The working state switching method according to claim 3, characterized in that, The step of determining whether to switch the operating state of the dual filter switcher based on the gain difference parameter includes: When the gain difference parameter is greater than the preset gain difference threshold, the working state of the dual filter switcher is switched to the daytime working state.
5. The working state switching method according to any one of claims 1 to 4, characterized in that, The process of acquiring the target image and determining the current operating state of the dual filter switcher based on the target image includes: Acquire the target image and determine the color information of the target image; If the color information is in color, the current working state is determined to be the daytime working state; If the color information is black and white, the current working state is determined to be the night film working state.
6. A working state switching device, used to implement the working state switching method as described in any one of claims 1 to 5, characterized in that, Includes a current working state determination module, a first working state switching module, and a second working state switching module: The current working state determination module is used to acquire the target image and determine the current working state of the dual filter switcher based on the target image. The first working state switching module is used to determine the image quality degradation parameters of the target image when the current working state is the daytime working state; and to determine whether to switch the working state of the dual filter switcher based on the image quality degradation parameters. The second working state switching module is used to determine the gain difference parameter of the target image when the current working state is the night film working state; and to determine whether to switch the working state of the dual filter switcher based on the gain difference parameter.
7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the working state switching method according to any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the working state switching method according to any one of claims 1 to 5 when running.
Citation Information
Patent Citations
Image processing method and camera
CN109151257A
Camera mode switching control method and device, camera and storage medium
CN111385477A
Surveillance camera for day-night transitions and method therefor
WO2019157096A1