CN116567407A - A camera parameter configuration method and electronic equipment - Google Patents
A camera parameter configuration method and electronic equipment Download PDFInfo
- Publication number
- CN116567407A CN116567407A CN202310503448.4A CN202310503448A CN116567407A CN 116567407 A CN116567407 A CN 116567407A CN 202310503448 A CN202310503448 A CN 202310503448A CN 116567407 A CN116567407 A CN 116567407A
- Authority
- CN
- China
- Prior art keywords
- camera
- mode
- camera sensor
- configuration parameter
- parameters
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/617—Upgrading or updating of programs or applications for camera control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/62—Control of parameters via user interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/63—Control of cameras or camera modules by using electronic viewfinders
- H04N23/631—Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/667—Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Software Systems (AREA)
- Studio Devices (AREA)
Abstract
本申请实施例提供了一种相机参数配置方法及电子设备,涉及终端技术领域。解决在实现多出图模式切换之前,相机参数配置时耗长的问题。具体方案为:指示第一相机传感器配置第一配置参数,所述第一配置参数是多个出图模式之间共用的相机参数,所述多个出图模式包括第一出图模式和第二出图模式;指示所述第一相机传感器配置第一数据包,所述第一数据包包括第二配置参数和第三配置参数,所述第二配置参数对应有第一标识,所述第一标识指示所述第一相机传感器在接收到所述第一数据包之后,加载所述第一出图模式对应的所述第二配置参数。
Embodiments of the present application provide a camera parameter configuration method and an electronic device, which relate to the technical field of terminals. Solve the problem that it takes a long time to configure the camera parameters before switching between multiple output modes. The specific solution is: instruct the first camera sensor to configure the first configuration parameter, the first configuration parameter is a camera parameter shared between multiple image output modes, and the multiple image output modes include the first image output mode and the second image output mode. Image output mode; instruct the first camera sensor to configure a first data packet, the first data packet includes a second configuration parameter and a third configuration parameter, the second configuration parameter corresponds to a first identifier, and the first The identifier indicates that the first camera sensor loads the second configuration parameter corresponding to the first drawing mode after receiving the first data packet.
Description
技术领域technical field
本申请涉及终端技术领域,尤其涉及一种相机参数配置方法及电子设备。The present application relates to the technical field of terminals, and in particular to a camera parameter configuration method and electronic equipment.
背景技术Background technique
拍摄功能已成为大部分电子设备(如,手机)的基础功能。随着拍摄功能在电子设备中的普及,用户对电子设备的拍摄质量要求也越来越高。于电子设备而言,在不同的拍摄场景下,指示电子设备中的相机传感器启用适配的出图模式,可以有效提高电子设备的拍摄质量。比如,常规场景下,启用Binning出图模式;高动态场景下,启用场内双转换增益(intra-scene dual conversion gain,Idcg)出图模式;用户指示放大拍摄画面的场景下,启用Remosaic出图模式。The photographing function has become a basic function of most electronic devices (eg, mobile phones). With the popularization of shooting functions in electronic devices, users have higher and higher requirements for shooting quality of electronic devices. For electronic devices, instructing the camera sensor in the electronic device to enable an adapted image output mode in different shooting scenarios can effectively improve the shooting quality of the electronic device. For example, in normal scenes, enable the Binning image output mode; in high dynamic scenes, enable the intra-scene dual conversion gain (Idcg) image output mode; in the scene where the user instructs to zoom in on the shooting screen, enable Remosaic image output model.
相关技术中,在相机传感器起流之前,需要多次往相机传感器写入重复的数据,相机传感器才能在不断流的情况下,实现多种出图模式的切换。显然,这也会增加相机传感器的启动时长。In related technologies, before the camera sensor starts streaming, it is necessary to write repeated data to the camera sensor multiple times, so that the camera sensor can switch between multiple image output modes under the condition of uninterrupted streaming. Obviously, this also increases the boot time of the camera sensor.
发明内容Contents of the invention
本申请实施例提供一种相机参数配置方法及电子设备,在确保实现多种出图模式切换的情况下,缩短相机传感器的启动时耗。Embodiments of the present application provide a method for configuring camera parameters and an electronic device, which shorten the start-up time consumption of the camera sensor while ensuring the switching of multiple output modes.
为达到上述目的,本申请的实施例采用如下技术方案:In order to achieve the above object, the embodiments of the present application adopt the following technical solutions:
第一方面,本申请实施例提供的一种相机参数配置方法,所述方法包括:指示第一相机传感器配置第一配置参数,所述第一配置参数是多个出图模式之间共用的相机参数,所述多个出图模式包括第一出图模式和第二出图模式;指示所述第一相机传感器配置第一数据包,所述第一数据包包括第二配置参数和第三配置参数,所述第二配置参数对应有第一标识,所述第一标识指示所述第一相机传感器在接收到所述第一数据包之后,加载所述第一出图模式对应的所述第二配置参数。In the first aspect, an embodiment of the present application provides a camera parameter configuration method, the method includes: instructing the first camera sensor to configure the first configuration parameter, the first configuration parameter is a camera shared between multiple drawing modes Parameters, the multiple drawing modes include a first drawing mode and a second drawing mode; instruct the first camera sensor to configure a first data package, and the first data package includes a second configuration parameter and a third configuration parameter, the second configuration parameter corresponds to a first identifier, and the first identifier instructs the first camera sensor to load the first image corresponding to the first drawing mode after receiving the first data packet. Two configuration parameters.
其中,上述第一配置参数与第二配置参数,组成启用第一出图模式所需的相机参数,也可称为相机参数。上述第一配置参数和第三配置参数,组成启用第一出图模式所需的所有相机参数,也可称为相机参数。Wherein, the above-mentioned first configuration parameter and the second configuration parameter constitute camera parameters required for enabling the first drawing mode, which may also be referred to as camera parameters. The above-mentioned first configuration parameters and third configuration parameters constitute all camera parameters required for enabling the first drawing mode, which may also be referred to as camera parameters.
示例性地,上述指示第一相机传感器配置第一配置参数可以是:将第一配置参数写入第一相机传感器,然后,由第一相机传感器进行加载。例如,按照I2C协议封装第一配置参数封装之后,由相机驱动发送至第一相机传感器,第一相机传感器接收到之后,可以直接加载该第一配置参数。Exemplarily, the foregoing instructing the first camera sensor to configure the first configuration parameter may be: writing the first configuration parameter into the first camera sensor, and then loading it by the first camera sensor. For example, after the first configuration parameter is encapsulated according to the I2C protocol, the camera driver sends the package to the first camera sensor, and the first camera sensor can directly load the first configuration parameter after receiving it.
示例性地,上述指示第一相机传感器配置第一数据包可以是:将第一数据包写入第一相机传感器,比如,按照I2C协议封装第一数据包封装之后,由相机驱动发送至第一相机传感器。然后,通过第一数据包中的第一标记,触发第一相机传感器加载第一数据包中的第二配置参数。Exemplarily, the above-mentioned instructing the first camera sensor to configure the first data packet may be: writing the first data packet into the first camera sensor, for example, after encapsulating the first data packet according to the I2C protocol, the camera driver sends the first data packet to the first camera sensor. Then, the first camera sensor is triggered to load the second configuration parameters in the first data packet through the first flag in the first data packet.
可以理解的,在第一相机传感器加载第一配置参数之后,可以执行相机传感器的基本功能。比如,上述第一配置参数中,可以包括指示相机传感器识别FMC数据包(如,第一数据包)中的默认标识(如,第一标识)的公共参数,以及,包括指示相机传感器在接收到第一数据包之后,加载默认标识对应的配置参数的公共参数。It can be understood that after the first camera sensor is loaded with the first configuration parameters, the basic functions of the camera sensor can be executed. For example, the above-mentioned first configuration parameter may include a public parameter indicating that the camera sensor recognizes the default identifier (eg, the first identifier) in the FMC data packet (eg, the first data packet), and may include indicating that the camera sensor receives the After the first data packet, the public parameters of the configuration parameters corresponding to the default identifier are loaded.
这样,在往第一相机传感器写入第一数据包之后,无需重复向第一相机传感器写入第二配置参数,第一相机传感器能够在多个出图模式的配置参数中,自动识别并加载第一出图模式所对应的第二配置参数,使第一相机传感器可以采用第一出图模式进行出图,完成第一相机传感器的启动。In this way, after writing the first data packet to the first camera sensor, there is no need to repeatedly write the second configuration parameters to the first camera sensor, and the first camera sensor can automatically identify and load the configuration parameters of multiple drawing modes. The second configuration parameter corresponding to the first image output mode enables the first camera sensor to output an image in the first image output mode, completing the activation of the first camera sensor.
在上述实施例中,第一数据包中多个出图模式的配置参数,为实现多出图模式间快速切换提供条件。另外,第一数据包中的第一标识,解决了第一相机传感器不能直接加载第一数据包中某一种出图模式的配置参数的问题。这样,在第一数据包写入第一相机传感器之后,不用往第一相机传感器中重复写入第二配置参数,也可以触发第一相机传感器加载第二配置参数。In the above embodiment, the configuration parameters of multiple drawing modes in the first data packet provide conditions for fast switching between multiple drawing modes. In addition, the first identifier in the first data packet solves the problem that the first camera sensor cannot directly load the configuration parameters of a certain image output mode in the first data packet. In this way, after the first data packet is written into the first camera sensor, the first camera sensor can also be triggered to load the second configuration parameter without repeatedly writing the second configuration parameter into the first camera sensor.
总之,在保障能够实现多出图模式间快速切换的前提下,减少了往第一相机传感器中写入重复数据的步骤,也减少了往第一相机传感器写入的数据量,有效缩短第一相机传感器的相机参数配置时间。In short, on the premise of ensuring the rapid switching between multiple image output modes, the steps of writing repeated data to the first camera sensor are reduced, and the amount of data written to the first camera sensor is also reduced, effectively shortening the first Camera parameter configuration time for camera sensor.
在一些实施例中,在指示第一相机传感器配置第一配置参数之前,所述方法包括:检测到用户指示打开第一应用的第一操作;响应于所述第一操作,显示第一界面,所述第一界面是所述第一应用提供的第一类预览界面;在指示所述第一相机传感器配置第一数据包之后,所述方法还包括:响应于加载第二配置参数,在第一界面中显示第一图像帧,第一图像帧是所述第一相机传感器采用所述第一出图模式得到的图像。In some embodiments, before instructing the first camera sensor to configure the first configuration parameter, the method includes: detecting a first operation of the user indicating to open the first application; in response to the first operation, displaying the first interface, The first interface is a first-type preview interface provided by the first application; after instructing the first camera sensor to configure the first data package, the method further includes: in response to loading the second configuration parameter, at the A first image frame is displayed on an interface, and the first image frame is an image obtained by the first camera sensor using the first drawing mode.
其中,上述第一应用可以是相机应用,也可以是其他具备拍摄功能的应用程序。该第一应用在启用不同的相机模式的情况下,可以显示不同类型的预览界面。Wherein, the above-mentioned first application may be a camera application, or other application programs with a shooting function. The first application can display different types of preview interfaces when different camera modes are enabled.
在上述实施例中,在用户打开第一应用的场景下,保障能够实现多出图模式间快速切换的同时,电子设备可以缩短第一相机传感器的起流时长。In the above embodiment, when the user opens the first application, the electronic device can shorten the start-up time of the first camera sensor while ensuring fast switching among multiple output modes.
在一些实施例中,所述多个出图模式还包括第三出图模式,所述第一数据包中还包括所述第三出图模式对应的第四配置参数,所述第四配置参数包括用于启动第三出图模式的相机参数中,除所述第一配置参数之外的参数,所述方法还包括:在第一条件下,往所述第一相机传感器写入第一信息,所述第一信息指示所述第一相机传感器从所述第一数据包中加载第三配置参数,所述第一信息的数据体积小于所述第三配置参数的数据体积;响应于所述加载第三配置参数,在所述第一界面中显示第二图像帧,所述第二图像帧是所述第一相机传感器采用所述第二出图模式得到的图像;在第二条件下,往所述第一相机传感器写入第二信息,所述第二信息指示所述第一相机传感器从所述第一数据包中加载第四配置参数,所述第二信息的数据体积小于所述第四配置参数的数据体积;响应于所述加载第四配置参数,在所述第一界面中显示第三图像帧,所述第三图像帧是所述第一相机传感器采用所述第三出图模式得到的图像;其中,所述第一条件指示适合启用所述第二出图模式的场景;所述第二条件指示适合使用所述第三出图模式的场景。In some embodiments, the multiple drawing modes further include a third drawing mode, and the first data packet further includes a fourth configuration parameter corresponding to the third drawing mode, and the fourth configuration parameter Among the camera parameters used to start the third image output mode, parameters other than the first configuration parameters, the method further includes: under the first condition, writing first information to the first camera sensor , the first information indicates that the first camera sensor loads a third configuration parameter from the first data packet, and the data volume of the first information is smaller than the data volume of the third configuration parameter; in response to the Loading a third configuration parameter, displaying a second image frame in the first interface, the second image frame is an image obtained by the first camera sensor using the second drawing mode; under the second condition, Writing second information to the first camera sensor, the second information instructs the first camera sensor to load fourth configuration parameters from the first data packet, and the data volume of the second information is smaller than the The data volume of the fourth configuration parameter; in response to the loading of the fourth configuration parameter, displaying a third image frame in the first interface, the third image frame is the first camera sensor using the third output An image obtained in the drawing mode; wherein, the first condition indicates a scene suitable for enabling the second drawing mode; the second condition indicates a scene suitable for using the third drawing mode.
在上述实施例中,电子设备在拍摄场景变化的情况下,只需往第一相机传感器写入第一信息或第二信息,就可以实现不同出图模式的快速切换。上述第一信息或第二信息相较于出图模式(第二出图模式或第三出图模式)的配置参数(第三配置参数或第四配置参数)的数据体积更小,写入第一相机传感器的速度更快,触发出图模式的切换速度更快。In the above embodiments, when the shooting scene changes, the electronic device only needs to write the first information or the second information to the first camera sensor, and then it can quickly switch between different image output modes. Compared with the configuration parameters (third configuration parameters or fourth configuration parameters) of the drawing mode (the second drawing mode or the third drawing mode), the above-mentioned first information or second information has a smaller data size, and it is written in the first The speed of the camera sensor is faster, and the switching speed of the trigger drawing mode is faster.
在一些实施例中,在第二出图模式为Idcg出图模式的情况下,所述第一条件包括:所述第一相机传感器对应的摄像头的变焦倍率属于第一区间的情况下,检测到的第一光亮度大于第一阈值,高动态范围HDR标记位指示已开启HDR;在所述第三出图模式为Remosaic出图模式的情况下,所述第二条件包括所述第一相机传感器对应的摄像头的变焦倍率属于第二区间,且检测到的第一照度量化值小于第二阈值,所述第一区间的取值小于第二区间的取值。In some embodiments, when the second image output mode is the Idcg image output mode, the first condition includes: when the zoom ratio of the camera corresponding to the first camera sensor belongs to the first interval, it is detected that The first brightness of the first light is greater than the first threshold, and the high dynamic range HDR flag indicates that HDR has been turned on; when the third drawing mode is the Remosaic drawing mode, the second condition includes that the first camera sensor The zoom ratio of the corresponding camera belongs to the second interval, and the detected first quantized illumination value is smaller than the second threshold, and the value in the first interval is smaller than the value in the second interval.
在上述实施例中,在不同的变焦倍率下,采用不同的条件,识别拍摄场景,并确定出需要使用的出图模式,确保启用的出图模式与拍摄场景适配,提升拍摄质量。In the above embodiment, under different zoom ratios and different conditions, the shooting scene is identified, and the image output mode to be used is determined to ensure that the enabled image output mode is adapted to the shooting scene, and the shooting quality is improved.
在一些实施例中,在显示所述第二图像帧或所述第三图像帧之后,所述方法还包括:在第三条件下,往所述第一相机传感器写入第三信息,所述第三信息指示从所述第一数据包中加载第二配置参数;响应于所述加载所述第二配置参数,在所述第一界面中,显示第四图像帧,所述第四图像帧是所述第一相机传感器采用所述第一出图模式得到的图像;所述第三条件包括以下任意一项:在摄像头的变焦倍率属于所述第一区间的情况下,检测到的第二光亮度不大于所述第一阈值,或者,所述HDR标记位指示已关闭HDR;在所述摄像头的变焦倍率属于所述第二区间的情况下,检测到的第二照度量化值不小于第二阈值。In some embodiments, after displaying the second image frame or the third image frame, the method further includes: under a third condition, writing third information to the first camera sensor, the The third information indicates that the second configuration parameter is loaded from the first data packet; in response to the loading of the second configuration parameter, in the first interface, a fourth image frame is displayed, and the fourth image frame is the image obtained by the first camera sensor using the first drawing mode; the third condition includes any one of the following: when the zoom ratio of the camera belongs to the first interval, the detected second The light brightness is not greater than the first threshold, or the HDR flag indicates that HDR has been turned off; when the zoom ratio of the camera belongs to the second interval, the detected second illuminance quantification value is not less than the first Two thresholds.
在上述实施例中,电子设备还能够在不同变焦倍率下,准确识别出切回第一出图模式的场景,提升出图模式切换的准确性,提升拍摄质量。In the above embodiment, the electronic device can also accurately identify the scene switched back to the first image output mode at different zoom ratios, so as to improve the accuracy of switching the image output mode and improve the shooting quality.
在一些实施例中,所述方法还包括:响应于第二操作,显示第二界面,所述第二界面是所述第一应用提供的第二类预览界面;指示第一相机传感器配置第二数据包,所述第二数据包包括第五配置参数,所述第五配置参数包括启用第四出图模式的相机参数中,除所述第一配置参数之外的参数;所述第五配置参数对应有第二标识,该第二标识可以是第二数据包中的默认标识。第二标识指示所述第一相机传感器接收到所述第二数据包之后,加载所述第五配置参数;响应于加载所述第五配置参数,在所述第二界面中显示第五图像帧,所述第五图像帧是所述第一相机传感器采用所述第四出图模式得到的图像。In some embodiments, the method further includes: in response to the second operation, displaying a second interface, the second interface is a second-type preview interface provided by the first application; instructing the first camera sensor to configure the second interface; A data packet, the second data packet includes a fifth configuration parameter, and the fifth configuration parameter includes parameters other than the first configuration parameter in the camera parameters for enabling the fourth drawing mode; the fifth configuration The parameter corresponds to a second identifier, and the second identifier may be a default identifier in the second data packet. The second identification indicates that after the first camera sensor receives the second data packet, the fifth configuration parameter is loaded; in response to loading the fifth configuration parameter, a fifth image frame is displayed on the second interface , the fifth image frame is an image obtained by the first camera sensor using the fourth image output mode.
可以理解的,第一应用切换启用不同相机模式的情况下,所显示的预览界面类型不同,上述第一界面和第二界面是启用不同相机模式时显示的预览界面。电子设备响应于第二操作,由显示第一界面切换至显示第二界面,本质上是响应第二操作,由一种相机模式切换另一种相机模式。It can be understood that when the first application is switched to enable different camera modes, the displayed preview interface types are different, and the above-mentioned first interface and second interface are preview interfaces displayed when different camera modes are enabled. The electronic device switches from displaying the first interface to displaying the second interface in response to the second operation, essentially switching from one camera mode to another camera mode in response to the second operation.
在上述实施例中,相机模式切换之后,无需再次配置第一配置参数,加快相机模式之间的切换速度。In the above embodiment, after the camera mode is switched, there is no need to configure the first configuration parameter again, so that the switching speed between camera modes is accelerated.
在一些实施例中,在指示第一相机传感器配置第二数据包之前,所述方法包括:确定显示所述第二界面期间可启用的相机传感器与显示所述第一界面期间可启用的相机传感器相同。In some embodiments, before instructing the first camera sensor to configure the second data packet, the method includes: determining the camera sensors that can be enabled during the display of the second interface and the camera sensors that can be enabled during the display of the first interface same.
可以理解的,显示第二界面期间可启用的相机传感器与显示第一界面期间可启用的相机传感器相同的情况下,在显示第二界面期间实际送显的相机传感器与在显示第一界面期间实际送显的相机传感器可以相同,这样,即使相机模式切换,且未下发第一配置参数,相机传感器也能正常使用。It can be understood that, when the camera sensors that can be activated during the display of the second interface are the same as the camera sensors that can be activated during the display of the first interface, the camera sensors that are actually displayed during the display of the second interface are the same as those actually displayed during the display of the first interface. The camera sensors for display can be the same, so that even if the camera mode is switched and the first configuration parameters are not delivered, the camera sensors can still be used normally.
在上述实施例中,在确定预览界面切换前、后,可启用的相机传感器相同之后,确定不向相机传感器重写入第一配置参数。在保障相机传感器能正常工作的前提下,减少往相机传感器中写入的数据量。In the above embodiment, after it is determined that the enableable camera sensors are the same before and after switching the preview interface, it is determined not to rewrite the first configuration parameter to the camera sensor. Under the premise of ensuring that the camera sensor can work normally, reduce the amount of data written to the camera sensor.
在一些实施例中,所述方法还包括:响应于第三操作,显示第三界面,所述第三界面是所述第一应用提供的第三类预览界面;其中,显示所述第三界面期间可启用的相机传感器与显示所述第一界面期间可启用相机传感器不同;指示第二相机传感器配置所述第一配置参数,指示第二相机传感器配置第三数据包,所述第三数据包包括第六配置参数,所述第六配置参数包括启用第五出图模式的相机参数中,除所述第一配置参数之外的参数;所述第六配置参数对应有第三标识,所述第三标识指示所述第二相机传感器接收到所述第三数据包之后,加载所述第六配置参数;响应于加载所述第六配置参数,在所述第三界面中显示第六图像帧,所述第六图像帧是所述第二相机传感器采用所述第五出图模式得到的图像。In some embodiments, the method further includes: in response to the third operation, displaying a third interface, where the third interface is a third-type preview interface provided by the first application; wherein, displaying the third interface The camera sensors that can be enabled during the period are different from the camera sensors that can be enabled during the display of the first interface; instruct the second camera sensor to configure the first configuration parameters, instruct the second camera sensor to configure the third data package, and the third data package Including a sixth configuration parameter, the sixth configuration parameter includes parameters other than the first configuration parameter in the camera parameters for enabling the fifth drawing mode; the sixth configuration parameter corresponds to a third identifier, and the The third identification indicates that after the second camera sensor receives the third data packet, the sixth configuration parameter is loaded; in response to loading the sixth configuration parameter, a sixth image frame is displayed on the third interface , the sixth image frame is an image obtained by the second camera sensor using the fifth image output mode.
在上述实施例中,在确定预览界面切换前、后,可启用的相机传感器不相同之后,确定向相机传感器重写入第一配置参数,保障相机传感器可以正常送显。In the above embodiment, after it is determined that the camera sensors that can be enabled are different before and after switching the preview interface, it is determined to rewrite the first configuration parameter to the camera sensor to ensure that the camera sensor can be displayed normally.
在一些实施例中,所述第一类预览界面包括:拍照预览界面、视频录制界面和人像拍摄界面中的任意一种。In some embodiments, the first type of preview interface includes: any one of a photo preview interface, a video recording interface, and a portrait shooting interface.
第二方面,本申请实施例提供的一种电子设备,电子设备包括一个或多个处理器和存储器;所述存储器与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,所述一个或多个处理器,用于执行第一方面及其可能的实施例中的方法。In the second aspect, an electronic device provided by an embodiment of the present application, the electronic device includes one or more processors and a memory; the memory is coupled to the processor, and the memory is used to store computer program codes, the computer program codes include computer instructions, When one or more processors execute computer instructions, the one or more processors are configured to perform the method in the first aspect and possible embodiments thereof.
第三方面,本申请实施例提供的一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述第一方面及其可能的实施例中的方法。In the third aspect, a computer storage medium provided by an embodiment of the present application includes computer instructions, and when the computer instructions are run on the electronic device, the electronic device is made to execute the method in the above first aspect and its possible embodiments.
第四方面,本申请提供一种计算机程序产品,当计算机程序产品在上述电子设备上运行时,使得电子设备执行上述第一方面及其可能的实施例中的方法。In a fourth aspect, the present application provides a computer program product. When the computer program product is run on the above-mentioned electronic device, the electronic device is made to execute the method in the above-mentioned first aspect and its possible embodiments.
可以理解地,上述各个方面所提供的电子设备、计算机存储介质以及计算机程序产品均应用于上文所提供的对应方法,因此,其所能达到的有益效果可参考上文所提供的对应方法中的有益效果,此处不再赘述。It can be understood that the electronic devices, computer storage media and computer program products provided by the above aspects are all applied to the corresponding methods provided above, therefore, the beneficial effects that can be achieved can refer to the corresponding methods provided above The beneficial effects will not be repeated here.
附图说明Description of drawings
图1为本申请实施例提供的电子设备的软硬件结构图之一;FIG. 1 is one of the software and hardware structural diagrams of the electronic device provided by the embodiment of the present application;
图2为本申请实施例提供的电子设备的软硬件结构图之二;Fig. 2 is the second software and hardware structure diagram of the electronic device provided by the embodiment of the present application;
图3为本申请实施例提供的电子设备的显示界面示意图;FIG. 3 is a schematic diagram of a display interface of an electronic device provided in an embodiment of the present application;
图4为本申请实施例提供的一种相机参数配置方法的示例图之一;Fig. 4 is one of the example diagrams of a camera parameter configuration method provided by the embodiment of the present application;
图5为本申请实施例提供的给目标相机传感器配置相机参数的信令交互图;FIG. 5 is a signaling interaction diagram for configuring camera parameters for a target camera sensor provided in an embodiment of the present application;
图6为本申请实施例提供的实现显示图像帧的信令交互图;FIG. 6 is a signaling interaction diagram for realizing displaying image frames provided by an embodiment of the present application;
图7为本申请实施例提供的一种相机参数配置方法的示例图之二;FIG. 7 is the second example diagram of a camera parameter configuration method provided by the embodiment of the present application;
图8为本申请实施例提供的切换目标相机传感器的出图模式的信令交互图;FIG. 8 is a signaling interaction diagram for switching the output mode of the target camera sensor provided by the embodiment of the present application;
图9为本申请实施例提供的改变变焦倍率的场景示例图;FIG. 9 is an example diagram of a scene for changing the zoom ratio provided by the embodiment of the present application;
图10为本申请实施例提供的切换相机模式的信令交互图;FIG. 10 is a signaling interaction diagram for switching camera modes provided by an embodiment of the present application;
图11为本申请实施例提供的切换相机模式的场景示例图;FIG. 11 is an example diagram of a scene for switching camera modes provided by an embodiment of the present application;
图12为一些实施例中目标相机传感器配置相机参数的示例图;12 is an example diagram of configuring camera parameters for a target camera sensor in some embodiments;
图13为本申请实施例提供的目标相机传感器配置相机参数的示例图之一;FIG. 13 is one of the example diagrams of configuring camera parameters for a target camera sensor provided in an embodiment of the present application;
图14为本申请实施例提供的目标相机传感器配置相机参数的示例图之二。FIG. 14 is the second example diagram of configuring camera parameters for a target camera sensor provided in an embodiment of the present application.
具体实施方式Detailed ways
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
下面将结合附图对本实施例的实施方式进行详细描述。The implementation of this embodiment will be described in detail below in conjunction with the accompanying drawings.
本申请实施例提供了一种相机参数配置方法,应用于具有拍摄功能的电子设备。An embodiment of the present application provides a method for configuring camera parameters, which is applied to an electronic device with a shooting function.
示例性地,电子设备可以是桌面型、膝上型、平板电脑、手持计算机、手机、笔记本电脑、超级移动个人计算机(Ultra-mobile Personal Computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(Personal Digital Assistant,PDA)、电视机、VR设备、AR设备等具有摄像头的设备。Exemplary, the electronic device may be a desktop, laptop, tablet, handheld computer, cell phone, notebook computer, Ultra-mobile Personal Computer (UMPC), netbook, as well as a cellular phone, personal digital assistant ( Personal Digital Assistant, PDA), television, VR equipment, AR equipment and other equipment with cameras.
如图1所示,电子设备100从上至下可以分成应用程序层(简称应用层),应用程序框架层(简称框架层),硬件抽象层(hardware abstraction layer,HAL),内核(Kernel)层(也称为驱动层)以及硬件(Hardwork)层等若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。As shown in FIG. 1 , the electronic device 100 can be divided into an application layer (referred to as the application layer), an application framework layer (referred to as the framework layer), a hardware abstraction layer (hardware abstraction layer, HAL), and a kernel (Kernel) layer from top to bottom. (also known as the driver layer) and several layers such as the hardware (Hardwork) layer, each layer has a clear role and division of labor. Layers communicate through software interfaces.
可以理解的,图1仅为示例,也就是,电子设备中划分的层不限于图1所示出的层,比如,在应用框架层和HAL层之间,还可以包括安卓运行时(Android runtime)和系统库(libraries)层等。It can be understood that Fig. 1 is only an example, that is, the layers divided in the electronic device are not limited to the layers shown in Fig. 1, for example, between the application framework layer and the HAL layer, Android runtime (Android runtime ) and system libraries (libraries) layer, etc.
示例性地,应用层可以包括一系列应用程序包。如图1所示,应用层可以包括相机应用。当然,除了相机应用之外,应用层中还可以包括其他应用程序包,如,图库应用、视频应用等多个应用程序包。Exemplarily, the application layer may include a series of application program packages. As shown in FIG. 1, the application layer may include a camera application. Of course, in addition to the camera application, the application layer may also include other application packages, such as multiple application packages such as a gallery application and a video application.
一般而言,应用程序是使用Java语言开发,通过调用应用程序框架层所提供的应用程序编程接口(application programming interface,API)和编程框架来完成。示例性地,应用程序框架层包括一些预先定义的函数。Generally speaking, the application program is developed using the Java language, and is completed by calling an application programming interface (application programming interface, API) and a programming framework provided by the application program framework layer. Exemplarily, the application framework layer includes some predefined functions.
如图1所示,应用程序框架层可以包括相机服务,该相机服务可供相机应用调用,从而,实现拍摄相关的功能。当然,应用程序框架层还可以包括内容提供器、资源管理器、通知管理器、窗口管理器、视图系统、电话管理器等,同样,相机应用也可以依据实际的业务需求调用内容提供器、资源管理器、通知管理器、窗口管理器、视图系统等,本申请实施例对此不做任何限制。As shown in FIG. 1 , the application framework layer may include a camera service, which can be invoked by the camera application, so as to realize shooting-related functions. Of course, the application framework layer can also include content provider, resource manager, notification manager, window manager, view system, phone manager, etc. Similarly, the camera application can also call content provider, resource Manager, notification manager, window manager, view system, etc., are not limited in this embodiment of the present application.
上述内核层是硬件和软件之间的层。如图1所示,内核层至少包含相机驱动。该相机驱动可用于驱动具备拍摄功能的硬件模块,如,相机传感器。换句话说,上述相机驱动需负责与相机传感器进行数据交互。当然,内核层也还可以包括音频驱动程序、传感器驱动程序等驱动软件,本申请实施例对此不做任何限制。The aforementioned kernel layer is a layer between hardware and software. As shown in Figure 1, the kernel layer contains at least a camera driver. The camera driver can be used to drive hardware modules with shooting functions, such as camera sensors. In other words, the camera driver mentioned above is responsible for data interaction with the camera sensor. Certainly, the kernel layer may also include driver software such as an audio driver program and a sensor driver program, which is not limited in this embodiment of the present application.
另外,HAL层可以对内核层中的驱动程序进行封装,并向应用框架层提供调用的接口,屏蔽低层硬件的实现细节。In addition, the HAL layer can encapsulate the driver program in the kernel layer, and provide the calling interface to the application framework layer, shielding the implementation details of the low-level hardware.
如图1所示,上述HAL层中可以包括相机(Camera)HAL、决策模块和XML。As shown in FIG. 1 , the above HAL layer may include a camera (Camera) HAL, a decision module and XML.
其中,Camera HAL是Camera核心软件框架,该Camera HAL中包括传感器节点(Sensor node)、图像处理模块和接口模块等。其中,上述Sensor node、图像处理模块和接口模块是Camera HAL中图像数据和控制指令传输管道中的组件,当然,不同组件也对应有不同的功能。比如,Sensor node可以是面向相机传感器的控制节点,该Sensor node可以通过相机驱动控制相机传感器。再如,接口模块可以是面向应用框架层的软件接口,用于与应用框架层进行数据交互,当然,接口模块还可以与HAL中的其他模块(如,决策模块、图像处理模块、Sensor node)进行数据交互。再例如,图像处理模块可以处理相机传感器回传的原始图像数据,示例性地,上述图像处理模块可以包括图像前处理(image front end,IFE)节点(IFE node)和拜耳处理(bayer processing segment,BPS)节点(BPS node),其中,IFE用于处理相机传感器采集的预览流,BPS node用于处理相机传感器采集的拍照流。另外,图像处理模块还可以包括具有其他图像处理能力的节点,具体可参照相关技术,在此不再赘述。Wherein, the Camera HAL is the core software framework of the Camera, and the Camera HAL includes a sensor node (Sensor node), an image processing module, an interface module, and the like. Among them, the above-mentioned Sensor node, image processing module and interface module are the components in the image data and control command transmission pipeline in Camera HAL, of course, different components also have different functions. For example, the Sensor node may be a control node for a camera sensor, and the Sensor node may control the camera sensor through a camera driver. For another example, the interface module can be a software interface oriented to the application framework layer for data interaction with the application framework layer. Of course, the interface module can also interact with other modules in the HAL (eg, decision-making module, image processing module, Sensor node) For data interaction. For another example, the image processing module may process the original image data sent back by the camera sensor. Exemplarily, the above image processing module may include an image front end (IFE) node (IFE node) and a Bayer processing (bayer processing segment, BPS) node (BPS node), wherein, the IFE is used to process the preview stream collected by the camera sensor, and the BPS node is used to process the photo stream collected by the camera sensor. In addition, the image processing module may also include nodes with other image processing capabilities. For details, reference may be made to related technologies, which will not be repeated here.
另外,上述决策模块是CamX-Chi架构下的多摄决策模块,该决策模块可以根据场景信息,确定实际出图的相机传感器(如,前摄相机传感器、后摄相机传感器等)以及该相机传感器的出图模式。关于相机传感器的出图模式,可参考后续实施例中详解描述。In addition, the above-mentioned decision-making module is a multi-camera decision-making module under the CamX-Chi architecture. This decision-making module can determine the actual camera sensor (such as the front camera sensor, rear camera sensor, etc.) The drawing mode of . For the image output mode of the camera sensor, refer to the detailed description in the subsequent embodiments.
另外,上述XML可以用来传输和存储数据。示例性地,上述XML可以从电子设备的存储器中获取各类配置参数,如,相机传感器运行所需的配置参数。同时,XML还可以支持Sensor node查询已存储的配置参数。In addition, the aforementioned XML can be used to transmit and store data. Exemplarily, the above XML can obtain various configuration parameters from the memory of the electronic device, for example, the configuration parameters required for the operation of the camera sensor. At the same time, XML can also support the Sensor node to query the stored configuration parameters.
另外,图1中还示例性地展示了硬件层中可以被驱动的硬件模块,如,目标相机传感器等。当然,硬件层中还可包括图1未示出的硬件模块,如,摄像头、处理器、存储器等,再如,除目标相机传感器之外的其他相机传感器。In addition, FIG. 1 also exemplarily shows hardware modules that can be driven in the hardware layer, such as target camera sensors and the like. Of course, hardware modules not shown in FIG. 1 may also be included in the hardware layer, such as a camera, a processor, a memory, etc., or other camera sensors except the target camera sensor.
如前所述,相机传感器可以支持多种出图模式,比如,Binning出图模式、Idcg出图模式和Remosaic出图模式。As mentioned above, the camera sensor can support multiple image output modes, such as Binning image output mode, Idcg image output mode and Remosaic image output mode.
其中,在Binning出图模式下,相机传感器采集到原始像素阵列之后,将原始像素阵列中相邻像素对应的感应电荷加在一起,作为一个实际输出的像素点。该Binning出图模式通过将几个相邻的像素联合起来作为一个像素使用,这样,相机传感器向相机驱动输出的原始图像数据,相比于原始像素阵列,在维持视场角(FOV)不变的同时,降低输出分辨率,增加感光面积,提高暗处对光感应的灵敏度。通常,Binning出图模式也是默认的输出模式。Among them, in the binning image output mode, after the camera sensor collects the original pixel array, the induced charges corresponding to adjacent pixels in the original pixel array are added together as an actual output pixel point. The binning image output mode uses several adjacent pixels together as one pixel. In this way, the original image data output from the camera sensor to the camera driver maintains the same field of view (FOV) compared to the original pixel array. At the same time, the output resolution is reduced, the photosensitive area is increased, and the sensitivity to light sensing in dark places is improved. Usually, Binning output mode is also the default output mode.
另外,在Idcg出图模式下,可以提高相机传感器的动态范围,该动态范围是相机传感器在一幅图像里能够同时体现高光和阴影部分内容的能力。其中,相机传感器的动态范围越大,指示该相机传感器可以体现高光和阴影部分内容的能力越强。在Idcg出图模式下,相机传感器采用相同的曝光时间,同步获取同一帧原始图像数据对应的高增益(highconversion gain,HCG)图和低增益(low conversion gain,LCG)图。然后,相机传感器再将高增益图和低增益图,融合成一帧图像,作为实际向相机驱动输出的原始图像数据。In addition, in the Idcg image output mode, the dynamic range of the camera sensor can be improved. The dynamic range is the ability of the camera sensor to simultaneously reflect the content of highlights and shadows in an image. Wherein, the greater the dynamic range of the camera sensor, the stronger the ability of the camera sensor to reflect the contents of highlights and shadows. In the Idcg image output mode, the camera sensor uses the same exposure time to simultaneously acquire the high conversion gain (HCG) map and the low conversion gain (LCG) map corresponding to the same frame of raw image data. Then, the camera sensor fuses the high-gain image and the low-gain image into one frame of image, which is used as the original image data actually output to the camera driver.
上述Idcg出图模式相较于Binning出图模式而言,动态范围更大,当然,对应的功耗也更高,约为binning出图模式的1.5倍。Compared with the binning drawing mode, the above-mentioned Idcg drawing mode has a larger dynamic range. Of course, the corresponding power consumption is also higher, which is about 1.5 times that of the binning drawing mode.
在Remosaic出图模式下,相机传感器将4-cell sensor采集到的原始像素阵列,作为向相机驱动输出的原始图像数据,也即,在Remosaic出图模式下,相机驱动接收到的原始图像数据是未经过binning像素合成的。也即,启用Remosaic出图模式期间,相机驱动得到的原始图像数据无法被直接识别和处理。该原始图像数据需要被转换成标准bayer格式的图,这个转换的过程叫做remosaic。示例性地,可以由Camera HAL中的图像处理模块,将相机驱动接收到的原始图像数据转化为remosaic图像数据。上述remosaic图像数据相较于binning出图模式下得到的原始图像数据而言,像素点多、清晰度高,更适合于用户指示放大拍摄画面(也即,增大变焦倍率)的拍摄场景。In the Remosaic image output mode, the camera sensor uses the original pixel array collected by the 4-cell sensor as the original image data output to the camera driver, that is, in the Remosaic image output mode, the original image data received by the camera driver is Synthesized without binning pixels. That is, when the Remosaic output mode is enabled, the raw image data obtained by the camera driver cannot be directly recognized and processed. The original image data needs to be converted into a standard bayer format image, and this conversion process is called remosaic. Exemplarily, the original image data received by the camera driver may be converted into remosaic image data by an image processing module in the Camera HAL. Compared with the original image data obtained in the binning image output mode, the above remosaic image data has more pixels and higher definition, and is more suitable for the shooting scene where the user instructs to enlarge the shooting image (that is, increase the zoom ratio).
上述多种出图模式各自具备不同的优点,也适用于不同的场景。比如,Binning出图模式适合常规的拍摄场景,再如,Idcg出图模式适合逆光或者高亮的拍摄场景,再如,Remosaic出图模式适合用户指示提高变焦倍率的拍摄场景。Each of the above-mentioned output modes has different advantages and is also applicable to different scenarios. For example, the Binning image output mode is suitable for conventional shooting scenes. For example, the Idcg image output mode is suitable for backlit or high-brightness shooting scenes. For example, the Remosaic image output mode is suitable for shooting scenes where the user instructs to increase the zoom ratio.
在一些实施例中,在拍摄过程中,电子设备可以依据实时的拍摄场景,动态指示目标相机传感器切换不同的出图模式。其中,上述目标相机传感器是指当前采集送显数据的相机传感器。这样,在不同拍摄场景下,电子设备都能够拍摄到高质量的图像数据(如,照片、视频)。In some embodiments, during the shooting process, the electronic device may dynamically instruct the target camera sensor to switch between different image output modes according to the real-time shooting scene. Wherein, the aforementioned target camera sensor refers to the camera sensor currently collecting and displaying data. In this way, the electronic device can capture high-quality image data (eg, photos, videos) in different shooting scenarios.
可以理解的,电子设备切换不同出图模式,是指目标相机传感器切换不同出图模式。目标相机传感器切换不同出图模式,所需加载的模式参数可能存在差异。It can be understood that the electronic device switching between different image output modes means that the target camera sensor switches between different image output modes. When the target camera sensor switches between different output modes, the mode parameters that need to be loaded may be different.
示例性地,上述模式参数可以包括视场角、出图尺寸、出图宽高比、帧率以及其他参数。其中,上述其他参数可以包括:颜色、数据传输速率、曝光参数、一帧数据行数(FrameLength Lines),该Frame Length Lines包括场消隐、一行数据像素点数(Line LengthPCK),该Line Length PCK包括行消隐、剪裁参数、缩放参数、时钟频率、数据传输速率、相位对焦参数、像素点合并方式、内部时序、效果处理相关参数以及DCG相关参数(如,LCG和HCG的内部增益比值,LCG和HCG图像融合算法参数等)等中的一项或多项。Exemplarily, the above-mentioned mode parameters may include an angle of view, an output image size, an output image aspect ratio, a frame rate, and other parameters. Wherein, above-mentioned other parameters can comprise: color, data transmission rate, exposure parameter, one frame data line number (FrameLength Lines), and this Frame Length Lines comprises field blanking, one line of data pixel points (Line LengthPCK), and this Line Length PCK comprises Line blanking, clipping parameters, scaling parameters, clock frequency, data transmission rate, phase focus parameters, pixel binning method, internal timing, effect processing related parameters and DCG related parameters (such as internal gain ratio of LCG and HCG, LCG and HCG image fusion algorithm parameters, etc.) etc. one or more.
另外,电子设备在不同相机模式下,指示目标相机传感器采用同类型出图模式,目标相机传感器所需配置的模式参数可以是不同的参数。其中,相机模式可以包括拍照模式、录像模式(或高动态录像模式)、人像模式、4k动态帧率模式等。其中,拍照模式是指用于拍摄照片的功能模式,录像模式是指用于拍摄视频的功能模式,人像模式是指用于拍摄人物的功能模式,4k动态帧率模式是指用于拍摄4k动态帧率视频的功能模式,该4k动态帧率视频可以是分辨率为4k,且帧率可动态变化的视频数据。相机应用启用不同相机模式,可以显示不同的拍摄界面。In addition, in different camera modes, the electronic device instructs the target camera sensor to adopt the same type of drawing mode, and the mode parameters required to be configured by the target camera sensor may be different parameters. Wherein, the camera mode may include a photographing mode, a video recording mode (or a high dynamic video recording mode), a portrait mode, a 4K dynamic frame rate mode, and the like. Among them, the camera mode refers to the functional mode for taking photos, the video recording mode refers to the functional mode for shooting videos, the portrait mode refers to the functional mode for shooting people, and the 4K dynamic frame rate mode refers to the functional mode for shooting 4K dynamic Functional mode of frame rate video, the 4k dynamic frame rate video can be video data with a resolution of 4k and a dynamically changing frame rate. The camera application enables different camera modes to display different shooting interfaces.
以目标相机传感器是主摄像头的相机传感器为例,各相机模式下,可启用的出图模式和所对应的模式参数,如下表1所示:Taking the camera sensor whose target camera sensor is the main camera as an example, in each camera mode, the image output modes that can be enabled and the corresponding mode parameters are shown in Table 1 below:
表1Table 1
其中,Binning出图模式对应的模式参数(mode setting),可称为Binning模式参数;Idcg出图模式对应的模式参数(mode setting),可称为Idcg模式参数;Remosaic出图模式对应的模式参数(mode setting),可称为Remosaic模式参数。Among them, the mode parameter (mode setting) corresponding to the Binning drawing mode can be called the Binning mode parameter; the mode parameter (mode setting) corresponding to the Idcg drawing mode can be called the Idcg mode parameter; the mode parameter corresponding to the Remosaic drawing mode (mode setting), which can be called the Remosaic mode parameter.
由表1可见,Binning出图模式可以包括:图像的色彩数目量为14bit的Binning出图模式、色彩数目量为10bit的Binning出图模式。不同色彩数目量的出图模式,所对应的出图质量可以不同。当然,实际应用的实施例中,还可以包括色彩数目量为其他大小的Binning出图模式,也还可以配置不同视场角、不同出图尺寸、不同出图宽高比、不同帧率和/或不同其他参数(缩放参数)的Binning出图模式。It can be seen from Table 1 that the Binning image output mode may include: a Binning image output mode with an image color number of 14 bits, and a Binning image output mode with a color number of 10 bits. The image output modes with different numbers of colors may have different image output quality. Of course, in the embodiment of practical application, it can also include the Binning output mode with other sizes of color numbers, and can also configure different viewing angles, different output sizes, different output aspect ratios, different frame rates and/or Or the Binning output mode with different other parameters (zoom parameters).
在一些实施例中,电子设备在不同相机模式下,启用Binning出图模式时,目标相机传感器实际加载的Binning模式参数可能存在差异,以适应不同相机模式在Binning出图模式下,对出图效果的不同要求。In some embodiments, when the Binning image output mode is enabled in different camera modes of the electronic device, there may be differences in the Binning mode parameters actually loaded by the target camera sensor, so as to adapt to different camera modes. In the Binning image output mode, the image output effect different requirements.
在其他可能的实施例中,电子设备在不同相机模式下,启用Binning出图模式时,目标相机传感器实际加载的Binning模式参数也可能相同,对此本申请实施例不做具体限定。In other possible embodiments, when the binning mode is enabled in different camera modes of the electronic device, the binning mode parameters actually loaded by the target camera sensor may also be the same, which is not specifically limited in this embodiment of the present application.
同样地,Remosaic出图模式也可以包括:图像的色彩数目量为14bit的Remosaic出图模式、色彩数目量为10bit的Remosaic出图模式。不同色彩数目量的出图模式,所对应的出图质量可以不同。当然,实际应用的实施例中,还可以包括色彩数目量为其他大小的Remosaic出图模式,也还可以配置不同视场角、不同出图尺寸、不同出图宽高比和/或不同帧率的Remosaic出图模式。Similarly, the Remosaic image output mode may also include: a Remosaic image output mode with an image color number of 14 bits, and a Remosaic image output mode with a color number of 10 bits. The image output modes with different numbers of colors may have different image output quality. Of course, in the embodiment of practical application, it can also include the Remosaic image output mode with the number of colors in other sizes, and can also configure different viewing angles, different image output sizes, different image output aspect ratios and/or different frame rates Remosaic drawing mode.
在一些实施例中,电子设备在不同相机模式下,启用Remosaic出图模式时,目标相机传感器实际加载的Remosaic模式参数可能不同,以适应不同相机模式在Remosaic出图模式下,对出图效果的不同要求。In some embodiments, when the electronic device enables the Remosaic drawing mode in different camera modes, the Remosaic mode parameters actually loaded by the target camera sensor may be different, so as to adapt to different camera modes. Different requirements.
当然,在其他实施例中,不同相机模式下启用Remosaic出图模式时,目标相机传感器实际加载的Remosaic模式参数也可能相同,本申请实施例对此不做具体限定。Of course, in other embodiments, when the Remosaic drawing mode is enabled in different camera modes, the Remosaic mode parameters actually loaded by the target camera sensor may also be the same, which is not specifically limited in this embodiment of the present application.
同样地,Idcg出图模式也可以包括:图像的色彩数目量为14bit的Idcg出图模式、色彩数目量为10bit的Idcg出图模式。不同色彩数目量的出图模式,所对应的出图质量可以不同。当然,实际应用的实施例中,还可以包括色彩数目量为其他大小的Idcg出图模式,也还可以配置不同视场角、不同出图尺寸、不同出图宽高比、不同帧率和/或不同DCG参数的Idcg出图模式。Similarly, the Idcg image output mode may also include: an Idcg image output mode with an image color number of 14 bits, and an Idcg image output mode with a color number of 10 bits. The image output modes with different numbers of colors may have different image output quality. Certainly, in the embodiment of the actual application, it may also include the Idcg image output mode with the number of colors of other sizes, and it may also be configured with different viewing angles, different image output sizes, different image output aspect ratios, different frame rates and/or Or Idcg drawing mode with different DCG parameters.
在一些实施例中,电子设备在不同相机模式下,启用Idcg出图模式时,目标相机传感器实际加载的Idcg模式参数可能不同,以适应不同相机模式在Idcg出图模式下,对出图效果的不同要求。In some embodiments, when the electronic device is in different camera modes, when the Idcg drawing mode is enabled, the Idcg mode parameters actually loaded by the target camera sensor may be different, so as to adapt to different camera modes. In the Idcg drawing mode, the effect of drawing Different requirements.
当然,在其他实施例中,不同相机模式下启用Idcg出图模式时,目标相机传感器实际加载的Idcg模式参数也可能相同,本申请实施例对此不做具体限定。Of course, in other embodiments, when the Idcg output mode is enabled in different camera modes, the Idcg mode parameters actually loaded by the target camera sensor may also be the same, which is not specifically limited in this embodiment of the present application.
另外,如表1所示,相同相机模式下,Binning模式参数、Idcg模式参数和Remosaic模式参数中存在相同的参数,比如,视场角、出图尺寸、出图宽高比和帧率。这样,相同相机模式下,进行Binning出图模式、Idcg出图模式和Remosaic出图模式的切换时不影响预览画面的连贯性。In addition, as shown in Table 1, in the same camera mode, there are the same parameters in Binning mode parameters, Idcg mode parameters and Remosaic mode parameters, such as field of view, output image size, output image aspect ratio and frame rate. In this way, in the same camera mode, the continuity of the preview screen will not be affected when switching between Binning output mode, Idcg output mode and Remosaic output mode.
当然,Binning模式参数、Idcg模式参数和Remosaic模式参数还存在不同的参数。比如,Binning模式参数包括缩放参数,而Remosaic模式参数不包括缩放参数。再比如,Binning模式参数与Remosaic模式参数的裁剪参数的值不同。再如,Idcg模式参数包括DCG相关参数,但是Binning模式参数和Remosaic模式参数有均不包括DCG相关参数。再如,Binning模式参数和的Remosaic模式参数的内部时序均指示同一帧原始图像仅输出LCG图像(或者HCG图像),Idcg模式参数的内部时序指示同一帧原始图像可同步输出LCG图像和HCG图像。Of course, there are still different parameters among the Binning mode parameters, the Idcg mode parameters and the Remosaic mode parameters. For example, Binning mode parameters include scaling parameters, while Remosaic mode parameters do not include scaling parameters. For another example, the value of the clipping parameter of the Binning mode parameter is different from that of the Remosaic mode parameter. For another example, the Idcg mode parameters include DCG-related parameters, but neither the Binning mode parameters nor the Remosaic mode parameters include DCG-related parameters. For another example, the internal timing of the Binning mode parameter and the Remosaic mode parameter both indicate that the original image of the same frame only outputs the LCG image (or HCG image), and the internal timing of the Idcg mode parameter indicates that the original image of the same frame can output the LCG image and the HCG image synchronously.
另外,表1中示出各相机模式所对应的出图模式也仅为示例,可以理解的,各相机模式可以对应更多或者更少的出图模式。比如,录像模式除了对应有Binning出图模式和Idcg出图模式,还可以对应有Remosaic出图模式。再比如,录像模式也可以仅与Binning出图模式对应。In addition, the image output modes corresponding to each camera mode shown in Table 1 are only examples, and it can be understood that each camera mode may correspond to more or fewer image output modes. For example, in addition to the Binning image output mode and Idcg image output mode corresponding to the video recording mode, it can also correspond to the Remosaic image output mode. For another example, the video recording mode can only correspond to the binning output mode.
在电子设备包括多个摄像头的情况下,电子设备运行过程中,目标相机传感器可以出现变化,比如,由主摄像头的相机传感器变为长焦摄像头(TELE摄像头)的相机传感器。即使在相同的相机模式下,启用相同的出图模式,不同的目标相机传感器所需加载的模式参数也可能存在差异。比如,电子设备响应用户操作,开启拍照模式之后,确定主摄像头需要启用Binning出图模式的情况下,电子设备可以给主摄像头对应的相机传感器配置Binning模式参数a。之后,电子设备响应用户操作,切换由TELE摄像头送显。在此场景下,确定长焦摄像头(TELE摄像头)需要启用Binning出图模式,电子设备可以给TELE摄像头对应的相机传感器配置Binning模式参数b,Binning模式参数a和Binning模式参数b可以是不同的参数。In the case that the electronic device includes multiple cameras, the target camera sensor may change during the operation of the electronic device, for example, the camera sensor of the main camera becomes the camera sensor of the telephoto camera (TELE camera). Even if the same output mode is enabled in the same camera mode, the mode parameters that need to be loaded for different target camera sensors may be different. For example, after the electronic device responds to the user's operation and turns on the camera mode, if it is determined that the main camera needs to enable the Binning image output mode, the electronic device may configure the Binning mode parameter a for the camera sensor corresponding to the main camera. Afterwards, the electronic device responds to the user's operation, and switches the display from the TELE camera. In this scenario, it is determined that the binning output mode needs to be enabled for the telephoto camera (TELE camera), and the electronic device can configure the Binning mode parameter b for the camera sensor corresponding to the TELE camera, and the Binning mode parameter a and the Binning mode parameter b can be different parameters .
示例性的场景,如图1所示,相机应用可以将用户选择的相机模式、变焦倍率等信息,传递给应用框架层的相机服务,再由相机服务通过HAL层的接口模块传递给决策模块。这样,该决策模块可以依据相机模式、变焦倍率以及识别出的光照环境,确定出适配当前拍摄场景的出图模式,并通知Sensor node。An exemplary scenario, as shown in Figure 1, the camera application can pass information such as the camera mode and zoom ratio selected by the user to the camera service of the application framework layer, and then the camera service passes it to the decision-making module through the interface module of the HAL layer. In this way, the decision-making module can determine the output mode suitable for the current shooting scene according to the camera mode, zoom ratio and the recognized lighting environment, and notify the Sensor node.
这样,Sensor node可以从XML中获取与该出图模式匹配的相机参数,该相机参数中包含上述出图模式对应的模式参数(如,binning模式参数、Idcg模式参数或Remosaic模式参数)。In this way, the Sensor node can obtain the camera parameters matching the image output mode from XML, and the camera parameters include the mode parameters corresponding to the above image output mode (eg, binning mode parameters, Idcg mode parameters or Remosaic mode parameters).
然后,通过相机驱动给目标相机传感器配置对应的相机参数。如,Sensor node指示相机驱动与目标相机传感器的I2C接口进行交互,将相机参数写入目标相机传感器,并指示目标相机传感器加载。Then, configure the corresponding camera parameters for the target camera sensor through the camera driver. For example, the Sensor node instructs the camera driver to interact with the I2C interface of the target camera sensor, writes the camera parameters to the target camera sensor, and instructs the target camera sensor to load.
这样,如图2所示,目标相机传感器加载相机参数之后,目标相机传感器按照该相机参数所对应的出图模式,向相机驱动发送原始图像数据,如,通过目标相机传感器的MIPI接口向机驱动发送原始图像数据。之后,相机驱动将原始图像数据再发送给图像处理模块,该原始图像数据经由图像处理模块处理之后,得到图像帧。可以理解的,在相机应用处于拍摄预览阶段时,得到的图像帧又可称为预览帧,而在相机应用处于实际拍摄阶段时,得到的图像帧还可以称为相机帧。图像处理模块可以通过接口模块、相机服务向相机应用发送该图像帧,以便电子设备显示该图像帧。In this way, as shown in Figure 2, after the target camera sensor loads the camera parameters, the target camera sensor sends the original image data to the camera driver according to the output mode corresponding to the camera parameters, for example, through the MIPI interface of the target camera sensor to the machine driver Send raw image data. Afterwards, the camera driver sends the original image data to the image processing module, and the original image data is processed by the image processing module to obtain image frames. It can be understood that when the camera application is in the shooting preview stage, the obtained image frames may also be called preview frames, and when the camera application is in the actual shooting stage, the obtained image frames may also be called camera frames. The image processing module can send the image frame to the camera application through the interface module and the camera service, so that the electronic device can display the image frame.
可以理解的,电子设备实际配置目标相机传感器所对应的出图模式的过程,比上述描述的过程更为复杂。上述模式参数又可称为mode setting。上述相机参数除了模式参数之外,还可以包括公共参数。这样,配置相机参数的过程不仅包括配置模式参数,还包括配置公共参数。It can be understood that the process of actually configuring the image output mode corresponding to the target camera sensor by the electronic device is more complicated than the process described above. The above mode parameters may also be referred to as mode setting. In addition to the mode parameters, the above camera parameters may also include public parameters. In this way, the process of configuring camera parameters not only includes configuring mode parameters, but also includes configuring public parameters.
其中,上述公共参数又可称为init setting,或者init初始化参数,是用于实现相机传感器初始化的参数。比如,上述公共参数可以包括数据传输协议,内部时序和中断频率等。上述配置公共参数可以是指示目标相机传感器加载公共参数。上述公共参数是实现电子设备支持的所有出图模式的相机参数之间公共的参数,目标相机传感器加载公共参数之后,具有基本的运行能力。Wherein, the above public parameters may also be referred to as init setting, or init initialization parameters, which are parameters used to implement camera sensor initialization. For example, the above public parameters may include data transmission protocol, internal timing and interrupt frequency, etc. The above configuration public parameters may be public parameters instructing the target camera sensor to load. The above public parameters are the common parameters among the camera parameters that realize all image output modes supported by the electronic device. After the target camera sensor is loaded with the public parameters, it has basic operation capability.
下面结合附图,以电子设备是手机为例,描述本申请实施例所提供的相机参数配置方法的实现细节。The implementation details of the camera parameter configuration method provided by the embodiment of the present application will be described below with reference to the accompanying drawings, taking the electronic device as a mobile phone as an example.
在一些实施例中,手机在启用具有拍摄功能的应用程序(如,相机应用)之后,可以执行相机参数的配置。In some embodiments, after the mobile phone activates an application program (such as a camera application) with a shooting function, it can configure camera parameters.
如图3所示,手机解锁之后,可以显示主界面301。该主界面301中包括相机应用的应用图标302。在手机的后台应用中不包括相机应用的场景下,手机检测到用户对应用图标302的点击操作之后,可以启用相机应用。例如,响应于用户对应用图标302的操作,手机可以显示相机应用提供的等待界面,如界面303。该界面303可以是拍照模式所对应的应用界面。在显示该界面303时,相机传感器还未回传原始图像数据,也即,上述界面303中暂无可显示的图像帧。As shown in FIG. 3 , after the mobile phone is unlocked, a main interface 301 may be displayed. The main interface 301 includes an application icon 302 of the camera application. In a scenario where the background applications of the mobile phone do not include the camera application, the mobile phone may activate the camera application after the user's click operation on the application icon 302 is detected. For example, in response to the user's operation on the application icon 302, the mobile phone may display a waiting interface provided by the camera application, such as the interface 303. The interface 303 may be an application interface corresponding to the photographing mode. When the interface 303 is displayed, the camera sensor has not sent back the original image data, that is, there is no displayable image frame in the interface 303 .
在另一些实施例中,在手机的后台应用中包括相机应用的场景下,如果相机应用进入后台运行前启用了录像模式,那么手机接收到用户对应用图标302的点击操作,也可以显示等待界面,该等待界面为录像模式所对应的应用界面。在其他可能的实施例中,手机显示主界面301期间,可以接收用户对应用图标302的长按操作。这样,手机可以相对于该应用图标302显示模式选择窗口,该模式选择窗口中包括指示各个相机模式的模式控件。在此场景下,手机可以接收用户对任一模式控件的操作,并确定用户所选择的相机模式。比如,手机接收到用户对指示录像模式的模式控件的操作,可以显示录像模式所对应的等待界面。另外,除了点击应用图标302之外,在手机的后台应用中包括相机应用的场景下,还可以通过操作多任务界面的方式,指示手机显示上述等待界面。当然,在手机的后台应用中不包括相机应用时,还可以通过操作相机快捷键的方式,指示手机显示默认相机模式所对应的等待界面。除此之外,也可以通过识别用户说出的语音指示,或者,通过检测用户做出的手势动作等,分析是否需要打开相机应用。如,识别到用户说出关键字“相机”、“拍摄”等,可以确定需要打开相机应用,并显示对应的等待界面。再如,识别到用户做出与相机应用关联的手势动作,也可以确定需要打开相机应用,并显示对应的等待界面。另外,与相机应用关联的手势动作可以预先设定。In other embodiments, in the scenario where the camera application is included in the background application of the mobile phone, if the video recording mode is enabled before the camera application enters the background operation, the mobile phone may also display the waiting interface after receiving the user's click operation on the application icon 302 , the waiting interface is the application interface corresponding to the recording mode. In other possible embodiments, while the mobile phone is displaying the main interface 301 , a user's long press operation on the application icon 302 may be received. In this way, the mobile phone can display a mode selection window relative to the application icon 302, and the mode selection window includes mode controls indicating various camera modes. In this scenario, the mobile phone can receive the user's operation on any mode control and determine the camera mode selected by the user. For example, the mobile phone may display a waiting interface corresponding to the recording mode after receiving the user's operation on the mode control indicating the recording mode. In addition, in addition to clicking the application icon 302, in the scenario where the background applications of the mobile phone include the camera application, the mobile phone may be instructed to display the above-mentioned waiting interface by operating the multitasking interface. Of course, when the background application of the mobile phone does not include the camera application, the mobile phone can also be instructed to display the waiting interface corresponding to the default camera mode by operating the camera shortcut key. In addition, it is also possible to analyze whether it is necessary to open the camera application by recognizing the voice instructions spoken by the user, or by detecting gestures made by the user. For example, if it is recognized that the user speaks keywords such as "camera" and "shooting", it may be determined that the camera application needs to be opened, and a corresponding waiting interface is displayed. For another example, when it is recognized that the user makes a gesture action associated with the camera application, it may also be determined that the camera application needs to be opened, and a corresponding waiting interface is displayed. In addition, the gesture actions associated with the camera application can be preset.
在一些实施例中,手机可以在显示等待界面期间,进行相机参数的配置,以指示相机传感器启动采集原始图像数据。在一些实施例中,如图4所示,上述相机参数配置方法可以包括:In some embodiments, the mobile phone may configure camera parameters during the display of the waiting interface, so as to instruct the camera sensor to start collecting raw image data. In some embodiments, as shown in FIG. 4, the above method for configuring camera parameters may include:
S101,手机检测到指示启动相机应用的操作。S101, the mobile phone detects an operation indicating to start a camera application.
在一些实施例中,上述操作可以是用户对相机图标的点击操作。In some embodiments, the above operation may be a user's click operation on the camera icon.
在另一些实施例中,上述操作还可以是用户对相机图标的长按操作。当然,手机接收到用户对相机图标的长按操作,还可以显示模式选择窗口。该模式选择窗口中包括指示各个相机模式的模式控件。在相机应用确定用户选中任一相机模式的模式控件之后,流程也可以进入S102。In some other embodiments, the above operation may also be a user's long press operation on the camera icon. Certainly, the mobile phone may also display a mode selection window upon receiving the user's long press operation on the camera icon. The mode selection window includes mode controls that indicate the various camera modes. After the camera application determines that the user selects the mode control of any camera mode, the process may also enter S102.
可以理解的,上述S101仅为示例。实际使用过程中,手机还可以依据用户的其他操作,指示流程进入S102。比如,用户操作多任务界面中的窗口1,其中,该窗口1中显示有相机应用的应用界面缩略图。再比如,用户点击相机应用的快捷入口(比如,显示于手机负一屏中的相机快捷入口)。再比如,手机检测到用户说出与相机应用相关的关键字,或者,检测到用户做出与相机应用相关的手势动作等,也可以指示流程可进入S102。It can be understood that the above S101 is only an example. During actual use, the mobile phone may also instruct the process to enter S102 according to other operations of the user. For example, the user operates window 1 in the multitasking interface, where a thumbnail image of the application interface of the camera application is displayed in the window 1 . For another example, the user clicks the shortcut entry of the camera application (for example, the camera shortcut entry displayed on the negative screen of the mobile phone). For another example, the mobile phone detects that the user speaks a keyword related to the camera application, or detects that the user makes a gesture action related to the camera application, etc., may also indicate that the process can enter S102.
S102,手机控制相机传感器1上电,相机传感器1中包含目标相机传感器。S102, the mobile phone controls the camera sensor 1 to be powered on, and the camera sensor 1 includes a target camera sensor.
其中,上述相机传感器1也可以是相机模式1所对应的相机传感器。另外,相机模式1是相机应用识别出当前所需启用的相机模式。Wherein, the aforementioned camera sensor 1 may also be a camera sensor corresponding to camera mode 1 . In addition, camera mode 1 is the camera mode that the camera application recognizes and needs to enable currently.
示例性的,在手机后台未运行相机应用的情况下,手机启动相机应用之后,相机应用可确定需要启用默认相机模式(比如,默认相机模式可以预配置为拍照模式),这样,相机模式1为默认相机模式。Exemplarily, when the camera application is not running in the background of the mobile phone, after the mobile phone starts the camera application, the camera application can determine that the default camera mode needs to be enabled (for example, the default camera mode can be pre-configured as the camera mode), so that the camera mode 1 is Default camera mode.
又示例性的,在手机后台运行有相机应用,相机应用确定需要启用最近一次使用的相机模式,比如,相机应用进入后台运行之前的相机模式。这样,相机模式1为相机应用最近一次启用的相机模式。Also exemplary, there is a camera application running in the background of the mobile phone, and the camera application determines that the camera mode used last time needs to be enabled, for example, the camera mode before the camera application enters the background operation. In this way, camera mode 1 is the last enabled camera mode for the camera application.
在手机响应于用户选择的相机模式的操作,启动相机应用的场景下,相机应用可确定当前需启用被选择的相机模式。这样,相机模式1为用户选择的相机模式。In a scenario where the mobile phone starts the camera application in response to the operation of the camera mode selected by the user, the camera application may determine that the selected camera mode needs to be activated currently. In this way, camera mode 1 is the camera mode selected by the user.
可以理解地,手机配置有多个摄像头的情况下,相机应用在不同相机模式,可使用的摄像头不同。比如,手机包括前置摄像头1、前置摄像头2、后置摄像头1、后置摄像头2和后置摄像头3。拍照模式下,可使用的摄像头为手机的前置摄像头1、后置摄像头1、后置摄像头2和后置摄像头3。在人像模式下,可使用的摄像头为手机的前置摄像头1、前置摄像头2和后置摄像头1。Understandably, when the mobile phone is equipped with multiple cameras, different cameras can be used in different camera modes when the camera is applied. For example, a mobile phone includes a front camera 1 , a front camera 2 , a rear camera 1 , a rear camera 2 and a rear camera 3 . In the camera mode, the available cameras are the front camera 1, rear camera 1, rear camera 2 and rear camera 3 of the mobile phone. In portrait mode, the available cameras are the front camera 1, front camera 2 and rear camera 1 of the mobile phone.
这样,在确定相机模式1是拍照模式的情况下,相机传感器1包含前置摄像头1、后置摄像头1、后置摄像头2和后置摄像头3所对应的相机传感器。在此场景下,手机响应于上述指示启动相机应用的操作,控制前置摄像头1、后置摄像头1、后置摄像头2和后置摄像头3所对应的相机传感器上电。In this way, when it is determined that the camera mode 1 is the photographing mode, the camera sensor 1 includes camera sensors corresponding to the front camera 1 , the rear camera 1 , the rear camera 2 and the rear camera 3 . In this scenario, the mobile phone responds to the above instructions to start the operation of the camera application, and controls the camera sensors corresponding to the front camera 1, the rear camera 1, the rear camera 2, and the rear camera 3 to be powered on.
在确定相机模式1是人像模式的情况下,相机传感器1包含前置摄像头1、前置摄像头2和后置摄像头1所对应的相机传感器。在此场景下,手机响应于上述指示启动相机应用的操作,控制前置摄像头1、前置摄像头2和后置摄像头1所对应的相机传感器上电。When it is determined that the camera mode 1 is a portrait mode, the camera sensor 1 includes camera sensors corresponding to the front camera 1 , the front camera 2 and the rear camera 1 . In this scenario, the mobile phone responds to the above instructions to start the operation of the camera application, and controls the camera sensors corresponding to the front camera 1, the front camera 2, and the rear camera 1 to be powered on.
当然,在另一些实施例中,上述相机传感器1可以是手机中配置的所有相机传感器。这样,手机响应于上述指示启动相机应用的操作,可以控制手机所有的相机传感器上电,本身实施例对此不做具体限定。Of course, in some other embodiments, the above-mentioned camera sensor 1 may be all camera sensors configured in the mobile phone. In this way, the mobile phone can control all camera sensors of the mobile phone to be powered on in response to the operation of starting the camera application in response to the above instructions, which is not specifically limited in this embodiment itself.
在一些实施例中,手机检测到指示启动相机应用(如,第一应用)的操作(如,第一操作)之后,还可以显示相机应用提供的第一类预览界面,也即,第一界面。该第一类预览界面可以是运行相机模式1期间所显示的图像预览界面。比如,相机模式1是拍照模式,上述第一类预览界面可以是拍照预览界面,如,图3中的界面303。相机模式1是人像模式,上述第一类预览界面可以是人像预览界面(也可称为人像拍摄界面)。相机模式1是录像模式,上述第一类预览界面可以是录像预览界面(也可称为视频录制界面)。另外,在显示第一界面期间,手机对应的目标相机传感器可以是第一相机传感器。In some embodiments, after the mobile phone detects an operation (such as the first operation) indicating to start the camera application (such as the first application), it may also display the first type of preview interface provided by the camera application, that is, the first interface . The first type of preview interface may be an image preview interface displayed during camera mode 1 operation. For example, camera mode 1 is a photographing mode, and the above-mentioned first type of preview interface may be a photographing preview interface, such as interface 303 in FIG. 3 . The camera mode 1 is a portrait mode, and the above-mentioned first type of preview interface may be a portrait preview interface (also called a portrait shooting interface). Camera mode 1 is a video recording mode, and the above-mentioned first type of preview interface may be a video recording preview interface (also called a video recording interface). In addition, during the display of the first interface, the target camera sensor corresponding to the mobile phone may be the first camera sensor.
S103,手机指示相机传感器1配置公共参数。S103, the mobile phone instructs the camera sensor 1 to configure public parameters.
在一些实施例中,上述公共参数又可称为第一配置参数,手机可以将公共参数依次写入每一个相机传感器1中,然后,指示相机传感器1加载公共参数。通过加载公共参数,相机传感器1具备执行基本功能的能力。In some embodiments, the above-mentioned public parameters can also be referred to as first configuration parameters, and the mobile phone can write the public parameters into each camera sensor 1 in turn, and then instruct the camera sensor 1 to load the public parameters. By loading public parameters, the camera sensor 1 has the ability to perform basic functions.
在手机显示第一界面的情况下,也即,启用相机模式1的情况下,上述相机传感器1中包括作为目标相机传感器的第一相机传感器。When the mobile phone displays the first interface, that is, when the camera mode 1 is enabled, the camera sensor 1 includes the first camera sensor as the target camera sensor.
在一些实施例中,在每一个相机传感器1写入公共参数之后,可以调用模式记录函数,如,setstaticlastresindex(cameraID,resindex),在特定的存储位置1中,记录相机传感器1的相机标识(cameraID)和该相机传感器1当前的出图模式标识(resindex)。可以理解的,上述相机标识可以唯一指示对应的相机传感器1。另外,出图模式标识可以指示相机传感器1当前所启用的出图模式。在配置完公共参数的阶段,相机传感器1还未启用任何出图模式,这样,所记录的出图模式标识可以是指示初始化的序号,比如,指示初始化的序号是255。In some embodiments, after each camera sensor 1 writes the public parameters, the mode record function can be called, such as, setstaticlastresindex(cameraID, resindex), and record the camera ID (cameraID) of the camera sensor 1 in a specific storage location 1 ) and the current drawing mode identification (resindex) of the camera sensor 1. It can be understood that the above camera identifier may uniquely indicate the corresponding camera sensor 1 . In addition, the image output mode identifier may indicate the image output mode currently enabled by the camera sensor 1 . At the stage of configuring the public parameters, the camera sensor 1 has not enabled any image output mode, so the recorded image output mode identifier can be a serial number indicating initialization, for example, the serial number indicating initialization is 255.
以cameraID为1的相机传感器1为例,在该相机传感器1中写入公共参数之后,手机可以通过setstaticlastresindex(1,255),在存储位置1中记录cameraID“1”和出图模式标识“255”之间的对应关系。这样,手机访问存储位置1时,可以依据cameraID“1”和出图模式标识“255”之间的对应关系,确定该相机传感器1已完成公共参数配置。Taking the camera sensor 1 with cameraID as 1 as an example, after writing the public parameters in the camera sensor 1, the mobile phone can record the cameraID "1" and the drawing mode identifier "255" in the storage location 1 through setstaticlastresindex(1, 255) "The corresponding relationship between. In this way, when the mobile phone accesses the storage location 1, it can be determined that the public parameter configuration of the camera sensor 1 has been completed according to the correspondence between the cameraID "1" and the drawing mode identifier "255".
S104,手机判断当前的相机模式1是否对应有模式快速切换(fast mode change,FMC)数据包1。S104. The mobile phone determines whether the current camera mode 1 corresponds to a fast mode change (FMC) data packet 1.
在一些实施例中,手机中可以预先配置有预设列表,该预设列表中记录有相机应用在每个相机模式下,可启用的出图模式。In some embodiments, a preset list may be pre-configured in the mobile phone, and the preset list records the image output modes that can be enabled by the camera application in each camera mode.
在相机模式可启用多种出图模式的情况下,该相机模式可以对应多组模式参数,每组模式参数对应一个出图模式。每组模式参数包含实现该出图模式所需的大量属性值,数据体积较大。In the case that the camera mode can enable multiple image output modes, the camera mode can correspond to multiple sets of mode parameters, and each set of mode parameters corresponds to an image output mode. Each group of mode parameters contains a large number of attribute values required to realize the drawing mode, and the data volume is relatively large.
可以理解的,手机启用该类相机模式期间,具有出图模式间快速切换的业务需求,又可称为具有seamless的业务需求。这样,可以将该类相机模式下多个出图模式所对应的模式参数,也即,多组模式参数封装在同一数据包中,该数据包也可称为FMC数据包。当然,FMC数据包中还包括不同出图模式所对应的开关字段。其中,上述开关字段中携带相机传感器中特定寄存器的取值。通常开关字段中不含实现对应出图模式的属性值,其数据体积远小于出图模式所对应的模式参数。It can be understood that when this type of camera mode is enabled on the mobile phone, there is a business requirement for fast switching between image output modes, which can also be called a seamless business requirement. In this way, mode parameters corresponding to multiple drawing modes in this type of camera mode, that is, multiple sets of mode parameters can be encapsulated in the same data package, and the data package can also be called an FMC data package. Of course, the FMC data packet also includes switch fields corresponding to different drawing modes. Wherein, the above switch field carries the value of a specific register in the camera sensor. Usually the switch field does not contain the attribute value to realize the corresponding drawing mode, and its data volume is much smaller than the mode parameter corresponding to the drawing mode.
另外,相机传感器的特定寄存器加载不同取值的情况下,可以指示该相机传感器从FMC数据包中加载不同出图模式所对应的模式参数。这样,在FMC数据包写入相机传感器之后,通过指示相机传感器加载目标出图模式对的开关字段,可以使相机传感器启用目标出图模式。其中,FMC数据包中包含目标出图模式对应的模式参数以及开关字段。在相机模式可启用一种出图模式的情况下,该相机模式仅对应一组模式参数。In addition, when the specific registers of the camera sensor are loaded with different values, the camera sensor may be instructed to load mode parameters corresponding to different drawing modes from the FMC data packet. In this way, after the FMC data packet is written into the camera sensor, the camera sensor can be enabled to enable the target image output mode by instructing the camera sensor to load the switch field of the target image output mode pair. Wherein, the FMC data packet includes a mode parameter and a switch field corresponding to the target drawing mode. In the case that a camera mode can enable a drawing mode, the camera mode only corresponds to a set of mode parameters.
在一些实施例中,手机可以通过预设列表,判断相机模式1是否对应有FMC数据包1。比如,相机模式1在预设列表中对应有多个出图模式的情况下,确定相机模式1对应有FMC数据包1。比如,相机模式1为拍照模式的场景下,拍照模式在预设列表中对应14bit的binning出图模式、14bit的Idcg出图模式和14bit Remosaic出图模式,这样,可确定拍照模式对应有FMC数据包。In some embodiments, the mobile phone can determine whether the camera mode 1 corresponds to the FMC data package 1 through the preset list. For example, in the case that the camera mode 1 corresponds to multiple output modes in the preset list, it is determined that the camera mode 1 corresponds to the FMC data package 1 . For example, in the scene where camera mode 1 is the camera mode, the camera mode corresponds to 14bit binning image output mode, 14bit Idcg image output mode and 14bit Remosaic image output mode in the preset list. In this way, it can be determined that the camera mode corresponds to FMC data Bag.
再比如,预设列表中还包括各个相机模式对应的专属配置参数标识,该专属配置参数标识可以指示相机模式对应的专属配置参数类型(如,FMC数据包或者模式参数)。如果相机模式1对应有多个出图模式,该相机模式1在预设列表中的专属配置参数标识可以是标识“FMC数据包1”,指示相机模式1对应的专属配置参数类型为FMC数据包,这样,可确定相机模式1对应有FMC数据包1。如果相机模式1仅对应一个出图模式,该相机模式1在预设列表中的专属配置参数标识可以是标识“模式参数1”,指示相机模式1对应的专属配置参数类型为模式参数,这样,可确定相机模式1未对应有FMC数据包,且仅对应有模式参数1。For another example, the preset list also includes a dedicated configuration parameter identifier corresponding to each camera mode, and the dedicated configuration parameter identifier may indicate a dedicated configuration parameter type (eg, FMC data packet or mode parameter) corresponding to the camera mode. If camera mode 1 corresponds to multiple output modes, the exclusive configuration parameter identifier of camera mode 1 in the preset list can be the identifier "FMC data package 1", indicating that the exclusive configuration parameter type corresponding to camera mode 1 is FMC data package , so that it can be determined that camera mode 1 corresponds to FMC data packet 1. If the camera mode 1 corresponds to only one output mode, the exclusive configuration parameter identifier of the camera mode 1 in the preset list may be the identifier "mode parameter 1", indicating that the exclusive configuration parameter type corresponding to the camera mode 1 is a mode parameter. In this way, It can be determined that the camera mode 1 does not correspond to the FMC data packet, and only corresponds to the mode parameter 1.
在一些实施例中,上述FMC数据包1可称为第一数据包。该第一数据包中包括多个出图模式的配置参数(又可称为模式参数)。In some embodiments, the above-mentioned FMC data packet 1 may be referred to as the first data packet. The first data packet includes a plurality of configuration parameters (also referred to as mode parameters) of drawing modes.
在多个出图模式包含第一出图模式和第二出图模式的情况下,第一数据包中包括第一出图模式对应的模式参数(也即,第二配置参数)和第二出图模式对应的模式参数(也即,第三配置参数)。In the case that multiple output modes include the first output mode and the second output mode, the first data packet includes the mode parameters corresponding to the first output mode (that is, the second configuration parameters) and the second output mode. The mode parameter (that is, the third configuration parameter) corresponding to the graph mode.
在多个出图模式包含第一出图模式、第二出图模式和第三出图模式的情况下,第一数据包中包括第一出图模式对应的模式参数、第二出图模式对应的模式参数和第三出图模式对应的模式参数(也即,第四配置参数)。In the case that multiple output modes include the first output mode, the second output mode and the third output mode, the first data packet includes the mode parameters corresponding to the first output mode and the parameters corresponding to the second output mode. The mode parameter of and the mode parameter corresponding to the third drawing mode (that is, the fourth configuration parameter).
其中,上述第二配置参数可以包含可实现第一出图模式的相机参数中,除公共参数之外的部分。上述第三配置参数可以包含可实现第二出图模式的相机参数中,除公共参数之外的部分。上述第四配置参数可以包含可实现第三出图模式的相机参数中,除公共参数之外的部分。Wherein, the above-mentioned second configuration parameters may include camera parameters capable of realizing the first drawing mode, except the common parameters. The above-mentioned third configuration parameters may include camera parameters capable of realizing the second drawing mode, except the common parameters. The above-mentioned fourth configuration parameters may include camera parameters capable of realizing the third drawing mode, except the common parameters.
示例性的,上述第一出图模式、上述第二出图模式和第三出图模式可以是binning出图模式、Idcg出图模式和Remosaic出图模式中的一种,且各不相同。Exemplarily, the first graph output mode, the second graph output mode and the third graph output mode may be one of binning graph output mode, Idcg graph output mode and Remosaic graph output mode, and they are different from each other.
S105,在相机模式1对应有FMC数据包1的情况下,手机指示目标相机传感器配置FMC数据包1。S105, in the case that the camera mode 1 corresponds to the FMC data package 1, the mobile phone instructs the target camera sensor to configure the FMC data package 1.
在一些实施例中,手机可以将FMC数据包1写入目标相机传感器。然后,指示目标相机传感器加载FMC数据包1中的指定模式参数。其中,指定模式参数可以是FMC数据包1中封装的多组模式参数中的一组。上述FMC数据包1写入目标相机传感器和目标相机传感器加载完指定模式参数的过程,可称为配置FMC数据包1。In some embodiments, the phone may write FMC packet 1 to the target camera sensor. Then, instruct the target camera sensor to load the specified mode parameters in FMC packet 1. Wherein, the specified mode parameter may be one group of multiple groups of mode parameters encapsulated in the FMC data packet 1 . The above-mentioned process of writing the FMC data packet 1 to the target camera sensor and loading the specified mode parameters to the target camera sensor can be referred to as configuring the FMC data packet 1.
示例性地,上述指定模式参数可以是相机模式1支持的任意一个出图模式所对应的模式参数。在目标相机传感器接收到FMC数据包1之后,可以随机从FMC数据包1中加载一组模式参数。Exemplarily, the above specified mode parameter may be a mode parameter corresponding to any drawing mode supported by camera mode 1. After the target camera sensor receives the FMC data packet 1, a set of mode parameters can be randomly loaded from the FMC data packet 1.
又示例性地,上述指定模式参数可以是相机模式1的默认出图模式所对应的模式参数,如称为默认模式参数。其中,各个相机模式的默认出图模式,可以是在该相机模式支持的出图模式中预先选定的出图模式。这样,封装FMC数据包1的过程中,可以标记出默认出图模式的默认模式参数,或者,标记默认出图模式对应的开关字段。比如,利用第一标识,标识FMC数据包1中的第二配置参数,这样,第二配置参数为FMC数据包1中的默认模式参数,第一出图模式也是相机模式1的默认出图模式。As another example, the above specified mode parameter may be a mode parameter corresponding to the default drawing mode of camera mode 1, such as called a default mode parameter. Wherein, the default image output mode of each camera mode may be a pre-selected image output mode among the image output modes supported by the camera mode. In this way, during the process of encapsulating the FMC data packet 1, the default mode parameter of the default drawing mode can be marked, or the switch field corresponding to the default drawing mode can be marked. For example, use the first identifier to identify the second configuration parameter in the FMC data package 1, so that the second configuration parameter is the default mode parameter in the FMC data package 1, and the first drawing mode is also the default drawing mode of the camera mode 1 .
在目标相机传感器加载公共参数之后,具备识别FMC数据包1中的第一标识的能力,这样,在FMC数据包1中标记出默认模式参数的情况下,目标相机传感器在接收到FMC数据包1之后,可以依据第一标识,加载默认模式参数。After the target camera sensor loads the public parameters, it has the ability to identify the first identifier in the FMC data packet 1, so that when the default mode parameter is marked in the FMC data packet 1, the target camera sensor receives the FMC data packet 1 Afterwards, default mode parameters may be loaded according to the first identifier.
在FMC数据包1中标记出默认出图模式对应的开关字段的情况下,目标相机传感器在接收到FMC数据包1之后,按照默认出图模式的开关字段,配置特定寄存器的取值。这样,目标相机传感器可以依据特定寄存器,从FMC数据包1中加载默认模式参数。When the switch field corresponding to the default drawing mode is marked in the FMC data packet 1, after receiving the FMC data packet 1, the target camera sensor configures the value of a specific register according to the switch field of the default drawing mode. In this way, the target camera sensor can load default mode parameters from FMC packet 1 according to specific registers.
后续实施例中,主要以指定模式参数是默认模式参数进行描述。In the subsequent embodiments, the description is mainly made with the specified mode parameter being the default mode parameter.
在另一些实施例中,在目标相机传感器从FMC数据包1中加载模式参数之前,手机需确定目标相机传感器当前所启用的出图模式。作为一种实现方式,手机可以采用函数Updatelastresindex(cameraID),从存储位置1中,查询目标相机传感器最近一次记录的出图模式标识。比如,目标相机传感器的cameraID为“1”,可以通过调用Updatelastresindex(1),确定获取到最近一次记录的目标相机传感器所对应的出图模式标识。In some other embodiments, before the target camera sensor loads the mode parameters from the FMC data packet 1, the mobile phone needs to determine the image output mode currently enabled by the target camera sensor. As an implementation manner, the mobile phone may use the function Updatelastresindex(cameraID) to query the latest image output mode identifier recorded by the target camera sensor from the storage location 1. For example, if the cameraID of the target camera sensor is "1", it can be determined by calling Updatelastresindex(1) to obtain the output mode identifier corresponding to the target camera sensor recorded last time.
可以理解的,手机可以通过setstaticlastresindex,在存储位置1中,记录相机传感器所对应的出图模式。在S105之前,手机最近一次调用setstaticlastresindex,记录目标相机传感器的出图模式时,所记录的出图模式标识是指示初始化的序号(如,255)。这样,手机通过Updatelastresindex(1),可得到出图模式标识“255”。在得到出图模式标识为“255”的情况下,手机可以确定目标相机传感器当前还未启用任何出图模式。It can be understood that the mobile phone can record the output mode corresponding to the camera sensor in the storage location 1 through setstaticlastresindex. Before S105, when the mobile phone called setstaticlastresindex last time to record the image output mode of the target camera sensor, the recorded image output mode identifier was a serial number indicating initialization (eg, 255). In this way, the mobile phone can obtain the map output mode identifier "255" through Updatelastresindex(1). In the case where the image output mode identifier is "255", the mobile phone may determine that the target camera sensor has not yet enabled any image output mode.
在确定目标相机传感器当前还未启用任何出图模式的情况下,手机指示目标相机传感器加载上述指定模式参数。这样,目标相机传感器可以开始启用指定模式参数所对应的出图模式。When it is determined that the target camera sensor has not enabled any drawing mode, the mobile phone instructs the target camera sensor to load the above specified mode parameters. In this way, the target camera sensor can start to enable the output mode corresponding to the specified mode parameter.
在另一些实施例中,在目标相机传感器从FMC数据包中加载模式参数之后,手机可以在存储位置1中,更新与目标相机传感器的cameraID(也可称为目标相机标识)对应的出图模式标识。更新后的出图模式标识可以指示本次所加载的模式参数所对应的出图模式。In some other embodiments, after the target camera sensor loads the mode parameters from the FMC data packet, the mobile phone can update the output mode corresponding to the cameraID (also called the target camera ID) of the target camera sensor in storage location 1 logo. The updated drawing mode identifier may indicate the drawing mode corresponding to the mode parameter loaded this time.
在一些实施例中,手机还可以给所有出图模式预配置一个序号下标,也即,出图模式标识。不同出图模式对应的出图模式标识,可以采用列表的形式,存储在手机中。In some embodiments, the mobile phone may also pre-configure a serial number subscript for all image output modes, that is, an image output mode identifier. The graphic output mode identifiers corresponding to different graphic output modes may be stored in the mobile phone in the form of a list.
例如,手机所支持的出图模式如表1所示,对应地,预先配置的出图模式标识,可以如表2所示:For example, the image output modes supported by the mobile phone are shown in Table 1, and correspondingly, the pre-configured image output mode identifiers can be shown in Table 2:
表2Table 2
作为一种实施方式,在目标相机传感器从FMC数据包中加载模式参数之后,手机可以通过setstaticlastresindex(cameraID,resindex),在存储位置1中,更新目标相机标识(也即,目标相机传感器的cameraID)所对应的出图模式标识。As an implementation, after the target camera sensor loads the mode parameters from the FMC data packet, the mobile phone can update the target camera ID (that is, the cameraID of the target camera sensor) in storage location 1 through setstaticlastresindex(cameraID, resindex). The corresponding drawing mode identifier.
以目标相机标识为1,目标相机传感器加载14bit Binning出图模式为例,如表2所示,14bit Binning出图模式对应的出图模式标识为Setting mode1。手机可以调用Take the target camera ID as 1, and the target camera sensor loads the 14bit Binning image output mode as an example. As shown in Table 2, the output mode identifier corresponding to the 14bit Binning image output mode is Setting mode1. mobile phone can call
setstaticlastresindex(1,1),将存储位置1中,cameraID“1”对应的出图模式标识从“255”更新为“1”,指示目标相机传感器开始启用14bit Binning出图模式。setstaticlastresindex(1, 1), update the image output mode flag corresponding to cameraID "1" in storage location 1 from "255" to "1", indicating that the target camera sensor starts to enable the 14bit Binning image output mode.
S106,在相机模式1未对应有FMC数据包1,且仅对应一组模式参数1的情况下,手机指示目标相机传感器加载模式参数1。S106, in the case that the camera mode 1 does not correspond to the FMC data package 1, and only corresponds to a set of mode parameters 1, the mobile phone instructs the target camera sensor to load the mode parameter 1.
在一些实施例中,手机将模式参数1写入目标相机传感器,并指示目标相机传感器加载该模式参数1。In some embodiments, the mobile phone writes the mode parameter 1 into the target camera sensor, and instructs the target camera sensor to load the mode parameter 1.
在另一些实施例中,在目标相机传感器加载该模式参数1之后,手机可以在存储位置1中,更新与目标相机标识对应的出图模式标识。其中,更新的方式可参考前述实施例,在此不再赘述。In some other embodiments, after the target camera sensor loads the mode parameter 1, the mobile phone may update the image output mode identifier corresponding to the target camera identifier in the storage location 1. Wherein, the way of updating may refer to the above-mentioned embodiments, which will not be repeated here.
S107,手机指示目标相机传感器启动图像采集。S107, the mobile phone instructs the target camera sensor to start image acquisition.
在一些实施例中,目标相机传感器可以按照启用出图模式,进行图像采集,该过程也可称为起流。目标相机传感器所采集的图像经过预处理之后,得到图像帧。这样,手机可以显示由目标相机传感器采集的图像帧,也即,第一图像帧。In some embodiments, the target camera sensor can perform image acquisition according to enabling the image output mode, and this process can also be referred to as streaming. After the image collected by the target camera sensor is preprocessed, an image frame is obtained. In this way, the mobile phone can display the image frame captured by the target camera sensor, that is, the first image frame.
可以理解地,电子设备中部分相机模式支持多出图模式的切换。在启用该类相机模式的情况下,电子设备在执行S105之后,目标相机传感器可以采用指定出图模式起流,也即,可以执行S107。之后,电子设备可以在不断流的情况下,在该相机模式所支持的出图模式之间,进行无间歇切换。Understandably, some camera modes in the electronic device support the switching of the multi-image output mode. In the case of enabling this type of camera mode, after the electronic device executes S105, the target camera sensor can be activated in a designated drawing mode, that is, S107 can be executed. Afterwards, the electronic device can switch between the output modes supported by the camera mode without interruption without continuous streaming.
同样,电子设备中也可以存在部分相机模式仅支持一种出图模式。在启用该类相机模式的情况下,电子设备在执行S106之后,目标相机传感器可以按照模式参数1所对应的出图模式起流,但不能进行出图模式切换。Similarly, some camera modes in the electronic device may only support one image output mode. When this type of camera mode is enabled, after the electronic device executes S106, the target camera sensor can start streaming according to the output mode corresponding to the mode parameter 1, but cannot switch the output mode.
在另一些实施例中,目标相机传感器起流之后,还可以再次调用setstaticlastresindex(cameraID,resindex),在存储位置1中,更新目标相机标识所对应的出图模式标识,确保存储位置1中所记录的数据的有效性。In some other embodiments, after the sensor of the target camera is activated, setstaticlastresindex(cameraID, resindex) can be called again, and in storage location 1, the output mode identifier corresponding to the target camera identifier is updated to ensure that the the validity of the data.
在另一些实施例中,目标相机传感器开始采集图像帧之后,也即,目标相机传感器起流之后,手机还可以判断目标相机传感器是否需要停止工作,如,是否需要停止图像采集(stream off)。其中,在检测到用户指示切换相机模式的情况下,手机可以判定目标相机传感器需要停止工作。在检测到用户指示相机应用后台运行的情况下,手机也可以判定目标相机传感器需要停止工作。在检测到用户指示关闭相机应用的情况下,手机也可以判定目标相机传感器需要停止工作。在检测到用户指示切换目标相机传感器的情况下,比如,目标相机传感器由主摄像头的相机传感器切换为广角摄像头的相机传感器时,手机也可以判定目标相机传感器需要停止工作。当然,判断目标相机传感器是否停止工作的规则,本申请实施例不作具体限定。In some other embodiments, after the target camera sensor starts to capture image frames, that is, after the target camera sensor streams, the mobile phone can also determine whether the target camera sensor needs to stop working, such as whether to stop image acquisition (stream off). Wherein, in the case of detecting that the user indicates to switch the camera mode, the mobile phone may determine that the target camera sensor needs to stop working. The phone can also determine that the target camera sensor needs to stop working when it detects that the user has instructed the camera app to run in the background. The phone can also determine that the target camera sensor needs to stop working when it detects a user instruction to close the camera app. When it is detected that the user indicates to switch the target camera sensor, for example, when the target camera sensor is switched from the camera sensor of the main camera to the camera sensor of the wide-angle camera, the mobile phone may also determine that the target camera sensor needs to stop working. Of course, the embodiment of the present application does not specifically limit the rules for judging whether the target camera sensor stops working.
在控制目标相机传感器停止工作之后,手机可以调用setstaticlastresindex(cameraID,resindex),在存储位置1中,将目标相机标识所对应的出图模式标识变更为指示初始化的序号(如,255),指示该目标相机传感器当前未启用任何出图模式。After controlling the sensor of the target camera to stop working, the mobile phone can call setstaticlastresindex(cameraID, resindex), and in storage location 1, change the output mode identifier corresponding to the target camera identifier to a sequence number indicating initialization (such as 255), indicating the No plot mode is currently enabled for the target camera sensor.
以目标相机标识是“1”为例,在目标相机传感器停止工作之后,手机可以调用setstaticlastresindex(1,255),在存储位置1中,将cameraID“1”对应的出图模式标识,更新为指示初始化的序号“255”。这样,可以记录cameraID为“1”的相机传感器当前未启用任何出图模式。Taking the target camera ID as "1" as an example, after the target camera sensor stops working, the mobile phone can call setstaticlastresindex(1, 255), and in storage location 1, update the output mode ID corresponding to cameraID "1" to indicate Initialized sequence number "255". In this way, it can be recorded that the camera sensor whose cameraID is "1" does not currently enable any image output mode.
下面介绍上述方法实现过程中,手机的各个模块之间的信令交互情况。如图5所示:The following describes the signaling interaction between various modules of the mobile phone during the implementation of the above method. As shown in Figure 5:
S201,响应于指示启动相机应用的操作,运行相机应用和确定启用的相机模式1。S201 , in response to an operation indicating to start the camera application, run the camera application and determine the enabled camera mode 1 .
在一些实施例中,上述指示启动相机应用的操作可以包含上述S101中所枚举的指示启动相机应用的操作,在此不再赘述。In some embodiments, the above operation of instructing to start the camera application may include the operation of instructing to start the camera application enumerated in S101 above, which will not be repeated here.
在运行相机应用之后,相机应用可以确定当前所需启用的相机模式,也即,相机模式1。同样,确定相机模式1的方式,可参考前述实施例中的描述,在此不再赘述。After running the camera application, the camera application can determine the currently enabled camera mode, that is, camera mode 1 . Likewise, for the manner of determining the camera mode 1, reference may be made to the descriptions in the foregoing embodiments, and details are not repeated here.
S202,相机应用向相机服务发送与相机模式1匹配的相机标识1,相机标识1包括目标相机传感器的目标相机标识。S202. The camera application sends the camera ID 1 matching the camera mode 1 to the camera service, where the camera ID 1 includes the target camera ID of the target camera sensor.
其中,相机标识1是相机传感器1的相机标识(cameraID)。相机传感器1包括相机模式1中可启用的所有相机传感器。这样,也可称相机标识1与相机模式1匹配。可以理解的,在相机模式1下,目标相机传感器可以是相机传感器1中的一个。Wherein, the camera ID 1 is the camera ID (cameraID) of the camera sensor 1 . Camera Sensor 1 includes all camera sensors that can be enabled in Camera Mode 1. In this way, it can also be said that the camera ID 1 matches the camera model 1. It can be understood that, in the camera mode 1, the target camera sensor may be one of the camera sensors 1 .
S203,相机服务向接口模块发送相机标识1。S203. The camera service sends the camera identification 1 to the interface module.
S204,接口模块向Sensor node发送相机标识1。S204. The interface module sends the camera identification 1 to the Sensor node.
S205,Sensor node向目标相机驱动发送相机标识1。S205, the Sensor node sends the camera identification 1 to the target camera driver.
S206,目标相机驱动指示目标相机传感器上电。S206, the target camera driver instructs the target camera sensor to be powered on.
在一些实施例中,手机内配置多个相机传感器,手机内也会配置多个相机传感器。一个相机驱动对应控制一个相机传感器。目标相机传感器对应的相机驱动,也可称为目标相机驱动。In some embodiments, multiple camera sensors are configured in the mobile phone, and multiple camera sensors are also configured in the mobile phone. A camera driver corresponds to controlling a camera sensor. The camera driver corresponding to the target camera sensor may also be referred to as the target camera driver.
另外,Sensor node在接收到相机标识1之后,可以将相机标识1发送给所有的相机驱动。在相机驱动接收到相机标识1之后,如果确定相机标识1中包含该相机驱动的相机传感器的相机标识,该相机驱动可以指示对应的相机传感器上电。如果确定相机标识1中不包含该相机驱动的相机传感器的相机标识,该相机驱动可以不作响应。In addition, after the Sensor node receives the camera ID 1, it can send the camera ID 1 to all camera drivers. After the camera driver receives the camera ID 1, if it is determined that the camera ID 1 includes the camera ID of the camera sensor of the camera driver, the camera driver may instruct the corresponding camera sensor to be powered on. If it is determined that the camera identifier 1 does not include the camera identifier of the camera sensor of the camera driver, the camera driver may not respond.
这样,目标相机驱动接收到相机标识1之后,可以响应于相机标识1,指示目标相机传感器上电。In this way, after receiving the camera ID 1, the driver of the target camera may respond to the camera ID 1 and instruct the sensor of the target camera to be powered on.
S207,目标相机传感器上电。S207, the target camera sensor is powered on.
在一些实施例中,相机传感器1中的其他相机传感器,也可以响应于对应相机驱动的指示,上电。In some embodiments, other camera sensors in the camera sensor 1 may also be powered on in response to the corresponding camera driving instructions.
S208,Sensor node从XML获取公共参数。S208, the Sensor node acquires public parameters from the XML.
在一些实施例中,手机的存储器中可以预先配置多个相机参数,多个相机参数中包括公共参数和各个相机模式对应的专属配置参数。可以理解的,在相机模式支持多个出图模式时,该相机模式对应专属配置参数可以是FMC数据包。在相机模式只支持一个出图模式时,该相机模式对应专属配置参数可以是模式参数。后续实施例中,以相机模式1支持多个出图模式为例进行说明。另外,多个专属配置参数中,相机模式1所对应的专属配置参数可称为FMC数据包1。In some embodiments, a plurality of camera parameters may be pre-configured in the memory of the mobile phone, and the plurality of camera parameters include public parameters and specific configuration parameters corresponding to each camera mode. It can be understood that when the camera mode supports multiple output modes, the dedicated configuration parameters corresponding to the camera mode may be FMC data packets. When the camera mode only supports one output mode, the dedicated configuration parameters corresponding to the camera mode can be mode parameters. In the subsequent embodiments, the camera mode 1 supports multiple drawing modes as an example for illustration. In addition, among the plurality of dedicated configuration parameters, the dedicated configuration parameter corresponding to camera mode 1 may be referred to as FMC data package 1 .
另外,上述公共参数和多个专属配置参数可以被镜像到HAL层中的XML中,这样,HAL层的XML中可以包括公共参数和多个专属配置参数,比如,公共参数和FMC数据包1。这样,Sensor node也可以从XML中读取到公共参数和FMC数据包1。In addition, the above-mentioned public parameters and multiple dedicated configuration parameters can be mirrored into XML in the HAL layer, so that the XML of the HAL layer can include public parameters and multiple dedicated configuration parameters, such as public parameters and FMC data package 1. In this way, the Sensor node can also read the public parameters and FMC data package 1 from XML.
在一些实施例中,在相机传感器1均上电之后,相机传感器1可以向Sensor node反馈指示已上电的消息,Sensor node可以响应于该消息,从XML中读取到公共参数。In some embodiments, after the camera sensors 1 are all powered on, the camera sensor 1 can feed back a message indicating that it has been powered on to the Sensor node, and the Sensor node can respond to the message and read the public parameters from the XML.
S209,Sensor node向目标相机驱动发送公共参数。S209, the Sensor node sends public parameters to the target camera driver.
在一些实施例中,Sensor node可以向所有相机驱动发送公共参数。在另一些实施例中,Sensor node可以向控制相机传感器1的相机驱动发送公共参数,本申请实施例,对此不作具体限定。In some embodiments, the Sensor node can send common parameters to all camera drivers. In some other embodiments, the Sensor node may send public parameters to the camera driver controlling the camera sensor 1, which is not specifically limited in this embodiment of the present application.
当然,Sensor node无论是向所有相机驱动发送公共参数,还是向控制相机传感器1的相机驱动发送公共参数,目标相机驱动均可以接收到来自Sensor node的公共参数。Of course, whether the Sensor node sends public parameters to all camera drivers or to the camera driver controlling camera sensor 1, the target camera driver can receive the public parameters from the Sensor node.
S210,目标相机驱动向目标相机传感器发送公共参数。S210, the target camera driver sends public parameters to the target camera sensor.
在一些实施例中,接收到公共参数的相机驱动,均可以向所控制的相机传感器发送公共参照。在所有相机驱动都接收到公共参数,且,存在部分相机传感器未上电的情况下,相机驱动可以仅向已上电的相机传感器发送公共参数。在仅相机传感器1的相机驱动接收到公共参数的情况下,相机传感器1的相机驱动可以向相机传感器1发送公共参数,指示相机传感器1加载公共参数。In some embodiments, the camera drivers that receive the public parameters can all send a public reference to the controlled camera sensor. When all camera drivers receive the public parameters, and some camera sensors are not powered on, the camera driver can only send the public parameters to the powered camera sensors. In the case that only the camera driver of camera sensor 1 receives the public parameters, the camera driver of camera sensor 1 may send the public parameters to camera sensor 1, instructing camera sensor 1 to load the public parameters.
当然,无论采用以上何种方式,目标相机传感器均可接收到来自目标相机驱动的公共参数。Of course, no matter which of the above methods is adopted, the target camera sensor can receive public parameters from the target camera drive.
S211,目标相机传感器加载公共参数。S211, the target camera sensor loads public parameters.
可以理解的,其他接收到公共参数的相机传感器(如,其他的相机传感器1),也可以加载上述公共参数。这样,即使其他的相机传感器1,暂时无需采集原始图像,且无需进行向显示器回传所采集的图像,也可以预先加载公共参数。It can be understood that other camera sensors that have received the public parameters (eg, other camera sensor 1 ) can also load the above public parameters. In this way, even if other camera sensors 1 do not need to collect original images for the time being, and do not need to return the collected images to the display, the public parameters can also be preloaded.
另外,目标相机传感器加载公共参数的方式,可参考相关技术中相机传感器加载相机参数的过程,在此不再赘述。In addition, for the manner of loading public parameters by the target camera sensor, reference may be made to the process of loading camera parameters by the camera sensor in the related art, which will not be repeated here.
S212,目标相机传感器向目标相机驱动发送完成通知1。S212, the target camera sensor sends a completion notification 1 to the target camera driver.
S213,目标相机驱动向Sensor node发送完成通知1。S213, the target camera driver sends a completion notification 1 to the Sensor node.
其中,上述完成通知1指示目标相机传感器完成公共参数的配置。Wherein, the above-mentioned completion notice 1 indicates that the configuration of the public parameters of the target camera sensor is completed.
S214,Sensor node响应于完成通知1,从XML中获取与相机模式1对应的FMC数据包1。S214. In response to the completion notification 1, the Sensor node acquires the FMC data packet 1 corresponding to the camera mode 1 from the XML.
在一些实施例中,确定启用相机模式1之后,相机应用可以通知Sensor node,需启用相机模式1。另外,每个专属配置参数可以预先标记对应的相机模式,比如,FMC数据包1可以被标记与相机模式1对应。这样,在启用的相机模式为相机模式1的情况下,Sensor node可以从XML中获取与相机模式1对应的FMC数据包1。In some embodiments, after it is determined that the camera mode 1 is enabled, the camera application may notify the Sensor node that the camera mode 1 needs to be enabled. In addition, each dedicated configuration parameter can be marked with a corresponding camera mode in advance, for example, FMC data packet 1 can be marked as corresponding to camera mode 1. In this way, when the enabled camera mode is camera mode 1, the Sensor node can obtain FMC data packet 1 corresponding to camera mode 1 from XML.
S215,Sensor node向目标相机驱动发送FMC数据包1。S215, the Sensor node sends the FMC data packet 1 to the target camera driver.
S216,目标相机驱动向目标相机传感器发送FMC数据包1。S216, the target camera driver sends the FMC data packet 1 to the target camera sensor.
S217,目标相机传感器配置FMC数据包1。S217, the target camera sensor configures the FMC data packet 1.
在一些实施例中,在目标相机传感器接收并存储FMC数据包1之后,Sensor node确定此时目标相机传感器未启用任何出图模式,这样,Sensor node通过目标相机驱动指示目标相机传感器加载FMC数据包1中的默认模式参数,以使目标相机传感器启用相机模式1的对应的默认出图模式。In some embodiments, after the target camera sensor receives and stores the FMC data packet 1, the Sensor node determines that the target camera sensor does not enable any drawing mode at this time, so that the Sensor node instructs the target camera sensor to load the FMC data packet through the target camera driver The default mode parameter in 1, so that the target camera sensor enables the corresponding default output mode of camera mode 1.
以相机模式1是拍照模式为例,拍照模式的默认出图模式是14bit的binning出图模式,Sensor node确定目标相机传感器未启用任何出图模式的情况下,可以通过向目标相机驱动发送指令“INSENSORZOOMNONE”,使目标相机驱动控制目标相机传感器加载FMC数据包1中14bit的binning出图模式所对应的模式参数。Take camera mode 1 as the camera mode as an example. The default image output mode of the camera mode is 14bit binning image output mode. When the Sensor node determines that the target camera sensor does not enable any image output mode, it can send commands to the target camera driver by " INSENSORZOOMNONE", so that the target camera driver controls the target camera sensor to load the mode parameters corresponding to the 14-bit binning output mode in FMC data packet 1.
可以理解的,在相机模式支持多个出图模式时,该相机模式均对应有一个默认出图模式,这样,该相机模式对应的FMC数据包中,包含默认出图模式对应的默认模式参数。目标相机传感器可以通过加载FMC数据包中的默认模式参数,启用对应的默认出图模式。这样,在FMC数据包1下发之后,不用重复往目标相机传感器中写入默认模式参数,利用FMC数据包1中默认模式参数的默认标识,触发目标相机传感器加载默认模式参数。It can be understood that when a camera mode supports multiple image output modes, the camera mode corresponds to a default image output mode, so that the FMC data packet corresponding to the camera mode includes default mode parameters corresponding to the default image output mode. The target camera sensor can enable the corresponding default output mode by loading the default mode parameters in the FMC data package. In this way, after the FMC data packet 1 is delivered, it is not necessary to repeatedly write the default mode parameters into the target camera sensor, and use the default flag of the default mode parameter in the FMC data packet 1 to trigger the target camera sensor to load the default mode parameters.
上述S214至S217是给目标相机传感器配置相机模式1的专属配置参数的过程。在其他实施例中,如果相机模式1仅支持一种出图模式,且相机模式1的专属配置参数是模式参数1的情况下,Sensor node根据相机模式1,也可以从XML中获取模式参数1,并通过目标相机驱动指示目标相机传感器直接加载该模式参数1。这样,目标相机传感器可以启用模式参数1所对应的出图模式。The above S214 to S217 are the process of configuring the dedicated configuration parameters of the camera mode 1 for the target camera sensor. In other embodiments, if camera mode 1 only supports one output mode, and the dedicated configuration parameter of camera mode 1 is mode parameter 1, the Sensor node can also obtain mode parameter 1 from XML according to camera mode 1 , and instruct the target camera sensor to directly load the mode parameter 1 through the target camera driver. In this way, the target camera sensor can enable the drawing mode corresponding to the mode parameter 1.
S218,目标相机传感器向目标相机驱动发送完成通知2。S218, the target camera sensor sends a completion notification 2 to the target camera driver.
S219,目标相机驱动向Sensor node发送完成通知2。S219, the target camera driver sends a completion notification 2 to the Sensor node.
其中,上述完成通知2指示目标相机传感器已完成专属配置参数的配置。Wherein, the above completion notification 2 indicates that the target camera sensor has completed the configuration of the dedicated configuration parameters.
S220,Sensor node向目标相机驱动发送起流指令。S220, the Sensor node sends a stream instruction to the target camera driver.
S221,目标相机驱动向目标相机传感器发送起流指令。S221, the target camera driver sends a flow command to the target camera sensor.
S222,目标相机传感器按照FMC数据包1所对应的默认出图模式,进行出图。S222. The target camera sensor outputs an image according to the default image output mode corresponding to the FMC data packet 1.
其中,每一FMC数据包都对应一个相机模式,这样,FMC数据包1所对应的默认出图模式,可以是相机模式1对应的默认出图模式。Wherein, each FMC data packet corresponds to a camera mode, thus, the default image output mode corresponding to the FMC data packet 1 may be the default image output mode corresponding to the camera mode 1.
在其他实施例中,在目标相机传感器配置的专属配置参数是模式参数1时,目标相机传感器按照模式参数1所指示的出图模式,进行出图。In other embodiments, when the specific configuration parameter configured by the target camera sensor is the mode parameter 1, the target camera sensor outputs the image according to the image output mode indicated by the mode parameter 1.
在一些实施例中,如图6所示,上述方法还包括:In some embodiments, as shown in Figure 6, the above method also includes:
S223,目标相机传感器响应于起流指令,采集得到原始图像数据。S223, the target camera sensor responds to the flow instruction, and collects original image data.
其中,该原始图像数据所对应的出图方式为相机模式1的默认出图模式。Wherein, the output mode corresponding to the original image data is the default output mode of the camera mode 1.
S224,目标相机传感器向目标相机驱动发送原始图像数据。S224, the target camera sensor sends the original image data to the target camera driver.
S225,目标相机驱动向图像处理模块发送原始图像数据。S225, the target camera driver sends the original image data to the image processing module.
在一些实施例中,目标相机传感器通过目标相机驱动将采集到的原始图像数据传递给图像处理模块,以便图像处理模块处理该原始图像数据。In some embodiments, the target camera sensor transmits the collected raw image data to the image processing module through the driving of the target camera, so that the image processing module can process the raw image data.
S226,图像处理模块处理原始图像数据,得到图像帧。S226, the image processing module processes the original image data to obtain image frames.
在一些实施例中,图像处理模块处理原始图像数据的原理可参考相关技术,在此不再赘述。In some embodiments, the principle of processing the original image data by the image processing module may refer to related technologies, which will not be repeated here.
S227,图像处理模块向接口模块传递图像帧。S227. The image processing module transmits the image frame to the interface module.
S228,接口模块向相机服务传递图像帧。S228. The interface module transmits the image frame to the camera service.
S229,相机服务向相机应用传递图像帧。S229, the camera service transmits the image frame to the camera application.
在一些实施例中,图像处理模块通过接口模块以及相机服务,将处理得到的图像帧透传到相机应用。In some embodiments, the image processing module transparently transmits the processed image frames to the camera application through the interface module and the camera service.
S230,相机应用显示图像帧。S230, the camera application displays the image frame.
在一些实施例中,相机应用接收到图像帧之后,可以指示在拍照模式的应用界面中显示该图像帧,如图3所示,手机可以显示界面304。示例性地,相机应用接收到图像帧(如称为第一图像帧)之后,可以调度应用框架层中的视图系统,通过视图系统实现显示图像帧。In some embodiments, after receiving the image frame, the camera application may instruct to display the image frame in the application interface of the camera mode. As shown in FIG. 3 , the mobile phone may display an interface 304 . Exemplarily, after the camera application receives an image frame (for example, referred to as the first image frame), it may schedule the view system in the application framework layer, and display the image frame through the view system.
在一些实施例中,在相机模式1支持多种出图模式的情况下,相机应用在相机模式1下运行期间,相机应用还可以根据拍摄场景的变化,动态切换不同的出图模式。In some embodiments, when the camera mode 1 supports multiple image output modes, during the operation of the camera application in the camera mode 1, the camera application can also dynamically switch between different image output modes according to the change of the shooting scene.
以相机模式1是拍照模式为例,在不同拍摄场景下,适配的出图模式如表3所示:Taking camera mode 1 as the photo mode as an example, in different shooting scenarios, the adapted output modes are shown in Table 3:
表3table 3
其中,在不同变焦倍率下,判断暗环境和亮环境的方式可以不同。Wherein, under different zoom magnifications, methods for judging a dark environment and a bright environment may be different.
示例性地,在变焦倍率的单位为0.1X、变焦倍率属于1X至1.9X的情况下,手机可以根据计算出的光亮度(lv,也可称为第一光亮度)和检测到的HDR标志位,判断当前的光照环境。其中,光照环境分为亮环境和暗环境。Exemplarily, when the unit of the zoom ratio is 0.1X, and the zoom ratio is from 1X to 1.9X, the mobile phone may Bit, to judge the current lighting environment. Wherein, the light environment is divided into a bright environment and a dark environment.
比如,计算出的光亮度(lv)大于预设值1(可称为第一阈值,如,50),且HDR标志位指示手机进入HDR场景,可以确定当前所处的光照环境为亮环境。其中,上述预设值1可以是经验值,本申请实施例不限定预设值1的具体取值。另外,上述HDR场景是指需要启用HDR技术的拍摄场景,比如,拍摄视野中同时包括高亮度区域和低亮度区域。For example, if the calculated luminance (lv) is greater than a preset value 1 (may be referred to as a first threshold, eg, 50), and the HDR flag indicates that the mobile phone enters an HDR scene, it can be determined that the current lighting environment is a bright environment. Wherein, the above preset value 1 may be an empirical value, and the embodiment of the present application does not limit the specific value of the preset value 1 . In addition, the aforementioned HDR scene refers to a shooting scene where the HDR technology needs to be enabled, for example, a shooting field of view includes both a high-brightness area and a low-brightness area.
比如,计算出的光亮度(lv)不大于预设值1(如,50),或者,HDR标志位指示手机未进入HDR场景,可以确定当前所处的光照环境为暗环境。For example, the calculated luminance (lv) is not greater than the preset value 1 (eg, 50), or the HDR flag indicates that the mobile phone has not entered the HDR scene, so it can be determined that the current lighting environment is a dark environment.
这样,变焦倍率在1X至1.9X之间的情况下,如果判定当前的光照环境属于亮环境,确定目标相机传感器启用14bit Idcg出图模式。如果判定当前的光照环境属于暗环境,确定目标相机传感器启用14bit binning出图模式。In this way, when the zoom ratio is between 1X and 1.9X, if it is determined that the current lighting environment is a bright environment, it is determined that the target camera sensor enables the 14bit Idcg image output mode. If it is determined that the current lighting environment is a dark environment, make sure that the target camera sensor enables the 14bit binning image output mode.
示例性地,在变焦倍率的单位为0.1X、变焦倍率属于2X至2.5X的情况下,手机可以根据计算出的照度量化值(luxindex),判断当前的光照环境。其中,照度量化值(luxindex)是手机根据检测到的环境照度(lux)计算出的参数。比如,手机通过ISP根据最新采集的RAW图,评估出的参数值。当然,照度量化值(luxindex)的取值越大,指示实际的环境亮度越暗,照度量化值(第一照度量化值,如,luxindex)的取值越小,指示实际的环境亮度(lux)越亮。Exemplarily, when the unit of the zoom ratio is 0.1X, and the zoom ratio is from 2X to 2.5X, the mobile phone can judge the current lighting environment according to the calculated illuminance quantification value (luxindex). Wherein, the illuminance quantification value (luxindex) is a parameter calculated by the mobile phone according to the detected ambient illuminance (lux). For example, the mobile phone evaluates the parameter values based on the latest collected RAW image through the ISP. Of course, the larger the value of the illuminance quantization value (luxindex), the darker the actual ambient brightness is, and the smaller the illuminance quantization value (the first illuminance quantization value, such as luxindex), the smaller the actual ambient brightness (lux) brighter.
比如,照度量化值(luxindex)小于预设值2(第二阈值,如,350),可以确定当前所处的光照环境为亮环境。其中,上述预设值2可以是经验值,本申请实施例不限定预设值2的具体取值。For example, if the illuminance quantification value (luxindex) is less than a preset value 2 (the second threshold, eg, 350), it may be determined that the current lighting environment is a bright environment. Wherein, the above preset value 2 may be an empirical value, and the embodiment of the present application does not limit the specific value of the preset value 2 .
比如,照度量化值(luxindex)不小于预设值2(如,350),可以确定当前所处的光照环境为暗环境。For example, if the illuminance quantification value (luxindex) is not less than a preset value 2 (for example, 350), it can be determined that the current lighting environment is a dark environment.
这样,变焦倍率在2X至2.5X之间的情况下,如果判定当前的光照环境属于亮环境,确定目标相机传感器启用14bit Remosaic出图模式。如果判定当前的光照环境属于暗环境,确定目标相机传感器启用14bit binning出图模式。In this way, when the zoom ratio is between 2X and 2.5X, if it is determined that the current lighting environment is a bright environment, it is determined that the target camera sensor enables the 14bit Remosaic image output mode. If it is determined that the current lighting environment is a dark environment, make sure that the target camera sensor enables the 14bit binning image output mode.
可以理解地,在暗环境下,图像亮度梯度差异小,在此场景下,选用感光度更好、功耗较低的binning出图模式,可以得到感光度更佳的成像效果。也即,无论手机的变焦倍率为任何值,在确定光照环境为暗环境的情况下,优先选用binning出图模式。It is understandable that in a dark environment, the image brightness gradient difference is small. In this scenario, the binning image output mode with better sensitivity and lower power consumption can be used to obtain an imaging effect with better sensitivity. That is, no matter what the zoom ratio of the mobile phone is, if the lighting environment is determined to be dark, the binning image output mode is preferred.
在亮环境下,变焦倍率在1X至1.9X期间,摄像头的视野广,采集的图像亮度梯度差异较大,在此场景下,启用Idcg出图模式可达到最佳的出图效果。In a bright environment, when the zoom ratio is between 1X and 1.9X, the field of view of the camera is wide, and the brightness gradient of the collected images is quite different. In this scene, enabling the Idcg image output mode can achieve the best image output effect.
在亮环境下,变焦倍率在2X至2.5X期间,Remosaic出图模式的感光度够用且图像像素点多,清晰度更高。In a bright environment, when the zoom ratio is between 2X and 2.5X, the sensitivity of the Remosaic output mode is sufficient, and the image pixels are more, and the definition is higher.
在一些实施例中,在第一条件下,确定目标相机传感器启用第二出图模式,在第二条件下,确定目标相机传感器启用第三出图模式。在第三条件下,确定目标相机传感器启用第一出图模式。In some embodiments, under the first condition, it is determined that the target camera sensor activates the second image output mode, and under the second condition, it is determined that the target camera sensor activates the third image output mode. Under the third condition, it is determined that the target camera sensor enables the first drawing mode.
在相机模式1是拍照模式,且第二出图模式是Idcg出图模式的情况下,上述第一条件指示适合启用Idcg出图模式的场景,比如,可以是在变焦倍率属于1X-1.9X(也即,第一区间)时,识别出亮环境的条件。In the case that camera mode 1 is a photographing mode, and the second drawing mode is an Idcg drawing mode, the above-mentioned first condition indicates a scene suitable for enabling the Idcg drawing mode, for example, it may be when the zoom ratio belongs to 1X-1.9X ( That is, during the first interval), the condition of a bright environment is recognized.
在相机模式1是拍照模式,且第三出图模式是Remosaic出图模式的情况下,上述第二条件指示适合启用Remosaic出图模式的场景,比如,可以是在变焦倍率属于2X-2.5X(也即,第二区间)时,识别出亮环境的条件。In the case that camera mode 1 is a photographing mode, and the third drawing mode is a Remosaic drawing mode, the above-mentioned second condition indicates a scene suitable for enabling the Remosaic drawing mode, for example, it may be when the zoom factor belongs to 2X-2.5X ( That is, during the second interval), the condition of a bright environment is recognized.
在相机模式1是拍照模式,且第三出图模式是binning出图模式的情况下,上述第三条件指示适合启用binning出图模式的场景,比如,可以是在变焦倍率属于第二区间时,识别出暗环境的条件,再比如,还可以是在变焦倍率属于第一区间时,识别出暗环境的条件。In the case that the camera mode 1 is a photographing mode, and the third drawing mode is a binning drawing mode, the above-mentioned third condition indicates a scene suitable for enabling the binning drawing mode, for example, when the zoom ratio belongs to the second range, The condition for recognizing the dark environment may also be, for example, the condition for recognizing the dark environment when the zoom ratio belongs to the first range.
以相机模式1是人像模式为例,在不同拍摄场景下,适配的出图模式如表4所示:Taking camera mode 1 as portrait mode as an example, in different shooting scenarios, the adapted output modes are shown in Table 4:
表4Table 4
其中,人像模式下,可选的变焦倍率包括1X、2X和3X。Among them, in the portrait mode, the optional zoom ratios include 1X, 2X and 3X.
作为一种实现方式,在人像模式下,手机可以在照度量化值(luxindex)小于预设值3(如,290)的情况下,确定当前所处的光照环境为亮环境。手机可以在照度量化值(luxindex)不小于预设值3的情况下,确定当前所处的光照环境为暗环境。其中,预设值3可以是经验值,本申请实施例对其具体取值不作限定。As an implementation manner, in the portrait mode, the mobile phone may determine that the current lighting environment is a bright environment when the illuminance quantification value (luxindex) is less than a preset value 3 (eg, 290). The mobile phone may determine that the current lighting environment is a dark environment when the illuminance quantification value (luxindex) is not less than the preset value 3. Wherein, the preset value 3 may be an empirical value, and the embodiment of the present application does not limit its specific value.
作为另一种实现方式,手机在启用人像模式之后,首次判断光照环境的过程中,可以按照实际计算出的照度量化值(luxindex)是否小于预设值3进行判断。在启用人像模式之后,在最近一次确定光照环境属于亮环境的情况下,在计算出照度量化值(luxindex)大于预设值3和裕度值1(如,75)之和的情况下,确定光照环境变为暗环境。As another implementation method, after the portrait mode is enabled, the mobile phone may judge according to whether the actually calculated illuminance quantification value (luxindex) is less than the preset value 3 in the process of judging the lighting environment for the first time. After portrait mode is enabled, if the last time the lighting environment is determined to be a bright environment, and the calculated illumination quantification value (luxindex) is greater than the sum of the preset value 3 and the margin value 1 (for example, 75), determine the lighting The environment becomes a dark environment.
在最近一次确定光照环境属于暗环境的情况下,在计算出照度量化值(luxindex)小于预设值3和裕度值1(如,75)之差的情况下,确定光照环境变为亮环境。When it is determined that the lighting environment belongs to the dark environment last time, if the calculated illuminance quantification value (luxindex) is less than the difference between the preset value 3 and the margin value 1 (eg, 75), it is determined that the lighting environment becomes a bright environment.
人像模式下,手机的变焦倍率为3X的情况下,手机在亮环境中,使用TELE摄像头进行图像采集,在此场景下,目标相机传感器为TELE摄像头的相机传感器。手机在暗环境中,启用主摄像头进行图像采集,在此场景下,目标相机传感器为主摄像头的相机传感器。这样,手机的变焦倍率为3X的情况下,虽然亮环境和暗环境下均启用binning出图模式,但是,在暗环境中,启用针对主摄像头的binning出图模式。在亮环境中,启用针对TELE摄像头的binning出图模式。In the portrait mode, when the zoom ratio of the mobile phone is 3X, the mobile phone uses the TELE camera to collect images in a bright environment. In this scene, the target camera sensor is the camera sensor of the TELE camera. When the mobile phone is in a dark environment, enable the main camera to collect images. In this scenario, the target camera sensor is the camera sensor of the main camera. In this way, when the zoom ratio of the mobile phone is 3X, although the binning image output mode is enabled in both the bright environment and the dark environment, in the dark environment, the binning image output mode for the main camera is enabled. In a bright environment, enable the binning output mode for TELE cameras.
人像模式下,手机的变焦倍率为1X的情况下,目标相机传感器可以是人像模式下可启用的相机传感器中的任意一个。在此场景下,无论在暗环境还是亮环境,目标相机传感器均启用适配自身的10bit binning出图模式。In the portrait mode, when the zoom ratio of the mobile phone is 1X, the target camera sensor can be any one of the camera sensors that can be enabled in the portrait mode. In this scenario, no matter in a dark environment or a bright environment, the target camera sensor will enable its own 10bit binning image output mode.
人像模式下,手机的变焦倍率为2X的情况下,目标相机传感器可以是人像模式下可启用的相机传感器中的任意一个。在此场景下,暗环境中,目标相机传感器启用适配自身的10bit binning出图模式。亮环境中,目标相机传感器启用适配自身的10bit Remosaic出图模式。In the portrait mode, when the zoom ratio of the mobile phone is 2X, the target camera sensor can be any one of the camera sensors that can be enabled in the portrait mode. In this scenario, in a dark environment, the target camera sensor enables its own 10bit binning output mode. In a bright environment, the target camera sensor enables its own 10bit Remosaic output mode.
可以理解地,人像模式下,手机的变焦倍率为1X的情况下,视场(FOV)正常,感光度较好,在此场景下,无论处于亮环境还是暗环境,使用功耗较低的binning出图模式的收益更高。It is understandable that in portrait mode, when the zoom ratio of the mobile phone is 1X, the field of view (FOV) is normal and the sensitivity is better. In this scene, no matter in a bright environment or a dark environment, binning with low power consumption is used. The income of the drawing mode is higher.
另外,人像模式下,手机的变焦倍率为2X的情况下,暗环境中,使用感光度较好、功耗较低的binning出图模式的收益更高。人像模式下,手机的变焦倍率为2X的情况下,亮环境中,Remosaic出图模式的感光度够用且图像像素点多,清晰度更高,使用Remosaic出图模式的收益更高。In addition, in the portrait mode, when the zoom ratio of the mobile phone is 2X, in a dark environment, the benefit of using the binning image output mode with better sensitivity and lower power consumption is higher. In portrait mode, when the zoom ratio of the mobile phone is 2X, in a bright environment, the sensitivity of the Remosaic image output mode is sufficient, and the image pixels are more, and the definition is higher. The benefit of using the Remosaic image output mode is higher.
人像模式下,手机的变焦倍率为3X的情况下,暗环境中,主摄像头的相机传感器启用binning出图模式时感光度更优。手机的变焦倍率为3X的情况下,亮环境中,TELE的相机传感器启用binning出图模式时感光度能够满足要求,采集的像素点更多,清晰度高。In portrait mode, when the zoom ratio of the mobile phone is 3X, in a dark environment, the camera sensor of the main camera has better sensitivity when the binning output mode is enabled. When the zoom ratio of the mobile phone is 3X, in a bright environment, the sensitivity of the TELE camera sensor can meet the requirements when the binning image output mode is enabled, and the collected pixels are more with high definition.
以相机模式1是录像模式为例,在不同拍摄场景下,适配的出图模式如表5所示:Taking camera mode 1 as video recording mode as an example, in different shooting scenarios, the adapted output modes are shown in Table 5:
表5table 5
其中,在录像模式下,手机判断所处光照环境的方式可以是:根据自适应动态范围压缩(adaptive dynamic range compression,Adrc)增益、DarkLuma和光亮度(lv),判断当前的光照环境。Wherein, in the video recording mode, the mobile phone may judge the lighting environment in the following manner: according to adaptive dynamic range compression (adaptive dynamic range compression, Adrc) gain, DarkLuma and luminance (lv), the current lighting environment is judged.
其中,Adrc增益是指示动态范围的一个参数。Adrc增益的计算方式可参考相关技术,比如,按照当前曝光参数得到一帧RAW图像。然后,获取该RAW图像的整体平均曝光量,以及该RAW图像中亮区的平均曝光量。这样,将该RAW图像的整体平均曝光量与亮区的平均曝光量之间的商值确定为Adrc增益。Wherein, the Adrc gain is a parameter indicating the dynamic range. For the calculation method of the Adrc gain, reference may be made to related technologies, for example, a frame of RAW image is obtained according to the current exposure parameters. Then, the overall average exposure of the RAW image and the average exposure of bright areas in the RAW image are obtained. In this way, the quotient between the overall average exposure of the RAW image and the average exposure of bright areas is determined as the Adrc gain.
DarkLuma是表示图片暗区平均亮度的参数,其计算方式也可参考相关技术,本申请实施例对此不作具体限定。DarkLuma is a parameter representing the average brightness of the dark area of the picture, and its calculation method can also refer to related technologies, which is not specifically limited in this embodiment of the present application.
示例性地,在Adrc增益小于预设值4(如,1.6)或DarkLuma大于预设值5(如,36)的情况下,如果光亮度(lv)小于预设值6(如,46),确定当前所处的光照环境属于暗环境。另外,上述预设值4、预设值5和预设值6均为经验值,具体取值不作限定。Exemplarily, when the Adrc gain is less than a preset value of 4 (eg, 1.6) or DarkLuma is greater than a preset value of 5 (eg, 36), if the brightness (lv) is less than a preset value of 6 (eg, 46), Make sure that the current lighting environment is a dark environment. In addition, the above preset value 4, preset value 5 and preset value 6 are all empirical values, and specific values are not limited.
示例性地,在Adrc增益大于预设值7(如,2.2)或DarkLuma小于预设值8(如,27)的情况下,如果光亮度(lv)大于预设值9(如,50),确定当前所处的光照环境属于亮环境。另外,上述预设值7、预设值8和预设值9均为经验值,具体取值不作限定,当然,预设值7大于预设值4,预设值8小于预设值5,预设值9大于预设值6。Exemplarily, when the Adrc gain is greater than a preset value of 7 (eg, 2.2) or DarkLuma is less than a preset value of 8 (eg, 27), if the brightness (lv) is greater than a preset value of 9 (eg, 50), Determine that the current lighting environment belongs to the bright environment. In addition, the above preset value 7, preset value 8 and preset value 9 are all empirical values, and the specific values are not limited. Of course, the preset value 7 is greater than the preset value 4, and the preset value 8 is smaller than the preset value 5. The default value of 9 is greater than the default value of 6.
可以理解的,在录像模式下,暗环境中,图像的亮度梯度差异小,使用感光度好、功耗低的binning出图模式收益更佳。在录像模式下,亮环境中,图像的亮度梯度较大,使用动态范围更好的Idcg出图模式的收益更高。It is understandable that in video recording mode, in a dark environment, the brightness gradient difference of the image is small, and it is better to use the binning image output mode with good sensitivity and low power consumption. In video recording mode, in a bright environment, the brightness gradient of the image is large, and the benefit of using the Idcg image output mode with better dynamic range is higher.
如图7所示,手机在相机模式1下,指示目标相机传感器启用默认出图模式之后,上述相机参数配置方法还可以包括:As shown in Figure 7, after the mobile phone is in camera mode 1 and instructs the target camera sensor to enable the default image output mode, the above camera parameter configuration method may also include:
S301,在未检测到指示切换相机模式的操作时,手机确定适配当前拍摄场景的出图模式1。S301. When no operation indicating to switch the camera mode is detected, the mobile phone determines the image output mode 1 suitable for the current shooting scene.
在一些实施例中,在未检测到指示切换相机模式的操作期间,相机应用依然运行于相机模式1。在此期间,手机可以周期性地确定与当前拍摄场景适配的出图模式,如称为出图模式1。In some embodiments, the camera application is still running in camera mode 1 during the period when an operation indicating to switch the camera mode is not detected. During this period, the mobile phone can periodically determine a picture output mode suitable for the current shooting scene, such as called picture output mode 1.
以相机模式1是拍照模式为例,手机可以根据变焦倍率,结合HDR标记位、光亮度(lv)或者照度量化值(luxindex),识别当前的光照环境。其中,在拍照模式下,识别光照环境的细节可参考前述实施例,在此不再赘述。然后,根据识别出的光照环境,结合变焦倍率和前述实施例中的表3,确定与当前拍摄场景匹配的出图模式1,具体细节可参考前述实施例,在此不再赘述。Taking camera mode 1 as a camera mode as an example, the mobile phone can identify the current lighting environment according to the zoom ratio, combined with the HDR flag, luminance (lv) or illuminance quantification value (luxindex). Wherein, in the photographing mode, the details of identifying the lighting environment may refer to the foregoing embodiments, which will not be repeated here. Then, according to the identified lighting environment, combined with the zoom ratio and Table 3 in the foregoing embodiments, determine the image output mode 1 that matches the current shooting scene. For details, refer to the foregoing embodiments, and details are not repeated here.
以相机模式1是人像模式为例,手机可以根据照度量化值(luxindex),识别当前的光照环境。其中,在人像模式下,识别光照环境的细节可参考前述实施例,在此不再赘述。然后,根据识别出的光照环境,结合变焦倍率和前述实施例中的表4,确定与当前拍摄场景匹配的出图模式1,具体细节可参考前述实施例,在此不再赘述。Taking the camera mode 1 as the portrait mode as an example, the mobile phone can identify the current lighting environment according to the illuminance quantification value (luxindex). Wherein, in the portrait mode, the details of identifying the lighting environment may refer to the foregoing embodiments, which will not be repeated here. Then, according to the identified lighting environment, combined with the zoom ratio and Table 4 in the foregoing embodiments, the image output mode 1 matching the current shooting scene is determined. For details, please refer to the foregoing embodiments, which will not be repeated here.
以相机模式1是录像模式为例,手机可以根据Adrc增益、DarkLuma和光亮度(lv),识别当前的光照环境。其中,在录像模式下,识别光照环境的细节可参考前述实施例,在此不再赘述。然后,根据识别出的光照环境,结合前述实施例中的表5,确定与当前拍摄场景匹配的出图模式1,具体细节可参考前述实施例,在此不再赘述。Taking camera mode 1 as video recording mode as an example, the mobile phone can identify the current lighting environment according to Adrc gain, DarkLuma and brightness (lv). Wherein, in the video recording mode, the details of identifying the lighting environment may refer to the foregoing embodiments, which will not be repeated here. Then, according to the identified lighting environment and in combination with Table 5 in the foregoing embodiments, an image output mode 1 matching the current shooting scene is determined. For details, reference may be made to the foregoing embodiments, which will not be repeated here.
S302,在出图模式1与目标相机传感器当前启用的出图模式不同的情况下,指示目标相机传感器无缝切换至出图模式1。S302. Instruct the target camera sensor to seamlessly switch to the image output mode 1 when the image output mode 1 is different from the image output mode currently enabled by the target camera sensor.
在一些实施例中,手机可以识别目标相机传感器当前所启用的出图模式,然后,将出图模式1与目标相机传感器当前所启用的出图模式进行比较。在出图模式1与正启用的出图模式相同的情况下,不进行出图模式的切换。在出图模式1与正启用的出图模式相同不同的情况下,指示目标相机传感器无缝切换至出图模式1,也即,采用seamless切换的方式,启用出图模式1。In some embodiments, the mobile phone may identify the image output mode currently enabled by the target camera sensor, and then compare image output mode 1 with the image output mode currently enabled by the target camera sensor. In the case that drawing mode 1 is the same as the drawing mode being activated, the switching of the drawing mode is not performed. In the case that image output mode 1 is the same as the currently enabled image output mode, instruct the target camera sensor to seamlessly switch to image output mode 1, that is, enable image output mode 1 by means of seamless switching.
作为一种实现方式,手机可以采用函数Updatelastresindex(cameraID),从存储位置1中,查询目标相机传感器最近一次记录的出图模式标识,作为正启用的出图模式的出图模式标识。然后,通过比较出图模式1的出图模式标识与正启用的出图模式的出图模式标识是否相同,判定是否进行模式切换。As an implementation manner, the mobile phone may use the function Updatelastresindex(cameraID) to query the latest image output mode ID recorded by the target camera sensor from the storage location 1 as the image output mode ID of the currently enabled image output mode. Then, by comparing whether the drawing mode identifier of the drawing mode 1 is the same as that of the drawing mode being activated, it is determined whether to switch the mode.
比如,目标相机传感器的cameraID为“1”,可以通过调用Updatelastresindex(1),确定获取到最近一次记录的目标相机传感器所对应的出图模式标识,比如,Updatelastresindex(1)反馈的出图模式标识是setting mode1。这样,在出图模式1的出图模式标识也是setting mode1时,判定不进行出图模式的切换。在出图模式1的出图模式标识不是setting mode1时,判定切换启用出图模式1。For example, if the cameraID of the target camera sensor is "1", you can call Updatelastresindex(1) to determine the output mode ID corresponding to the target camera sensor recorded last time, for example, the output mode ID fed back by Updatelastresindex(1) It is setting mode1. In this way, when the drawing mode flag of drawing mode 1 is also setting mode1, it is determined not to switch the drawing mode. When the drawing mode flag of drawing mode 1 is not setting mode1, it is determined to switch to enable drawing mode 1.
在确定需要切换出图模式1的情况下,手机判断目标相机传感器加载的模式参数与出图模式1所对应的模式参数是否属于同一FMC数据包。如果属于同一FMC数据包,可以进行seamless切换,实现细节参考后续实施例中的描述,在此暂不赘述。When it is determined that the image output mode 1 needs to be switched, the mobile phone determines whether the mode parameters loaded by the target camera sensor and the mode parameters corresponding to the image output mode 1 belong to the same FMC data packet. If they belong to the same FMC data packet, seamless switching can be performed. For implementation details, refer to the description in subsequent embodiments, and details will not be repeated here.
示例性地,专属配置参数是FMC数据包的情况下,该FMC数据包中还包括每个模式参数所对应的出图模式的标识。当然,专属配置参数是模式参数时,该专属配置参数中也包括该模式参数所对应的出图模式的标识。手机通过函数Getcustomsettings,可以从存储地址1中读取目标相机标识对应的出图模式标识,所读取的出图模式标识可以指示目标相机传感器当前所启用的出图模式。然后,将读取到的出图模式标识与专属配置参数1中的出图模式标识进行比较。其中,专属配置参数1包含出图模式1的模式参数以及出图模式1的出图模式标识。如果读取到的出图模式标识与专属配置参数1中另一个出图模式标识相同,执行seamless切换。Exemplarily, in the case that the exclusive configuration parameter is an FMC data packet, the FMC data packet further includes an identifier of a drawing mode corresponding to each mode parameter. Of course, when the exclusive configuration parameter is a mode parameter, the exclusive configuration parameter also includes the identifier of the drawing mode corresponding to the mode parameter. Through the function Getcustomsettings, the mobile phone can read the image output mode ID corresponding to the target camera ID from the storage address 1, and the read image output mode ID can indicate the image output mode currently enabled by the target camera sensor. Then, compare the read output mode identifier with the output mode identifier in the exclusive configuration parameter 1. Among them, the exclusive configuration parameter 1 includes the mode parameters of the image output mode 1 and the image output mode identifier of the image output mode 1. If the read output mode ID is the same as another output mode ID in dedicated configuration parameter 1, perform seamless switching.
在另一些实施例中,在seamless切换之后,目标相机传感器启用出图模式1。在目标相机传感器启用出图模式1之后,手机可以在存储位置1中,更新与目标相机标识对应的出图模式标识。更新后的出图模式标识可以出图模式1所对应的出图模式。可以理解的,相机传感器每次更新出图模式,都会在存储位置1中更新对应的出图模式标识,这样,可以确保存储位置1中所记录的出图模式标识,可以指示相机传感器当前启用的出图模式。In some other embodiments, after the seamless switching, the target camera sensor enables the output mode 1 . After the image output mode 1 is enabled by the target camera sensor, the mobile phone may update the image output mode identifier corresponding to the target camera identifier in the storage location 1. The updated drawing mode identifier may be the drawing mode corresponding to drawing mode 1. It can be understood that every time the camera sensor updates the image output mode, it will update the corresponding image output mode identifier in the storage location 1. In this way, it can be ensured that the image output mode identifier recorded in the storage location 1 can indicate the image output mode currently enabled by the camera sensor. Plot mode.
下面以手机在相机模式1下,依据拍摄场景,由默认出图模式切换出图模式1为例,介绍同一相机模式下,切换出图模式的实现细节。The following takes the mobile phone in camera mode 1 and switches from the default image output mode to image output mode 1 according to the shooting scene as an example to introduce the implementation details of switching image output modes in the same camera mode.
如图8所示,上述相机参数配置方法可以包括以下步骤:As shown in Figure 8, the above camera parameter configuration method may include the following steps:
S401,决策模块确定出图模式1与当前拍摄场景适配。S401. The decision-making module determines that image output mode 1 is suitable for the current shooting scene.
在一些实施例中,如果相机应用切换相机模式,可以通过相机服务通知决策模块。另外,如果相机应用响应用户的操作变更变焦倍率,也会通过相机服务向决策模块发送变更后的变焦倍率。这样,决策模块可以及时地获取到相机应用启用的变焦倍率。In some embodiments, if the camera application switches the camera mode, the decision module may be notified through the camera service. In addition, if the camera application changes the zoom ratio in response to the user's operation, it will also send the changed zoom ratio to the decision-making module through the camera service. In this way, the decision-making module can obtain the zoom ratio enabled by the camera application in time.
在相机应用未通知决策模块切换相机模式的情况下,决策模块可以识别当前的光照环境,并根据当前的光照环境和/或当前启用的变焦倍率,确定与当前拍摄场景适配的出图模式,也即,出图模式1。当然,具体实现细节可参考前述实施例中的S301,在此不再赘述。In the case that the camera application does not notify the decision-making module to switch the camera mode, the decision-making module can identify the current lighting environment, and determine the image output mode suitable for the current shooting scene according to the current lighting environment and/or the currently enabled zoom ratio, That is, drawing mode 1. Of course, for specific implementation details, reference may be made to S301 in the foregoing embodiments, and details are not repeated here.
在一些实施例中,在未接收到指示切换相机模式的通知的情况下,决策模块可以周期性地根据光照环境和/或最近一次接收到的变焦倍率,确定出图模式1。In some embodiments, the decision module may periodically determine the image output mode 1 according to the lighting environment and/or the last received zoom ratio if no notification indicating to switch the camera mode is received.
在另一些实施例中,在未接收到指示切换相机模式的通知的情况下,决策模块可以在接收到新的变焦倍率,或者,确定光照环境变化的情况下,根据光照环境和最近一次接收到的变焦倍率,确定出图模式1。In some other embodiments, when no notification indicating to switch the camera mode is received, the decision-making module may receive a new zoom ratio, or determine that the lighting environment changes, according to the lighting environment and the last received The zoom magnification to determine the output mode 1.
S402,决策模块向Sensor node发送出图模式标识1,该出图模式标识1与出图模式1对应。S402. The decision-making module sends a graph output mode identifier 1 to the Sensor node, where the graph output mode identifier 1 corresponds to the graph output mode 1.
S403,Sensor node确定出图模式1的模式参数也属于FMC数据包1。S403, the Sensor node determines that the mode parameter of the drawing mode 1 also belongs to the FMC data package 1.
在一些实施例中,Sensor node可以通过函数Getcustomsettings,从存储地址1中读取目标相机标识对应的出图模式标识。然后,将读取到的出图模式标识与专属配置参数1中的出图模式标识进行比较。其中,专属配置参数1包含出图模式1的模式参数以及出图模式1的出图模式标识。如果读取到的出图模式标识与专属配置参数1中任意一个出图模式标识相同,确定出图模式1的模式参数也属于FMC数据包1,也即,专属配置参数1是FMC数据包1。In some embodiments, the Sensor node can read the output mode identifier corresponding to the target camera identifier from storage address 1 through the function Getcustomsettings. Then, compare the read output mode identifier with the output mode identifier in the exclusive configuration parameter 1. Among them, the exclusive configuration parameter 1 includes the mode parameters of the image output mode 1 and the image output mode identifier of the image output mode 1. If the output mode identifier read is the same as any one of the output mode identifiers in the exclusive configuration parameter 1, it is determined that the mode parameters of the output mode 1 also belong to the FMC data package 1, that is, the exclusive configuration parameter 1 is the FMC data package 1 .
S404,Sensor node向目标相机驱动发送指示启用出图模式1的指令。S404, the Sensor node sends an instruction to the target camera driver to enable image output mode 1.
示例性地,在默认出图模式是binning出图模式的情况下,如果出图模式1是Remosaic出图模式,指示启用出图模式1的指令可以是INSENSORZOOM CROP。如果出图模式1是Idcg出图模式,指示启用出图模式1的指令可以是INSENSORZOOM IDCG。在默认出图模式不是binning出图模式、出图模式1是binning出图模式,或者,需从其他出图模式切换至binning出图模式的情况下,Sensor node向目标相机驱动发送指令“INSENSORZOOMBINNING”。Exemplarily, in the case that the default drawing mode is the binning drawing mode, if the drawing mode 1 is the Remosaic drawing mode, the command indicating to enable the drawing mode 1 may be INSENSORZOOM CROP. If the drawing mode 1 is the Idcg drawing mode, the instruction to enable the drawing mode 1 can be INSENSORZOOM IDCG. When the default image output mode is not binning image output mode, image output mode 1 is binning image output mode, or needs to be switched from other image output modes to binning image output mode, the Sensor node sends the command "INSENSORZOOMBINNING" to the target camera driver .
S405,目标相机驱动向目标相机传感器发送开关字段1。在FMC数据包1中开关字段1与出图模式1对应。S405, the target camera driver sends the switch field 1 to the target camera sensor. Switch field 1 in FMC packet 1 corresponds to drawing mode 1.
在一些实施例中,目标相机驱动接收到启用出图模式1的指令之后,可以判断目标相机传感器当前的出图模式是否与出图模式1相同。比如,可以比较相邻两次接收到的启用出图模式的指令是否相同,如果相同,可确定目标相机传感器当前的出图模式与出图模式1相同。如果不同,可确定目标相机传感器当前的出图模式与出图模式1不相同。In some embodiments, after the target camera driver receives the instruction to enable the image output mode 1, it may determine whether the current image output mode of the target camera sensor is the same as the image output mode 1. For example, it may be compared whether two adjacent received instructions for enabling the image output mode are the same, and if they are the same, it may be determined that the current image output mode of the target camera sensor is the same as image output mode 1. If not, it can be determined that the current image output mode of the target camera sensor is different from image output mode 1.
在目标相机传感器当前的出图模式与出图模式1不相同的情况下,目标相机驱动可以从FMC数据包1中获取与出图模式1对应的开关字段1,并发送给目标相机传感器。In the case that the current image output mode of the target camera sensor is different from image output mode 1, the target camera driver can obtain the switch field 1 corresponding to image output mode 1 from the FMC packet 1, and send it to the target camera sensor.
例如,出图模式1为第二出图模式,对应的开关字段1可以是第一信息,再例如,出图模式1为第三出图模式,对应的开关字段1可以是第二信息。再比如,出图模式1为第一出图模式,对应的开关字段1可以是第三信息。For example, the image output mode 1 is the second image output mode, and the corresponding switch field 1 may be the first information. For another example, the image output mode 1 is the third image output mode, and the corresponding switch field 1 may be the second information. For another example, the drawing mode 1 is the first drawing mode, and the corresponding switch field 1 may be the third information.
另外,开关字段(如,第一信息、第二信息和第三信息)的数据体积远小于对应出图模式的模式参数。通过写入开关字段指示目标相机传感器切换出图模式,相较于写入模式参数指示切换出图模式,实现更快捷。In addition, the data volume of the switch fields (eg, the first information, the second information and the third information) is much smaller than the mode parameter corresponding to the drawing mode. Instructing the target camera sensor to switch the image output mode by writing the switch field is faster than writing the mode parameter instruction to switch the image output mode.
S406,目标相机传感器在加载开关字段1之后,从FMC数据包1中加载出图模式1对应的模式参数。S406. After loading the switch field 1, the target camera sensor loads the mode parameters corresponding to the image output mode 1 from the FMC data packet 1.
这样,目标相机传感器可以按照出图模式1进行图像采集。通过上述步骤,目标相机传感器从默认出图模式切换至出图模式1,切换的实现过程可称为seamless切换。本申请实施例中,指示目标相机传感器完成seamless切换的过程中,不需目标相机传感器停止工作,也无需向目标相机传感器发送大体积的模式参数,只需发送轻量级的开关字段,就可以实现切换,方便快捷。In this way, the target camera sensor can perform image acquisition according to the drawing mode 1. Through the above steps, the target camera sensor is switched from the default image output mode to image output mode 1, and the switching process can be called seamless switching. In the embodiment of this application, in the process of instructing the target camera sensor to complete the seamless switching, it is not necessary for the target camera sensor to stop working, and it is not necessary to send a large volume of mode parameters to the target camera sensor. It is only necessary to send a lightweight switch field. To achieve switching, convenient and quick.
在切换启用出图模式1之后,手机可以显示采用出图模式1采集到的图像帧。比如,出图模式1是第二出图模式时,在第一界面中显示第二图像帧。出图模式1是第三出图模式时,在第一界面中显示第三图像帧。在出图模式由其他出图模式切回第一出图模式时,在第一界面显示第四图像帧。After switching to enable the image output mode 1, the mobile phone can display the image frames collected by the image output mode 1. For example, when the image output mode 1 is the second image output mode, the second image frame is displayed on the first interface. When image output mode 1 is the third image output mode, the third image frame is displayed on the first interface. When the image output mode is switched back to the first image output mode from other image output modes, the fourth image frame is displayed on the first interface.
示例性地,如图9所示,在相机应用启用拍照模式期间,手机可以显示拍照模式提供的拍照预览界面901。在拍摄预览界面901中,显示有来自主摄像头的图像帧902,也即,主摄像头的相机传感器可称为目标相机传感器。另外,拍摄预览界面901中还显示当前的变焦倍率为1X。Exemplarily, as shown in FIG. 9 , when the camera application activates the photographing mode, the mobile phone may display a photographing preview interface 901 provided by the photographing mode. In the shooting preview interface 901, an image frame 902 from the main camera is displayed, that is, the camera sensor of the main camera may be called a target camera sensor. In addition, the shooting preview interface 901 also displays that the current zoom ratio is 1X.
在手机识别当前所处的光照环境为亮环境,且显示拍摄预览界面901的情况下,目标相机传感器采用14bit的Idcg出图模式进行出图。When the mobile phone recognizes that the current lighting environment is a bright environment and displays the shooting preview interface 901 , the target camera sensor uses the 14bit Idcg image output mode to output images.
另外,在拍摄预览界面901中,还包括变焦栏902。该变焦栏902上显示有滑动窗口903。可以理解的,上述变焦栏902中不同的位置点,对应不同的变焦倍率。滑动窗口903与变焦栏902重叠的位置点所指示的变焦倍率,为当前选用的变焦倍率。另外,滑动窗口903还可以显示有当前选用的变焦倍率的数值。In addition, the shooting preview interface 901 also includes a zoom bar 902 . A slide window 903 is displayed on the zoom bar 902 . It can be understood that different positions in the zoom bar 902 correspond to different zoom ratios. The zoom magnification indicated by the point where the sliding window 903 overlaps the zoom bar 902 is the currently selected zoom magnification. In addition, the sliding window 903 can also display the numerical value of the currently selected zoom ratio.
在一些实施例中,在手机接收到用户在变焦栏902上的滑动操作时,可以确定接收到变焦操作。该滑动操作可以指示滑动窗口903调整与变焦栏902重叠的位置点,从而,指示修改选用的变焦倍率,在用户的滑动操作结束之后,手机可得到变更后的变焦倍率。比如,图9中所示,用户指示将选用的变焦倍率从1X修改为2X,在确定用户指示启用的变焦倍率变更为2X之后,手机可以显示拍摄预览界面904。该拍摄预览界面904中显示当前的变焦倍率为2X,该拍摄预览界面904依然显示来自主摄像头的图像帧,也即,目标相机传感器不变。In some embodiments, when the mobile phone receives the user's sliding operation on the zoom bar 902, it may determine that the zoom operation is received. The sliding operation can instruct the sliding window 903 to adjust the position overlapped with the zoom bar 902, thereby instructing to modify the selected zoom ratio. After the user's sliding operation is completed, the mobile phone can obtain the changed zoom ratio. For example, as shown in FIG. 9 , the user instructs to change the selected zoom ratio from 1X to 2X, and after it is determined that the zoom ratio enabled by the user instruction is changed to 2X, the mobile phone may display a shooting preview interface 904 . The shooting preview interface 904 shows that the current zoom ratio is 2X, and the shooting preview interface 904 still displays image frames from the main camera, that is, the target camera sensor remains unchanged.
不同的是,在手机识别当前所处的光照环境为亮环境,且显示拍摄预览界面904的情况下,目标相机传感器采用14bit的Idcg出图模式进行出图。The difference is that when the mobile phone recognizes that the current lighting environment is a bright environment and displays the shooting preview interface 904, the target camera sensor uses the 14bit Idcg image output mode to output images.
另外,在由拍摄预览界面901切换至拍摄预览界面904之间,目标相机传感器的出图模式发生了改变。当然,在出图模式改变的过程中,目标相机传感器不断流,也即,不停止工作。这样,在手机从显示摄预览界面901过渡至显示拍摄预览界面904的过程中,不出现黑屏。在确定出变焦倍率是2X之后,只需向目标相机传感器写入轻量级的开关字段,快速完成模式切换。In addition, when switching from the shooting preview interface 901 to the shooting preview interface 904 , the image output mode of the target camera sensor has changed. Of course, in the process of changing the drawing mode, the sensor of the target camera does not stop streaming, that is, does not stop working. In this way, when the mobile phone transitions from displaying the shooting preview interface 901 to displaying the shooting preview interface 904, no black screen appears. After determining that the zoom ratio is 2X, you only need to write a lightweight switch field to the target camera sensor to quickly complete the mode switching.
总之,同一相机模式下,切换不同的出图模式的过程中,只需往目标相机传感器写入轻量级的开关字段,实现快速的出图模式切换。相较于往相机传感器中写入切换后的出图模式的模式参数而言,减少写入数据量,缩短切换时间。In short, in the same camera mode, in the process of switching between different image output modes, you only need to write a lightweight switch field to the target camera sensor to achieve fast image output mode switching. Compared with writing the mode parameters of the switched output mode into the camera sensor, the amount of written data is reduced and the switching time is shortened.
在一些实施例中,相机应用运行期间,还可以响应用户的操作,切换启用不同的相机模式。比如,由拍照模式切换至人像模式,再比如,由人像模式切换至录像模式,再比如,由拍照模式切换至录像模式等。In some embodiments, during the running of the camera application, different camera modes may be switched and enabled in response to user operations. For example, switching from the photo mode to the portrait mode, another example, switching from the portrait mode to the video mode, and another example, switching from the photo mode to the video mode, etc.
下面以手机由相机模式1切换至相机模式2为例,介绍相机应用切换不同相机模式的实现细节。The following takes the mobile phone switching from camera mode 1 to camera mode 2 as an example to introduce the implementation details of the camera application switching between different camera modes.
如图10所示,上述相机参数配置方法还可以包括以下步骤:As shown in Figure 10, the above camera parameter configuration method may also include the following steps:
S501,相机应用检测到切换相机模式2的操作。S501 , the camera application detects an operation of switching the camera mode 2 .
在一些实施例中,手机显示相机模式1提供的应用界面期间,可以检测用户指示切换相机模式2的操作,如称为第二操作或第三操作。其中,上述第二操作和第三操作指示启用的相机模式2可以不同。比如,第二操作指示启用录像模式,第三操作指示启用人像模式。In some embodiments, when the mobile phone displays the application interface provided by the camera mode 1, it may detect the user's operation instructing to switch the camera mode 2, such as a second operation or a third operation. Wherein, the above-mentioned second operation and the third operation indicate that the enabled camera mode 2 may be different. For example, the second operation indicates enabling the video recording mode, and the third operation indicates enabling the portrait mode.
例如,如图11所示,手机显示拍照模式提供的拍摄预览界面901。该拍摄预览界面901中包括指示其他相机模式的控件,如,指示录像模式的控件1101。在手机检测到用户选中控件1101的操作,手机可以切换显示录像预览界面1102,也即,启用录像模式。在上述过程中,录像模式为相机模式2,用户选中控件1101的操作,可称为指示切换录像模式的操作。For example, as shown in FIG. 11 , the mobile phone displays a shooting preview interface 901 provided by the camera mode. The shooting preview interface 901 includes controls indicating other camera modes, for example, a control 1101 indicating a recording mode. When the mobile phone detects that the user selects the control 1101, the mobile phone can switch to display the video preview interface 1102, that is, enable the video recording mode. In the above process, the video recording mode is the camera mode 2, and the operation of selecting the control 1101 by the user may be referred to as an operation of instructing to switch the video recording mode.
再比如,手机检测到用户发出的指示切换相机模式2的语音口令,也可确定检测到指示切换相机模式2的操作。再比如,检测到指示切换相机模式2的手势,也可确定检测到指示切换相机模式2的操作。For another example, if the mobile phone detects a voice password issued by the user indicating to switch the camera mode 2, it may also determine that an operation indicating to switch the camera mode 2 is detected. For another example, if a gesture indicating to switch camera mode 2 is detected, it may also be determined that an operation indicating to switch camera mode 2 is detected.
S502,相机应用向Sensor node发送通知信息1,通知信息1指示需启用相机模式2。S502. The camera application sends notification information 1 to the Sensor node. The notification information 1 indicates that camera mode 2 needs to be enabled.
在一些实施例中,相机应用可以通过相机服务,调用HAL层的接口模块,向Sensornode发送通知信息1。In some embodiments, the camera application can call the interface module of the HAL layer through the camera service, and send notification information 1 to the Sensornode.
启用不同的相机模式2,手机所显示的预览界面类型不同,比如,手机响应于第二操作,可显示第二界面,该第二界面可以是第二类预览界面。手机响应于第三操作,可以显示第三界面,该第三界面可以是第三类预览界面,也即,第二界面和第三界面的类型可以不同。响应于第二操作,启用的相机模式2可称为第一类相机模式2,上述第一类相机模式2下可启用的相机传感器与相机模式1下可启用的相机传感器相同。Different camera modes 2 are enabled, and the types of preview interfaces displayed by the mobile phone are different. For example, the mobile phone may display a second interface in response to the second operation, and the second interface may be a second type of preview interface. In response to the third operation, the mobile phone may display a third interface, and the third interface may be a third-type preview interface, that is, the types of the second interface and the third interface may be different. In response to the second operation, the enabled camera mode 2 may be referred to as a first-type camera mode 2 , and the camera sensors that can be enabled in the first-type camera mode 2 are the same as the camera sensors that can be enabled in the camera mode 1 .
响应于第三操作,启用的相机模式2可称为第二类相机模式2,上述第二类相机模式2下可启用的相机传感器与相机模式1下可启用的相机传感器存在差异。In response to the third operation, the enabled camera mode 2 may be referred to as a second type of camera mode 2 , and the camera sensors that can be enabled in the second type of camera mode 2 are different from the camera sensors that can be enabled in camera mode 1 .
S503,Sensor node向目标相机驱动发送指示停止工作的信息。S503, the Sensor node sends information indicating to stop working to the target camera driver.
S504,目标相机驱动向目标相机传感器发送指示停止工作的信息。S504, the target camera driver sends information indicating to stop working to the target camera sensor.
S505,目标相机传感器停止图像采集。S505, the target camera sensor stops image acquisition.
S506,Sensor node确定相机模式2对应的相机传感器2与相机传感器1相同。S506. The Sensor node determines that the camera sensor 2 corresponding to the camera mode 2 is the same as the camera sensor 1.
在一些实施例中,上述S506与S503之间没有必然的先后顺序,均是Sensor node响应于通知信息1所执行的步骤。In some embodiments, there is no necessary sequence between the above S506 and S503, and they are all steps performed by the Sensor node in response to the notification information 1 .
在Sensor node接收到通知信息1后,可以判断相机模式2所对应的相机传感器2和相机模式1所对应的相机传感器1是否完全相同。其中,相机传感器2是启用相机模式2期间,可使用的摄像头的相机传感器。比如,相机传感器2包括前置摄像头1、前置摄像头2和后置摄像头1所对应的相机传感器,相机传感器1也包括前置摄像头1、前置摄像头2和后置摄像头1所对应的相机传感器,可确定相机传感器2与相机传感器1完全相同。再比如,相机传感器2包括前置摄像头1和后置摄像头1所对应的相机传感器,相机传感器1也包括前置摄像头1、前置摄像头2和后置摄像头1所对应的相机传感器,可确定相机传感器2与相机传感器1不完全相同。After the Sensor node receives the notification information 1, it can determine whether the camera sensor 2 corresponding to the camera mode 2 is exactly the same as the camera sensor 1 corresponding to the camera mode 1. Wherein, camera sensor 2 is the camera sensor of the camera that can be used when camera mode 2 is enabled. For example, camera sensor 2 includes camera sensors corresponding to front camera 1, front camera 2, and rear camera 1, and camera sensor 1 also includes camera sensors corresponding to front camera 1, front camera 2, and rear camera 1. , it can be determined that camera sensor 2 is identical to camera sensor 1. For another example, camera sensor 2 includes camera sensors corresponding to front camera 1 and rear camera 1, and camera sensor 1 also includes camera sensors corresponding to front camera 1, front camera 2, and rear camera 1. Sensor 2 is not exactly the same as camera sensor 1.
在相机传感器2和相机传感器1不完全相同的情况下,比如,响应于第三操作,显示第三界面之后,需要控制相机传感器1下电,再控制相机传感器1上电。然后,指示相机传感器2配置公共参数,在公共参数配置完成之后,流程进入S507。在相机传感器2和相机传感器1完全相同的情况下,比如,响应于第二操作,显示第二界面之后,流程进入S507。In the case that the camera sensor 2 is not exactly the same as the camera sensor 1, for example, after the third interface is displayed in response to the third operation, it is necessary to control the camera sensor 1 to be powered off, and then control the camera sensor 1 to be powered on. Then, instruct the camera sensor 2 to configure public parameters, and after the configuration of the public parameters is completed, the process goes to S507. In the case that the camera sensor 2 is identical to the camera sensor 1, for example, after the second interface is displayed in response to the second operation, the process goes to S507.
S507,Sensor node从XML中,获取与相机模式2对应的FMC数据包2。S507. The Sensor node obtains the FMC data packet 2 corresponding to the camera mode 2 from the XML.
在一些实施例中,相机模式2对应的专属配置参数也属于预先配置的相机参数。这样,XML中也可以存储有相机模式2的专属配置参数。In some embodiments, the dedicated configuration parameters corresponding to camera mode 2 also belong to pre-configured camera parameters. In this way, the exclusive configuration parameters of the camera mode 2 can also be stored in the XML.
在一些实施例中,Sensor node从XML中,获取与相机模式2对应的专属配置参数。在该实施例中,以相机模式2是支持多种出图模式的相机模式为例,相机模式2所对应的专属配置参数也可以是FMC数据包,如称为FMC数据包2。该FMC数据包2与FMC数据包1类似,但是,二者对应不同相机模式,所包含的模式参数、开关字段及出图模式标识等内容可以能不同。另外,该FMC数据包2可以标记有相机模式2的标识,这样,Sensor node可以直接从XML中读出该FMC数据包2。In some embodiments, the Sensor node obtains the dedicated configuration parameters corresponding to the camera mode 2 from the XML. In this embodiment, taking camera mode 2 as an example that supports multiple output modes, the dedicated configuration parameters corresponding to camera mode 2 may also be FMC data packets, such as FMC data packet 2 . The FMC data packet 2 is similar to the FMC data packet 1, but the two correspond to different camera modes, and may contain different content such as mode parameters, switch fields, and drawing mode identifiers. In addition, the FMC data packet 2 can be marked with the identifier of the camera mode 2, so that the Sensor node can directly read the FMC data packet 2 from XML.
在其他可能的实施例中,如果相机模式2仅支持一种出图模式,相机模式2对应的专属配置参数可以是该出图模式对应的模式参数。这样,Sensor node获取相机模式2的模式参数之后,可以通过目标相机驱动,指示目相机传感器加载该模式参数,实现启用相机模式2所支持的出图模式。In other possible embodiments, if the camera mode 2 supports only one image output mode, the dedicated configuration parameters corresponding to the camera mode 2 may be the mode parameters corresponding to the image output mode. In this way, after the Sensor node obtains the mode parameters of the camera mode 2, it can instruct the target camera sensor to load the mode parameters through the target camera driver, so as to enable the output mode supported by the camera mode 2.
示例性地,在响应第二操作,显示第二界面之后,往目标相机传感器(也即,第一相机传感器)写入的FMC数据包2可以是第二数据包。在第一类相机模式2支持第四出图模式的情况下,第二数据包可以包括第四出图模式对应的模式参数,也即,第五配置参数,该第五配置参数中包括启用第四出图模式的相机参数(或称为属性参数)中,除公共参数之外的部分。另外,在第二数据包中还包括其他出图模式的模式参数时,该第四出图模式在第二数据包中,还对应有第二标识,目标相机传感器在加载公共参数之后,具备识别第二标识,并基于第二标识,触发加载第五配置参数的能力。Exemplarily, after the second interface is displayed in response to the second operation, the FMC data packet 2 written to the target camera sensor (that is, the first camera sensor) may be the second data packet. In the case that the first type of camera mode 2 supports the fourth drawing mode, the second data packet may include mode parameters corresponding to the fourth drawing mode, that is, the fifth configuration parameter, which includes enabling the fourth drawing mode In the camera parameters (or called attribute parameters) of the four-out image mode, the part other than the common parameters. In addition, when the second data packet also includes mode parameters of other image output modes, the fourth image output mode also has a second identification in the second data packet. After the target camera sensor is loaded with public parameters, it has the ability to identify The second identification, based on the second identification, triggers the ability to load the fifth configuration parameter.
又示例性地,在响应第三操作,显示第三界面之后,往目标相机传感器(也即,第二相机传感器)写入的FMC数据包2可以是第三数据包。在第二类相机模式2支持第五出图模式的情况下,第三数据包可以包括第五出图模式对应的模式参数,也即,第六配置参数,该第六配置参数中包括启用第五出图模式的相机参数(或称为属性参数)中,除公共参数之外的部分。另外,在第三数据包中还包括其他出图模式的模式参数时,该第五出图模式在第三数据包中,还对应有第三标识,目标相机传感器在加载公共参数之后,具备识别第三标识,并基于第三标识,触发加载第六配置参数的能力。As another example, after the third interface is displayed in response to the third operation, the FMC data packet 2 written to the target camera sensor (that is, the second camera sensor) may be the third data packet. In the case that the second type of camera mode 2 supports the fifth drawing mode, the third data packet may include the mode parameters corresponding to the fifth drawing mode, that is, the sixth configuration parameter, which includes enabling the fifth drawing mode Among the camera parameters (or called attribute parameters) of the five-image output mode, the part other than the common parameters. In addition, when the third data packet also includes mode parameters of other image output modes, the fifth image output mode in the third data packet also corresponds to a third identification, and the target camera sensor is capable of identifying The third identification, based on the third identification, triggers the ability to load the sixth configuration parameter.
S508,Sensor node向目标相机驱动发送FMC数据包2。S508, the Sensor node sends the FMC data packet 2 to the target camera driver.
S509,目标相机驱动向目标相机传感器发送FMC数据包2。S509, the target camera driver sends the FMC data packet 2 to the target camera sensor.
S510,目标相机传感器配置FMC数据包2。S510, the target camera sensor configures FMC data packet 2.
在一些实施例中,配置FMC数据包2的实现细节可参考前述实施例中配置FMC数据包1的过程,在此不再赘述。In some embodiments, for the implementation details of configuring the FMC data package 2, reference may be made to the process of configuring the FMC data package 1 in the foregoing embodiments, which will not be repeated here.
S511,目标相机传感器向目标相机驱发送完成通知3。S511, the target camera sensor sends a completion notification 3 to the target camera driver.
S512,目标相机驱向Sensor node发送完成通知3。S512. The target camera drives to send a completion notification 3 to the Sensor node.
S513,Sensor node向目标相机驱发送起流指令。S513, the Sensor node sends a stream instruction to the target camera driver.
S514,目标相机驱动向目标相机传感器发送起流指令。S514, the target camera driver sends a flow command to the target camera sensor.
S515,目标相机传感器按照FMC数据包2所对应的默认出图模式,进行出图。S515. The target camera sensor outputs an image according to the default image output mode corresponding to the FMC data packet 2.
在一些实施例中,上述S511~S515的实现细节可参考前述实施例中的S218~S222,在此不再赘述。In some embodiments, for implementation details of the foregoing S511-S515, reference may be made to S218-S222 in the foregoing embodiments, and details are not repeated here.
示例性地,往目标相机传感器写入的FMC数据包2是第二数据包的情况下,目标相机传感器出图之后,手机可以在第二界面中显示第五图像帧,第五图像帧是目标相机传感器采用所述第四出图模式得到的图像。For example, when the FMC data packet 2 written to the target camera sensor is the second data packet, after the target camera sensor outputs the image, the mobile phone can display the fifth image frame on the second interface, and the fifth image frame is the target The camera sensor adopts the image obtained by the fourth image output mode.
示例性地,往目标相机传感器写入的FMC数据包2是第三数据包的情况下,目标相机传感器出图之后,手机可以在第三界面中显示第六图像帧,第六图像帧是目标相机传感器采用所述第五出图模式得到的图像。For example, when the FMC data packet 2 written to the target camera sensor is the third data packet, after the target camera sensor outputs the image, the mobile phone can display the sixth image frame on the third interface, and the sixth image frame is the target The image obtained by the camera sensor using the fifth image output mode.
可以理解的,显示第二界面期间(也即,启用第一类相机模式2期间),可启用的相机传感器和显示第三界面期间(也即,启用第二类相机模式2期间),可启用的相机传感器存在差异,这样,第一相机传感器和第二相机传感器可以是同一相机传感器,也可以是不同的相机传感器。It can be understood that during the display of the second interface (that is, during the activation of the first type of camera mode 2), the enabled camera sensor and during the display of the third interface (that is, during the activation of the second type of camera mode 2), the enableable There are differences in the camera sensors, such that the first camera sensor and the second camera sensor may be the same camera sensor or different camera sensors.
在上述S501~S515所描述的相机模式的切换过程中,在相机模式1和相机模式2对应的相机传感器不变的情况下,不用再次下发公共参数,减少往目标相机传感器写入的数据量,有效缩短相机模式切换所需时长。In the switching process of camera modes described in S501-S515 above, if the camera sensors corresponding to camera mode 1 and camera mode 2 remain unchanged, there is no need to send public parameters again, reducing the amount of data written to the target camera sensor , which effectively shortens the time required for camera mode switching.
另外,第一类预览界面、第二类预览界面和第三类预览界面可以是包括:拍照预览界面、视频录制界面和人像拍摄界面中的任意一种。上述第一类预览界面、第二类预览界面和第三类预览界面可以不同。In addition, the first type of preview interface, the second type of preview interface and the third type of preview interface may be any one of: a photo preview interface, a video recording interface, and a portrait shooting interface. The above-mentioned first type preview interface, second type preview interface and third type preview interface may be different.
在一些实施例中,如图12所示,手机配置目标相机传感器的出图模式以及切换出图模式的过程如下:首先,目标相机传感器需要接收公共参数并进行配置。然后,在需要启用出图模式3的情况下,目标相机传感器接收并配置模式参数3,该模式参数3是出图模式3对应的专属配置参数,这样,目标相机传感器可以按照模式参数3所对应的出图模式3进行出图。在接收并配置模式参数3之后,如果需要切换启用出图模式4,目标相机传感器可以暂停工作(stream off),然后,接收并配置模式参数4,该模式参数4是出图模式4对应的专属配置参数。这样,目标相机传感器可以按照模式参数4所对应的出图模式4进行出图。In some embodiments, as shown in FIG. 12 , the mobile phone configures the image output mode of the target camera sensor and switches the image output mode as follows: First, the target camera sensor needs to receive public parameters and perform configuration. Then, when it is necessary to enable image output mode 3, the target camera sensor receives and configures mode parameter 3, which is a dedicated configuration parameter corresponding to image output mode 3. In this way, the target camera sensor can follow the corresponding mode parameter 3 The drawing mode 3 is used to export the drawing. After receiving and configuring mode parameter 3, if you need to switch to enable image output mode 4, the target camera sensor can suspend work (stream off), and then receive and configure mode parameter 4, which is exclusive to image output mode 4 configuration parameters. In this way, the target camera sensor can output images according to the image output mode 4 corresponding to the mode parameter 4 .
当然,在目标相机传感器接收并配置公共参数之后,如果需要直接启用出图模式4,也可以直接接收并配置模式参数4,这样,目标相机传感器可以按照出图模式4进行出图。同样,在接收并配置模式参数4之后,如果需要切换启用出图模式3,目标相机传感器可以暂停工作(stream off),然后,接收并配置模式参数3。这样,目标相机传感器可以按照出图模式3进行出图。Of course, after the target camera sensor receives and configures the public parameters, if the image output mode 4 needs to be directly enabled, the mode parameter 4 can also be directly received and configured, so that the target camera sensor can output images according to the image output mode 4. Similarly, after receiving and configuring the mode parameter 4, if it is necessary to switch to enable the drawing mode 3, the target camera sensor can suspend work (stream off), and then receive and configure the mode parameter 3. In this way, the target camera sensor can output images according to image output mode 3.
显然,在上述过程中,无论出图模式3和出图模式4是否属于同一相机模式,进行切换的过程中,目标相机传感器都需要stream off,这将直接影响手机显示画面的流畅性,同时,每次切换时,都需写入大体积的专属配置参数,切换耗时更长。Obviously, in the above process, regardless of whether the image output mode 3 and the image output mode 4 belong to the same camera mode, the target camera sensor needs to be stream off during the switching process, which will directly affect the fluency of the display screen of the mobile phone. At the same time, Every time you switch, you need to write a large volume of exclusive configuration parameters, and the switch takes longer.
本申请实施例中,如图13所示,手机配置目标相机传感器的出图模式以及切换出图模式的过程如下:In the embodiment of the present application, as shown in FIG. 13 , the mobile phone configures the image output mode of the target camera sensor and switches the image output mode as follows:
首先,目标相机传感器需要接收公共参数并进行配置。First, the target camera sensor needs to receive public parameters and configure them.
在确定启用相机模式1之后,接收并配置相机模式1对应的FMC数据包1。例如,上述FMC数据包1包含出图模式a、出图模式b和出图模式c的模式参数。配置FMC数据包1的过程可参考前述实施例中的S217。在出图模式a是相机模式1的默认出图模式的情况下,目标相机传感器配置FMC数据包1之后,可以按照出图模式a进行出图。After it is determined that camera mode 1 is enabled, FMC data packet 1 corresponding to camera mode 1 is received and configured. For example, the above-mentioned FMC data packet 1 includes mode parameters of drawing mode a, drawing mode b, and drawing mode c. For the process of configuring the FMC data package 1, reference may be made to S217 in the foregoing embodiments. In the case that image output mode a is the default image output mode of camera mode 1, after the target camera sensor is configured with FMC data package 1, it can output images according to image output mode a.
之后,目标相机传感器可以依据拍摄场景变化,在出图模式a、出图模式b和出图模式c之间做seamless切换。比如,接收并加载出图模式b对应的开关字段b,按照出图模式b进行出图。在按照出图模式b进行出图之后,如果接收并加载出图模式c对应的开关字段c,按照出图模式c进行出图。当然,还可以通过接收并加载出图模式a对应的开关字段a,重新切换至按照出图模式a进行出图。Afterwards, the target camera sensor can seamlessly switch between image output mode a, image output mode b, and image output mode c according to the change of the shooting scene. For example, receive and load the switch field b corresponding to the output mode b, and output the image according to the output mode b. After outputting the image according to the output mode b, if the switch field c corresponding to the output mode c is received and loaded, the image is output according to the output mode c. Of course, by receiving and loading the switch field a corresponding to the drawing mode a, it is also possible to re-switch to outputting the drawing according to the drawing mode a.
可以理解的,同一相机模式下,多个出图模式间的seamless切换顺序,可以根据实际的拍摄场景变化情况而定。任意两个出图模式进行切换的过程中,目标相机传感器只需接收所需切换的出图模式的开关字段。该开关字段的数据体积小,接收和加载速度较快,能够快速实现同相机模式下的出图模式切换,另外,切换期间不断流,不会影响手机所显示内容的流畅性。It can be understood that in the same camera mode, the order of seamless switching between multiple output modes can be determined according to the actual shooting scene changes. In the process of switching between any two image output modes, the target camera sensor only needs to receive the switch field of the image output mode to be switched. The data size of the switch field is small, and the receiving and loading speed is fast, which can quickly realize the switching of the image output mode under the same camera mode. In addition, the continuous flow during the switching period will not affect the smoothness of the content displayed on the mobile phone.
在确定由相机模式1切换至另一个相机模式之后,如,确定切换至相机模式2的情况下,目标相机传感器需要暂停工作,也即,需要stream off,然后,接收并配置相机模式2对应的FMC数据包2,包含出图模式d和出图模式e的模式参数。其中,上述出图模式d和出图模式e均是相机模式2所支持的出图模式,出图模式d是相机模式2的默认出图模式。After it is determined to switch from camera mode 1 to another camera mode, for example, when it is determined to switch to camera mode 2, the target camera sensor needs to suspend work, that is, stream off is required, and then receive and configure the corresponding FMC data packet 2, including mode parameters of drawing mode d and drawing mode e. Wherein, the above image output mode d and image output mode e are both image output modes supported by camera mode 2, and image output mode d is the default image output mode of camera mode 2.
在配置FMC数据包2之后,目标相机传感器可以再次起流。目标相机传感器起流之后,目标相机传感器可以按照出图模式d进行出图。After configuring the FMC package 2, the target camera sensor can be streamed again. After the target camera sensor is activated, the target camera sensor can output images according to image output mode d.
之后,在运行相机模式2期间,目标相机传感器可以依据拍摄场景变化,在出图模式d和出图模式e之间做seamless切换。比如,接收并加载出图模式e对应的开关字段e,按照出图模式e进行出图。在按照出图模式e进行出图之后,如果接收并加载出图模式d对应的开关字段d,也可以切换至按照出图模式d进行出图。Afterwards, during the operation of camera mode 2, the target camera sensor can seamlessly switch between the image output mode d and the image output mode e according to the change of the shooting scene. For example, receive and load the switch field e corresponding to the drawing mode e, and output the drawing according to the drawing mode e. After outputting the image according to the outputting mode e, if the switch field d corresponding to the outputting mode d is received and loaded, it can also be switched to outputting the image according to the outputting mode d.
可以理解地,上述相机模式1和相机模式2可以是相机应用中任意两个支持多出图模式的相机模式。比如,相机应用中支持多出图模式的相机模式包括拍照模式、录像模式和人像模式。上述相机模式1和相机模式2可以分别为拍照模式和录像模式,也可以分别为录像模式和人像模式,还可以分别为拍照模式和人像模式,本申请实施例对此不作具体限定。It can be understood that the aforementioned camera mode 1 and camera mode 2 may be any two camera modes in the camera application that support the multi-image output mode. For example, the camera modes that support multiple output modes in the camera application include photo mode, video mode and portrait mode. The above-mentioned camera mode 1 and camera mode 2 may be a photo mode and a video mode, respectively, or a video mode and a portrait mode, or a photo mode and a portrait mode, which are not specifically limited in this embodiment of the present application.
另外,在相机模式1和相机模式2所对应的相机传感器不完全相同,但,目标相机传感器相同的情况下,从相机模式1切换至相机模式2之前,目标相机传感器可以还需下电,并重新上电,然后,重新接受并配置公共参数,之后,再接收并配置FMC数据包2。In addition, when the camera sensors corresponding to camera mode 1 and camera mode 2 are not exactly the same, but the target camera sensor is the same, before switching from camera mode 1 to camera mode 2, the target camera sensor may need to be powered off, and Power on again, then accept and configure the public parameters again, and then receive and configure FMC packet 2.
当然,在目标相机传感器接收并配置公共参数之后,如果需要直接启用相机模式2,也可以直接接收并配置FMC数据包2,这样,目标相机传感器可以按照出图模式d进行出图。之后,可以在相机模式2所支持的出图模式之间作seamless切换。同样,在接收并配置FMC数据包2之后,如果需要切换启用相机模式1,目标相机传感器可以暂停工作(streamoff),然后,接收并配置FMC数据包1。这样,目标相机传感器可以按照出图模式a进行出图。之后,可以在相机模式1所支持的出图模式之间作seamless切换。Of course, after the target camera sensor receives and configures the public parameters, if the camera mode 2 needs to be directly enabled, the FMC data packet 2 can also be directly received and configured, so that the target camera sensor can output images according to the output mode d. Afterwards, you can seamlessly switch between the output modes supported by camera mode 2. Similarly, after receiving and configuring the FMC data packet 2, if it is necessary to switch to enable the camera mode 1, the target camera sensor can suspend work (streamoff), and then receive and configure the FMC data packet 1 . In this way, the target camera sensor can output images according to image output mode a. Afterwards, you can seamlessly switch between the output modes supported by camera mode 1.
在本申请实施例中,支持多个出图模式的相机模式也可以与仅支持一个出图模式的相机模式进行切换。如图14所述,手机配置目标相机传感器的出图模式以及切换出图模式的过程如下:In the embodiment of the present application, the camera mode supporting multiple drawing modes may also be switched with the camera mode supporting only one drawing mode. As shown in Figure 14, the mobile phone configures the image output mode of the target camera sensor and switches the image output mode as follows:
首先,目标相机传感器需要接收公共参数并进行配置。First, the target camera sensor needs to receive public parameters and configure them.
在确定启用相机模式2之后,接收并配置相机模式2对应的FMC数据包2。例如,上述FMC数据包2包含出图模式d和出图模式e的模式参数。配置FMC数据包2的过程可参考前述实施例中的S217。在出图模式d是相机模式2的默认出图模式的情况下,目标相机传感器配置FMC数据包2之后,可以按照出图模式d进行出图。After the camera mode 2 is determined to be enabled, the FMC data packet 2 corresponding to the camera mode 2 is received and configured. For example, the above-mentioned FMC data packet 2 includes mode parameters of drawing mode d and drawing mode e. For the process of configuring the FMC data package 2, reference may be made to S217 in the foregoing embodiments. In the case that image output mode d is the default image output mode of camera mode 2, after the target camera sensor is configured with FMC data package 2, it can output images according to image output mode d.
之后,目标相机传感器可以依据拍摄场景变化,在出图模式d和出图模式e之间做seamless切换。在确定由相机模式2切换至另一个相机模式之后,如,确定切换至相机模式3的情况下,目标相机传感器需要暂停工作,也即,需要stream off。在此示例中,相机模式3是仅支持一种出图模式的相机模式示例。然后,接收并配置相机模式3的模式参数5。这样,目标相机传感器可以按照模式参数5指示的出图模式f进行出图。Afterwards, the target camera sensor can seamlessly switch between the image output mode d and the image output mode e according to the change of the shooting scene. After it is determined to switch from camera mode 2 to another camera mode, for example, in the case of determining to switch to camera mode 3, the target camera sensor needs to suspend work, that is, needs to stream off. In this example, camera mode 3 is an example of a camera mode that supports only one drawing mode. Then, the mode parameter 5 of the camera mode 3 is received and configured. In this way, the target camera sensor can output images according to the image output mode f indicated by the mode parameter 5.
可以理解的,上述相机模式2为相机应用中支持多类出图模式的相机模式示例,比如,可以是拍照模式、人像模式以及路线模式等,本申请实施例不作具体限定。It can be understood that the above-mentioned camera mode 2 is an example of a camera mode that supports multiple image output modes in the camera application, for example, it may be a camera mode, a portrait mode, and a route mode, etc., which are not specifically limited in this embodiment of the present application.
当然,在目标相机传感器接收并配置公共参数之后,如果需要直接启用相机模式3,也可以直接接收并配置模式参数5,这样,目标相机传感器可以按照出图模式f进行出图。同样,在接收并配置模式参数5之后,如果需要切换启用相机模式2,目标相机传感器可以暂停工作(stream off),然后,接收并配置FMC数据包2。这样,目标相机传感器可以按照出图模式d进行出图。之后,可以在相机模式2所支持的出图模式之间作seamless切换。Of course, after the target camera sensor receives and configures the public parameters, if the camera mode 3 needs to be directly enabled, the mode parameter 5 can also be directly received and configured, so that the target camera sensor can output images according to the output mode f. Similarly, after receiving and configuring the mode parameter 5, if it is necessary to switch to enable the camera mode 2, the target camera sensor can suspend work (stream off), and then receive and configure the FMC data packet 2. In this way, the target camera sensor can output images according to image output mode d. Afterwards, you can seamlessly switch between the output modes supported by camera mode 2.
本申请实施例还提供一种电子设备,该电子设备可以包括:存储器和一个或多个处理器。该存储器和处理器耦合。该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令。当处理器执行计算机指令时,可使得电子设备执行上述实施例中手机执行的各个步骤。当然,该电子设备包括但不限于上述存储器和一个或多个处理器。The embodiment of the present application also provides an electronic device, and the electronic device may include: a memory and one or more processors. The memory is coupled to the processor. The memory is used to store computer program code comprising computer instructions. When the processor executes the computer instructions, the electronic device can be made to perform various steps performed by the mobile phone in the above-mentioned embodiments. Of course, the electronic device includes, but is not limited to, the aforementioned memory and one or more processors.
本申请实施例还提供一种芯片系统,该芯片系统可以应用于前述实施例中的电子设备。该芯片系统包括至少一个处理器和至少一个接口电路。该处理器可以是上述电子设备中的处理器。处理器和接口电路可通过线路互联。该处理器可以通过接口电路从上述电子设备的存储器接收并执行计算机指令。当计算机指令被处理器执行时,可使得电子设备执行上述实施例中手机执行的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。An embodiment of the present application further provides a chip system, which can be applied to the electronic device in the foregoing embodiments. The chip system includes at least one processor and at least one interface circuit. The processor may be the processor in the above-mentioned electronic device. The processor and interface circuitry may be interconnected by wires. The processor can receive and execute computer instructions from the memory of the above-mentioned electronic device through the interface circuit. When the computer instructions are executed by the processor, the electronic device can be made to perform various steps performed by the mobile phone in the above-mentioned embodiments. Of course, the chip system may also include other discrete devices, which is not specifically limited in this embodiment of the present application.
在一些实施例中,通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。In some embodiments, through the above description of the implementation, those skilled in the art can clearly understand that for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, it can be based on If necessary, the above-mentioned function allocation is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. For the specific working process of the above-described system, device, and unit, reference may be made to the corresponding process in the foregoing method embodiments, and details are not repeated here.
在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。Each functional unit in each embodiment of the embodiment of the present application may be integrated into one processing unit, or each unit may physically exist separately, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage The medium includes several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk, and other various media capable of storing program codes.
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。The above is only the specific implementation of the embodiment of the application, but the protection scope of the embodiment of the application is not limited thereto, and any changes or replacements within the technical scope disclosed in the embodiment of the application shall be covered by this application. Within the scope of protection of the application examples. Therefore, the protection scope of the embodiments of the present application should be based on the protection scope of the claims.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310503448.4A CN116567407B (en) | 2023-05-04 | 2023-05-04 | Camera parameter configuration method and electronic equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310503448.4A CN116567407B (en) | 2023-05-04 | 2023-05-04 | Camera parameter configuration method and electronic equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN116567407A true CN116567407A (en) | 2023-08-08 |
| CN116567407B CN116567407B (en) | 2024-05-03 |
Family
ID=87494041
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310503448.4A Active CN116567407B (en) | 2023-05-04 | 2023-05-04 | Camera parameter configuration method and electronic equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN116567407B (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117692799A (en) * | 2023-08-26 | 2024-03-12 | 荣耀终端有限公司 | Photography method and related equipment |
| CN117714837A (en) * | 2023-08-31 | 2024-03-15 | 荣耀终端有限公司 | Camera parameter configuration method and electronic equipment |
| CN117979147A (en) * | 2023-11-20 | 2024-05-03 | 荣耀终端有限公司 | Camera control method and electronic device |
| WO2024093518A1 (en) * | 2022-11-01 | 2024-05-10 | 荣耀终端有限公司 | Image readout mode switching method and related device |
| WO2025179568A1 (en) * | 2024-02-29 | 2025-09-04 | 荣耀终端股份有限公司 | Data processing method and electronic device |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180160042A1 (en) * | 2016-12-05 | 2018-06-07 | Shanghai Xiaoyi Technology Co., Ltd. | Apparatus and method for controlling camera array |
| CN112532857A (en) * | 2019-09-18 | 2021-03-19 | 华为技术有限公司 | Shooting method and equipment for delayed photography |
| CN115526787A (en) * | 2022-02-28 | 2022-12-27 | 荣耀终端有限公司 | Video processing method and device |
| CN115550541A (en) * | 2022-04-22 | 2022-12-30 | 荣耀终端有限公司 | Camera parameter configuration method and electronic equipment |
| CN116033275A (en) * | 2023-03-29 | 2023-04-28 | 荣耀终端有限公司 | A kind of automatic exposure method, electronic equipment and computer-readable storage medium |
| CN116055890A (en) * | 2022-08-29 | 2023-05-02 | 荣耀终端有限公司 | Method and electronic device for generating high dynamic range video |
-
2023
- 2023-05-04 CN CN202310503448.4A patent/CN116567407B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20180160042A1 (en) * | 2016-12-05 | 2018-06-07 | Shanghai Xiaoyi Technology Co., Ltd. | Apparatus and method for controlling camera array |
| CN112532857A (en) * | 2019-09-18 | 2021-03-19 | 华为技术有限公司 | Shooting method and equipment for delayed photography |
| CN115526787A (en) * | 2022-02-28 | 2022-12-27 | 荣耀终端有限公司 | Video processing method and device |
| CN115550541A (en) * | 2022-04-22 | 2022-12-30 | 荣耀终端有限公司 | Camera parameter configuration method and electronic equipment |
| CN116055890A (en) * | 2022-08-29 | 2023-05-02 | 荣耀终端有限公司 | Method and electronic device for generating high dynamic range video |
| CN116033275A (en) * | 2023-03-29 | 2023-04-28 | 荣耀终端有限公司 | A kind of automatic exposure method, electronic equipment and computer-readable storage medium |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2024093518A1 (en) * | 2022-11-01 | 2024-05-10 | 荣耀终端有限公司 | Image readout mode switching method and related device |
| CN117692799A (en) * | 2023-08-26 | 2024-03-12 | 荣耀终端有限公司 | Photography method and related equipment |
| CN117692799B (en) * | 2023-08-26 | 2024-10-22 | 荣耀终端有限公司 | A shooting method and related equipment |
| CN117714837A (en) * | 2023-08-31 | 2024-03-15 | 荣耀终端有限公司 | Camera parameter configuration method and electronic equipment |
| CN117714837B (en) * | 2023-08-31 | 2024-12-06 | 荣耀终端有限公司 | Camera parameter configuration method and electronic device |
| CN117979147A (en) * | 2023-11-20 | 2024-05-03 | 荣耀终端有限公司 | Camera control method and electronic device |
| WO2025179568A1 (en) * | 2024-02-29 | 2025-09-04 | 荣耀终端股份有限公司 | Data processing method and electronic device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116567407B (en) | 2024-05-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN116567407B (en) | Camera parameter configuration method and electronic equipment | |
| CN115550541B (en) | Camera parameter configuration method and electronic device | |
| CN111491102B (en) | Detection method and system for photographing scene, mobile terminal and storage medium | |
| CN115689963B (en) | Image processing method and electronic equipment | |
| CN108737739A (en) | A kind of preview screen acquisition method, preview screen harvester and electronic equipment | |
| CN115883957B (en) | Shooting mode recommendation method | |
| CN110049247B (en) | Image optimization method and device, electronic equipment and readable storage medium | |
| CN108513069A (en) | Image processing method, image processing device, storage medium and electronic equipment | |
| US20090160945A1 (en) | Systems and Methods for Enhancing Image Quality of a Web Camera Image | |
| EP4543031A1 (en) | Photographing method and electronic device | |
| WO2024179109A1 (en) | Photographing method and electronic device | |
| CN114926351B (en) | Image processing method, electronic device and computer storage medium | |
| WO2023160221A1 (en) | Image processing method and electronic device | |
| WO2023160220A1 (en) | Image processing method and electronic device | |
| CN115472140A (en) | Display method, display device, electronic device and readable storage medium | |
| EP2629505A1 (en) | Apparatus and method for image processing | |
| CN111835941A (en) | Image generation method and apparatus, electronic device, computer-readable storage medium | |
| CN118555468A (en) | Shooting method, graphical interface and electronic equipment | |
| CN117692781A (en) | Flicker light source detection method and electronic equipment | |
| US20260019702A1 (en) | Image Readout Mode Switching Method and Related Device | |
| CN117714837B (en) | Camera parameter configuration method and electronic device | |
| CN117560574B (en) | A shooting method, electronic device and readable storage medium | |
| US20250380058A1 (en) | Image processing method and electronic device | |
| CN119653225A (en) | Photographing method and folding screen device | |
| CN118828188A (en) | Shooting method, device, electronic device and medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address | ||
| CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |