HDR configuration method, apparatus and device, and readable storage medium
By obtaining HDR configuration requests from the Linux 2 video system, determining and sending configuration parameters, the problem of asynchronous configuration of multiple hardware modules was solved, ensuring the stability and consistency of image processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-03-10
AI Technical Summary
In the Linux 2 video system, the HDR configuration of multiple hardware modules failed to synchronize, resulting in abnormal image processing, such as image distortion, color abnormalities, or data processing failure.
By obtaining HDR configuration requests, determining configuration parameters, and sending configuration parameters to multiple hardware modules according to a preset timing sequence, including security checks and status monitoring, the system ensures that each module is configured collaboratively.
It enables synchronized configuration between multiple hardware modules, avoids pipeline errors, and improves operational stability and consistency.
Smart Images

Figure CN121645007A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of hardware configuration, and particularly relates to an HDR configuration method and device, equipment and a readable storage medium. BACKGROUND
[0002] High Dynamic Range (HDR) imaging technology aims to solve the problem of overexposure in high light areas or underexposure in dark areas of an image sensor in a scene with large light-dark contrast. In Linux 2 Video (Video for Linux2, V4L2), a complex video hardware is split into multiple independent sub-devices (sub-device, subdev), and each sub-device is responsible for a single function, and each sub-device is a hardware module. In this case, how to configure the multiple hardware modules is a problem to be solved. SUMMARY
[0003] The present application provides an HDR configuration method, device, equipment and readable storage medium, which are used for synchronizing the configuration between multiple hardware modules.
[0004] In a first aspect, an HDR configuration method is provided, and the method comprises: obtaining an HDR configuration request; determining an HDR configuration parameter based on the HDR configuration request; sending the HDR configuration parameter to multiple hardware modules according to a preset timing sequence, the HDR configuration parameter being used for the multiple hardware modules to perform HDR configuration.
[0005] In a possible implementation, the multiple hardware modules comprise an image sensor, and before the determining of the HDR configuration parameter, the method further comprises: judging a streaming state of the image sensor. The determining of the HDR configuration parameter comprises: if it is confirmed that the image sensor is in a non-streaming state, determining the HDR configuration parameter.
[0006] In a possible implementation, after the judging of the streaming state of the image sensor, the method further comprises: if it is confirmed that the image sensor is in an active video stream output state, rejecting the HDR configuration request.
[0007] In a possible implementation, the determining of the HDR configuration parameter comprises: obtaining an environment parameter, the environment parameter comprising one or more of the following: scene average brightness, contrast ratio or motion detection flag; determining the HDR configuration parameter based on the environment parameter.
[0008] In a possible implementation, in a case where the scene average brightness is lower than a brightness threshold, the HDR configuration parameter is determined based on an HDR mode using two exposure frames to synthesize an image; or in a case where the contrast ratio is higher than a contrast threshold, the HDR configuration parameter is determined based on an HDR mode using three exposure frames to synthesize an image; or in a case where the motion detection flag indicates that the motion rate is greater than a rate threshold, the HDR configuration parameter is determined based on an image mode using a single exposure frame.
[0009] In a possible implementation, the determining the HDR configuration parameter comprises: obtaining a power consumption parameter, the power consumption parameter comprising one or more of the following: a power supply power, a chip temperature, or a user-set performance mode; determining the HDR configuration parameter based on the power consumption parameter.
[0010] In a possible implementation, in a case where the power supply power is lower than a power threshold, the HDR configuration parameter is determined based on an image mode using a single exposure frame; or in a case where the chip temperature is higher than a temperature threshold, the HDR configuration parameter is determined based on an HDR mode using two exposure frames to synthesize an image; or in a case where the performance mode is a power saving mode, the HDR configuration parameter is determined based on an image mode using a single exposure frame.
[0011] In a possible implementation, before the HDR configuration parameter is sent to the plurality of hardware modules in a preset timing sequence, the method further comprises: performing a security check on the plurality of hardware modules, the security check being configured to check whether the plurality of hardware modules support configuration of the HDR configuration parameter.
[0012] In a possible implementation, the security check comprises one or more of the following: querying configuration data of the hardware module to confirm whether the hardware module supports configuration of the HDR configuration parameter; querying whether system resources, memory bandwidth, or system processing capability of the hardware module are sufficient to confirm whether the hardware module supports a requirement of configuration of the HDR configuration parameter; evaluating whether a performance index requirement can be met after the plurality of hardware modules are configured with the HDR configuration parameter under a current system load.
[0013] In a possible implementation, the plurality of hardware modules are respectively an image sensor, a camera serial interface (CSI) receiver, and an image signal processor (ISP).
[0014] Secondly, an HDR configuration device is provided, the device comprising: The configuration management module is used to obtain high dynamic range (HDR) configuration requests and determine HDR configuration parameters based on the HDR configuration requests. A synchronization control module is used to send the HDR configuration parameters to multiple hardware modules according to a preset timing sequence. The HDR configuration parameters are used by the multiple hardware modules to perform HDR configuration.
[0015] In one possible implementation, the plurality of hardware modules include an image sensor; the device further includes: A status monitoring module is used to determine the streaming media status of the image sensor; The configuration management module is used to confirm the HDR configuration parameters if it is confirmed that the image sensor is in a non-streaming state.
[0016] In one possible implementation, the configuration management module is further configured to reject the HDR configuration request if it is confirmed that the image sensor processing is in an active video stream output state.
[0017] In one possible implementation, the configuration management module includes a scenario analysis module; The scene analysis module is used to acquire environmental parameters, which include one or more of the following: average scene brightness, contrast ratio, or motion detection markers; and to determine HDR configuration parameters based on the environmental parameters.
[0018] In one possible implementation, if the average brightness of the scene is below a brightness threshold, the HDR configuration parameters are determined based on an HDR mode that synthesizes an image using two exposure frames; or, if the contrast ratio is above a contrast threshold, the HDR configuration parameters are determined based on an HDR mode that synthesizes an image using three exposure frames; or, if the motion detection flag indicates that the motion rate is greater than a rate threshold, the HDR configuration parameters are determined based on an image mode that uses a single exposure frame.
[0019] In one possible implementation, the configuration management module includes a power consumption management module; The power management module is used to acquire power consumption parameters, which include one or more of the following: power supply level, chip temperature, or user-set performance mode; and to determine HDR configuration parameters based on the power consumption parameters.
[0020] In one possible implementation, when the power supply is below a power threshold, the HDR configuration parameters are determined based on an image mode using a single exposure frame; or, when the chip temperature is above a temperature threshold, the HDR configuration parameters are determined based on an HDR mode using an image synthesized from two exposure frames; or, when the performance mode is a power-saving mode, the HDR configuration parameters are determined based on an image mode using a single exposure frame.
[0021] In one possible implementation, the device further includes: A configuration verification module is used to perform security checks on the plurality of hardware modules, the security checks being used to check whether the plurality of hardware modules support the configuration of the HDR configuration parameters.
[0022] In one possible implementation, the security check includes one or more of the following: Query the configuration data of the hardware module to confirm whether it supports configuring the HDR configuration parameters; Check whether the system resources, memory bandwidth, or system processing power of the hardware module are sufficient to confirm whether the requirement to configure HDR parameters is supported. Evaluate whether the performance requirements can be met under the current system load after configuring the HDR configuration parameters on the multiple hardware modules.
[0023] In one possible implementation, the plurality of hardware modules are an image sensor, a CSI receiver, and an ISP.
[0024] Thirdly, a computer device is also provided, the computer device including a processor and a memory, the memory storing at least one piece of program code, the at least one piece of program code being loaded and executed by the processor to enable the computer device to implement the HDR configuration method described in any of the above claims.
[0025] In one possible implementation, the computer device has the functionality to perform the behaviors described in the method embodiments above. The computer device may be a terminal device, a component of a terminal device (e.g., a processor, chip, or chip system), or a logic module or software capable of implementing all or part of the functions of the terminal device. The functions of the computer device can be implemented in hardware or by hardware executing corresponding software, the hardware or software including one or more modules or units corresponding to the functions described above.
[0026] Fourthly, a computer-readable storage medium is also provided, wherein at least one piece of program code is stored therein, the at least one piece of program code being loaded and executed by a processor to enable a computer to implement the HDR configuration method described in any of the preceding claims.
[0027] Fifthly, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform any of the HDR configuration methods described above.
[0028] The technical solution provided in this application can bring at least the following beneficial effects: By sending HDR configuration parameters to multiple hardware modules according to a preset timing sequence, the multiple hardware modules can complete the configuration in sequence, avoiding errors in the processing pipelines corresponding to the multiple hardware modules, ensuring the consistency of HDR configuration among the multiple hardware modules, and improving the operational stability of the multiple hardware modules. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is an implementation environment diagram of an HDR configuration method provided in an embodiment of this application; Figure 2 This is a flowchart of an HDR configuration method provided in an embodiment of this application; Figure 3 This is a state transition diagram of a configuration verification and application process provided in an embodiment of this application; Figure 4 This is a structural diagram of a multi-hardware module configuration system provided in an embodiment of this application; Figure 5 This is a schematic diagram of the configuration process of a multi-hardware module configuration system provided in an embodiment of this application; Figure 6 This is a logic diagram of an adaptive configuration decision provided in an embodiment of this application; Figure 7 This is a sequence diagram of multi-module configuration synchronization provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of an HDR configuration device provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0032] The Linux kernel, as the core of the open-source operating system, is responsible for managing hardware resources, providing system call interfaces, scheduling processes, handling interrupts, and other low-level functions. The Linux kernel acts as a bridge between applications and hardware; applications indirectly operate the hardware through system calls provided by the kernel, without directly interacting with hardware registers. Among its components, Video for Linux 2 (V4L2) is a standardized subsystem framework for video devices within the Linux kernel, providing a unified framework for driver development and application programming for video devices.
[0033] Optionally, V4L2 breaks down a complex video hardware component into multiple independent sub-devices (subdevices), each responsible for a single function; each sub-device is essentially a hardware module. For example, V4L2 uses structures such as v4l2-subdev to abstract sub-devices such as image sensors, camera serial interface (CSI) receivers, and image signal processors (ISPs), providing standard configuration and control interfaces for upper-layer applications.
[0034] The image sensor is the core device that converts optical images into electronic signals, used to acquire raw image data and respond to exposure or focus control. The CSI receiver is responsible for receiving and parsing image data. The ISP is a key processing unit in the camera system, responsible for data processing and synthesis. For example, the ISP performs a series of processes on the raw image data output by the image sensor, such as noise reduction, color interpolation, white balance, gamma correction, and HDR synthesis.
[0035] High Dynamic Range (HDR) imaging technology aims to solve the problem of overexposure in highlight areas or underexposure in shadow areas in scenes with high contrast between light and dark. Among them, sensor-level HDR technology includes, but is not limited to, the following two functions: (1) multi-exposure temporal synthesis: the image sensor continuously captures multiple frames of images with different exposure times in a very short period of time, providing wider dynamic range information for subsequent processing; (2) single-frame spatial synthesis: through special design at the pixel level, signals of different exposure levels are captured in one exposure. Enabling HDR mode usually means higher data throughput, more complex processing flow and higher system power consumption.
[0036] However, in HDR mode, if the HDR configurations of multiple hardware modules in the image processing pipeline are out of sync, it will lead to image processing abnormalities. For example, because the ISP needs to perform complex algorithms such as multi-frame alignment and fusion, the ISP's HDR configuration must be precisely matched with the image sensor's HDR output mode; otherwise, it will result in synthesis failure, image artifacts, or image quality degradation.
[0037] In other words, changing the HDR mode requires synchronized updates to the HDR configurations of the image sensor, CSI receiver, and ISP. This synchronized HDR configuration update means that the image sensor, CSI receiver, and ISP must coordinate and align key parameters to ensure that multi-exposure data can be correctly transmitted and fused. Optionally, HDR modes include a two-frame composite HDR mode (HDR_X2 mode), a three-frame composite HDR mode (HDR_X3 mode), and an HDR-off mode (i.e., NO_HDR mode).
[0038] HDR_X2 mode refers to an HDR implementation using a two-stage combination of "short exposure + long exposure". The short exposure frame is specifically used to capture details in highlight areas, avoiding overexposure; the long exposure frame focuses on shadow areas, thus supplementing shadow textures. During ISP compositing, the pixels of the short exposure frame are used for highlight areas, and the pixels of the long exposure frame are used for shadow areas. Then, the intermediate transition area is blended. HDR_X3 mode refers to an HDR implementation using a three-stage combination of "short exposure + medium exposure + long exposure". In addition to the short exposure frame preserving highlights and the long exposure capturing shadows, the newly added medium exposure frame is specifically responsible for restoring the normal brightness details of the main subject. During ISP compositing, the short exposure frame and the medium exposure frame are first combined to create a highlight enhancement image, which is then blended with the long exposure frame, significantly reducing the abruptness of the transition between bright and dark areas.
[0039] Taking HDR_X3 mode as an example, this section illustrates the collaborative configuration required by the image sensor, CSI receiver, and ISP. The image sensor is configured with HDR_X2 mode enabled, outputting three exposures: long (L), medium (M), and short (S). It outputs L frames through virtual channel (VC0), M frames through VC1, and S frames through VC2. VCs are fixedly mapped to the exposure frames to avoid confusion. The row interleaving order of the raw image data (RAW) is L0→M0→S0→L1→M1→S1. Therefore, the CSI receiver needs to enable VC0 / 1 / 2, with the mapping between VCs and exposure frames consistent with the image sensor. The ISP also needs to enable VC0 / 1 / 2, with the mapping between VCs and exposure frames consistent with both the image sensor and CSI receiver. Deinterleaving is performed according to the row interleaving order of the image sensor to restore the three independent RAW frames. During image synthesis, the images are fused using L / M / S weights.
[0040] In related technologies, V4L2-based image processing systems often perform independent HDR configurations for hardware modules such as image sensors, CSI receivers, and ISPs, failing to consider the entire image pipeline as a whole and resulting in significant systemic coordination deficiencies. For example, due to the lack of an atomic synchronization configuration mechanism, it is highly susceptible to configuration lag or mismatch in certain hardware modules, leading to parameter mismatch in the entire image processing pipeline and causing image distortion, color anomalies, or data processing failures.
[0041] The atomic synchronous configuration mechanism means that for multiple hardware modules, either all hardware modules' configuration changes succeed and take effect, or no hardware module is modified and it rolls back to its original state, without any intermediate state where configuration changes for some hardware modules take effect. Furthermore, the lack of security verification for HDR mode configuration changes may lead to instability in the image processing system.
[0042] This application provides an HDR configuration method that can be applied to any processing system comprising multiple hardware modules. The processing system can be, for example, a camera system, image processing system, or digital imaging system used in fields such as smartphones, tablets, automotive electronics, security monitoring, and industrial vision. For example, see... Figure 1 , Figure 1 This is an implementation environment diagram of an HDR configuration method provided in an embodiment of this application. The implementation environment includes a processing system, which includes multiple hardware modules.
[0043] This system requires multiple hardware modules to work together to enable HDR functionality. Therefore, the HDR configuration of these modules needs to be synchronized to ensure stable operation of the entire system. This application does not limit the number of hardware modules. Figure 1 The example uses N hardware modules, where N is a positive integer greater than 1. In one possible scenario, multiple hardware modules are derived from the breakdown of a complex hardware module with the same function, with each module implementing one of those functions. Alternatively, multiple hardware modules may correspond to different processing modules on the same processing pipeline, with each subsequent module processing the output of the preceding module.
[0044] See Figure 2 , Figure 2 This is a flowchart illustrating an HDR configuration method provided in an embodiment of this application. The method can be executed by a processing system comprising multiple hardware modules or a functional module on the processing system. For example, the method is applied to... Figure 1 The implementation environment shown. For example... Figure 2 As shown, the HDR configuration method includes, but is not limited to, the following steps 201-203.
[0045] Step 201: Obtain the HDR configuration request.
[0046] The HDR configuration request is used to configure HDR functionality for multiple hardware modules. For example, these multiple hardware modules are multiple sub-devices in an image processing pipeline, including but not limited to image sensors, CSI receivers, and ISPs. For instance, the HDR configuration request is used to change the HDR mode of multiple hardware modules to a target mode, which includes, but is not limited to, the aforementioned HDR_X2 mode, HDR_X3 mode, or NO_HDR mode.
[0047] The embodiments of this application obtain HDR configuration requests in ways including but not limited to the following two: Method 1, responding to receiving an HDR configuration request from the application layer; Method 2, generating an HDR configuration request in response to the fact that the currently configured HDR modes of multiple hardware modules differ from the adaptive mode, where the target mode is the adaptive mode. The adaptive mode is an operating mode adapted to at least one of the environmental parameters or power consumption parameters of the multiple hardware modules.
[0048] In this embodiment, the adaptive mode is determined based on at least one of the environmental parameters or power consumption parameters of multiple hardware modules. The environmental parameters indicate the operating environment of the multiple hardware modules and include one or more of the following: average scene brightness, contrast ratio, or motion detection flags. The power consumption parameters indicate the operating power consumption of the multiple hardware modules and include one or more of the following: power supply level, chip temperature, or user-set performance mode. The average scene brightness refers to the average brightness of the surrounding environment of the processing system where the multiple hardware modules are located; in an image processing system, it refers to the ambient brightness of the acquired image. The contrast ratio also refers to the average contrast of the surrounding environment of the processing system where the multiple hardware modules are located. The motion detection flags refer to the motion state of the processing system where the multiple hardware modules are located.
[0049] For example, if the adaptive mode is determined based on environmental parameters of multiple hardware modules, then when the average scene brightness is below a brightness threshold, the adaptive mode is a high dynamic range (HDR) mode that uses two exposure frames to synthesize an image, such as HDR_X2 mode; or, when the contrast ratio is above a contrast threshold, the adaptive mode is an HDR mode that uses three exposure frames to synthesize an image, such as HDR_X3 mode; or, when the motion detection metric indicates that the motion rate is greater than a rate threshold, the adaptive mode is an image mode that uses a single exposure frame, such as NO_HDR mode. Under other environmental parameters, it can be considered that there is no adaptive mode. The brightness threshold, contrast threshold, and rate threshold can all be flexibly set.
[0050] If the adaptive mode is determined based on the power consumption parameters of multiple hardware modules, then when the battery level is below a threshold, the adaptive mode uses a single-exposure frame image mode, such as NO_HDR mode; or when the chip temperature is above a threshold, the adaptive mode uses a high dynamic range (HDR) mode that synthesizes an image using two exposure frames, such as HDR_X2 mode; or, when the performance mode is power-saving mode, the adaptive mode uses a single-exposure frame image mode, such as NO_HDR mode. Both the battery level threshold and the stability threshold can be flexibly set.
[0051] Under other environmental parameters, or under other power consumption parameters, it can be assumed that no adaptive mode exists. In this case, the system can operate according to the currently configured HDR mode or the reference mode issued by the application layer. If the adaptive mode is determined based on the environmental and power consumption parameters of multiple hardware modules, then a first adaptive mode can be determined based on the environmental parameters of the multiple hardware modules, and a second adaptive mode can be determined based on the power consumption parameters of the multiple hardware modules. One of the first and second adaptive modes is then selected as the final adaptive mode. For example, the adaptive mode that is closest to the reference mode among the first and second adaptive modes can be selected; or, the adaptive mode with lower complexity among the first and second adaptive modes can be selected.
[0052] Step 202: Determine HDR configuration parameters based on the HDR configuration request.
[0053] In this scenario, multiple hardware modules require different parameters for the same operating mode. For example, these hardware modules include an image sensor, a CSI receiver, and an ISP. When simultaneously configuring the same HDR mode for the image sensor, CSI receiver, and ISP, the image sensor needs to be configured with parameters such as the number of exposure groups, VC mapping, and line interleaving order; the CSI receiver needs to be configured with parameters such as the number of exposure groups and VC mapping; and the ISP needs to be configured with parameters such as the number of exposure groups, VC mapping, line interleaving order, and composition weights. Therefore, determining the HDR configuration parameters based on the HDR configuration request includes: determining the HDR configuration parameters corresponding to each of the multiple hardware modules based on the HDR mode indicated by the HDR configuration request.
[0054] In one possible implementation, before determining the HDR configuration parameters based on the HDR configuration request, it is first determined whether multiple hardware modules are operating according to the parameters of the currently configured operating mode. Then, if multiple hardware modules are not operating according to the parameters of the currently configured operating mode, i.e., if multiple hardware modules are not in an operating state, the HDR configuration parameters are determined based on the HDR configuration request. This application does not limit the method of sensing the operating state of multiple hardware modules; it can sense only the operating state of any one of the multiple hardware modules. If any one hardware module is in an operating state, then it is considered that multiple hardware modules are in an operating state.
[0055] Optionally, if multiple hardware modules are running according to the parameters of the currently configured operating mode, i.e., multiple hardware modules are in operation, the HDR configuration request is rejected and the HDR configuration parameters are not determined. Alternatively, the HDR configuration parameters are determined based on the HDR configuration request after the multiple hardware modules stop running.
[0056] For example, taking multiple hardware modules including an image sensor as an example, before determining the HDR configuration parameters, the method further includes: determining the streaming media status of the image sensor; determining the HDR configuration parameters includes: if it is confirmed that the image sensor is in a non-streaming media status, that is, the image sensor is not operating according to the parameters of the currently configured operating mode, then determining the HDR configuration parameters. After determining the streaming media status of the image sensor, the method further includes: if it is confirmed that the image sensor processing is in an active video stream output state, that is, the image sensor is operating according to the parameters of the currently configured operating mode, then rejecting the HDR configuration request.
[0057] In one possible implementation, if the HDR configuration request is generated based on adaptive mode, the HDR configuration parameters can be determined directly according to the adaptive mode. If the HDR configuration request is issued by the application layer, the HDR configuration parameters can be determined directly according to the target mode indicated by the HDR configuration request; alternatively, it can be determined whether the target mode matches the adaptive mode. If they match, the HDR configuration parameters corresponding to the target mode are determined; if they do not match, the HDR configuration parameters are determined according to the adaptive mode.
[0058] In this context, "target mode matching" means that the target mode does not conflict with at least one of the environmental or power consumption parameters of multiple hardware modules; for example, the complexity of the target mode is equal to or lower than the complexity of the adaptive mode. "Target mode mismatch" means that the target mode conflicts with at least one of the environmental or power consumption parameters of multiple hardware modules; for example, the complexity of the target mode is higher than the complexity of the adaptive mode. For instance, the complexity of HDR_X3 mode is higher than that of HDR_X2 mode, and the complexity of HDR_X2 mode is higher than that of NO_HDR mode.
[0059] When determining HDR configuration parameters according to adaptive mode, the determination of HDR configuration parameters includes: obtaining environmental parameters and determining HDR configuration parameters based on the environmental parameters; or obtaining power consumption parameters and determining HDR configuration parameters based on the power consumption parameters; or obtaining both environmental parameters and power consumption parameters and determining HDR configuration parameters based on both environmental parameters and power consumption parameters.
[0060] Corresponding to the above-mentioned method of obtaining adaptive mode, the method of determining HDR configuration parameters based on environmental parameters includes: when the average scene brightness is lower than the brightness threshold, determining HDR configuration parameters based on the HDR mode of synthesizing an image using two exposure frames; or, when the contrast ratio is higher than the contrast threshold, determining HDR configuration parameters based on the HDR mode of synthesizing an image using three exposure frames; or, when the motion detection flag indicates that the motion rate is greater than the rate threshold, determining HDR configuration parameters based on the image mode using a single exposure frame.
[0061] The methods for determining HDR configuration parameters based on power consumption parameters include: determining HDR configuration parameters based on an image mode using a single exposure frame when the power supply is below a power threshold; or determining HDR configuration parameters based on an HDR mode using an image synthesized from two exposure frames when the chip temperature is above a temperature threshold; or determining HDR configuration parameters based on an image mode using a single exposure frame when the performance mode is power saving mode.
[0062] Step 203: Send HDR configuration parameters to multiple hardware modules according to a preset timing sequence. The HDR configuration parameters are used by multiple hardware modules to configure HDR.
[0063] In this embodiment, the preset timing sequence can be determined based on the pipeline order of multiple hardware modules. For example, if the preset timing sequence is image sensor, CSI receiver, and ISP, then the process of sending HDR configuration parameters to multiple hardware modules according to the preset timing sequence includes: first sending HDR configuration parameters to the image sensor to ensure that the image sensor outputs the configured data format; after the image sensor is successfully configured, then sending HDR configuration parameters to the CSI receiver and ISP in sequence to prepare the CSI receiver and ISP to receive and process the data output according to the configured data format.
[0064] By sending HDR configuration parameters to multiple hardware modules according to a preset timing sequence, the system ensures that the modules can be configured sequentially, guaranteeing configuration consistency across all modules. If any hardware module fails to configure during the process of sending HDR configuration parameters according to the preset timing sequence, the configured hardware module is reverted to its previous state.
[0065] In one possible implementation, before sending HDR configuration parameters to multiple hardware modules according to a preset timing sequence, a security check is performed on the multiple hardware modules. This security check verifies whether the multiple hardware modules support the configuration of the HDR configuration parameters. The security check includes one or more of the following: querying the configuration data of the hardware modules to confirm whether they support configuring the HDR configuration parameters; querying whether the system resources, memory bandwidth, or system processing power of the hardware modules are sufficient to confirm whether the requirement to configure the HDR configuration parameters is supported; and assessing whether, under the current system load, configuring the HDR configuration parameters on the multiple hardware modules can meet performance requirements.
[0066] Optionally, the security check includes three layers: hardware compatibility check, resource availability check, and performance constraint check. Taking multiple hardware modules, including an image sensor, CSI receiver, and ISP, as an example, the hardware compatibility check is used to consult the image sensor's datasheet or driver capability table to confirm whether the image sensor supports HDR configuration parameters; the resource availability check is used to check whether system resources such as digital signal processors, memory bandwidth, etc., are sufficient to meet the high throughput processing requirements under HDR configuration parameters; the performance constraint check is used to evaluate whether, under the current processing system load, the application of this HDR configuration parameter can meet the performance requirements such as frame rate.
[0067] For example, taking multiple hardware modules including an image sensor, a CSI receiver, and an ISP as an example, see [link to relevant documentation]. Figure 3The diagram shows the state transitions during the configuration verification and application process. Initially, the image sensor, CSI receiver, and ISP are in a stable state under their current operating modes. Upon receiving a mode change request (corresponding to an HDR configuration request), the request indicates the target HDR mode. Configuration verification is first performed through a triple security check, and the configuration is applied through a synchronization mechanism only after all verifications are passed.
[0068] like Figure 3 As shown, a hardware compatibility check determines whether the target HDR mode is supported (i.e., whether the HDR configuration parameters corresponding to the target HDR mode are supported). If not, the verification fails, and the system remains in its current stable state. If supported, a resource availability check determines whether resources are sufficient. If resources are insufficient, the verification fails, and the system remains in its current stable state. If resources are sufficient, a performance constraint check determines whether the performance meets the performance requirements. If the performance does not meet the requirements, the verification fails, and the system remains in its current stable state. If the performance meets the requirements, all verifications pass, and the system is configured and applied.
[0069] Continue as Figure 3 As shown, during the application configuration process, the image sensor is configured first. Specifically, the image sensor is configured for HDR according to the parameters of the target HDR mode. If the image sensor configuration fails, a configuration error is identified, and the system remains in its current stable state. If the image sensor configuration is successful, the CSI receiver is configured. The CSI receiver is configured for HDR according to the parameters of the target HDR mode. If the CSI receiver configuration fails, a configuration error is identified, and the system remains in its current stable state. If the CSI receiver configuration is successful, the ISP is configured. The ISP is configured for HDR according to the parameters of the target HDR mode. If the ISP configuration fails, a configuration error is identified, and the system remains in its current stable state. If the ISP configuration is successful, all modules are confirmed to be configured successfully, ensuring that the image sensor, CSI receiver, and ISP are all updated to the stable state of the target mode.
[0070] In summary, this method synchronizes the parameters of the target mode across multiple hardware modules after the target mode passes the security check. Furthermore, it only runs according to the modified target mode parameters after all multiple hardware modules have been successfully configured. This ensures consistency in operating modes across multiple hardware modules, preventing errors in the processing pipelines corresponding to those modules, while also guaranteeing operational security after configuration changes and improving the operational stability of the multiple hardware modules.
[0071] The following example illustrates an application using the method described in this embodiment to implement HDR configuration, taking multiple hardware modules including an image sensor, a CSI receiver, and an ISP. For example, in this application scenario, the method can be implemented by... Figure 4The multi-hardware module configuration system shown is a centralized, intelligent configuration management framework. For example... Figure 4 As shown, the multi-hardware module configuration system includes an application layer, a configuration manager, and a multi-module configurator, with the method executed by the configuration manager. The application layer includes application programs, and the configuration manager includes a status monitoring module, a scene analysis module, a power management module, a configuration verification module, and a synchronization control module. The multi-module configurator includes an image sensor driver, a CSI receiver driver, and an ISP driver.
[0072] For example, Figure 4 The configuration process of the multi-hardware module configuration system shown can be as follows: Figure 5 As shown. In step S1, the application layer initiates an HDR configuration request. Optionally, the application layer initiates the HDR configuration request through the Input / OutputControl (ioctl) interface. ioctl is the core interface for transmitting control commands between user space and the kernel / driver, used to handle HDR configuration, status queries, or special operations for sub-devices. The ioctl interface adopts a "single interface + multiple commands" design; a single ioctl system call uses different command codes to distinguish different control operations, supports the transmission of complex data structures, and can carry multi-parameter configurations.
[0073] In step S2, the configuration manager checks the streaming media status through the status monitoring module. If it is running, i.e., transmitting a video stream, the process terminates and returns a "busy" signal to the application layer; otherwise, proceed to step S3.
[0074] Step 2 provides a state-aware, delayed configuration mechanism. In this mechanism, when the application layer initiates an HDR configuration request via a V4L2 ioctl system call, the configuration manager does not immediately command the hardware to execute the request. Instead, it first queries the state monitoring module, which maintains flags indicating the current streaming media status of the system. These flags include streaming and non-streaming states. A streaming state indicates that a video stream is being transmitted; a non-streaming state indicates that a video stream is not being transmitted, for example, the image sensor preview has not started or has stopped.
[0075] If the streaming status is "streaming," the configuration manager will immediately return a "busy" signal, such as the EBUSY status code, to the application layer to reject the HDR configuration request. All configuration parameters will be temporarily stored to avoid video stream interruption or frame loss due to hardware reconfiguration. The configuration process will continue if the streaming status is not "streaming."
[0076] Therefore, in this state-aware delayed configuration mechanism, a "request-check-delayed execution" mode is adopted. Based on the working status of the image sensor monitored in real time, the configuration timing is intelligently selected, and the reception of the configuration request and the execution of the hardware parameters are separated in time. This avoids the problem of video stream interruption caused by dynamically configuring HDR parameters during video stream operation. In other words, it fundamentally solves the timing conflict between dynamic configuration and real-time streaming media, so that the mode change process will not cause screen stuttering, frame skipping or application errors, and can realize advanced functions such as "seamless" zoom or dynamic image quality adjustment.
[0077] After the streaming media status is checked, the HDR configuration request is not executed directly, but is instead sent to an intelligent decision-making layer for optimization. This intelligent decision-making layer includes two core modules: a scene analysis module and a power management module.
[0078] In step S3, the configuration manager performs environmental analysis based on real-time environmental parameters through the scene analysis module, and recommends an optimized HDR mode based on the environmental analysis results.
[0079] The scene analysis module, as a software logic unit, continuously acquires real-time environmental parameters from the ISP or a dedicated image sensor. These parameters include brightness, contrast, and motion signs. Optionally, brightness refers to the average brightness of the scene. The pre-built strategy engine within the scene analysis module performs environmental analysis based on these real-time parameters and recommends optimized HDR modes.
[0080] For example, see Figure 6 The diagram shows the logic of the adaptive configuration decision. The scene analysis module's inputs include average scene brightness, contrast ratio, and motion indicators. If the average scene brightness is below the brightness threshold, indicating a low-light scene, the scene analysis module prioritizes recommending HDR_X2 mode to enhance shadow details. If the contrast ratio is above the contrast threshold, indicating a high-contrast scene, the scene analysis module recommends HDR_X3 mode to maximize dynamic range. If fast motion is detected, to avoid artifacts (ghosting) and reduce processing latency, the scene analysis module recommends NO_HDR mode. When the brightness is above the brightness threshold, the contrast ratio is below the contrast threshold, or no fast motion is detected (i.e., other cases), the scene analysis module does not recommend HDR mode.
[0081] Step S4: The configuration manager optimizes the system status through the power management module, that is, it performs secondary optimization on the HDR mode recommended by the scene analysis module based on the system power consumption message.
[0082] System power consumption information includes, but is not limited to, battery level, chip temperature, and performance mode. The power management module interacts with the underlying power management service to obtain information such as battery level and chip temperature, and is aware of the user-set performance mode. Based on the system power consumption parameters, the power management module performs secondary optimization on the HDR mode recommended by the scene analysis module.
[0083] For example, see Figure 6 The diagram shows the logic of the adaptive configuration decision. The power management module's inputs include battery level, chip temperature, and performance mode. When the battery level is below 20% or the system is in forced power-saving mode, the power management module will reject the suggestion to enable HDR mode, forcing the system to use the basic NO_HDR mode to save power. When the chip temperature is too high, for example, above 70 degrees Celsius, the power management module suggests downgrading the HDR mode, for example, from the high-load HDR_X3 mode to the lower-load HDR_X2 mode to prevent overheating. When the performance mode is in power-saving mode, the system is forced to use the basic NO_HDR mode to save power. When the battery level is above 20%, the chip temperature is below 70 degrees Celsius, and the performance mode is not in power-saving mode (i.e., other situations), the power management module does not recommend HDR mode, meaning it does not perform secondary optimization on the HDR mode recommended by the scene analysis module.
[0084] Therefore, the scene analysis module and power management module can intelligently optimize the HDR mode. For example, based on the actual shooting scene (such as low light, backlight, motion) and device status (such as battery level, temperature), intelligent and adaptive configuration recommendations and optimizations can be made to maintain the best balance between image quality, system performance and power consumption in complex real-world usage scenarios.
[0085] For each HDR mode specified in the HDR configuration request, recommended by the scene analysis module, and recommended by the power management module, the HDR mode with the lowest complexity is selected as the final target HDR mode. For example, if the HDR configuration request specifies HDR_X3 mode and the scene analysis module or power management module recommends NO_HDR mode, the target HDR mode is determined to be NO_HDR mode; if the HDR configuration request specifies HDR_X2 mode, the scene analysis module recommends HDR_X3 mode, and the power management module does not recommend an HDR mode, the target HDR mode is determined to be HDR_X2 mode. Alternatively, the HDR mode recommended by the power management module after secondary optimization is selected as the final target HDR mode.
[0086] After the target HDR mode is obtained by the intelligent decision-making layer, it is not applied immediately. Instead, it enters a critical security check layer to perform a series of proactive checks. The security check layer includes a configuration verification module.
[0087] In step S5, the configuration manager performs a triple security check on the finally determined target HDR mode through the configuration verification module. If the verification is successful, proceed to step S6; if the verification fails, proceed to step S7.
[0088] The triple security check includes hardware compatibility checks, resource availability checks, and performance constraint checks. Hardware compatibility checks involve consulting the image sensor's datasheet or driver capability table to confirm whether the image sensor supports the target HDR mode. Resource availability checks ensure that system resources such as the digital signal processor, memory bandwidth, etc., are sufficient to meet the high throughput processing requirements of the target HDR mode. Performance constraint checks assess whether, under the current system load, applying this target HDR mode can meet performance requirements such as frame rate.
[0089] The target HDR mode will only be applied after all three security checks pass. If any security check fails, the configuration process will abort and return an error code to the application layer, indicating the specific reason for the error.
[0090] Step S6: The configuration manager performs multi-hardware module configuration synchronization through the synchronization control module, that is, atomically synchronizes the parameters of the target HDR mode to the image sensor, CSI and ISP according to a predetermined sequence; if synchronization fails, for example, an error occurs during the synchronization process, proceed to step S7; if all hardware modules are successfully synchronized, proceed to step S8.
[0091] Once the target HDR configuration passes the triple security check, the synchronization control module begins operation. Internally, the synchronization control module maintains a configuration synchronization manager, which holds references to drivers for multiple V4L2 sub-devices, including the image sensor, CSI receiver, and ISP. Following a predetermined sequence, the synchronization control module sends the same HDR mode configuration parameters to all V4L2 sub-devices.
[0092] The predetermined sequence can be a pre-defined, optimal timing sequence. For example, a typical predetermined sequence is to first configure the image sensor to ensure it outputs the correct data format, and then sequentially configure the CSI receiver and ISP to prepare them for receiving and processing the data output by the image sensor. This atomic, synchronous operation ensures that the entire pipeline from acquisition to processing has a consistent understanding of the HDR mode at any given moment, avoiding problems such as image distortion, color distortion, or processing failure caused by asynchronous configuration of individual modules.
[0093] For example, see Figure 7The diagram shows the sequence of multi-module configuration synchronization. After the application layer sends an HDR configuration request to the configuration manager, the configuration manager performs stream state checks, adaptive recommendations, and security verification. First, it configures the target HDR mode parameters for the image sensor driver in the multi-module configurator, i.e., sends HDR configuration parameters to the image sensor driver. If the image sensor driver configuration fails, the configuration manager's summary synchronization result is considered a failure, triggering a rollback mechanism and returning an error to the application layer. If the image sensor driver configuration succeeds, it then configures the target HDR mode parameters for the CSI receiver driver in the multi-module configurator, i.e., sends HDR configuration parameters to the CSI receiver driver.
[0094] If the CSI receiver driver configuration fails, the synchronization result obtained by the configuration manager will be considered a failure, triggering a rollback mechanism and returning an error to the application layer. If the CSI receiver driver configuration succeeds, the parameters for the target HDR mode will be configured for the ISP driver in the multi-module configurator, i.e., HDR configuration parameters will be sent to the ISP driver. If the ISP driver configuration fails, the synchronization result obtained by the configuration manager will be considered a failure, triggering a rollback mechanism and returning an error to the application layer. If the ISP driver configuration succeeds, the synchronization result obtained by the configuration manager will be considered a success, and a success message will be returned to the application layer.
[0095] Step S7: Trigger the rollback mechanism to restore all hardware modules to their previous configuration and report errors to the application layer, for example, by returning error codes to the application layer.
[0096] To address the rare occurrence of unexpected failures during application configuration, this application incorporates a rollback mechanism. This mechanism securely saves the HDR configuration parameters from the previous stable state. If the synchronization configuration of the target HDR mode fails, it automatically and quickly restores all relevant hardware modules to their previous stable state and records error logs, thereby significantly enhancing the system's fault tolerance and reliability.
[0097] Step S8: Return a success message to the application layer, completing the configuration change.
[0098] Therefore, by configuring the system with multiple hardware modules, it is possible to ensure that the HDR modes of multiple independent hardware modules such as image sensors, CSI receivers, and ISPs in the image processing pipeline are atomically consistent, avoiding image anomalies caused by configuration asynchrony. Furthermore, by integrating scene analysis and power management modules, the HDR mode can dynamically adjust according to ambient light, motion, system power consumption, and temperature, achieving an intelligent balance between image quality, system performance, and power consumption. This automatically provides users with the optimal image effect while intelligently reducing power consumption in scenarios with low power. In addition, a security and reliability guarantee mechanism is configured. By introducing a complete configuration security chain including pre-verification, failure rollback, and emergency recovery, multiple feasibility checks are performed before configuration changes, and the system can automatically recover to a stable state in the event of failure, greatly improving the system's robustness.
[0099] The above describes the HDR configuration method of the present application embodiments. Corresponding to the above method, the present application embodiments also provide an HDR configuration device. Figure 8 This is a schematic diagram of the structure of an HDR configuration device provided in an embodiment of this application, based on... Figure 8 The following modules are capable of executing Figure 8 The illustrated HDR configuration method includes all or part of the operations. It should be understood that the device may include more additional modules than those shown, or may omit some of the modules shown; this application embodiment does not impose limitations in this regard.
[0100] like Figure 8 As shown, the device includes: a configuration management module 701, used to acquire a high dynamic range (HDR) configuration request; determine HDR configuration parameters based on the HDR configuration request; and a synchronization control module 702, used to send HDR configuration parameters to multiple hardware modules according to a preset timing sequence, wherein the HDR configuration parameters are used by the multiple hardware modules to perform HDR configuration.
[0101] In one possible implementation, multiple hardware modules include an image sensor; the device further includes a status monitoring module for determining the streaming media status of the image sensor. The configuration management module 701 is used to confirm the HDR configuration parameters if it is confirmed that the image sensor is in a non-streaming state.
[0102] In one possible implementation, the configuration management module 701 is further configured to reject the HDR configuration request if it is confirmed that the image sensor processing is in an active video stream output state.
[0103] In one possible implementation, the configuration management module 701 includes a scene analysis module; the scene analysis module is used to acquire environmental parameters, which include one or more of the following: average scene brightness, contrast ratio, or motion detection flags; and to determine HDR configuration parameters based on the environmental parameters.
[0104] In one possible implementation, when the average scene brightness is below a brightness threshold, the HDR configuration parameters are determined based on an HDR mode that synthesizes an image using two exposure frames; or, when the contrast ratio is above a contrast threshold, the HDR configuration parameters are determined based on an HDR mode that synthesizes an image using three exposure frames; or, when a motion detection flag indicates that the motion rate is greater than a rate threshold, the HDR configuration parameters are determined based on an image mode that uses a single exposure frame.
[0105] In one possible implementation, the configuration management module 701 includes a power management module; the power management module is used to acquire power consumption parameters, which include one or more of the following: power supply capacity, chip temperature, or user-set performance mode; and determine HDR configuration parameters based on the power consumption parameters.
[0106] In one possible implementation, when the power supply is below a power threshold, the HDR configuration parameters are determined based on an image mode using a single exposure frame; or, when the chip temperature is above a temperature threshold, the HDR configuration parameters are determined based on an HDR mode using an image synthesized from two exposure frames; or, when the performance mode is power saving mode, the HDR configuration parameters are determined based on an image mode using a single exposure frame.
[0107] In one possible implementation, the device further includes a configuration verification module for performing security checks on multiple hardware modules, wherein the security checks are used to check whether the multiple hardware modules support the configuration of HDR configuration parameters.
[0108] In one possible implementation, the security check includes one or more of the following: querying the configuration data of the hardware module to confirm whether it supports configuring HDR configuration parameters; querying whether the system resources, memory bandwidth, or system processing power of the hardware module are sufficient to confirm whether the requirement to configure HDR configuration parameters is supported; and assessing whether the performance requirements can be met under the current system load after configuring HDR configuration parameters on multiple hardware modules.
[0109] In one possible implementation, the multiple hardware modules are an image sensor, a CSI receiver, and an ISP.
[0110] It should be understood that the above Figure 8The provided device, when implementing its functions, is only illustrated by the above-described division of functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process and beneficial effects are detailed in the method embodiments, and will not be repeated here.
[0111] Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device 800 is, for example, a smartphone, tablet computer, vehicle terminal, laptop computer, or desktop computer. The computer device 800 is used to execute the HDR configuration method provided in the embodiment of this application.
[0112] Typically, computer device 800 includes a processor 801 and a memory 802.
[0113] Processor 801 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 801 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 801 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 801 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 801 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0114] Processor 801 is coupled to memory 802, and it should be understood that computer device 800 also supports other memory configurations known in the art. Memory 802 may include one or more computer-readable storage media, which may be non-transitory, storing at least one computer program that is loaded and executed by processor 801.
[0115] The memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction for execution by the processor 801.
[0116] In one possible implementation, the aforementioned computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0117] Figure 9 A display 806 coupled to the processor 801 via a display controller 804 is also shown. In some cases, the computer device 800 can be used for wireless communication. Figure 9 A speaker 809 and a microphone 810 coupled to a processor 801 via an encoder / decoder 811 are also shown; as well as a wireless antenna 808 coupled to a wireless controller 805.
[0118] Display 806 is used to display a UI (User Interface). This UI may include graphics, text, icons, video, and any combination thereof. When display 806 is a touch screen, it also has the ability to collect touch signals on or above its surface. In this case, display 806 can also provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, display 806 may be a single display, located on the front panel of the terminal; in other embodiments, display 806 may be at least two, respectively located on different surfaces of the terminal or in a folded design; in still other embodiments, display 806 may be a flexible display, located on a curved or folded surface of the terminal. Furthermore, display 806 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. Display 806 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0119] Microphone 810 is used to collect sound waves from the user and the environment, and input the sound waves to processor 801 for processing. Multiple microphones 810 can be used for stereo sound acquisition or noise reduction, and they can be located in different parts of the terminal. Microphone 810 can also be an array microphone or an omnidirectional microphone. Speaker 809 is used to convert electrical signals from processor 801 into sound waves. Speaker 809 can be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement.
[0120] The processor 801 and memory 802 may be contained in a system-in-package or system-on-a-chip device.
[0121] Input device 807 and power supply 803 are coupled to system-on-chip device 812. Optionally, such as Figure 9 As shown, when one or more optional boxes are present, the display 806, input device 807, speaker 809, microphone 810, wireless antenna 808, and power supply 803 are external to the system-on-chip device 812. However, each of the display 806, input device 807, speaker 809, microphone 810, wireless antenna 808, and power supply 803 can be coupled to components of the system-on-chip device 812, such as interfaces or controllers.
[0122] Power supply 803 is used to power the various components in the terminal. Power supply 803 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 803 includes a rechargeable battery, the rechargeable battery can support wired or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0123] In one possible implementation, the processor 801 and memory 802 may be integrated into a set-top box, server, music player, video player, entertainment unit, navigation device, personal digital assistant (PDA), fixed location data unit, computer, laptop computer, tablet computer, communication device, mobile phone or other similar device.
[0124] Those skilled in the art will understand that Figure 9 The structures shown do not constitute a limitation on computer devices. Computer devices may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0125] In an exemplary embodiment, a computer device is also provided, comprising a processor and a memory storing at least one line of program code. The at least one line of program code is loaded and executed by one or more processors to enable the computer device to implement any of the above-described HDR configuration methods.
[0126] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one piece of program code that is loaded and executed by a processor of a computer device to enable the computer to implement any of the above-described HDR configuration methods.
[0127] Optionally, the aforementioned computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0128] In an exemplary embodiment, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform any of the above-described HDR configuration methods.
[0129] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0130] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for configuring an HDR, characterized in that, The method comprises: acquiring a high dynamic range (HDR) configuration request; determining an HDR configuration parameter based on the HDR configuration request; sending the HDR configuration parameter to a plurality of hardware modules according to a preset timing sequence, the HDR configuration parameter being used for the plurality of hardware modules to perform HDR configuration.
2. The method of claim 1, wherein, The plurality of hardware modules comprises an image sensor; before the determining of the HDR configuration parameter, the method further comprises: judging a streaming state of the image sensor; The determining of the HDR configuration parameter comprises: if it is confirmed that the image sensor is in a non-streaming state, confirming the HDR configuration parameter.
3. The method of claim 2, wherein, After the judging of the streaming state of the image sensor, the method further comprises: if it is confirmed that the image sensor is in an active video stream output state, rejecting the HDR configuration request.
4. The method of claim 1, wherein, The determining of the HDR configuration parameter comprises: acquiring an environment parameter, the environment parameter comprising one or more of the following: scene average brightness, contrast ratio, or motion detection flag; determining the HDR configuration parameter based on the environment parameter.
5. The method of claim 4, wherein, In a case where the scene average brightness is lower than a brightness threshold, the HDR configuration parameter is determined based on an HDR mode using two exposure frames to synthesize an image; or in a case where the contrast ratio is higher than a contrast threshold, the HDR configuration parameter is determined based on an HDR mode using three exposure frames to synthesize an image; or in a case where the motion detection flag indicates that a motion rate is greater than a rate threshold, the HDR configuration parameter is determined based on an image mode using a single exposure frame.
6. The method of claim 1, wherein, The determining of the HDR configuration parameter comprises: acquiring a power consumption parameter, the power consumption parameter comprising one or more of the following: power supply power, chip temperature, or user-set performance mode; determining the HDR configuration parameter based on the power consumption parameter.
7. The method of claim 6, wherein, In a case where the power supply power is lower than a power threshold, the HDR configuration parameter is determined based on an image mode using a single exposure frame; or in a case where the chip temperature is higher than a temperature threshold, the HDR configuration parameter is determined based on an HDR mode using two exposure frames to synthesize an image; or in a case where the performance mode is a power saving mode, the HDR configuration parameter is determined based on an image mode using a single exposure frame.
8. The method according to any one of claims 1 to 7, characterized in that, Before the sending of the HDR configuration parameter to the plurality of hardware modules according to the preset timing sequence, the method further comprises: performing a security check on the plurality of hardware modules, the security check being used to check whether the plurality of hardware modules support configuration of the HDR configuration parameter.
9. The method of claim 8, wherein, The security check comprises one or more of the following: inquiring configuration data of the hardware module to confirm whether the configuration of the HDR configuration parameter is supported; inquiring whether system resources, memory bandwidth, or system processing capability of the hardware module are sufficient to confirm whether the demand for configuration of the HDR configuration parameter is supported; evaluating whether a performance index requirement can be met after the plurality of hardware modules are configured with the HDR configuration parameter under a current system load.
10. An HDR configuration apparatus, characterized by, The apparatus comprises: a configuration management module configured to acquire a high dynamic range (HDR) configuration request, and determine an HDR configuration parameter based on the HDR configuration request. The synchronization control module is configured to send the HDR configuration parameters to the plurality of hardware modules according to a preset timing sequence, and the HDR configuration parameters are used for the plurality of hardware modules to perform HDR configuration.
11. The apparatus of claim 10, wherein, The plurality of hardware modules include an image sensor; and the device further includes: The state monitoring module is configured to determine a streaming state of the image sensor. The configuration management module is configured to confirm the HDR configuration parameters if it is determined that the image sensor is in a non-streaming state.
12. The apparatus of claim 11, wherein, The configuration management module is further configured to reject the HDR configuration request if it is determined that the image sensor is in an active video stream output state.
13. The apparatus of claim 10, wherein, The configuration management module includes a scene analysis module. The scene analysis module is configured to obtain environment parameters, the environment parameters including one or more of the following: scene average brightness, contrast ratio, or motion detection flag; and determine the HDR configuration parameters based on the environment parameters.
14. The apparatus of claim 13, wherein, In a case where the scene average brightness is lower than a brightness threshold, the HDR configuration parameters are determined based on an HDR mode using two exposure frames to synthesize an image; or in a case where the contrast ratio is higher than a contrast threshold, the HDR configuration parameters are determined based on an HDR mode using three exposure frames to synthesize an image; or in a case where the motion detection flag indicates that a motion rate is greater than a rate threshold, the HDR configuration parameters are determined based on an image mode using a single exposure frame.
15. The apparatus of claim 10, wherein, The configuration management module includes a power consumption management module. The power consumption management module is configured to obtain power consumption parameters, the power consumption parameters including one or more of the following: power supply power, chip temperature, or user-set performance mode; and determine the HDR configuration parameters based on the power consumption parameters.
16. The apparatus of claim 15, wherein, In a case where the power supply power is lower than a power threshold, the HDR configuration parameters are determined based on an image mode using a single exposure frame; or in a case where the chip temperature is higher than a temperature threshold, the HDR configuration parameters are determined based on an HDR mode using two exposure frames to synthesize an image; or in a case where the performance mode is a power saving mode, the HDR configuration parameters are determined based on an image mode using a single exposure frame.
17. The apparatus of any of claims 10-16, wherein, The device further includes: A configuration verification module is configured to perform security checks on the plurality of hardware modules, and the security checks are used to check whether the plurality of hardware modules support configuration of the HDR configuration parameters.
18. The apparatus of claim 17, wherein, The security checks include one or more of the following: Query configuration data of the hardware modules to determine whether the HDR configuration parameters can be configured; Query whether system resources, memory bandwidth, or system processing capacity of the hardware modules are sufficient to determine whether the HDR configuration parameters can be configured; Evaluate whether performance index requirements can be met after the plurality of hardware modules are configured with the HDR configuration parameters under current system load.
19. A computer device, comprising: The computer device includes a processor and a memory, and the memory stores at least one computer program or instruction, which is loaded and executed by the processor, so that the computer device implements the HDR configuration method according to any one of claims 1 to 9.
20. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one program code, and the at least one program code is loaded and executed by the processor to enable the computer to implement the HDR configuration method in any one of claims 1 to 9.
21. A computer program product, characterised in that, The computer program product comprises computer program code, and the computer program code is loaded and executed by the computer to enable the computer to implement the HDR configuration method in any one of claims 1 to 9.