Smart device photographing control method and apparatus, device, and storage medium
Patent Information
- Application Number
- CN202510437988.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]本申请的主要目的在于提供一种智能设备拍照控制方法、装置、设备及存储介质,旨在解决现有技术控制设备拍照的质量和效率较低的技术问题
[0047] One or more technical solutions proposed in this application have at least the following technical effects: determining target spectral information based on current light-sensing data in a dynamic scene; acquiring user's habitual data for taking photos with smart devices when the hardware abstraction layer detects that the target spectral information has been received; generating a target parameter adjustment strategy based on the habitual data and the target spectral information; dynamically adjusting the automatic exposure parameters and automatic white balance parameters of the smart device according to the target parameter adjustment strategy, and controlling the smart device to take photos based on the adjusted parameters. Through the above method, after determining stable target spectral information, the target spectral information is transmitted to the hardware abstraction layer to reduce the burden on the automatic exposure algorithm and automatic white balance parameters during the information acquisition stage. Then, a target parameter adjustment strategy is generated by combining the user's habitual data for taking photos with smart devices, and the automatic exposure parameters and automatic white balance parameters are dynamically adjusted according to the target parameter adjustment strategy to improve the performance of the automatic exposure algorithm and automatic white balance algorithm, thereby effectively improving the quality and efficiency of controlling the device to take photos and providing a better photography experience for users of smart devices.
Smart Images

