技术领域Technical Field
本公开涉及图像处理技术领域,尤其涉及一种图像拍摄方法、装置、摄像设备及存储介质。The present disclosure relates to the field of image processing technology, and in particular to an image shooting method, device, camera equipment and storage medium.
背景技术Background technique
随着图像处理技术的发展以及在各种摄像设备中的广泛应用,目前已经实现了一种稳定高效的图像处理流程,即首先采用摄像设备采集图像,然后再采用图像处理算法对采集的图像进行进一步处理,以得到最终输出的图像。With the development of image processing technology and its wide application in various camera devices, a stable and efficient image processing process has been realized. That is, firstly, the camera device is used to capture the image, and then the image processing algorithm is used to further process the captured image to obtain the final output image.
相关技术中,摄像设备通过ISP采集原始图像,采用图像处理算法为原始图像添加滤镜效果,但是在拍摄图像时,由于摄像设备的CPU(Central Processing Unit,中央处理器)性能限制,摄像设备不支持采用图像处理算法实时对高分辨率的图像添加滤镜效果。In the related art, a camera device collects original images through an ISP and uses an image processing algorithm to add a filter effect to the original image. However, when shooting images, due to the performance limitation of the CPU (Central Processing Unit) of the camera device, the camera device does not support the use of an image processing algorithm to add a filter effect to a high-resolution image in real time.
发明内容Summary of the invention
为克服相关技术中存在的问题,本公开提供一种图像拍摄方法、装置、摄像设备及存储介质。In order to overcome the problems existing in the related art, the present disclosure provides an image capturing method, an apparatus, a camera device and a storage medium.
根据本公开实施例的第一方面,提供一种图像拍摄方法,所述方法包括:According to a first aspect of an embodiment of the present disclosure, there is provided an image capturing method, the method comprising:
获取原始图像数据;Get the original image data;
通过图像信号处理器,对所述原始图像数据进行滤镜效果处理和图像格式转换,得到第一图像数据,所述滤镜效果处理用于生成目标滤镜效果;Performing filter effect processing and image format conversion on the original image data through an image signal processor to obtain first image data, wherein the filter effect processing is used to generate a target filter effect;
根据所述第一图像数据,生成目标图像。A target image is generated according to the first image data.
在一些实施例中,所述图像信号处理器包括色彩空间转换模块,所述通过图像信号处理器,对所述原始图像数据进行所述滤镜效果处理和所述图像格式转换,得到所述第一图像数据,包括:In some embodiments, the image signal processor includes a color space conversion module, and the image signal processor performs the filter effect processing and the image format conversion on the original image data to obtain the first image data, including:
通过所述色彩空间转换模块,对所述原始图像数据进行所述滤镜效果处理和所述图像格式转换,得到所述第一图像数据。The color space conversion module performs the filter effect processing and the image format conversion on the original image data to obtain the first image data.
在一些实施例中,所述通过图像信号处理器,对所述原始图像数据进行滤镜效果处理和图像格式转换,得到第一图像数据,包括:In some embodiments, the performing filter effect processing and image format conversion on the original image data by an image signal processor to obtain the first image data includes:
根据所述目标滤镜效果,获取所述目标滤镜效果对应的融合参数,所述融合参数用于转换所述原始图像数据的图像格式以及为所述原始图像数据生成所述目标滤镜效果;According to the target filter effect, acquiring a fusion parameter corresponding to the target filter effect, wherein the fusion parameter is used to convert the image format of the original image data and generate the target filter effect for the original image data;
通过所述图像信号处理器,基于所述融合参数对所述原始图像数据进行所述滤镜效果处理和所述图像格式转换,得到所述第一图像数据。The image signal processor performs the filter effect processing and the image format conversion on the original image data based on the fusion parameters to obtain the first image data.
在一些实施例中,所述融合参数根据用于转换所述原始图像数据的图像格式的转换参数以及为所述原始图像数据生成所述目标滤镜效果的滤镜转换参数确定。In some embodiments, the fusion parameter is determined according to a conversion parameter for converting an image format of the original image data and a filter conversion parameter for generating the target filter effect for the original image data.
在一些实施例中,所述融合参数包括第一融合参数和融合偏差参数;所述转换参数包括第一转换参数和转换偏差参数;所述融合参数按照下述方式确定:In some embodiments, the fusion parameter includes a first fusion parameter and a fusion deviation parameter; the conversion parameter includes a first conversion parameter and a conversion deviation parameter; the fusion parameter is determined in the following manner:
将所述第一转换参数与所述滤镜转换参数的乘积作为所述第一融合参数;将所述转换偏差参数与所述滤镜转换参数的乘积作为所述融合偏差参数。The product of the first conversion parameter and the filter conversion parameter is used as the first fusion parameter; the product of the conversion deviation parameter and the filter conversion parameter is used as the fusion deviation parameter.
在一些实施例中,所述基于所述融合参数对所述原始图像数据进行所述滤镜效果处理和所述图像格式转换,得到所述第一图像数据,包括:In some embodiments, performing the filter effect processing and the image format conversion on the original image data based on the fusion parameter to obtain the first image data includes:
将所述原始图像数据对应的预设通道参数与所述第一融合参数的乘积与所述融合偏差参数的和作为所述第一图像数据对应的预设通道参数。The product of the preset channel parameter corresponding to the original image data and the first fusion parameter and the sum of the fusion deviation parameter are used as the preset channel parameter corresponding to the first image data.
在一些实施例中,所述根据所述目标滤镜效果,获取所述目标滤镜效果对应的融合参数,包括:In some embodiments, obtaining, according to the target filter effect, a fusion parameter corresponding to the target filter effect includes:
根据滤镜效果与对应的所述融合参数的映射关系,获取所述目标滤镜效果对应的融合参数。According to the mapping relationship between the filter effect and the corresponding fusion parameter, the fusion parameter corresponding to the target filter effect is obtained.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
根据所述滤镜效果的标识与对应的融合参数,建立所述目标滤镜效果与对应的所述融合参数的映射关系;According to the identifier of the filter effect and the corresponding fusion parameter, a mapping relationship between the target filter effect and the corresponding fusion parameter is established;
根据所述映射关系,将所述目标滤镜效果的标识与对应的融合参数对应存储。According to the mapping relationship, the identifier of the target filter effect and the corresponding fusion parameter are stored in correspondence.
根据本公开实施例的第二方面,提供一种图像拍摄装置,所述装置包括:According to a second aspect of an embodiment of the present disclosure, there is provided an image capturing device, the device comprising:
数据获取模块,被配置为获取原始图像数据;A data acquisition module is configured to acquire raw image data;
图像信号处理器,被配置为对所述原始图像数据进行滤镜效果处理和图像格式转换,得到第一图像数据,所述滤镜效果处理用于生成目标滤镜效果;an image signal processor configured to perform filter effect processing and image format conversion on the original image data to obtain first image data, wherein the filter effect processing is used to generate a target filter effect;
生成模块,被配置为根据所述第一图像数据,生成目标图像。The generating module is configured to generate a target image according to the first image data.
在一些实施例中,所述图像信号处理器包括色彩空间转换模块,所述色彩空间转换模块被配置为对所述原始图像数据进行所述滤镜效果处理和所述图像格式转换,得到所述第一图像数据。In some embodiments, the image signal processor includes a color space conversion module, and the color space conversion module is configured to perform the filter effect processing and the image format conversion on the original image data to obtain the first image data.
在一些实施例中,所述图像信号处理器,被配置为:In some embodiments, the image signal processor is configured to:
根据所述目标滤镜效果,获取所述目标滤镜效果对应的融合参数,所述融合参数用于转换所述原始图像数据的图像格式以及为所述原始图像数据生成所述目标滤镜效果;According to the target filter effect, acquiring a fusion parameter corresponding to the target filter effect, wherein the fusion parameter is used to convert the image format of the original image data and generate the target filter effect for the original image data;
基于所述融合参数对所述原始图像数据进行所述滤镜效果处理和所述图像格式转换,得到所述第一图像数据。The filter effect processing and the image format conversion are performed on the original image data based on the fusion parameters to obtain the first image data.
在一些实施例中,所述融合参数根据用于转换所述原始图像数据的图像格式的转换参数以及为所述原始图像数据生成所述目标滤镜效果的滤镜转换参数确定。In some embodiments, the fusion parameter is determined according to a conversion parameter for converting an image format of the original image data and a filter conversion parameter for generating the target filter effect for the original image data.
在一些实施例中,所述融合参数包括第一融合参数和融合偏差参数;所述转换参数包括第一转换参数和转换偏差参数;所述融合参数按照下述方式确定:In some embodiments, the fusion parameter includes a first fusion parameter and a fusion deviation parameter; the conversion parameter includes a first conversion parameter and a conversion deviation parameter; the fusion parameter is determined in the following manner:
将所述第一转换参数与所述滤镜转换参数的乘积作为所述第一融合参数;将所述转换偏差参数与所述滤镜转换参数的乘积作为所述融合偏差参数。The product of the first conversion parameter and the filter conversion parameter is used as the first fusion parameter; the product of the conversion deviation parameter and the filter conversion parameter is used as the fusion deviation parameter.
在一些实施例中,所述图像信号处理器,被配置为将所述原始图像数据对应的预设通道参数与所述第一融合参数的乘积与所述融合偏差参数的和作为所述第一图像数据对应的预设通道参数。In some embodiments, the image signal processor is configured to use the product of the preset channel parameter corresponding to the original image data and the first fusion parameter and the sum of the fusion deviation parameter as the preset channel parameter corresponding to the first image data.
在一些实施例中,所述图像信号处理器,被配置为根据滤镜效果与对应的所述融合参数的映射关系,从所述摄像设备中获取所述目标滤镜效果对应的融合参数。In some embodiments, the image signal processor is configured to obtain the fusion parameters corresponding to the target filter effect from the camera device according to a mapping relationship between the filter effect and the corresponding fusion parameters.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
关系建立模块,被配置为根据所述滤镜效果的标识与对应的融合参数,建立所述滤镜效果与对应的所述融合参数的映射关系;a relationship establishing module, configured to establish a mapping relationship between the filter effect and the corresponding fusion parameter according to the identifier of the filter effect and the corresponding fusion parameter;
参数存储模块,被配置为根据所述映射关系,将所述目标滤镜效果的标识与对应的融合参数存储在所述摄像设备内。The parameter storage module is configured to store the identifier of the target filter effect and the corresponding fusion parameter in the camera device according to the mapping relationship.
根据本公开实施例的第三方面,提供一种摄像设备,包括:According to a third aspect of an embodiment of the present disclosure, there is provided an imaging device, including:
处理器;processor;
用于存储处理器可执行指令的存储器;a memory for storing processor-executable instructions;
其中,所述处理器被配置为执行如本公开实施例的第一方面中任一项所述的图像拍摄方法。The processor is configured to execute the image capturing method as described in any one of the first aspects of the embodiments of the present disclosure.
根据本公开实施例的第四方面,提供一种非临时性计算机可读存储介质,当所述存储介质中的指令由摄像设备的处理器执行时,使得摄像设备能够执行如本公开实施例的第一方面中任一项所述的图像拍摄方法。According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a camera device, the camera device can execute an image capture method as described in any one of the first aspects of an embodiment of the present disclosure.
采用本公开的上述方法,具有以下有益效果:The above method of the present disclosure has the following beneficial effects:
本公开提供的图像拍摄方法,在获取到原始图像数据后,直接通过图像信号处理器,对原始图像数据进行滤镜效果处理和图像格式转换,即通过图像信号处理器实现了图像格式转换和为原始图像数据生成目标滤镜效果的功能,相比于相关技术中采用图像处理算法为原始图像添加滤镜效果,本公开提供的方案,直接由图像信号处理器为原始图像数据生成目标滤镜效果,不再受CPU性能的限制,能够为高分辨率的图像添加滤镜。The image shooting method provided by the present disclosure, after acquiring the original image data, directly uses an image signal processor to process the filter effect and convert the image format of the original image data, that is, the image signal processor realizes the functions of image format conversion and generating target filter effects for the original image data. Compared with the related art that uses image processing algorithms to add filter effects to the original image, the solution provided by the present disclosure directly generates the target filter effects for the original image data by the image signal processor, is no longer limited by the CPU performance, and can add filters to high-resolution images.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
图1是根据一示例性的实施例示出的一种图像拍摄方法的流程图;FIG1 is a flow chart showing an image capturing method according to an exemplary embodiment;
图2是根据一示例性的实施例示出的一种图像拍摄方法的流程图;FIG2 is a flow chart showing an image capturing method according to an exemplary embodiment;
图3是根据一示例性的实施例示出的一种滤镜效果的示意图;FIG3 is a schematic diagram showing a filter effect according to an exemplary embodiment;
图4是根据一示例性的实施例示出的一种图像处理过程的流程图;FIG4 is a flow chart showing an image processing process according to an exemplary embodiment;
图5是根据一示例性的实施例示出的一种相关技术中的图像处理过程的流程图;FIG5 is a flowchart showing an image processing process in a related art according to an exemplary embodiment;
图6是根据一示例性的实施例示出的一种图像拍摄过程的流程图;FIG6 is a flow chart showing an image capturing process according to an exemplary embodiment;
图7是根据一示例性的实施例示出的一种图像处理流程;FIG7 is a flow chart showing an image processing process according to an exemplary embodiment;
图8是根据一示例性的实施例示出的一种相关技术中的图像处理流程;FIG8 is an image processing flow in a related art shown according to an exemplary embodiment;
图9是根据一示例性的实施例示出的一种分辨率和帧率选择的示意图;FIG9 is a schematic diagram showing a resolution and frame rate selection according to an exemplary embodiment;
图10是根据一示例性的实施例示出的一种图像拍摄装置的装置框图;FIG10 is a device block diagram showing an image capturing device according to an exemplary embodiment;
图11是根据一示例性的实施例示出的一种摄像设备的框图。FIG. 11 is a block diagram showing a camera device according to an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
本公开实施例提供的图像拍摄方法,由摄像设备执行,该摄像设备可以为智能手机、平板电脑等具有摄像功能的电子设备。The image capturing method provided in the embodiments of the present disclosure is executed by a camera device, which may be an electronic device with a camera function, such as a smart phone or a tablet computer.
图1是根据一示例性的实施例示出的一种图像拍摄方法的流程图,参见图1,本公开实施例的执行主体为摄像设备,该方法包括以下步骤:FIG. 1 is a flow chart of an image capturing method according to an exemplary embodiment. Referring to FIG. 1 , the execution subject of the embodiment of the present disclosure is a camera device, and the method includes the following steps:
步骤S101,获取原始图像数据。Step S101, obtaining original image data.
其中,原始图像数据为摄像设备中的相机模组直接采集得到、未经过处理的图像数据,该原始图像数据可以为RAW格式的图像数据;该原始图像数据可以为采用RGB(RedGreen Blue,红绿蓝)格式的数据,即该原始图像数据为采用矩阵表示的、包含各个像素点的RGB值的数据。Among them, the original image data is the image data directly collected by the camera module in the camera device and has not been processed. The original image data may be image data in RAW format; the original image data may be data in RGB (RedGreenBlue) format, that is, the original image data is data represented by a matrix and contains the RGB value of each pixel.
步骤S102,通过图像信号处理器,对原始图像数据进行滤镜效果处理和图像格式转换,得到第一图像数据,滤镜效果处理用于生成目标滤镜效果。Step S102: performing filter effect processing and image format conversion on the original image data through an image signal processor to obtain first image data. The filter effect processing is used to generate a target filter effect.
本公开实施例中,摄像设备包括图像信号处理器,在获取到原始图像数据后,通过该图像信号处理器,为该原始图像数据生成目标滤镜效果,并对该原始图像数据进行图像格式转换。其中,滤镜效果是指通过改变图像数据以在对应的图像中添加特效或者调整图像的色彩,例如,滤镜效果可以为在图像中添加爱心特效、眼镜特效等。In the disclosed embodiment, the camera device includes an image signal processor. After acquiring the original image data, the image signal processor generates a target filter effect for the original image data and performs image format conversion on the original image data. The filter effect refers to adding special effects to the corresponding image or adjusting the color of the image by changing the image data. For example, the filter effect can be adding a love effect, glasses effect, etc. to the image.
示例地,图像传感器生成RAW格式的图像数据,将RAW格式的图像数据传输至图像信号处理器(Image Signal Processing,ISP),ISP可以将RAW格式的图像数据转换为高效影像容器(High Efficiency Image Container,HEIC)、便携式网络图形(PortableNetwork Graphics,JPG)等格式的图像数据。并且,在转换图像格式的同时,能够为原始图像数据生成目标滤镜效果。For example, the image sensor generates image data in RAW format, and transmits the image data in RAW format to an image signal processor (ISP), which can convert the image data in RAW format into image data in formats such as High Efficiency Image Container (HEIC), Portable Network Graphics (JPG), etc. Moreover, while converting the image format, it can generate a target filter effect for the original image data.
步骤103,根据第一图像数据,生成目标图像。Step 103: Generate a target image according to the first image data.
本公开实施例中,在通过图像信号处理器得到第一图像数据之后,能够直接基于该第一图像数据得到目标图像,也可以继续采用图像处理算法,对该第一图像数据进行处理,再基于处理后的第一图像数据得到目标图像。In the disclosed embodiment, after obtaining the first image data through the image signal processor, the target image can be obtained directly based on the first image data, or the image processing algorithm can be continued to be used to process the first image data and then obtain the target image based on the processed first image data.
本公开提供的图像拍摄方法,在获取到原始图像数据后,直接通过图像信号处理器,对原始图像数据进行滤镜效果处理和图像格式转换,即通过图像信号处理器实现了图像格式转换和为原始图像数据生成目标滤镜效果的功能,相比于相关技术中采用图像处理算法为原始图像添加滤镜效果,本公开提供的方案,直接由图像信号处理器为原始图像数据生成目标滤镜效果,不再受CPU性能的限制,能够为高分辨率的图像添加滤镜。并且,将图像格式转换和生成滤镜效果的功能通过ISP这一硬件模块实现,在不需要改变摄像设备的硬件结构的情况下,使用ISP这一硬件模块实现了生成滤镜效果的功能。The image shooting method provided by the present disclosure, after acquiring the original image data, directly performs filter effect processing and image format conversion on the original image data through the image signal processor, that is, the image format conversion and the function of generating the target filter effect for the original image data are realized through the image signal processor. Compared with the related art that uses the image processing algorithm to add the filter effect to the original image, the scheme provided by the present disclosure directly generates the target filter effect for the original image data by the image signal processor, which is no longer limited by the CPU performance and can add filters to high-resolution images. In addition, the functions of image format conversion and filter effect generation are realized through the ISP hardware module, and the function of generating filter effect is realized by using the ISP hardware module without changing the hardware structure of the camera device.
图2是根据一示例性的实施例示出的一种图像拍摄方法的流程图,参见图2,本公开实施例的执行主体为摄像设备,该方法包括以下步骤:FIG. 2 is a flow chart of an image capturing method according to an exemplary embodiment. Referring to FIG. 2 , the execution subject of the embodiment of the present disclosure is a camera device, and the method includes the following steps:
步骤S201,获取原始图像数据。Step S201, obtaining original image data.
其中,原始图像数据为摄像设备中的相机模组直接采集得到、未经过处理的图像数据,该原始图像数据可以为RGB格式的数据,即该原始图像数据为采用矩阵表示的、包含各个像素点的RGB值的数据,该原始图像数据也可以被称为RAW格式的图像数据。例如,原始图像数据可以表示为下述矩阵:The raw image data is the image data directly acquired by the camera module in the camera device and not processed. The raw image data may be data in RGB format, that is, the raw image data is data represented by a matrix and contains the RGB values of each pixel. The raw image data may also be referred to as RAW format image data. For example, the raw image data may be represented by the following matrix:
其中,R包括各个像素点的R值,G包括各个像素点的G值,B包括各个像素点的B值。Among them, R includes the R value of each pixel point, G includes the G value of each pixel point, and B includes the B value of each pixel point.
在一些实施例中,摄像设备中的相机模组包括图像传感器,通过该图像传感器采集场景的原始图像数据。In some embodiments, the camera module in the camera device includes an image sensor, through which raw image data of the scene is collected.
步骤S202,根据目标滤镜效果,获取目标滤镜效果对应的融合参数。Step S202: acquiring a fusion parameter corresponding to the target filter effect according to the target filter effect.
其中,目标滤镜效果为用户从提供的多个滤镜效果中选择的滤镜效果,目标滤镜效果对应的融合参数用于转换原始图像数据的图像格式以及为原始图像数据生成目标滤镜效果,该融合参数包含用于转换图像格式的参数信息以及用于生成目标滤镜效果的参数信息。每个滤镜效果具有对应的融合参数,且摄像设备中的融合参数为提前存储在该摄像设备中的参数,在图像拍摄过程中,直接从存储的多个融合参数中获取所选择的目标滤镜效果对应的融合参数即可。The target filter effect is a filter effect selected by the user from a plurality of provided filter effects, and the fusion parameters corresponding to the target filter effect are used to convert the image format of the original image data and generate the target filter effect for the original image data, and the fusion parameters include parameter information for converting the image format and parameter information for generating the target filter effect. Each filter effect has a corresponding fusion parameter, and the fusion parameters in the camera device are parameters stored in advance in the camera device. During the image capture process, the fusion parameters corresponding to the selected target filter effect can be directly obtained from the stored multiple fusion parameters.
在一些实施例中,融合参数根据用于转换原始图像数据的图像格式的转换参数以及为原始图像数据生成目标滤镜效果的滤镜转换参数确定。其中,原始图像数据的图像格式为RGB格式,转换参数用于将RGB格式转换为YUV格式(YCbCr,一种像素格式)或者其他图像格式;滤镜转换参数用于表示对应的滤镜效果,不同滤镜效果对应的滤镜转换参数不同。In some embodiments, the fusion parameters are determined according to conversion parameters for converting the image format of the original image data and filter conversion parameters for generating the target filter effect for the original image data. The image format of the original image data is RGB format, and the conversion parameters are used to convert the RGB format into YUV format (YCbCr, a pixel format) or other image formats; the filter conversion parameters are used to represent the corresponding filter effect, and different filter effects correspond to different filter conversion parameters.
在一些实施例中,转换参数包括第一转换参数和转换偏差参数,该第一转换参数用于将原始图像数据的RGB格式转换为其他图像格式,转换偏差参数用于调整在进行图像格式转换时原始图像数据产生的偏差。确定融合参数的方式包括:将第一转换参数与滤镜转换参数的乘积作为第一融合参数;将转换偏差参数与滤镜转换参数的乘积作为融合偏差参数。In some embodiments, the conversion parameters include a first conversion parameter and a conversion deviation parameter, wherein the first conversion parameter is used to convert the RGB format of the original image data into other image formats, and the conversion deviation parameter is used to adjust the deviation generated by the original image data when performing the image format conversion. The method of determining the fusion parameter includes: taking the product of the first conversion parameter and the filter conversion parameter as the first fusion parameter; taking the product of the conversion deviation parameter and the filter conversion parameter as the fusion deviation parameter.
例如,以原始图像数据属于BT601标准为例,第一转换参数为:For example, taking the original image data as belonging to the BT601 standard, the first conversion parameter is:
转换偏差参数为:The conversion bias parameter is:
滤镜转换参数为:The filter conversion parameters are:
则第一融合参数为下述公式的计算结果:Then the first fusion parameter is the calculation result of the following formula:
融合偏差参数为下述公式的计算结果:The fusion deviation parameter is the result of the following formula:
需要说明的是,本公开实施例中的融合参数可以是由其他电子设备采用上述实施方式确定,然后发送给本公开实施例中的摄像设备存储的,也可以是由本公开实施例中的摄像设备在进行图像拍摄之前采用上述实施方式确定,然后存储下来的,本公开实施例对此不做限制。It should be noted that the fusion parameters in the embodiment of the present disclosure may be determined by other electronic devices using the above-mentioned implementation mode and then sent to the camera device in the embodiment of the present disclosure for storage, or may be determined by the camera device in the embodiment of the present disclosure using the above-mentioned implementation mode before image capture and then stored. The embodiment of the present disclosure does not impose any restrictions on this.
本公开实施例中,滤镜效果与对应的融合参数的映射关系是指每个滤镜效果与融合参数之间一一对应。该映射关系存储在摄像设备中,在用户选择目标滤镜效果之后,根据该映射关系,从摄像设备中获取与所选择的目标滤镜效果对应的融合参数。In the disclosed embodiment, the mapping relationship between the filter effect and the corresponding fusion parameter refers to a one-to-one correspondence between each filter effect and the fusion parameter. The mapping relationship is stored in the camera device, and after the user selects a target filter effect, the fusion parameter corresponding to the selected target filter effect is obtained from the camera device according to the mapping relationship.
在一些实施例中,根据滤镜效果的标识与对应的融合参数,建立滤镜效果与对应的融合参数的映射关系,该映射关系中包括滤镜效果的标识以及对应的融合参数;根据映射关系,将滤镜效果的标识与对应的融合参数存储在摄像设备内。这种情况下,根据滤镜效果与对应的融合参数的映射关系,从摄像设备中获取目标滤镜效果对应的融合参数,包括:根据映射关系以及所选择的目标滤镜效果的标识,从摄像设备中获取该标识对应的融合参数。In some embodiments, a mapping relationship between the filter effect and the corresponding fusion parameter is established according to the identifier of the filter effect and the corresponding fusion parameter, and the mapping relationship includes the identifier of the filter effect and the corresponding fusion parameter; according to the mapping relationship, the identifier of the filter effect and the corresponding fusion parameter are stored in the camera device. In this case, according to the mapping relationship between the filter effect and the corresponding fusion parameter, the fusion parameter corresponding to the target filter effect is obtained from the camera device, including: according to the mapping relationship and the identifier of the selected target filter effect, the fusion parameter corresponding to the identifier is obtained from the camera device.
可选的,摄像设备在拍摄过程中,用户从多个滤镜效果中选择一个滤镜效果,相机组件基于所选择的滤镜效果的标识,产生携带该标识的图像拍摄请求,然后摄像设备基于该图像拍摄请求中携带的标识以及映射关系,获取该标识对应的融合参数。Optionally, during the shooting process of the camera device, the user selects a filter effect from multiple filter effects, and the camera component generates an image shooting request carrying the identifier of the selected filter effect based on the identifier. Then the camera device obtains the fusion parameter corresponding to the identifier based on the identifier carried in the image shooting request and the mapping relationship.
可选的,摄像设备将不同的滤镜效果对应的融合参数保存在不同的表格中,从摄像设备中获取滤镜效果对应的融合参数包括:从表格中读取滤镜效果对应的融合参数。Optionally, the camera device stores fusion parameters corresponding to different filter effects in different tables, and obtaining the fusion parameters corresponding to the filter effect from the camera device includes: reading the fusion parameters corresponding to the filter effect from the table.
在一些实施例中,摄像设备安装有相机应用,在通过相机应用拍摄图像时,在拍摄界面中显示多个滤镜效果,然后用户可以从多个滤镜效果中选择想要的滤镜效果。例如,参见图3所示的滤镜效果的示意图。In some embodiments, the camera device is installed with a camera application, and when shooting an image through the camera application, multiple filter effects are displayed in the shooting interface, and then the user can select a desired filter effect from the multiple filter effects. For example, see the schematic diagram of the filter effect shown in FIG. 3.
另外,在一些实施例中,滤镜效果对应的滤镜转换参数可以是通过不断调试获取的。即根据滤镜效果最终的显示效果,先设置初始的滤镜转换参数,然后基于该初始的滤镜转换参数和用于调试的图像数据,确定添加滤镜效果后的图像数据,如果添加滤镜效果后的图像数据达到的显示效果不是该滤镜效果最终的显示效果,则调整初始的滤镜转换参数,直至添加滤镜效果后的图像数据达到的显示效果不是该滤镜效果最终的显示效果。In addition, in some embodiments, the filter conversion parameters corresponding to the filter effect may be obtained through continuous debugging. That is, according to the final display effect of the filter effect, the initial filter conversion parameters are first set, and then based on the initial filter conversion parameters and the image data used for debugging, the image data after adding the filter effect is determined, and if the display effect achieved by the image data after adding the filter effect is not the final display effect of the filter effect, the initial filter conversion parameters are adjusted until the display effect achieved by the image data after adding the filter effect is not the final display effect of the filter effect.
需要说明的是,获取目标滤镜效果对融合参数的步骤,可以由摄像设备的处理器执行,也可以由图像信号处理器执行,本公开实施例对此不做限制。It should be noted that the step of obtaining the fusion parameters of the target filter effect may be executed by a processor of the camera device or by an image signal processor, and the embodiments of the present disclosure do not impose any limitation on this.
步骤S203,通过图像信号处理器,基于融合参数对原始图像数据进行滤镜效果处理和图像格式转换,得到第一图像数据。Step S203: Using an image signal processor, filter effect processing and image format conversion are performed on the original image data based on the fusion parameters to obtain first image data.
本公开实施例中,通过图像信号处理器,基于融合参数,转换原始图像数据的图像格式以及为原始图像数据生成目标滤镜效果,得到的第一图像数据为已转换图像格式且具有目标滤镜效果的图像数据。In the disclosed embodiment, an image signal processor is used to convert the image format of the original image data based on fusion parameters and generate a target filter effect for the original image data, and the obtained first image data is image data with a converted image format and a target filter effect.
在一些实施例中,通过图像信号处理器,将原始图像数据对应的预设通道参数与第一融合参数的乘积与融合偏差参数的和作为第一图像数据对应的预设通道参数。In some embodiments, an image signal processor uses a sum of a product of a preset channel parameter corresponding to the original image data and a first fusion parameter and a fusion deviation parameter as a preset channel parameter corresponding to the first image data.
其中,原始图像数据对应的预设通道参数为RGB三个通道的通道参数,而目标图像数对应的预设通道参数则是转换后的图像格式对应的通道参数,以将RGB格式转换为YUV格式为例,第一图像数据对应的预设通道参数则为YUV三个通道的通道参数。Among them, the preset channel parameters corresponding to the original image data are the channel parameters of the three RGB channels, and the preset channel parameters corresponding to the target image number are the channel parameters corresponding to the converted image format. Taking the conversion of RGB format to YUV format as an example, the preset channel parameters corresponding to the first image data are the channel parameters of the three YUV channels.
例如,第一图像数据对应的预设通道参数可以表示为下述矩阵:For example, the preset channel parameters corresponding to the first image data can be expressed as the following matrix:
其中,Y包括各个像素点的Y值,U包括各个像素点的U值,V包括各个像素点的V值。Among them, Y includes the Y value of each pixel point, U includes the U value of each pixel point, and V includes the V value of each pixel point.
例如,第一图像数据对应的预设通道参数的过程可以采用下述公式表示:For example, the process of presetting channel parameters corresponding to the first image data can be expressed by the following formula:
需要说明的是,本公开实施例仅是采用第一转换参数与滤镜转换参数的乘积的形式来表示第一融合参数,采用转换偏差参数与滤镜转换参数的乘积的形式来表示融合偏差参数,在实际应用中,采用的是的计算结果以及/>的计算结果。It should be noted that the embodiment of the present disclosure only uses the product of the first conversion parameter and the filter conversion parameter to represent the first fusion parameter, and uses the product of the conversion deviation parameter and the filter conversion parameter to represent the fusion deviation parameter. In practical applications, the product of the first conversion parameter and the filter conversion parameter is used to represent the fusion deviation parameter. The calculation results and /> The calculation result of .
另外,在一些实施例中,图像信号处理器包括色彩空间转换(Color SpaceTransformation,CST)模块,通过图像信号处理器,对原始图像数据进行滤镜效果处理和图像格式转换,得到第一图像数据,包括:通过色彩空间转换模块,对原始图像数据进行滤镜效果处理和图像格式转换,得到第一图像数据。通过色彩空间转换模块进行处理的具体实施方式与步骤S203中的实施方式同理,在此不再赘述。In addition, in some embodiments, the image signal processor includes a color space conversion (Color Space Transformation, CST) module, and the image signal processor performs filter effect processing and image format conversion on the original image data to obtain the first image data, including: performing filter effect processing and image format conversion on the original image data through the color space conversion module to obtain the first image data. The specific implementation of processing through the color space conversion module is the same as the implementation in step S203, and will not be repeated here.
步骤S204,根据第一图像数据,生成目标图像。Step S204: generating a target image according to the first image data.
本公开实施例中,在通过图像信号处理器,得到第一图像数据之后,能够直接基于该第一图像数据得到目标图像,也可以继续采用图像处理算法,对该第一图像数据进行处理,再基于处理后的第一图像数据得到目标图像,例如采用图像处理算法,增强第一图像数据的画质或者实现其他功能,本公开实施例对此不做限制。In the embodiment of the present disclosure, after obtaining the first image data through the image signal processor, the target image can be obtained directly based on the first image data, or the image processing algorithm can be continued to be used to process the first image data, and then the target image can be obtained based on the processed first image data. For example, the image processing algorithm can be used to enhance the image quality of the first image data or to achieve other functions, and the embodiment of the present disclosure does not impose any restrictions on this.
另外,在一些实施例中,对第一图像数据进行编码处理,将编码后的第一图像数据存储在文件中,以得到最终的图像文件。In addition, in some embodiments, the first image data is encoded and the encoded first image data is stored in a file to obtain a final image file.
例如,参见图4所示的图像处理过程的流程图,首先,通过相机模组获取原始图像数据,然后通过ISP对原始图像数据进行图像格式转换以及进行滤镜效果处理,得到第一图像数据,再采用图像处理算法对第一图像数据进行画质增强或者其他处理,最后对处理后的第一图像数据进行编码,将编码后的第一图像数据存储在文件中,得到最终的图像文件。For example, referring to the flowchart of the image processing process shown in Figure 4, first, the original image data is obtained through the camera module, and then the image format of the original image data is converted and the filter effect is processed through the ISP to obtain the first image data, and then the image processing algorithm is used to enhance the image quality or perform other processing on the first image data, and finally the processed first image data is encoded, and the encoded first image data is stored in a file to obtain the final image file.
而相关技术中,则是先通过ISP进行图像格式转换,然后采用图像处理算法对转换后的图像数据进行滤镜效果处理。例如,参见下述公式:In the related art, the image format is first converted through the ISP, and then the image processing algorithm is used to process the converted image data with a filter effect. For example, see the following formula:
例如,参见图5所示的相关技术中的图像处理过程的流程图,首先,通过相机模组获取原始图像数据,然后通过ISP对原始图像数据进行图像格式转换,得到第一图像数据,再采用图像处理算法对第一图像数据进行滤镜效果处理、进行画质增强或者其他处理,最后对处理后的第一图像数据进行编码,将编码后的第一图像数据存储在文件中,得到最终的图像文件。For example, referring to the flowchart of the image processing process in the related art shown in Figure 5, first, the original image data is obtained through the camera module, and then the image format of the original image data is converted through the ISP to obtain the first image data, and then the image processing algorithm is used to perform filter effect processing, image quality enhancement or other processing on the first image data, and finally the processed first image data is encoded, and the encoded first image data is stored in a file to obtain the final image file.
通过对比图4和图5所示的图像处理过程的流程图,可以确定,本公开实施例提供的图像拍摄方法,将对原始图像数据进行滤镜效果处理的步骤提前,由图像信号处理器对原始图像数据进行滤镜效果处理,而不是由图像信号处理器对原始图像数据进行图像格式转换后,再由摄像设备中的其他模块对第一图像数据进行滤镜效果处理。By comparing the flowcharts of the image processing process shown in Figures 4 and 5, it can be determined that the image capture method provided by the embodiment of the present disclosure advances the step of performing filter effect processing on the original image data, and the image signal processor performs filter effect processing on the original image data, rather than the image signal processor converting the image format of the original image data and then other modules in the camera device performing filter effect processing on the first image data.
本公开提供的图像拍摄方法,在获取到原始图像数据后,直接通过图像信号处理器,对原始图像数据进行滤镜效果处理和图像格式转换,即通过图像信号处理器实现了图像格式转换和为原始图像数据生成目标滤镜效果的功能,相比于相关技术中采用图像处理算法为原始图像添加滤镜效果,本公开提供的方案,直接由图像信号处理器为原始图像数据生成目标滤镜效果,不再受CPU性能的限制,能够为高分辨率的图像添加滤镜。并且,将图像格式转换和生成滤镜效果的功能通过ISP这一硬件模块实现,在不需要改变摄像设备的硬件结构的情况下,使用ISP这一硬件模块实现了生成滤镜效果的功能。The image shooting method provided by the present disclosure, after acquiring the original image data, directly performs filter effect processing and image format conversion on the original image data through the image signal processor, that is, the image format conversion and the function of generating the target filter effect for the original image data are realized through the image signal processor. Compared with the related art that uses the image processing algorithm to add the filter effect to the original image, the scheme provided by the present disclosure directly generates the target filter effect for the original image data by the image signal processor, which is no longer limited by the CPU performance and can add filters to high-resolution images. In addition, the functions of image format conversion and filter effect generation are realized through the ISP hardware module, and the function of generating filter effect is realized by using the ISP hardware module without changing the hardware structure of the camera device.
并且,本公开实施例中,进一步由ISP中的色彩空间转换模块进行滤镜效果处理,使色彩空间转换模块具备了生成滤镜效果的功能。Furthermore, in the embodiment of the present disclosure, the color space conversion module in the ISP further performs filter effect processing, so that the color space conversion module has the function of generating filter effects.
图6是根据一示例性的实施例示出的一种图像拍摄过程的流程图,参见图6,由摄像设备执行,该摄像设备包括图像传感器、ISP以及处理器。首先,由图像传感器生成RAW图像,即生成原始图像数据,并将该RAW图像传输至ISP,再由ISP对RAW图像进行图像格式转换和滤镜效果处理,得到第一图像数据,并将第一图像数据输出至处理器,最后由处理器对第一图像数据进行其他图像处理,得到目标图像。图6中各个步骤的实施方式与图2中的实施方式同理,在此不再赘述。FIG6 is a flow chart of an image capturing process according to an exemplary embodiment, referring to FIG6 , which is executed by a camera device, and the camera device includes an image sensor, an ISP, and a processor. First, a RAW image is generated by the image sensor, that is, raw image data is generated, and the RAW image is transmitted to the ISP, and then the ISP performs image format conversion and filter effect processing on the RAW image to obtain first image data, and outputs the first image data to the processor, and finally the processor performs other image processing on the first image data to obtain a target image. The implementation of each step in FIG6 is the same as that in FIG2 , and will not be repeated here.
另外,从程序实现流程上来看,本公开实施例提供的图像处理流程与相关技术中的图像处理流程也存在区别,例如参见图7和图8所示的图像处理流程,图7的图像处理流程为本公开实施例的图像处理流程,图8为相关技术中的图像处理流程。对比图7和图8的流程,可以看出,在本公开实施例中,相机应用在发出图像请求时,该图像请求携带目标滤镜效果的标识,而相关技术中给的图像请求并不携带目标滤镜效果的标识;然后在获取参数的阶段,本公开实施例中tuning(调整)参数为根据目标滤镜效果的标识选择的融合参数打包得到的,而相关技术中tuning参数则是根据固定的图像转换矩阵打包得到的;之后,本公开实施例和相关技术中的处理流程相同,都是将tuning参数发送到硬件平台,写入到摄像设备的寄存器中,然后在接收到原始图像数据后,将原始图像数据以图像帧格式返回到图像处理流程中,即通过ISP对原始图像数据进行处理,最后得到处理后的第一图像数据,不同的是,采用本公开实施例中通过ISP对原始图像数据进行处理包括:对原始图像数据进行图像格式转换和添加目标滤镜效果,而相关技术中通过ISP对原始图像数据进行处理包括:对原始图像数据进行图像格式转换。之后还可以继续对得到的第一图像数据进行图像后处理,图像后处理包括采用图像处理算法进行处理以及图像编码。In addition, from the perspective of program implementation flow, there are also differences between the image processing flow provided by the embodiment of the present disclosure and the image processing flow in the related technology. For example, refer to the image processing flow shown in Figures 7 and 8. The image processing flow in Figure 7 is the image processing flow of the embodiment of the present disclosure, and Figure 8 is the image processing flow in the related technology. By comparing the processes of FIG. 7 and FIG. 8 , it can be seen that in the embodiment of the present disclosure, when the camera application issues an image request, the image request carries the identification of the target filter effect, while the image request given in the related art does not carry the identification of the target filter effect; then in the stage of obtaining parameters, the tuning parameters in the embodiment of the present disclosure are obtained by packaging the fusion parameters selected according to the identification of the target filter effect, while the tuning parameters in the related art are obtained by packaging according to a fixed image conversion matrix; thereafter, the processing flow in the embodiment of the present disclosure and the related art is the same, both of which send the tuning parameters to the hardware platform and write them into the register of the camera device, and then after receiving the original image data, the original image data is returned to the image processing flow in the image frame format, that is, the original image data is processed by the ISP, and finally the processed first image data is obtained, the difference is that the processing of the original image data by the ISP in the embodiment of the present disclosure includes: image format conversion of the original image data and adding the target filter effect, while the processing of the original image data by the ISP in the related art includes: image format conversion of the original image data. Thereafter, the obtained first image data can also be subjected to image post-processing, and the image post-processing includes processing by an image processing algorithm and image encoding.
上述实施例是以单帧图像为例进行说明,在一些实施例中,本公开实施例提供的图像处理算法同样适用于对视频数据的处理。而且由于视频数据中包括多个图像数据,相比于相关技术中的图像处理方式,采用本公开实施例中的图像处理方式对视频数据中的每个图像数据进行处理,能够实现更好的处理效果。The above embodiments are described by taking a single frame image as an example. In some embodiments, the image processing algorithm provided by the embodiments of the present disclosure is also applicable to the processing of video data. Moreover, since the video data includes multiple image data, compared with the image processing method in the related art, the image processing method in the embodiments of the present disclosure is used to process each image data in the video data, which can achieve a better processing effect.
而且对于高分辨率、高帧率且需要添加滤镜效果的视频拍摄场景来说,例如,对于图9中在拍摄时选择8K的分辨率和24FPS(Frames Per Second,每秒传输帧数)的帧率的视频拍摄场景,相关技术中的图像处理方式,由于摄像设备的计算能力的限制,并不支持采用图像处理算法实时地对高分辨率图像的运算,即不支持对对高分辨率图像的添加滤镜效果。而本公开实施例中将添加滤镜效果的功能融入到ISP这一硬件模块中,在不改变硬件结构、不增加功耗、不增加算力需求的前提下,可以为用户提供为高分辨率、高帧率的视频添加滤镜效果的功能,提高用户的使用体验。并且,本公开实施例这种图像处理方式,在面对低分辨率、低帧率且需要添加滤镜效果的视频拍摄场景,也可以做到实现相同的效果,且还能够优化内存、功耗等指标,提高摄像设备使用时的流畅性。Moreover, for video shooting scenes with high resolution and high frame rate and the need to add filter effects, for example, for the video shooting scene in FIG. 9 where 8K resolution and 24FPS (Frames Per Second) frame rate are selected during shooting, the image processing method in the related art does not support the use of image processing algorithms to operate on high-resolution images in real time due to the limitation of the computing power of the camera device, that is, it does not support the addition of filter effects to high-resolution images. In the embodiment of the present disclosure, the function of adding filter effects is integrated into the ISP hardware module, and the function of adding filter effects to high-resolution and high-frame-rate videos can be provided to users without changing the hardware structure, increasing power consumption, and increasing computing power requirements, thereby improving the user experience. Moreover, the image processing method of the embodiment of the present disclosure can also achieve the same effect in the face of video shooting scenes with low resolution and low frame rate and the need to add filter effects, and can also optimize indicators such as memory and power consumption, thereby improving the fluency of the camera device when in use.
图10是根据一示例性的实施例示出的一种图像拍摄装置的装置框图,参见图10,该装置包括:FIG. 10 is a device block diagram showing an image capturing device according to an exemplary embodiment. Referring to FIG. 10 , the device includes:
数据获取模块1001,被配置为获取原始图像数据;The data acquisition module 1001 is configured to acquire original image data;
图像信号处理器1002,被配置为对原始图像数据进行滤镜效果处理和图像格式转换,得到第一图像数据,滤镜效果处理用于生成目标滤镜效果;The image signal processor 1002 is configured to perform filter effect processing and image format conversion on the original image data to obtain first image data, wherein the filter effect processing is used to generate a target filter effect;
生成模块1003,被配置为根据第一图像数据,生成目标图像。The generating module 1003 is configured to generate a target image according to the first image data.
本公开提供的图像拍摄装置,在获取到原始图像数据后,直接通过图像信号处理器,对原始图像数据进行滤镜效果处理和图像格式转换,即通过图像信号处理器实现了图像格式转换和为原始图像数据生成目标滤镜效果的功能,相比于相关技术中采用图像处理算法为原始图像添加滤镜效果,本公开提供的方案,直接由图像信号处理器为原始图像数据生成目标滤镜效果,不再受CPU性能的限制,能够为高分辨率的图像添加滤镜。并且,将图像格式转换和生成滤镜效果的功能通过ISP这一硬件模块实现,在不需要改变摄像设备的硬件结构的情况下,使用ISP这一硬件模块实现了生成滤镜效果的功能。The image capture device provided by the present disclosure, after acquiring the original image data, directly processes the filter effect and converts the image format of the original image data through the image signal processor, that is, the image format conversion and the function of generating the target filter effect for the original image data are realized through the image signal processor. Compared with the related art that uses the image processing algorithm to add the filter effect to the original image, the scheme provided by the present disclosure directly generates the target filter effect for the original image data by the image signal processor, which is no longer limited by the CPU performance and can add filters to high-resolution images. In addition, the functions of image format conversion and filter effect generation are realized through the ISP hardware module, and the function of generating filter effect is realized by using the ISP hardware module without changing the hardware structure of the camera device.
在一些实施例中,图像信号处理器1002包括色彩空间转换模块,色彩空间转换模块被配置为对原始图像数据进行滤镜效果处理和图像格式转换,得到第一图像数据。In some embodiments, the image signal processor 1002 includes a color space conversion module, and the color space conversion module is configured to perform filter effect processing and image format conversion on the original image data to obtain the first image data.
在一些实施例中,图像信号处理器1002,被配置为:In some embodiments, the image signal processor 1002 is configured to:
根据目标滤镜效果,获取目标滤镜效果对应的融合参数,融合参数用于转换原始图像数据的图像格式以及为原始图像数据生成目标滤镜效果;According to the target filter effect, a fusion parameter corresponding to the target filter effect is obtained, and the fusion parameter is used to convert the image format of the original image data and generate the target filter effect for the original image data;
基于融合参数对原始图像数据进行滤镜效果处理和图像格式转换,得到第一图像数据。The original image data is subjected to filter effect processing and image format conversion based on the fusion parameters to obtain first image data.
在一些实施例中,融合参数根据用于转换原始图像数据的图像格式的转换参数以及为原始图像数据生成目标滤镜效果的滤镜转换参数确定。In some embodiments, the blending parameters are determined according to conversion parameters for converting the image format of the original image data and filter conversion parameters for generating a target filter effect for the original image data.
在一些实施例中,融合参数包括第一融合参数和融合偏差参数;转换参数包括第一转换参数和转换偏差参数;融合参数按照下述方式确定:In some embodiments, the fusion parameter includes a first fusion parameter and a fusion deviation parameter; the conversion parameter includes a first conversion parameter and a conversion deviation parameter; the fusion parameter is determined in the following manner:
将第一转换参数与滤镜转换参数的乘积作为第一融合参数;将转换偏差参数与滤镜转换参数的乘积作为融合偏差参数。The product of the first conversion parameter and the filter conversion parameter is used as the first fusion parameter; the product of the conversion deviation parameter and the filter conversion parameter is used as the fusion deviation parameter.
在一些实施例中,图像信号处理器1002,被配置为将原始图像数据对应的预设通道参数与第一融合参数的乘积与融合偏差参数的和作为第一图像数据对应的预设通道参数。In some embodiments, the image signal processor 1002 is configured to use the sum of the product of the preset channel parameter corresponding to the original image data and the first fusion parameter and the fusion deviation parameter as the preset channel parameter corresponding to the first image data.
在一些实施例中,图像信号处理器1002,被配置为根据滤镜效果与对应的融合参数的映射关系,从摄像设备中获取目标滤镜效果对应的融合参数。In some embodiments, the image signal processor 1002 is configured to obtain fusion parameters corresponding to the target filter effect from the camera device according to a mapping relationship between the filter effect and the corresponding fusion parameters.
在一些实施例中,装置还包括:In some embodiments, the apparatus further comprises:
关系建立模块,被配置为根据滤镜效果的标识与对应的融合参数,建立滤镜效果与对应的融合参数的映射关系;A relationship establishing module, configured to establish a mapping relationship between the filter effect and the corresponding fusion parameter according to the identifier of the filter effect and the corresponding fusion parameter;
参数存储模块,被配置为根据映射关系,将目标滤镜效果的标识与对应的融合参数存储在摄像设备内。The parameter storage module is configured to store the identifier of the target filter effect and the corresponding fusion parameter in the camera device according to the mapping relationship.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
本公开实施例还提供了一种摄像设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,处理器被配置为执行上述实施例中的图像拍摄方法。The embodiments of the present disclosure further provide an imaging device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the image capturing method in the above embodiments.
图11是根据一示例性的实施例示出的一种摄像设备1100的框图。FIG. 11 is a block diagram showing a camera device 1100 according to an exemplary embodiment.
参照图11,摄像设备1100可以包括以下一个或多个组件:处理组件1102,存储器1104,电源组件1106,多媒体组件1108,音频组件1110,输入/输出(I/O)的接口1112,传感器组件1114,以及通信组件1116。11 , the camera device 1100 may include one or more of the following components: a processing component 1102 , a memory 1104 , a power component 1106 , a multimedia component 1108 , an audio component 1110 , an input/output (I/O) interface 1112 , a sensor component 1114 , and a communication component 1116 .
处理组件1102通常控制摄像设备1100的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件1102可以包括一个或多个处理器1120来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1102可以包括一个或多个模块,便于处理组件1102和其他组件之间的交互。例如,处理组件1102可以包括多媒体模块,以方便多媒体组件1108和处理组件1102之间的交互。The processing component 1102 generally controls the overall operation of the camera device 1100, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1102 may include one or more modules to facilitate the interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate the interaction between the multimedia component 1108 and the processing component 1102.
存储器1104被配置为存储各种类型的数据以支持在摄像设备1100的操作。这些数据的示例包括用于在摄像设备1100上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1104可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 1104 is configured to store various types of data to support operations on the camera device 1100. Examples of such data include instructions for any application or method operating on the camera device 1100, contact data, phone book data, messages, pictures, videos, etc. The memory 1104 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
电源组件1106为摄像设备1100的各种组件提供电源。电源组件1106可以包括电源管理系统,一个或多个电源,及其他与为摄像设备1100生成、管理和分配电力相关联的组件。The power component 1106 provides power to the various components of the camera device 1100. The power component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the camera device 1100.
多媒体组件1108包括在所述摄像设备1100和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1108包括一个前置摄像头和/或后置摄像头。当摄像设备1100处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 1108 includes a screen that provides an output interface between the camera device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front camera and/or a rear camera. When the camera device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
音频组件1110被配置为输出和/或输入音频信号。例如,音频组件1110包括一个麦克风(MIC),当摄像设备1100处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1104或经由通信组件1116发送。在一些实施例中,音频组件1110还包括一个扬声器,用于输出音频信号。The audio component 1110 is configured to output and/or input audio signals. For example, the audio component 1110 includes a microphone (MIC), and when the camera device 1100 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1104 or sent via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting audio signals.
I/O接口1112为处理组件1102和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。I/O interface 1112 provides an interface between processing component 1102 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
传感器组件1114包括一个或多个传感器,用于为摄像设备1100提供各个方面的状态评估。例如,传感器组件1114可以检测到摄像设备1100的打开/关闭状态,组件的相对定位,例如所述组件为摄像设备1100的显示器和小键盘,传感器组件1114还可以检测摄像设备1100或摄像设备1100一个组件的位置改变,用户与摄像设备1100接触的存在或不存在,摄像设备1100方位或加速/减速和摄像设备1100的温度变化。传感器组件1114可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1114还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1114还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。The sensor assembly 1114 includes one or more sensors for providing various aspects of status assessment for the camera device 1100. For example, the sensor assembly 1114 can detect the open/closed state of the camera device 1100, the relative positioning of components, such as the display and keypad of the camera device 1100, the sensor assembly 1114 can also detect the position change of the camera device 1100 or a component of the camera device 1100, the presence or absence of user contact with the camera device 1100, the orientation or acceleration/deceleration of the camera device 1100, and the temperature change of the camera device 1100. The sensor assembly 1114 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件1116被配置为便于摄像设备1100和其他设备之间有线或无线方式的通信。摄像设备1100可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件1116经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件1116还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 1116 is configured to facilitate wired or wireless communication between the camera device 1100 and other devices. The camera device 1100 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,摄像设备1100可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the camera device 1100 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned methods.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1104,上述指令可由摄像设备1100的处理器1120执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, and the instructions can be executed by the processor 1120 of the camera device 1100 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
本公开实施例还提供了一种非临时性计算机可读存储介质,当所述存储介质中的指令由摄像设备的处理器执行时,使得摄像设备能够执行上述实施例中的图像拍摄方法。The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium. When instructions in the storage medium are executed by a processor of an imaging device, the imaging device is enabled to execute the image capturing method in the above embodiments.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| CN202211399052.1ACN118018835A (en) | 2022-11-09 | 2022-11-09 | Image capturing method, image capturing device, image capturing apparatus, and storage medium | 
| Application Number | Priority Date | Filing Date | Title | 
|---|---|---|---|
| CN202211399052.1ACN118018835A (en) | 2022-11-09 | 2022-11-09 | Image capturing method, image capturing device, image capturing apparatus, and storage medium | 
| Publication Number | Publication Date | 
|---|---|
| CN118018835Atrue CN118018835A (en) | 2024-05-10 | 
| Application Number | Title | Priority Date | Filing Date | 
|---|---|---|---|
| CN202211399052.1APendingCN118018835A (en) | 2022-11-09 | 2022-11-09 | Image capturing method, image capturing device, image capturing apparatus, and storage medium | 
| Country | Link | 
|---|---|
| CN (1) | CN118018835A (en) | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| CN118381996A (en)* | 2024-06-26 | 2024-07-23 | 荣耀终端有限公司 | Image shooting method and electronic equipment | 
| Publication number | Priority date | Publication date | Assignee | Title | 
|---|---|---|---|---|
| CN118381996A (en)* | 2024-06-26 | 2024-07-23 | 荣耀终端有限公司 | Image shooting method and electronic equipment | 
| CN118381996B (en)* | 2024-06-26 | 2024-11-15 | 荣耀终端有限公司 | Image shooting method and electronic device | 
| Publication | Publication Date | Title | 
|---|---|---|
| US11704771B2 (en) | Training super-resolution convolutional neural network model using a high-definition training image, a low-definition training image, and a mask image | |
| KR101831077B1 (en) | Method and device for switching color gamut mode | |
| CN109360261B (en) | Image processing method, device, electronic device and storage medium | |
| CN104333701B (en) | Method and device for displaying camera preview pictures as well as terminal | |
| CN109345485B (en) | Image enhancement method and device, electronic equipment and storage medium | |
| KR101727169B1 (en) | Method and apparatus for generating image filter | |
| CN106657780B (en) | Image preview method and device | |
| JP6328275B2 (en) | Image type identification method, apparatus, program, and recording medium | |
| CN111953904B (en) | Shooting method, shooting device, electronic equipment and storage medium | |
| CN111953903A (en) | Shooting method, shooting device, electronic equipment and storage medium | |
| CN118018835A (en) | Image capturing method, image capturing device, image capturing apparatus, and storage medium | |
| CN115633251A (en) | Image processing method, circuit and electronic equipment | |
| CN115237305A (en) | Shooting interface display method, device, electronic device and storage medium | |
| WO2021169810A1 (en) | Video processing method, and server | |
| CN118317203A (en) | Image processing method and device, electronic equipment and chip | |
| EP4250691A1 (en) | Image processing method and apparatus, device and storage medium | |
| CN110876013B (en) | Method and device for determining image resolution, electronic equipment and storage medium | |
| CN118870199A (en) | Image processing method, device, storage medium and chip | |
| CN118096508A (en) | Color mapping method, device, equipment and storage medium | |
| CN118354198A (en) | Camera starting method, device, medium and electronic equipment | |
| CN117369615A (en) | Electronic equipment control method and device, storage medium and electronic equipment | |
| CN120339739A (en) | Training data acquisition method, device, electronic device and storage medium | |
| CN116419075A (en) | Image data processing method, device and storage medium | |
| CN116170700A (en) | Photographing method, photographing device and storage medium | |
| CN118014873A (en) | Image processing method and device, image acquisition device and storage medium | 
| 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 |