Figure CN122934044A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart device technology, and in particular to smart device photography control methods, devices, equipment and storage media. Background Technology
[0002] To capture beautiful moments, users take photos with cameras. Controlling the camera during this process involves calculating light intensity. However, traditionally, this calculation only begins after the camera is turned on, resulting in a significant delay. This makes it difficult to capture optimal lighting conditions. Furthermore, the camera struggles to adapt quickly to changes in lighting in dynamic scenes, frequently leading to uneven exposure or loss of detail. Therefore, this method results in low quality and efficiency in controlling camera image capture.
[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this application is to provide a method, apparatus, device, and storage medium for controlling the taking of photos in smart devices, aiming to solve the technical problem of low quality and efficiency of photo taking in existing technologies.
[0005] To achieve the above objectives, this application proposes a method for controlling photography in a smart device, the method comprising:
[0006] Determine the target spectral information based on the current light-sensing data in a dynamic scene;
[0007] When the hardware abstraction layer detects that it has received the target spectral information, it acquires user data on their habits of taking photos with smart devices.
[0008] A target parameter adjustment strategy is generated based on the habitual data and the target spectral information;
[0009] According to the target parameter adjustment strategy, the automatic exposure parameters and automatic white balance parameters of the smart device are dynamically adjusted, and the smart device is controlled to take pictures according to the adjusted parameters.
[0010] In one embodiment, the step of determining the target spectral information based on the current light-sensing data in a dynamic scene includes:
[0011] Determine the sampling frequency of the spectral acquisition device by acquiring the current changing requirements under dynamic scenarios;
[0012] Based on the spectral acquisition device, current light-sensing data under dynamic scenes is acquired according to the sampling frequency;
[0013] Based on the target filtering algorithm, the current light-sensing data is smoothed according to the target filtering parameters;
[0014] The target spectral information is obtained by encapsulating the smoothed current light-sensing data according to the standard structure.
[0015] In one embodiment, before the step of obtaining user's habitual data on taking photos using a smart device when the hardware abstraction layer detects that the target spectral information has been received, the method further includes:
[0016] When the spectrum acquisition device establishes a connection with the upper-layer controller of the hardware abstraction layer based on the target serial communication protocol, the pin configuration information and power requirement information of the spectrum acquisition device are obtained.
[0017] When the compatibility of the spectral acquisition device is determined based on the pin configuration information and the power requirements information, a data transmission interface is configured.
[0018] Based on the data transmission interface, the target spectral information is transmitted to the hardware abstraction layer through an event-driven mechanism.
[0019] In one embodiment, the step of generating a target parameter adjustment strategy based on the habitual data and the target spectral information includes:
[0020] The effectiveness of the target spectral information is detected;
[0021] When abnormal spectral information is found in the validity detection results, the target spectral information is preprocessed based on the triggered anomaly handling and retry mechanism;
[0022] Historical light sensing data is obtained based on the habitual data, and the historical light sensing data is matched with the current light sensing data;
[0023] Historical exposure parameters and historical white balance parameters are determined based on the light-sensing data matching results;
[0024] A target parameter adjustment strategy is generated based on the historical exposure parameters, the historical white balance parameters, and the preprocessed target spectral information.
[0025] In one embodiment, the step of generating a target parameter adjustment strategy based on the historical exposure parameters, the historical white balance parameters, and the preprocessed target spectral information includes:
[0026] Determine the target exposure parameters and target white balance parameters based on the preprocessed target spectral information;
[0027] The target exposure parameters are adjusted based on the historical exposure parameters, and the target white balance parameters are adjusted based on the historical white balance parameters;
[0028] An automatic exposure parameter adjustment strategy is generated based on the automatic exposure parameters of the smart device and the adjusted target exposure parameters, and an automatic white balance parameter adjustment strategy is generated based on the automatic white balance parameters of the smart device and the adjusted target white balance parameters.
[0029] The target parameter adjustment strategy is obtained based on the automatic exposure parameter adjustment strategy and the automatic white balance parameter adjustment strategy.
[0030] In one embodiment, after the step of dynamically adjusting the automatic exposure parameters and automatic white balance parameters of the smart device according to the target parameter adjustment strategy, the method further includes:
[0031] Obtain the adjusted auto exposure and auto white balance parameters;
[0032] The adjusted auto exposure and auto white balance parameters are sent to the upper-layer application via the target callback interface;
[0033] If no parameter adjustment operation information is received from the upper-layer application within a preset time period, the smart device is controlled to take a picture according to the adjusted parameters.
[0034] In one embodiment, after the step of controlling the smart device to take a picture according to the adjusted parameters, the method further includes:
[0035] The current sample data is generated based on the current light sensitivity data, the adjusted auto exposure parameters, and the auto white balance parameters.
[0036] When the scene changes, target sample data is generated based on a number of light-sensing data from other dynamic scenes, as well as adjusted automatic exposure and automatic white balance parameters.
[0037] The target model training sample set is obtained based on the current sample data and the target sample data;
[0038] The target model training sample set is augmented with data to obtain a model training augmentation set, and a target parameter prediction model is trained based on the target learning algorithm and the model training sample set.
[0039] When the target parameter prediction model passes the test, the parameters predicted by the model are adjusted according to the target parameters to continue controlling the smart device to take pictures.
[0040] Furthermore, to achieve the above objectives, this application also proposes a smart device camera control device, which includes:
[0041] The determination module is used to determine the target spectral information based on the current light-sensing data in a dynamic scene;
[0042] The acquisition module is used to acquire user's habit data for taking pictures using smart devices when the hardware abstraction layer detects that the target spectral information has been received;
[0043] The generation module is used to generate a target parameter adjustment strategy based on the habitual data and the target spectral information;
[0044] The control module is used to dynamically adjust the automatic exposure parameters and automatic white balance parameters of the smart device according to the target parameter adjustment strategy, and control the smart device to take pictures according to the adjusted parameters.
[0045] In addition, to achieve the above objectives, this application also proposes a smart device photography control device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the smart device photography control method described above.
[0046] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the smart device photo-taking control method described above.
[0047] One or more technical solutions proposed in this application have at least the following technical effects: determining target spectral information based on current light-sensing data in a dynamic scene; acquiring user's habitual data for taking photos with smart devices when the hardware abstraction layer detects that the target spectral information has been received; generating a target parameter adjustment strategy based on the habitual data and the target spectral information; dynamically adjusting the automatic exposure parameters and automatic white balance parameters of the smart device according to the target parameter adjustment strategy, and controlling the smart device to take photos based on the adjusted parameters. Through the above method, after determining stable target spectral information, the target spectral information is transmitted to the hardware abstraction layer to reduce the burden on the automatic exposure algorithm and automatic white balance parameters during the information acquisition stage. Then, a target parameter adjustment strategy is generated by combining the user's habitual data for taking photos with smart devices, and the automatic exposure parameters and automatic white balance parameters are dynamically adjusted according to the target parameter adjustment strategy to improve the performance of the automatic exposure algorithm and automatic white balance algorithm, thereby effectively improving the quality and efficiency of controlling the device to take photos and providing a better photography experience for users of smart devices. Attached Figure Description
[0048] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0049] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a flowchart illustrating an embodiment of the intelligent device photo-taking control method of this application.
[0051] Figure 2 This is a flowchart illustrating Embodiment 2 of the intelligent device photo-taking control method of this application;
[0052] Figure 3 This is a schematic diagram of the module structure of the intelligent device photography control device according to an embodiment of this application;
[0053] Figure 4 This is a schematic diagram of the hardware operating environment involved in the smart device photo-taking control method in the embodiments of this application.
[0054] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0055] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or camera control device capable of performing the above functions. The following description uses a camera control device as an example to illustrate this embodiment and the subsequent embodiments.
[0056] Based on this, embodiments of this application provide a method for controlling the taking of photos in a smart device, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the smart device photo-taking control method of this application.
[0057] In this embodiment, the smart device photo-taking control method includes steps S10 to S40:
[0058] Step S10: Determine the target spectral information based on the current light sensing data in the dynamic scene.
[0059] It should be noted that the target spectral information is stable, including but not limited to light intensity and color temperature. Dynamic scenes refer to scenes where the ambient light changes in real time, such as motion scenes. In dynamic scenes, the current light sensing data is obtained based on the spectral acquisition device.
[0060] Further, step S10 includes: determining the sampling frequency of the spectral acquisition device based on the current changing requirements of the dynamic scene; acquiring the current light-sensing data of the dynamic scene based on the spectral acquisition device and the sampling frequency; smoothing the current light-sensing data according to the target filtering parameters based on the target filtering algorithm; and encapsulating the smoothed current light-sensing data according to a standard structure to obtain target spectral information.
[0061] It should be understood that, to adapt to the rapid pace of environmental change, the sampling frequency of the spectral acquisition device needs to be determined based on the current changing requirements of the dynamic scenario. This sampling frequency can be 10 times per second. Furthermore, the sampling frequency of the spectral acquisition device can be dynamically adjusted to optimize the update frequency of the current light-sensing data. To ensure the order and integrity of the current light-sensing data, it is cached using a message queue. This message queue can be a circular buffer or a FIFO queue, and its length needs to be set to prevent data overflow. Before smoothing the current light-sensing data, a blocking queue strategy can be used to read the current light-sensing data from the message queue.
[0062] Understandably, to meet application requirements, it is necessary to select a spectral acquisition device that can provide detailed information; this device can be a spectral sensor. To ensure the optimal balance between real-time performance and stability of the current light-sensing data, the optimal target filtering parameters are determined, and the current light-sensing data is smoothed based on a target filtering algorithm to eliminate noise. This target filtering algorithm can be a low-pass filter, a Kalman filter, etc. A standard structure is used to encapsulate the smoothed current light-sensing data into target spectral information in a standard format, facilitating subsequent transfer to the hardware abstraction layer and the addition of additional spectral information. This target spectral information is scalable.
[0063] Step S20: When the hardware abstraction layer detects that it has received the target spectral information, data on the user's habits of taking photos with a smart device is obtained.
[0064] Understandably, to achieve rapid processing of target spectral information and real-time response to changes in ambient light, after determining the target spectral information, it is transmitted to a hardware abstraction layer. This hardware abstraction layer receives the target spectral information, reducing the burden on automatic exposure algorithms and automatic white balance parameters during the information acquisition phase. This hardware abstraction layer can be a Camera HAL. Habitual data represents users' habits of taking photos using smart devices, such as AR glasses, which contain components for taking photos, such as a miniature camera.
[0065] Furthermore, before step S20, the method further includes: when establishing a connection between the spectral acquisition device and the upper-layer controller of the hardware abstraction layer based on the target serial communication protocol, acquiring the pin configuration information and power requirement information of the spectral acquisition device; when determining that the spectral acquisition device is compatible based on the pin configuration information and the power requirement information, setting a data transmission interface; and transmitting the target spectral information to the hardware abstraction layer through an event-driven mechanism based on the data transmission interface.
[0066] It should be understood that, to ensure stable power and signal connections, the spectral acquisition device needs to establish a connection with the upper-level controller of the hardware abstraction layer based on a target serial communication protocol. This target serial communication protocol can be the I2C protocol, and the upper-level controller can be the main controller of the Android device. To ensure compatibility between the spectral acquisition device and the Android hardware, the pin configuration and power supply requirements will also be checked. This requires obtaining the pin configuration information and power supply requirements of the spectral acquisition device.
[0067] It's important to note that the data transfer interface refers to the interface used to transfer data to the hardware abstraction layer. This interface can be set in the Camera2 API. Based on this interface, events can be triggered during data updates using an event-driven mechanism and callback functions to transfer the target spectral information to the hardware abstraction layer. Alternatively, a Handler can be used to periodically send the target spectral information to the Camera HAL to ensure timely updates.
[0068] Step S30: Generate a target parameter adjustment strategy based on the habitual data and the target spectral information.
[0069] It should be understood that the target parameter adjustment strategy refers to the strategy used to adjust the automatic exposure and automatic white balance parameters. This strategy dynamically adjusts the parameters to improve the performance of the automatic exposure and automatic white balance algorithms. To determine the most suitable automatic exposure and automatic white balance parameters for the user, the target parameter adjustment strategy needs to be generated in conjunction with data on the user's habits of taking photos with smart devices.
[0070] Step S40: Dynamically adjust the automatic exposure parameters and automatic white balance parameters of the smart device according to the target parameter adjustment strategy, and control the smart device to take pictures according to the adjusted parameters.
[0071] As we can understand, automatic exposure parameters refer to parameters closely related to the Auto Exposure (AE) algorithm, including but not limited to shutter speed, aperture value, and ISO sensitivity. Similarly, automatic white balance parameters refer to parameters closely related to the Auto White Balance (AWB) algorithm, including but not limited to mode and channel gain. Dynamically adjusting these parameters can effectively improve the performance of the automatic exposure and white balance algorithms in smart devices under varying lighting conditions. This allows the smart device to be controlled to take photos based on the adjusted parameters, resulting in high-quality images.
[0072] Furthermore, after the step of dynamically adjusting the automatic exposure parameters and automatic white balance parameters of the smart device according to the target parameter adjustment strategy, the method further includes: obtaining the adjusted automatic exposure parameters and automatic white balance parameters; sending the adjusted automatic exposure parameters and automatic white balance parameters to the upper-layer application through the target callback interface; and controlling the smart device to take a picture according to the adjusted parameters if no parameter adjustment operation information is received from the upper-layer application within a preset time period.
[0073] It should be understood that, in this embodiment, a parameter feedback mechanism is also provided. After dynamically adjusting the automatic exposure parameters and automatic white balance parameters of the smart device, the adjusted automatic exposure parameters and automatic white balance parameters are sent to the upper-layer application through a target callback interface. This target callback interface can be CameraCaptureSession.CaptureCallback, which provides real-time monitoring information. If there is no parameter adjustment operation information in the monitoring information, no parameter adjustment operation information will be fed back. At this time, the smart device is controlled to take pictures according to the adjusted parameters. If there is parameter adjustment operation information, the automatic exposure parameters and automatic white balance parameters need to be further dynamically adjusted.
[0074] Furthermore, after the step of controlling the smart device to take pictures according to the adjusted parameters, the method further includes: generating current sample data based on the current light-sensing data, the adjusted automatic exposure parameters, and the automatic white balance parameters; generating target sample data based on a number of light-sensing data from other dynamic scenes, the adjusted automatic exposure parameters, and the automatic white balance parameters when the scene changes; obtaining a target model training sample set based on the current sample data and the target sample data; performing data augmentation on the target model training sample set to obtain a model training augmentation set, and training a target parameter prediction model based on the target learning algorithm and the model training sample set; and when the target parameter prediction model passes the test, adjusting the parameters predicted by the model according to the target parameters to continue controlling the smart device to take pictures.
[0075] Understandably, in order to achieve intelligent photo control, light-sensing data, adjusted automatic exposure parameters, and automatic white balance parameters under different scenarios are acquired, and corresponding sample data is generated. Then, a target model training sample set is generated based on the current sample data and the target sample data. In order to improve the diversity of samples and alleviate the defects of unbalanced sample data, data augmentation is also performed on the target model training sample set.
[0076] It should be understood that after obtaining the model training augmentation set, the model is trained based on the target learning algorithm. This target learning algorithm can be an algorithm that combines decision trees and hierarchical reinforcement learning to improve the accuracy of model prediction. Before parameter prediction, the target parameter prediction model needs to be validated, trained, and tested until the loss value converges to the preset value, thereby further improving the intelligence level of smart devices.
[0077] This embodiment determines the target spectral information based on the current light-sensing data in a dynamic scene. Upon detecting that the hardware abstraction layer has received the target spectral information, it acquires user data on their habits of taking photos with smart devices. A target parameter adjustment strategy is generated based on the habit data and the target spectral information. The automatic exposure and automatic white balance parameters of the smart device are dynamically adjusted according to the target parameter adjustment strategy, and the smart device is controlled to take photos based on the adjusted parameters. Through this method, after determining stable target spectral information, the target spectral information is transmitted to the hardware abstraction layer to reduce the burden on the automatic exposure algorithm and automatic white balance parameters during the information acquisition stage. Then, the target parameter adjustment strategy is generated by combining the user's habit data on taking photos with smart devices, and the automatic exposure and automatic white balance parameters are dynamically adjusted according to the target parameter adjustment strategy to improve the performance of the automatic exposure and automatic white balance algorithms. This effectively improves the quality and efficiency of controlling the device to take photos, providing a better photography experience for users of smart devices.
[0078] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S30 includes steps S301 to S305:
[0079] Step S301: Validity detection is performed on the target spectral information.
[0080] It should be noted that, in order to effectively improve the accuracy of the target parameter adjustment strategy, after obtaining the target spectral information, it is necessary to perform validity testing on the target spectral information to determine whether there is any abnormal spectral information in the target spectral information.
[0081] Step S302: When abnormal spectral information is found in the validity detection result, the target spectral information is preprocessed based on the triggered anomaly handling and retry mechanism.
[0082] It is understandable that abnormal spectral information can be invalid spectral information. The anomaly handling and retry mechanism refers to the mechanism for processing and retrying abnormal spectral information. When abnormal spectral information is found in the validity detection result, the anomaly handling and retry mechanism is triggered. At this time, the activated anomaly handling and retry mechanism is used to preprocess the target spectral information, such as interpolation and filling.
[0083] Step S303: Obtain historical light sensing data based on the habitual data, and match the historical light sensing data with the current light sensing data.
[0084] It should be understood that historical light sensing data refers to the light sensing data of users taking photos with smart devices at historical moments. This historical light sensing data can be recorded using a historical data recording mechanism to facilitate gradual adjustments and optimizations.
[0085] Step S304: Determine the historical exposure parameters and historical white balance parameters based on the light sensor data matching results.
[0086] Understandably, when historical light sensitivity data exists that matches the current light sensitivity data, the exposure parameters corresponding to the matching light sensitivity data are used as historical exposure parameters, and the white balance parameters corresponding to the matching light sensitivity data are used as historical white balance parameters. Furthermore, the historical exposure and white balance parameters corresponding to the historical light sensitivity data can be saved using SQLite or SharedPreferences for later generation of target parameter adjustment strategies.
[0087] Step S305: Generate a target parameter adjustment strategy based on the historical exposure parameters, the historical white balance parameters, and the preprocessed target spectral information.
[0088] It should be understood that the target parameter adjustment strategy refers to the strategy used to adjust the automatic exposure parameters and automatic white balance parameters. After obtaining the historical exposure parameters and historical white balance parameters, the target parameter adjustment strategy is generated by combining the preprocessed target spectral information.
[0089] Further, step S305 includes: determining target exposure parameters and target white balance parameters based on the preprocessed target spectral information; adjusting the target exposure parameters based on the historical exposure parameters, and adjusting the target white balance parameters based on the historical white balance parameters; generating an automatic exposure parameter adjustment strategy based on the automatic exposure parameters of the smart device and the adjusted target exposure parameters, and generating an automatic white balance parameter adjustment strategy based on the automatic white balance parameters of the smart device and the adjusted target white balance parameters; and obtaining a target parameter adjustment strategy based on the automatic exposure parameter adjustment strategy and the automatic white balance parameter adjustment strategy.
[0090] It is understandable that target exposure parameters refer to the optimal exposure parameters obtained through precise analysis of the preprocessed target spectral information. Similarly, target white balance parameters refer to the optimal white balance parameters obtained through precise analysis of the preprocessed target spectral information. In order to adjust the automatic exposure parameters and automatic white balance parameters that are most suitable for the user, it is necessary to adjust the target exposure parameters and the target white balance parameters based on historical exposure parameters. The automatic exposure parameter adjustment strategy refers to the strategy of adjusting the automatic exposure parameters that are most suitable for the user and have the best effect. The automatic white balance parameter adjustment strategy refers to the strategy of adjusting the automatic white balance parameters that are most suitable for the user and have the best effect. Then, the target parameter adjustment strategy is obtained by combining the automatic exposure parameter adjustment strategy and the automatic white balance parameter adjustment strategy.
[0091] This embodiment performs validity detection on the target spectral information; when abnormal spectral information is found in the validity detection results, the target spectral information is preprocessed based on the triggered anomaly handling and retry mechanism; historical light-sensing data is obtained according to the habitual data, and the historical light-sensing data is matched with the current light-sensing data; historical exposure parameters and historical white balance parameters are determined based on the light-sensing data matching results; and a target parameter adjustment strategy is generated based on the historical exposure parameters, the historical white balance parameters, and the preprocessed target spectral information. Through the above method, when abnormal spectral information is determined in the target spectral information through validity detection, anomaly handling and retry mechanisms are triggered, and then historical light-sensing data is matched with the current light-sensing data. If matching light-sensing data exists, historical exposure parameters and historical white balance parameters are determined, and then a target parameter adjustment strategy is generated by combining the preprocessed target spectral information. This effectively improves the accuracy of generating the target parameter adjustment strategy, thereby improving the accuracy of dynamically adjusting automatic exposure parameters and automatic white balance parameters.
[0092] This application also provides a smart device camera control device, please refer to... Figure 3 The intelligent device camera control device includes:
[0093] The determination module 10 is used to determine the target spectral information based on the current light sensing data in a dynamic scene.
[0094] The acquisition module 20 is used to acquire user's habit data of taking pictures with smart devices when the hardware abstraction layer detects that the target spectral information has been received.
[0095] The generation module 30 is used to generate a target parameter adjustment strategy based on the habitual data and the target spectral information.
[0096] The control module 40 is used to dynamically adjust the automatic exposure parameters and automatic white balance parameters of the smart device according to the target parameter adjustment strategy, and control the smart device to take pictures according to the adjusted parameters.
[0097] This embodiment determines the target spectral information based on the current light-sensing data in a dynamic scene. Upon detecting that the hardware abstraction layer has received the target spectral information, it acquires user data on their habits of taking photos with smart devices. A target parameter adjustment strategy is generated based on the habit data and the target spectral information. The automatic exposure and automatic white balance parameters of the smart device are dynamically adjusted according to the target parameter adjustment strategy, and the smart device is controlled to take photos based on the adjusted parameters. Through this method, after determining stable target spectral information, the target spectral information is transmitted to the hardware abstraction layer to reduce the burden on the automatic exposure algorithm and automatic white balance parameters during the information acquisition stage. Then, the target parameter adjustment strategy is generated by combining the user's habit data on taking photos with smart devices, and the automatic exposure and automatic white balance parameters are dynamically adjusted according to the target parameter adjustment strategy to improve the performance of the automatic exposure and automatic white balance algorithms. This effectively improves the quality and efficiency of controlling the device to take photos, providing a better photography experience for users of smart devices.
[0098] The intelligent device photography control device provided in this application, employing the intelligent device photography control method in the above embodiments, can solve the technical problem of low quality and efficiency in photography control of existing technologies. Compared with the prior art, the beneficial effects of the intelligent device photography control device provided in this application are the same as those of the intelligent device photography control method provided in the above embodiments, and other technical features in the intelligent device photography control device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0099] In one embodiment, the determining module 10 is further configured to: determine the sampling frequency of the spectral acquisition device based on the current changing requirements of the dynamic scene; acquire the current light-sensing data of the dynamic scene based on the spectral acquisition device and the sampling frequency; smooth the current light-sensing data according to the target filtering parameters based on the target filtering algorithm; and encapsulate the smoothed current light-sensing data according to a standard structure to obtain target spectral information.
[0100] In one embodiment, the acquisition module 20 is further configured to acquire pin configuration information and power requirement information of the spectral acquisition device when establishing a connection between the spectral acquisition device and the upper-layer controller of the hardware abstraction layer based on the target serial communication protocol; set a data transmission interface when it is determined that the spectral acquisition device is compatible based on the pin configuration information and the power requirement information; and transmit the target spectral information to the hardware abstraction layer through an event-driven mechanism based on the data transmission interface.
[0101] In one embodiment, the generation module 30 is further configured to perform validity detection on the target spectral information; when abnormal spectral information is found in the validity detection result, preprocess the target spectral information based on the triggered exception handling and retry mechanism; obtain historical light sensing data according to the habitual data, and match the historical light sensing data with the current light sensing data; determine historical exposure parameters and historical white balance parameters according to the light sensing data matching result; and generate a target parameter adjustment strategy according to the historical exposure parameters, the historical white balance parameters, and the preprocessed target spectral information.
[0102] In one embodiment, the generation module 30 is further configured to: determine target exposure parameters and target white balance parameters based on preprocessed target spectral information; adjust the target exposure parameters based on the historical exposure parameters; adjust the target white balance parameters based on the historical white balance parameters; generate an automatic exposure parameter adjustment strategy based on the automatic exposure parameters of the smart device and the adjusted target exposure parameters; generate an automatic white balance parameter adjustment strategy based on the automatic white balance parameters of the smart device and the adjusted target white balance parameters; and obtain a target parameter adjustment strategy based on the automatic exposure parameter adjustment strategy and the automatic white balance parameter adjustment strategy.
[0103] In one embodiment, the control module 40 is further configured to acquire the adjusted automatic exposure parameters and automatic white balance parameters; send the adjusted automatic exposure parameters and automatic white balance parameters to the upper-layer application through the target callback interface; and control the smart device to take a picture according to the adjusted parameters if no parameter adjustment operation information is received from the upper-layer application within a preset time period.
[0104] In one embodiment, the control module 40 is further configured to generate current sample data based on current light-sensing data, adjusted automatic exposure parameters, and automatic white balance parameters; generate target sample data based on a number of light-sensing data from other dynamic scenes, adjusted automatic exposure parameters, and automatic white balance parameters when the scene changes; obtain a target model training sample set based on the current sample data and the target sample data; perform data augmentation on the target model training sample set to obtain a model training augmentation set, and train a target parameter prediction model based on the target learning algorithm and the model training sample set; when the target parameter prediction model passes the test, adjust the parameters predicted by the model based on the target parameters and continue to control the smart device to take pictures.
[0105] This application provides a smart device photo-taking control device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the smart device photo-taking control method in the first embodiment described above.
[0106] The following is for reference. Figure 4 This document illustrates a structural schematic diagram of a smart device camera control device suitable for implementing embodiments of this application. The smart device camera control device in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 4 The smart device camera control device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0107] like Figure 4As shown, the intelligent device camera control device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the intelligent device camera control device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touch screens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the smart device camera control device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show smart device camera control devices with various systems, it should be understood that implementing or having all of the systems shown is not required. More or fewer systems may be implemented alternatively.
[0108] Specifically, according to the embodiments disclosed in this application, the process described above with reference to the flowcharts can be implemented as a computer software program. This computer program includes program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0109] The intelligent device photography control device provided in this application, employing the intelligent device photography control method in the above embodiments, can solve the technical problem of low photography quality and efficiency in existing technologies. Compared with the prior art, the beneficial effects of the intelligent device photography control device provided in this application are the same as those of the intelligent device photography control method provided in the above embodiments, and other technical features in this intelligent device photography control device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0110] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0111] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0112] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the smart device photo-taking control method in the above embodiments.
[0113] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0114] The aforementioned computer-readable storage medium may be included in the smart device's camera control device; or it may exist independently and not be assembled into the smart device's camera control device.
[0115] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0116] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0117] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0118] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described intelligent device photography control method, which can solve the technical problem of low quality and efficiency in controlling device photography in the prior art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the intelligent device photography control method provided in the above embodiments, and will not be repeated here.
[0119] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for controlling photography in a smart device, characterized in that, The method includes: Determine the target spectral information based on the current light-sensing data in a dynamic scene; When the hardware abstraction layer detects that it has received the target spectral information, it acquires user data on their habits of taking photos with smart devices. A target parameter adjustment strategy is generated based on the habitual data and the target spectral information; According to the target parameter adjustment strategy, the automatic exposure parameters and automatic white balance parameters of the smart device are dynamically adjusted, and the smart device is controlled to take pictures according to the adjusted parameters.
2. The method as described in claim 1, characterized in that, The step of determining the target spectral information based on the current light-sensing data in a dynamic scene includes: Determine the sampling frequency of the spectral acquisition device by acquiring the current changing requirements under dynamic scenarios; Based on the spectral acquisition device, current light-sensing data under dynamic scenes is acquired according to the sampling frequency; Based on the target filtering algorithm, the current light-sensing data is smoothed according to the target filtering parameters; The target spectral information is obtained by encapsulating the smoothed current light-sensing data according to the standard structure.
3. The method as described in claim 1, characterized in that, Before the step of obtaining user's habitual data for taking photos using a smart device when the hardware abstraction layer detects that the target spectral information has been received, the method further includes: When the spectrum acquisition device establishes a connection with the upper-layer controller of the hardware abstraction layer based on the target serial communication protocol, the pin configuration information and power requirement information of the spectrum acquisition device are obtained. When the compatibility of the spectral acquisition device is determined based on the pin configuration information and the power requirements information, a data transmission interface is configured. Based on the data transmission interface, the target spectral information is transmitted to the hardware abstraction layer through an event-driven mechanism.
4. The method as described in claim 1, characterized in that, The step of generating a target parameter adjustment strategy based on the habitual data and the target spectral information includes: The effectiveness of the target spectral information is detected; When abnormal spectral information is found in the validity detection results, the target spectral information is preprocessed based on the triggered anomaly handling and retry mechanism; Historical light sensing data is obtained based on the habitual data, and the historical light sensing data is matched with the current light sensing data; Historical exposure parameters and historical white balance parameters are determined based on the light-sensing data matching results; A target parameter adjustment strategy is generated based on the historical exposure parameters, the historical white balance parameters, and the preprocessed target spectral information.
5. The method as described in claim 4, characterized in that, The step of generating a target parameter adjustment strategy based on the historical exposure parameters, the historical white balance parameters, and the preprocessed target spectral information includes: Determine the target exposure parameters and target white balance parameters based on the preprocessed target spectral information; The target exposure parameters are adjusted based on the historical exposure parameters, and the target white balance parameters are adjusted based on the historical white balance parameters; An automatic exposure parameter adjustment strategy is generated based on the automatic exposure parameters of the smart device and the adjusted target exposure parameters, and an automatic white balance parameter adjustment strategy is generated based on the automatic white balance parameters of the smart device and the adjusted target white balance parameters. The target parameter adjustment strategy is obtained based on the automatic exposure parameter adjustment strategy and the automatic white balance parameter adjustment strategy.
6. The method as described in claim 1, characterized in that, After the step of dynamically adjusting the automatic exposure parameters and automatic white balance parameters of the smart device according to the target parameter adjustment strategy, the method further includes: Obtain the adjusted auto exposure and auto white balance parameters; The adjusted auto exposure and auto white balance parameters are sent to the upper-layer application via the target callback interface; If no parameter adjustment operation information is received from the upper-layer application within a preset time period, the smart device is controlled to take a picture according to the adjusted parameters.
7. The method according to any one of claims 1 to 6, characterized in that, After the step of controlling the smart device to take a picture according to the adjusted parameters, the method further includes: The current sample data is generated based on the current light sensitivity data, the adjusted auto exposure parameters, and the auto white balance parameters. When the scene changes, target sample data is generated based on a number of light-sensing data from other dynamic scenes, as well as adjusted automatic exposure and automatic white balance parameters. The target model training sample set is obtained based on the current sample data and the target sample data; The target model training sample set is augmented with data to obtain a model training augmentation set, and a target parameter prediction model is trained based on the target learning algorithm and the model training sample set. When the target parameter prediction model passes the test, the parameters predicted by the model are adjusted according to the target parameters to continue controlling the smart device to take pictures.
8. A smart device for controlling camera photography, characterized in that, The device includes: The determination module is used to determine the target spectral information based on the current light-sensing data in a dynamic scene; The acquisition module is used to acquire user's habit data for taking pictures using smart devices when the hardware abstraction layer detects that the target spectral information has been received; The generation module is used to generate a target parameter adjustment strategy based on the habitual data and the target spectral information; The control module is used to dynamically adjust the automatic exposure parameters and automatic white balance parameters of the smart device according to the target parameter adjustment strategy, and control the smart device to take pictures according to the adjusted parameters.
9. A smart device for controlling camera photography, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the smart device photo capture control method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the smart device photo-taking control method as described in any one of claims 1 to 7.