Movatterモバイル変換


[0]ホーム

URL:


CN113747067B - Photography methods, devices, electronic equipment and storage media - Google Patents

Photography methods, devices, electronic equipment and storage media
Download PDF

Info

Publication number
CN113747067B
CN113747067BCN202111045276.8ACN202111045276ACN113747067BCN 113747067 BCN113747067 BCN 113747067BCN 202111045276 ACN202111045276 ACN 202111045276ACN 113747067 BCN113747067 BCN 113747067B
Authority
CN
China
Prior art keywords
photographing
photosensitive
areas
focus
area
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.)
Active
Application number
CN202111045276.8A
Other languages
Chinese (zh)
Other versions
CN113747067A (en
Inventor
朱泽基
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co LtdfiledCriticalVivo Mobile Communication Co Ltd
Priority to CN202111045276.8ApriorityCriticalpatent/CN113747067B/en
Publication of CN113747067ApublicationCriticalpatent/CN113747067A/en
Application grantedgrantedCritical
Publication of CN113747067BpublicationCriticalpatent/CN113747067B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The application discloses a photographing method, a photographing device, electronic equipment and a storage medium, which belong to the technical field of photographing, and the method comprises the following steps: acquiring focusing information of N photographing areas, wherein the N photographing areas are obtained by carrying out area division on a current photographing scene, and N is an integer larger than 1; determining focusing parameters of the N photographing areas according to the focusing information; and shooting an image based on the focusing parameters to obtain a target image.

Description

Translated fromChinese
拍照方法、装置、电子设备及存储介质Photography methods, devices, electronic equipment and storage media

技术领域Technical field

本申请属于拍照技术领域,具体涉及一种拍照方法、装置、电子设备及存储介质。This application belongs to the field of photography technology, and specifically relates to a photography method, device, electronic equipment and storage medium.

背景技术Background technique

近年来,随着电子设备的普及,越来越多的用户使用电子设备中的相机进行拍照。相比于专业的摄影设备,电子设备中的相机具有操作简单、拍照便捷等优点。In recent years, with the popularity of electronic devices, more and more users use cameras in electronic devices to take photos. Compared with professional photography equipment, cameras in electronic equipment have the advantages of simple operation and convenient taking pictures.

现有技术中,在进行拍照时,电子设备通过一次或者多次对焦,计算出一个自动对焦距离,按照该自动对焦距离完成一次对焦拍照,产生图像。然而,对于一些近距离拍照场景,受限于拍照景深,通过一次对焦拍照拍摄出的图像会产生局部失焦模糊的问题,拍照效果较差。In the prior art, when taking a picture, the electronic device calculates an automatic focusing distance by focusing once or multiple times, and completes one focusing picture according to the automatic focusing distance to generate an image. However, for some close-up photography scenes, due to the limited depth of field, the image captured through one-time focus photography will have the problem of partial defocus and blur, and the photography effect will be poor.

发明内容Contents of the invention

本申请实施例的目的是提供一种拍照方法、装置、电子设备及存储介质,能够解决现有技术中存在的拍照图像局部失焦模糊,拍照效果较差的问题。The purpose of the embodiments of the present application is to provide a photographing method, device, electronic equipment and storage medium, which can solve the problems in the prior art that the photographed image is partially out of focus and blurred, and the photographing effect is poor.

第一方面,本申请实施例提供了一种拍照方法,所述方法包括:In a first aspect, embodiments of the present application provide a photographing method, which method includes:

获取N个拍照区域的对焦信息,其中,所述N个拍照区域是对当前拍照场景进行区域划分得到的,N为大于1的整数;Obtain the focus information of N photographing areas, where the N photographing areas are obtained by dividing the current photographing scene into regions, and N is an integer greater than 1;

根据所述对焦信息,确定所述N个拍照区域的对焦参数;According to the focus information, determine the focus parameters of the N photographing areas;

基于所述对焦参数进行拍摄图像,得到目标图像。An image is captured based on the focus parameter to obtain a target image.

第二方面,本申请实施例提供了一种拍照装置,所述装置包括:In a second aspect, embodiments of the present application provide a camera device, which includes:

获取模块,用于获取N个拍照区域的对焦信息,其中,所述N个拍照区域是对当前拍照场景进行区域划分得到的,N为大于1的整数;The acquisition module is used to obtain the focus information of N photographing areas, where the N photographing areas are obtained by dividing the current photographing scene into regions, and N is an integer greater than 1;

确定模块,用于根据所述对焦信息,确定所述N个拍照区域的对焦参数;A determination module, configured to determine the focus parameters of the N photographing areas according to the focus information;

拍照模块,用于基于所述对焦参数进行拍摄图像,得到目标图像。A camera module is used to capture images based on the focus parameters to obtain a target image.

第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。In a third aspect, embodiments of the present application provide an electronic device. The electronic device includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor. The program or instructions are When executed by the processor, the steps of the method described in the first aspect are implemented.

第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。In a fourth aspect, embodiments of the present application provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the programs or instructions are executed by a processor, the steps of the method described in the first aspect are implemented. .

第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。In a fifth aspect, embodiments of the present application provide a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the first aspect. the method described.

本申请实施例中,对于当前拍照场景,电子设备中的相机可以同时对当前拍照场景的不同区域分别进行对焦,获取不同区域的对焦信息,根据对焦信息,确定不同区域的对焦参数,基于所确定的对焦参数进行拍摄图像,得到目标图像。与现有技术相比,本申请实施例中,相机可以根据当前拍照场景不同区域内视场物体距离相机镜头的远近,获取不同区域的对焦信息,基于不同区域的对焦信息对当前拍照场景进行拍摄图像,使得在对一些近距离场景拍照时,拍摄得到的图像中避免出现失焦模糊,拍摄到的图像清晰准确,提高了拍照效果。In the embodiment of the present application, for the current photographing scene, the camera in the electronic device can focus on different areas of the current photographing scene at the same time, obtain the focus information of the different areas, and determine the focus parameters of the different areas based on the focus information. Based on the determined Use the focus parameters to capture images and obtain the target image. Compared with the existing technology, in the embodiment of the present application, the camera can obtain the focus information of different areas according to the distance between the field of view objects in different areas of the current photographing scene and the camera lens, and shoot the current photographing scene based on the focus information of different areas. When taking photos of some close-up scenes, out-of-focus blur will be avoided in the captured images, and the captured images will be clear and accurate, improving the photography effect.

附图说明Description of the drawings

图1是本申请实施例提供的一种拍照方法的流程图;Figure 1 is a flow chart of a photographing method provided by an embodiment of the present application;

图2是本申请实施例提供的一种感光芯片的示例图;Figure 2 is an example diagram of a photosensitive chip provided by an embodiment of the present application;

图3是现有技术中感光芯片进行对焦的示例图;Figure 3 is an example diagram of a photosensitive chip focusing in the prior art;

图4是本申请实施例提供的感光芯片进行对焦的示例图;Figure 4 is an example diagram of focusing using a photosensitive chip provided by an embodiment of the present application;

图5是本申请实施例提供的一种拍照装置的结构框图;Figure 5 is a structural block diagram of a camera device provided by an embodiment of the present application;

图6是本申请实施例提供的一种电子设备的结构示意图;Figure 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

图7是实现本申请各个实施例的一种电子设备的硬件结构示意图。Figure 7 is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art fall within the scope of protection of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the present application can be practiced in orders other than those illustrated or described herein, and that "first," "second," etc. are distinguished Objects are usually of one type, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and/or" in the description and claims indicates at least one of the connected objects, and the character "/" generally indicates that the related objects are in an "or" relationship.

本申请实施例提供了一种拍照方法、装置、电子设备及存储介质。Embodiments of the present application provide a photographing method, device, electronic equipment and storage medium.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的拍照方法进行详细地说明。The photographing method provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios.

图1是本申请实施例提供的一种拍照方法的流程图,如图1所示,该方法可以包括以下步骤:步骤101、步骤102和步骤103,其中,Figure 1 is a flow chart of a photographing method provided by an embodiment of the present application. As shown in Figure 1, the method may include the following steps: step 101, step 102 and step 103, wherein,

在步骤101中,获取N个拍照区域的对焦信息,其中,N个拍照区域是对当前拍照场景进行区域划分得到的,N为大于1的整数。In step 101, focus information of N photographing areas is obtained, where the N photographing areas are obtained by dividing the current photographing scene into regions, and N is an integer greater than 1.

本申请实施例中,N个拍照区域构成完整的当前拍照场景。In the embodiment of this application, N photographing areas constitute a complete current photographing scene.

本申请实施例中,对焦信息可以包括:对焦距离;或者,对焦信息可以包括:对焦距离和拍照的色彩参数,其中,色彩参数可以包括以下一项或多项:光线强度、对比度和白平衡。In the embodiment of the present application, the focus information may include: focus distance; or, the focus information may include: focus distance and color parameters for taking pictures, where the color parameters may include one or more of the following: light intensity, contrast, and white balance.

本申请实施例中,N个拍照区域中至少有两个拍照区域的对焦信息不同。In the embodiment of the present application, at least two of the N photographing areas have different focus information.

本申请实施例中,在接收到对焦指令时,获取N个拍照区域的对焦信息,其中,对焦指令可以由用户触发。例如,当用户有拍照需求时,拿出电子设备,打开相机,点击相机屏幕即可触发对焦指令。In the embodiment of the present application, when a focus instruction is received, the focus information of N photographing areas is obtained, where the focus instruction can be triggered by the user. For example, when a user needs to take a photo, he or she can take out the electronic device, turn on the camera, and tap the camera screen to trigger the focus command.

本申请实施例中,电子设备的相机中可以包括一个感光芯片,该感光芯片可以被划分为多个感光区域,每个感光区域均为感光芯片的一部分。例如,图2所示,相机中包含一个感光芯片,该感光芯片可以被3×3等分,得到9个大小相同的感光区域,分别为感光区域1、感光区域2、感光区域3、感光区域4、感光区域5、感光区域6、感光区域7、感光区域8和感光区域9。In this embodiment of the present application, the camera of the electronic device may include a photosensitive chip. The photosensitive chip may be divided into multiple photosensitive areas, and each photosensitive area is a part of the photosensitive chip. For example, as shown in Figure 2, the camera contains a photosensitive chip. The photosensitive chip can be divided into 3 × 3 equal parts to obtain 9 photosensitive areas of the same size, namely photosensitive area 1, photosensitive area 2, photosensitive area 3, and photosensitive area. 4. Photosensitive area 5, photosensitive area 6, photosensitive area 7, photosensitive area 8 and photosensitive area 9.

感光芯片的流程工作如下:1)感光芯片上的光粒子信号接收器(传感器)接收光子信号;2)光粒子信号接收器接收到的模拟电流信号经过信号放大器放大成电压信号;3)经过ADC将模拟信号转换成数字信号,最终感光芯片输出不同像素位置上的数字信号。The process of the photosensitive chip works as follows: 1) The light particle signal receiver (sensor) on the photosensitive chip receives the photon signal; 2) The analog current signal received by the light particle signal receiver is amplified into a voltage signal by the signal amplifier; 3) After the ADC The analog signal is converted into a digital signal, and finally the photosensitive chip outputs digital signals at different pixel positions.

本申请实施例中,当感光芯片被划分为N个感光区域时,上述步骤101具体可以包括以下步骤:In this embodiment of the present application, when the photosensitive chip is divided into N photosensitive areas, the above step 101 may specifically include the following steps:

通过相机中的N个感光区域同时对N个拍照区域进行对焦,得到N个对焦信息;其中,N个感光区域是对相机中的一个感光芯片进行区域划分得到的,一个感光区域对应一个拍照区域。Focus on N photo-taking areas simultaneously through N photo-sensitive areas in the camera to obtain N focus information; among them, the N photo-sensitive areas are obtained by dividing a photo-sensitive chip in the camera, and one photo-sensitive area corresponds to one photo-taking area .

本申请实施例中,电子设备相机中的一个感光区域对当前拍照场景中的一个拍照区域进行对焦,N个感光区域同时对N个拍照区域进行对焦。In the embodiment of the present application, one photosensitive area in the electronic device camera focuses on one photo-taking area in the current photo-taking scene, and N photo-sensitive areas focus on N photo-taking areas at the same time.

在本申请提供的一个实施方式中,可以通过控制每个感光区域内感光薄膜发生形变,来对N个拍照区域进行对焦,具体地:In an implementation provided by this application, N photographing areas can be focused by controlling the deformation of the photosensitive film in each photosensitive area. Specifically:

对于每个拍照区域,通过调节不同强度的电磁力度,控制拍照区域对应的感光区域的感光薄膜发生形变,计算感光区域在不同强度下数字图像的反差大小,得到感光区域对应的拍照区域的对焦信息;其中,感光区域是对相机中的一个感光芯片进行区分划分得到的,一个感光区域对应一个拍照区域。For each photographing area, by adjusting the electromagnetic intensity of different intensities, the photosensitive film in the photosensitive area corresponding to the photosensitive area is controlled to deform, and the contrast of the digital image in the photosensitive area under different intensities is calculated to obtain the focus information of the photosensitive area corresponding to the photosensitive area. ; Among them, the photosensitive area is obtained by distinguishing and dividing a photosensitive chip in the camera, and one photosensitive area corresponds to a photographing area.

本申请实施例中,可以将感光芯片分成若干区域,每个区域的感光薄膜均可通过电磁控制其薄膜发生形变,来使感光芯片产生相对的位移,然后再经过上述的2)和3)步骤获取该区域的数字信号。In the embodiment of the present application, the photosensitive chip can be divided into several areas, and the photosensitive film in each area can be deformed by electromagnetically controlling the film to cause relative displacement of the photosensitive chip, and then go through the above steps 2) and 3). Get the digital signal for the area.

在一个例子中,以感光区域1的对焦为例,在对焦时,针对感光区域1,通过不同强度的电磁力度,使感光区域1发生不同程度的形变,具体地,可以通过电磁强度由弱到强的均匀改变,使该感光区域的感光薄膜均匀发生形变。In one example, taking the focusing of the photosensitive area 1 as an example, during focusing, the photosensitive area 1 is deformed to varying degrees through electromagnetic forces of different intensities. Specifically, the electromagnetic intensity can be changed from weak to Strong uniform changes cause the photosensitive film in the photosensitive area to deform evenly.

本申请实施例中,电磁力度越强,感光芯片的感光薄膜发生的形变越大,感光薄膜距离镜头越远,对焦距离越近;电磁力度越弱,感光芯片上的感光薄膜发生的形变越小,感光薄膜距离镜头的越近,对焦距离越远。In the embodiment of the present application, the stronger the electromagnetic force, the greater the deformation of the photosensitive film on the photosensitive chip. The farther the photosensitive film is from the lens, the closer the focusing distance. The weaker the electromagnetic force, the smaller the deformation of the photosensitive film on the photosensitive chip. , the closer the photosensitive film is to the lens, the farther the focusing distance is.

本申请实施例中,在感光薄膜均匀地发生形变过程中,对焦距离也在均匀的改变,计算当前感光区域在不同强度下的数字图像反差大小,来获得该区域的最佳对焦位置。整个感光芯片的所有感光区域均通过同样的方式完成对焦。In the embodiment of the present application, during the process of uniform deformation of the photosensitive film, the focus distance also changes uniformly, and the digital image contrast of the current photosensitive area under different intensities is calculated to obtain the optimal focus position of the area. All photosensitive areas of the entire photosensitive chip are focused in the same way.

在本申请提供的另一个实施方式中,可以通过改变感光芯片的机械结构,使得感光芯片的每个感光区域均可以沿镜头中心线方向前后自由移动,来对N个拍照区域进行对焦,具体地:In another embodiment provided by this application, N photographing areas can be focused by changing the mechanical structure of the photosensitive chip so that each photosensitive area of the photosensitive chip can freely move back and forth along the direction of the center line of the lens. Specifically, :

每个感光区域与音圈马达连接,通过音圈马达驱动感光区域移动,以支持感光芯片的各感光区域可以自由移动,计算感光区域在不同位置下数字图像的反差大小,得到感光区域对应的拍照区域的对焦信息。Each photosensitive area is connected to a voice coil motor. The voice coil motor drives the photosensitive area to move, so that each photosensitive area of the photosensitive chip can move freely. The contrast of the digital image at different positions of the photosensitive area is calculated to obtain the corresponding photo of the photosensitive area. Area focus information.

本申请实施例中,电子设备中也可以包含:多个可移动的感光芯片,每个感光芯片对应一个感光区域。In this embodiment of the present application, the electronic device may also include multiple movable photosensitive chips, each photosensitive chip corresponding to a photosensitive area.

本申请实施例中,在进行对焦时,不同的感光区域可以根据其对应视场物体的远近,沿着镜头的中轴线方向前后移动,通过反差对焦调整各自的对焦信息。In the embodiment of the present application, when focusing, different photosensitive areas can move forward and backward along the central axis of the lens according to the distance of the objects in the corresponding field of view, and adjust their respective focus information through contrast focusing.

本申请实施例中,在对当前拍照场景进行区域划分时,划分规则可以与感光区域的划分规则相同,当前拍照场景中的一个拍照区域对应于感光芯片的一个感光区域。例如,相机中包含图2所示的9个感光区域,在进行对焦时,镜头按照图2所示的感光区域的划分规则,通过拍照预览界面,将当前拍照场景划分为9个拍照区域,每个感光区域对应一个拍照区域。In the embodiment of the present application, when dividing the current photographing scene into areas, the dividing rules may be the same as the dividing rules for photosensitive areas. One photographing area in the current photographing scene corresponds to one photosensitive area of the photosensitive chip. For example, the camera contains 9 photosensitive areas as shown in Figure 2. When focusing, the lens divides the current photo-taking scene into 9 photo-sensitive areas through the photo preview interface according to the photo-sensitive area division rules shown in Fig. 2. Each photosensitive area corresponds to a photo-taking area.

本申请实施例中,也可以根据其他规则,对当前拍照场景进行区域划分,例如,根据用户预先设定的规则,将拍照场景由左到右三等分,得到3个拍照区域,本申请实施例对此不作限定。In the embodiment of this application, the current photographing scene can also be divided into areas according to other rules. For example, according to the rules preset by the user, the photographing scene is divided into three equal parts from left to right to obtain three photographing areas. This application implements This example does not limit this.

在步骤102中,根据对焦信息,确定N个拍照区域的对焦参数。In step 102, focus parameters of N photographing areas are determined based on the focus information.

在本申请提供的一个实施方式中,当对焦信息包括对焦距离时,上述步骤102具体可以包括以下步骤:In an implementation provided by this application, when the focus information includes the focus distance, the above step 102 may specifically include the following steps:

对于每个拍照区域,将拍照区域的对焦距离,确定为拍照区域的对焦参数。For each photographing area, the focus distance of the photographing area is determined as the focus parameter of the photographing area.

本申请实施例中,对于每个拍照区域,通过调节不同强度的电磁力度,控制拍照区域对应的感光区域的感光薄膜发生形变,计算感光区域在不同强度下数字图像的反差大小,得到感光区域对应的拍照区域的对焦距离,将拍照区域的对焦距离,确定为拍照区域的对焦参数;其中,感光区域是对相机中的一个感光芯片进行区分划分得到的,一个感光区域对应一个拍照区域。In the embodiment of the present application, for each photographing area, by adjusting the electromagnetic intensity of different intensities, the photosensitive film in the photosensitive area corresponding to the photographing area is controlled to deform, and the contrast of the digital image in the photosensitive area under different intensities is calculated to obtain the corresponding photosensitive area. The focusing distance of the photographing area is determined as the focus parameter of the photographing area; among them, the photosensitive area is obtained by distinguishing and dividing a photosensitive chip in the camera, and one photosensitive area corresponds to a photo taking area.

在本申请提供的另一个实施方式中,当对焦信息包括对焦距离和拍照的色彩参数时,上述步骤102具体可以包括以下步骤:In another implementation provided by this application, when the focus information includes the focus distance and the color parameters of taking pictures, the above step 102 may specifically include the following steps:

根据N个拍照区域的色彩参数,计算目标色彩参数;Calculate the target color parameters based on the color parameters of the N photographed areas;

对于每个拍照区域,将拍照区域的对焦距离和目标色彩参数,确定为拍照区域的对焦参数,其中,色彩参数包括以下一项或多项:光线强度、对比度和白平衡。For each photographing area, the focus distance and target color parameters of the photographing area are determined as the focus parameters of the photographing area, where the color parameters include one or more of the following: light intensity, contrast, and white balance.

考虑到现有技术中电子设备通过一次或者多次对焦,计算出一个自动对焦距离,按照该自动对焦距离完成一次对焦拍照,拍摄得到的图像除存在局部失焦模糊的问题之外,通过一次的对焦获取的对焦参数例如亮度、对比度、白平衡等信息不准确,还会导致拍摄得到图像中一些区域偏暗,另外一些区域偏亮,图像对于拍照场景的还原度较低。Considering that in the existing technology, electronic equipment calculates an auto-focus distance by focusing once or multiple times, and completes a focus photo according to the auto-focus distance. In addition to the problem of local out-of-focus blur, the captured image can be captured once. The focus parameters obtained by focusing, such as brightness, contrast, white balance and other information, are inaccurate, which will also cause some areas of the captured image to be darker and other areas to be lighter, and the image will have a lower degree of restoration of the photographed scene.

为解决上述问题,本申请实施例中,考虑到不同的对焦距离对应不同的色彩参数,不同的色彩参数对应不同的成像效果,因此为确保最终拍摄到的图像能高度还原拍照场景,在电子设备中多个感光区域对当前拍照场景的不同拍照区域分别对焦完成之后,在获取多个拍照区域的对焦距离的同时,获取多个拍照区域在其对焦距离下的色彩参数。In order to solve the above problem, in the embodiment of the present application, it is considered that different focus distances correspond to different color parameters, and different color parameters correspond to different imaging effects. Therefore, in order to ensure that the final captured image can highly restore the photographic scene, the electronic device After multiple photosensitive areas focus on different photo-taking areas of the current photo-taking scene respectively, while obtaining the focusing distances of the multiple photo-taking areas, the color parameters of the multiple photo-taking areas at their focusing distances are obtained.

在一个例子中,电子设备的相机中包含图2所示的9个感光区域,在对焦完成后,获取这9个感光区域对应的拍照区域的对焦距离,同时获取这9个拍照区域的色彩参数。In one example, the camera of the electronic device contains 9 photosensitive areas as shown in Figure 2. After the focusing is completed, the focusing distance of the photo-taking area corresponding to the 9 photo-sensitive areas is obtained, and the color parameters of the 9 photo-taking areas are obtained at the same time. .

本申请实施例中,在获取多个拍照区域的色彩参数之后,会根据多个拍照区域的色彩参数,计算出一个合适目标色彩参数,例如计算出合适的亮度、对比度和白平衡。In the embodiment of the present application, after obtaining the color parameters of multiple photographing areas, a suitable target color parameter, such as appropriate brightness, contrast and white balance, is calculated based on the color parameters of the multiple photographing areas.

本申请实施例中,在根据多个拍照区域的色彩参数计算目标色彩参数时,可以计算多个拍照区域的色彩参数的均值,将均值确定为目标色彩参数。In the embodiment of the present application, when calculating the target color parameter based on the color parameters of multiple photographing areas, the average value of the color parameters of the multiple photographing areas can be calculated, and the average value is determined as the target color parameter.

例如,根据不同拍照区域的亮度,通过计算亮度平均值得到一个统一的亮度参数;根据不同拍照区域的对比度,通过计算对比度平均值得到一个统一的对比度参数;根据不同拍照区域的白平衡,通过计算白平衡平均值得到一个统一的白平衡参数。For example, according to the brightness of different photographing areas, a unified brightness parameter is obtained by calculating the brightness average; according to the contrast of different photographing areas, a unified contrast parameter is obtained by calculating the contrast average; according to the white balance of different photographing areas, a unified contrast parameter is obtained by calculating White balance averaging results in a unified white balance parameter.

本申请实施例中,在计算出合理的目标色彩参数后,将目标色彩参数送入镜头的各个感光区域,调整各个感光区域的色彩参数至目标色彩参数。In the embodiment of the present application, after reasonable target color parameters are calculated, the target color parameters are sent to each photosensitive area of the lens, and the color parameters of each photosensitive area are adjusted to the target color parameters.

可见,本申请实施例中,在进行对焦时,不同拍照区域可以根据其在当前拍照场景中对应视场物体的远近,分别调整好各自的对焦距离,使得在对一些近距离场景拍照时,拍摄得到的图像中避免出现失焦模糊,拍摄到的图像清晰准确;此外,不同的拍照区域采用统一的色彩参数,使得拍摄到的图像对拍照场景的还原度更高、更加真实,提高了拍照效果。It can be seen that in the embodiment of the present application, when focusing, different photographing areas can adjust their respective focusing distances according to the distance of the corresponding field of view objects in the current photographing scene, so that when photographing some close-range scenes, the shooting distance is The resulting image avoids out-of-focus blur, and the captured image is clear and accurate; in addition, different photographing areas adopt unified color parameters, which makes the captured image restore the photographic scene to a higher degree and is more realistic, improving the photographic effect. .

在步骤103中,基于对焦参数进行拍摄图像,得到目标图像。In step 103, an image is captured based on the focus parameters to obtain a target image.

本申请实施例中,在N个感光区域处于各自对应对焦距离的对焦位置处、且N个感光区域的拍照色彩参数均调整为目标色彩参数的情况下,控制相机中的镜头进行拍摄,得到N个感光区域中各像素点的RGB值;根据N个感光区域中各像素点的RGB值,生成目标图像。In the embodiment of the present application, when the N photosensitive areas are at the focus positions corresponding to the focusing distances and the photographing color parameters of the N photosensitive areas are all adjusted to the target color parameters, the lens in the camera is controlled to shoot, and N is obtained. The RGB value of each pixel in the N photosensitive areas; the target image is generated based on the RGB value of each pixel in the N photosensitive areas.

为了便于理解本申请技术方案与现有技术的区别,结合图3和图4所示的例子进行描述。In order to facilitate understanding of the difference between the technical solution of the present application and the prior art, the description will be made with reference to the examples shown in Figures 3 and 4.

图3示出了现有技术中对焦方案,电子设备的相机中仅包含一个感光芯片,当拍照场景中同时包含远景和近景时,对于远景,感光芯片的对焦位置为位置1;对于近景,感光芯片的对焦位置为位置2,由于感光芯片只能统一移动且一次拍摄只能有一个对焦位置,无法同时兼顾位置1和位置2,因此只能计算出一个折中的位置,在这个折中的位置进行拍照,会导致拍摄到的图像存在局部失焦模糊。Figure 3 shows the focusing scheme in the prior art. The camera of the electronic device only contains one photosensitive chip. When the photographing scene contains both a distant view and a close view, for the distant view, the focus position of the photosensitive chip is position 1; for the close view, the focus position of the photosensitive chip is position 1. The focus position of the chip is position 2. Since the photosensitive chip can only move uniformly and there can only be one focus position for one shot, position 1 and position 2 cannot be taken into consideration at the same time. Therefore, only a compromise position can be calculated. In this compromise Taking pictures at a different location will cause the captured image to be partially out of focus and blurred.

图4示出了本申请中对焦方案,电子设备的相机中包含一个感光芯片,该感光芯片分成若干个区域,例如9个,每个感光区域均可自由移动。为便于描述,以9个中的3个感光区域为例,当拍照场景中同时包含远景、近景1和近景2时,对于远景,感光区域1的对焦位置为位置1;对于近景1,感光区域2的对焦位置为位置2;对于近景2,感光区域3的对焦位置为位置3;,由于感光芯片的各个区域可以分别移动,一个感光区域一次拍摄可以对应一个对焦位置,不同感光区域一次拍摄可以对应不同的对焦位置,可以同时兼顾位置1、位置2和位置3,因此拍摄到的图像比较清晰,不存在局部失焦模糊。Figure 4 shows the focusing scheme in this application. The camera of the electronic device contains a photosensitive chip. The photosensitive chip is divided into several areas, such as 9, and each photosensitive area can move freely. For the convenience of description, take 3 of the 9 photosensitive areas as an example. When the photo scene contains both distant view, close shot 1 and close shot 2, for the distant view, the focus position of the photosensitive area 1 is position 1; for the close shot 1, the focus position of the photosensitive area The focus position of 2 is position 2; for close-up 2, the focus position of photosensitive area 3 is position 3; since each area of the photosensitive chip can be moved separately, one photosensitive area can correspond to one focus position when shooting, and different photosensitive areas can be shot at one time. Corresponding to different focus positions, position 1, position 2 and position 3 can be taken into consideration at the same time, so the captured image is relatively clear and there is no local out-of-focus blur.

由上述实施例可见,该实施例中,对于当前拍照场景,电子设备中的相机可以同时对当前拍照场景的不同区域分别进行对焦,获取不同区域的对焦信息,根据对焦信息,确定不同区域的对焦参数,基于对焦参数进行拍摄图像,得到目标图像。与现有技术相比,本申请实施例中,相机可以根据当前拍照场景不同区域内视场物体距离相机镜头的远近,获取不同区域的对焦信息,基于不同区域的对焦信息对当前拍照场景进行拍摄图像,使得在对一些近距离场景拍照时,拍摄得到的图像中避免出现失焦模糊,拍摄到的图像清晰准确,提高了拍照效果。It can be seen from the above embodiment that in this embodiment, for the current photographing scene, the camera in the electronic device can focus on different areas of the current photographing scene at the same time, obtain the focus information of the different areas, and determine the focus of the different areas according to the focus information. Parameters, the image is captured based on the focus parameters to obtain the target image. Compared with the existing technology, in the embodiment of the present application, the camera can obtain the focus information of different areas according to the distance between the field of view objects in different areas of the current photographing scene and the camera lens, and shoot the current photographing scene based on the focus information of different areas. When taking photos of some close-up scenes, out-of-focus blur will be avoided in the captured images, and the captured images will be clear and accurate, improving the photography effect.

需要说明的是,本申请实施例提供的拍照方法,执行主体可以为拍照装置,或者该拍照装置中的用于执行加载拍照方法的控制模块。本申请实施例中以拍照装置执行加载拍照方法为例,说明本申请实施例提供的拍照装置。It should be noted that, for the photographing method provided by the embodiment of the present application, the execution subject may be a photographing device, or a control module in the photographing device for executing the loading of the photographing method. In the embodiment of the present application, a camera device is used as an example to perform a loading and photographing method to illustrate the camera device provided by the embodiment of the present application.

图5是本申请实施例提供的一种拍照装置的结构框图,如图5所示,拍照装置500,可以包括:获取模块501、确定模块502和拍照模块503,其中,Figure 5 is a structural block diagram of a camera device provided by an embodiment of the present application. As shown in Figure 5, the camera device 500 may include: an acquisition module 501, a determination module 502 and a camera module 503, where,

获取模块501,用于获取N个拍照区域的对焦信息,其中,所述N个拍照区域是对当前拍照场景进行区域划分得到的,N为大于1的整数;The acquisition module 501 is used to obtain the focus information of N photographing areas, where the N photographing areas are obtained by dividing the current photographing scene into regions, and N is an integer greater than 1;

确定模块502,用于根据所述对焦信息,确定所述N个拍照区域的对焦参数;Determination module 502, configured to determine focus parameters of the N photographing areas according to the focus information;

拍照模块503,用于基于所述对焦参数进行拍摄图像,得到目标图像。The camera module 503 is used to capture images based on the focus parameters to obtain a target image.

由上述实施例可见,该实施例中,对于当前拍照场景,电子设备中的相机可以同时对当前拍照场景的不同区域分别进行对焦,获取不同区域的对焦信息,根据对焦信息,确定不同区域的对焦参数,基于对焦参数进行拍摄图像,得到目标图像。与现有技术相比,本申请实施例中,相机可以根据当前拍照场景不同区域内视场物体距离相机镜头的远近,获取不同区域的对焦信息,基于不同区域的对焦信息对当前拍照场景进行拍摄图像,使得在对一些近距离场景拍照时,拍摄得到的图像中避免出现失焦模糊,拍摄到的图像清晰准确,提高了拍照效果。It can be seen from the above embodiment that in this embodiment, for the current photographing scene, the camera in the electronic device can focus on different areas of the current photographing scene at the same time, obtain the focus information of the different areas, and determine the focus of the different areas according to the focus information. Parameters, the image is captured based on the focus parameters to obtain the target image. Compared with the existing technology, in the embodiment of the present application, the camera can obtain the focus information of different areas according to the distance between the field of view objects in different areas of the current photographing scene and the camera lens, and shoot the current photographing scene based on the focus information of different areas. When taking photos of some close-up scenes, out-of-focus blur will be avoided in the captured images, and the captured images will be clear and accurate, improving the photography effect.

可选地,作为一个实施例,所述对焦信息包括:对焦距离;Optionally, as an embodiment, the focus information includes: focus distance;

所述确定模块502,可以包括:The determination module 502 may include:

第一确定子模块,用于对于每个拍照区域,将所述拍照区域的对焦距离,确定为所述拍照区域的对焦参数。The first determination sub-module is used to determine, for each photographing area, the focus distance of the photographing area as the focus parameter of the photographing area.

可选地,作为一个实施例,所述对焦信息包括:对焦距离和拍照的色彩参数,所述色彩参数包括以下一项或多项:光线强度、对比度和白平衡;Optionally, as an embodiment, the focus information includes: focus distance and color parameters for taking pictures, and the color parameters include one or more of the following: light intensity, contrast, and white balance;

所述确定模块502,可以包括:The determination module 502 may include:

计算子模块,用于根据所述N个拍照区域的色彩参数,计算目标色彩参数;The calculation submodule is used to calculate the target color parameters according to the color parameters of the N photographed areas;

第二确定子模块,用于对于每个拍照区域,将所述拍照区域的对焦距离和所述目标色彩参数,确定为所述拍照区域的对焦参数。The second determination sub-module is configured to determine, for each photographing area, the focus distance and the target color parameter of the photographing area as the focus parameters of the photographing area.

可选地,作为一个实施例,所述获取模块501,可以包括:Optionally, as an embodiment, the acquisition module 501 may include:

对焦子模块,用于通过相机中的N个感光区域同时对N个拍照区域进行对焦,得到N个对焦信息;其中,所述N个感光区域是对所述相机中的一个感光芯片进行区域划分得到的,一个感光区域对应一个拍照区域。The focusing sub-module is used to focus on N photographing areas simultaneously through N photosensitive areas in the camera to obtain N pieces of focus information; wherein the N photosensitive areas are used to divide a photosensitive chip in the camera. Obtained, a photosensitive area corresponds to a photographing area.

可选地,作为一个实施例,所述第一确定子模块,可以包括:Optionally, as an embodiment, the first determination sub-module may include:

对焦参数确定单元,用于对于每个拍照区域,通过调节不同强度的电磁力度,控制所述拍照区域对应的感光区域的感光薄膜发生形变,计算所述感光区域在不同强度下数字图像的反差大小,得到所述感光区域对应的拍照区域的对焦距离,将所述拍照区域的对焦距离,确定为所述拍照区域的对焦参数;其中,所述感光区域是对相机中的一个感光芯片进行区分划分得到的,一个感光区域对应一个拍照区域。A focus parameter determination unit is used to control the deformation of the photosensitive film in the photosensitive area corresponding to the photosensitive area by adjusting the electromagnetic intensity of different intensities for each photo-taking area, and calculate the contrast of the digital image in the photo-sensitive area under different intensities. , obtain the focus distance of the photo-taking area corresponding to the photo-sensitive area, and determine the focus distance of the photo-taking area as the focus parameter of the photo-taking area; wherein, the photo-sensitive area is to differentiate and divide a photo-sensitive chip in the camera Obtained, a photosensitive area corresponds to a photographing area.

可选地,作为一个实施例,所述拍照模块503,可以包括:Optionally, as an embodiment, the camera module 503 may include:

拍照子模块,用于在所述N个感光区域处于各自对应对焦距离的对焦位置处、且所述N个感光区域的拍照色彩参数均调整为所述目标色彩参数的情况下,控制所述相机中的镜头进行拍摄,得到所述N个感光区域中各像素点的RGB值;Photography sub-module, used to control the camera when the N photosensitive areas are at the focus positions corresponding to the focusing distances and the photographing color parameters of the N photosensitive areas are all adjusted to the target color parameters. Shoot with the lens in the camera to obtain the RGB value of each pixel in the N photosensitive areas;

生成子模块,用于根据所述N个感光区域中各像素点的RGB值,生成目标图像。The generation sub-module is used to generate a target image according to the RGB value of each pixel in the N photosensitive areas.

本申请实施例中的拍照装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personaldigital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(NetworkAttached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The camera device in the embodiment of the present application may be a device, or may be a component, integrated circuit, or chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (personal digital assistant). , PDA), etc., the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., embodiments of the present application No specific limitation is made.

本申请实施例中的拍照装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The camera device in the embodiment of the present application may be a device with an operating system. The operating system can be an Android operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of this application.

本申请实施例提供的拍照装置能够实现图1方法实施例实现的各个过程,为避免重复,这里不再赘述。The camera device provided by the embodiment of the present application can implement each process implemented by the method embodiment in Figure 1. To avoid repetition, details will not be described here.

可选地,如图6所示,本申请实施例还提供一种电子设备600,包括处理器601,存储器602,存储在存储器602上并可在所述处理器601上运行的程序或指令,该程序或指令被处理器601执行时实现上述拍照方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in Figure 6, this embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and programs or instructions stored on the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the above-mentioned photographing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, the details will not be described here.

需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

图7为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 7 is a schematic diagram of the hardware structure of an electronic device that implements an embodiment of the present application.

该电子设备700包括但不限于:射频单元701、网络模块702、音频输出单元703、输入单元704、传感器705、显示单元706、用户输入单元707、接口单元708、存储器709、以及处理器710等部件。The electronic device 700 includes but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, processor 710, etc. part.

本领域技术人员可以理解,电子设备700还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器710逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图7中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 700 may also include a power supply (such as a battery) that supplies power to various components. The power supply may be logically connected to the processor 710 through a power management system, thereby managing charging, discharging, and function through the power management system. Consumption management and other functions. The structure of the electronic device shown in Figure 7 does not constitute a limitation on the electronic device. The electronic device may include more or less components than shown in the figure, or combine certain components, or arrange different components, which will not be described again here. .

其中,处理器710,用于获取N个拍照区域的对焦信息,其中,所述N个拍照区域是对当前拍照场景进行区域划分得到的,N为大于1的整数;根据所述对焦信息,确定所述N个拍照区域的对焦参数;基于所述对焦参数进行拍摄图像,得到目标图像。Among them, the processor 710 is used to obtain the focus information of N photographing areas, wherein the N photographing areas are obtained by dividing the current photographing scene, and N is an integer greater than 1; according to the focus information, determine Focus parameters of the N photographing areas; capture images based on the focus parameters to obtain a target image.

可见,本申请实施例中,相机可以根据当前拍照场景不同区域内视场物体距离相机镜头的远近,获取不同区域的对焦信息,基于不同区域的对焦信息对当前拍照场景进行拍摄图像,使得在对一些近距离场景拍照时,拍摄得到的图像中避免出现失焦模糊,拍摄到的图像清晰准确,提高了拍照效果。It can be seen that in the embodiment of the present application, the camera can obtain the focus information of different areas according to the distance between the field of view objects in different areas of the current photographing scene and the camera lens, and capture images of the current photographing scene based on the focus information of different areas, so that when focusing When taking photos of some close-up scenes, out-of-focus blur is avoided in the captured images, and the captured images are clear and accurate, which improves the photography effect.

可选地,作为一个实施例,所述对焦信息包括:对焦距离;Optionally, as an embodiment, the focus information includes: focus distance;

处理器710,还用于对于每个拍照区域,将所述拍照区域的对焦距离,确定为所述拍照区域的对焦参数。The processor 710 is also configured to, for each photographing area, determine the focus distance of the photographing area as the focus parameter of the photographing area.

可选地,作为一个实施例,所述对焦信息包括:对焦距离和拍照的色彩参数,所述色彩参数包括以下一项或多项:光线强度、对比度和白平衡;Optionally, as an embodiment, the focus information includes: focus distance and color parameters for taking pictures, and the color parameters include one or more of the following: light intensity, contrast, and white balance;

处理器710,还用于根据所述N个拍照区域的色彩参数,计算目标色彩参数;对于每个拍照区域,将所述拍照区域的对焦距离和所述目标色彩参数,确定为所述拍照区域的对焦参数。The processor 710 is also configured to calculate a target color parameter according to the color parameters of the N photographing areas; for each photographing area, determine the focus distance of the photographing area and the target color parameter as the photographing area. focus parameters.

可选地,作为一个实施例,处理器710,还用于通过相机中的N个感光区域同时对N个拍照区域进行对焦,得到N个对焦信息;其中,所述N个感光区域是对所述相机中的一个感光芯片进行区域划分得到的,一个感光区域对应一个拍照区域。Optionally, as an embodiment, the processor 710 is also configured to simultaneously focus on N photographing areas through N photosensitive areas in the camera to obtain N pieces of focus information; wherein the N photosensitive areas are the It is obtained by dividing a photosensitive chip in the camera into areas, and one photosensitive area corresponds to a photo-taking area.

可选地,作为一个实施例,处理器710,还用于对于每个拍照区域,通过调节不同强度的电磁力度,控制所述拍照区域对应的感光区域的感光薄膜发生形变,计算所述感光区域在不同强度下数字图像的反差大小,得到所述感光区域对应的拍照区域的对焦距离,将所述拍照区域的对焦距离,确定为所述拍照区域的对焦参数;其中,所述感光区域是对相机中的一个感光芯片进行区分划分得到的,一个感光区域对应一个拍照区域。Optionally, as an embodiment, the processor 710 is also configured to control the deformation of the photosensitive film in the photosensitive area corresponding to the photosensitive area by adjusting electromagnetic forces of different intensities for each photo-taking area, and calculate the photosensitive area. The contrast size of the digital image under different intensities is used to obtain the focusing distance of the photographing area corresponding to the photosensitive area, and the focusing distance of the photographing area is determined as the focus parameter of the photographing area; wherein the photosensitive area is the focus distance of the photographing area. A photosensitive chip in the camera is divided into different areas, and one photosensitive area corresponds to a photo-taking area.

可选地,作为一个实施例,处理器710,还用于在所述N个感光区域处于各自对应对焦距离的对焦位置处、且所述N个感光区域的拍照色彩参数均调整为所述目标色彩参数的情况下,控制所述相机中的镜头进行拍摄,得到所述N个感光区域中各像素点的RGB值;根据所述N个感光区域中各像素点的RGB值,生成目标图像。Optionally, as an embodiment, the processor 710 is further configured to adjust the photographing color parameters of the N photosensitive areas to the target when the N photosensitive areas are at focus positions corresponding to respective focusing distances. In the case of color parameters, control the lens in the camera to shoot, and obtain the RGB value of each pixel in the N photosensitive areas; generate a target image based on the RGB value of each pixel in the N photosensitive areas.

应理解的是,本申请实施例中,输入单元704可以包括图形处理器(GraphicsProcessing Unit,GPU)7041和麦克风7042,图形处理器7041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元706可包括显示面板7061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板7061。用户输入单元707包括触控面板7071以及其他输入设备7072。触控面板7071,也称为触摸屏。触控面板7071可包括触摸检测装置和触摸控制器两个部分。其他输入设备7072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器709可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器710可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器710中。It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042. The graphics processor 7041 is responsible for the image capture device (such as Process the image data of still pictures or videos obtained by the camera). The display unit 706 may include a display panel 7061, which may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 707 includes a touch panel 7071 and other input devices 7072. Touch panel 7071, also called touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include but are not limited to physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be described again here. Memory 709 may be used to store software programs as well as various data, including but not limited to application programs and operating systems. The processor 710 can integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above modem processor may not be integrated into the processor 710.

电子设备700能够实现前述实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。The electronic device 700 can implement various processes implemented by the electronic device in the foregoing embodiments. To avoid repetition, the details will not be described again here.

本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述拍照方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application also provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the program or instructions are executed by a processor, each process of the above-mentioned photographing method embodiment is implemented, and the same process can be achieved. To avoid repetition, the technical effects will not be repeated here.

其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage media, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.

本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述拍照方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each of the above photographing method embodiments. The process can achieve the same technical effect. To avoid repetition, it will not be described again here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions may be performed, for example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Inspired by this application, many forms can be made without departing from the purpose of this application and the scope protected by the claims, all of which fall within the protection of this application.

Claims (10)

Translated fromChinese
1.一种拍照方法,其特征在于,所述方法包括:1. A photographing method, characterized in that the method includes:获取N个拍照区域的对焦信息,其中,所述N个拍照区域是对当前拍照场景进行区域划分得到的,N为大于1的整数;Obtain the focus information of N photographing areas, where the N photographing areas are obtained by dividing the current photographing scene into regions, and N is an integer greater than 1;根据所述对焦信息,确定所述N个拍照区域的对焦参数;According to the focus information, determine the focus parameters of the N photographing areas;基于所述对焦参数进行拍摄图像,得到目标图像;Capture images based on the focus parameters to obtain a target image;对于每个拍照区域,通过调节不同强度的电磁力度,控制所述拍照区域对应的感光区域的感光薄膜发生形变,计算所述感光区域在不同强度下数字图像的反差大小,得到所述感光区域对应的拍照区域的对焦距离,将所述拍照区域的对焦距离,确定为所述拍照区域的对焦参数;其中,所述感光区域是对相机中的一个感光芯片进行区分划分得到的,一个感光区域对应一个拍照区域。For each photographing area, by adjusting the electromagnetic intensity of different intensities, the photosensitive film in the photosensitive area corresponding to the photographing area is controlled to deform, and the contrast of the digital image in the photosensitive area under different intensities is calculated to obtain the corresponding photosensitive area. The focusing distance of the photographing area is determined as the focus parameter of the photographing area; wherein, the photosensitive area is obtained by distinguishing and dividing a photosensitive chip in the camera, and one photosensitive area corresponds to A photo area.2.根据权利要求1所述的方法,其特征在于,所述对焦信息还包括:拍照的色彩参数,所述色彩参数包括以下一项或多项:光线强度、对比度和白平衡;2. The method according to claim 1, wherein the focus information further includes: color parameters for taking pictures, and the color parameters include one or more of the following: light intensity, contrast and white balance;所述根据所述对焦信息,确定所述N个拍照区域的对焦参数,包括:Determining the focus parameters of the N photographing areas according to the focus information includes:根据所述N个拍照区域的色彩参数,计算目标色彩参数;Calculate the target color parameters according to the color parameters of the N photographed areas;对于每个拍照区域,将所述拍照区域的对焦距离和所述目标色彩参数,确定为所述拍照区域的对焦参数。For each photographing area, the focus distance and the target color parameter of the photographing area are determined as the focus parameters of the photographing area.3.根据权利要求1至2任一项所述的方法,其特征在于,所述获取N个拍照区域的对焦信息,包括:3. The method according to any one of claims 1 to 2, characterized in that said obtaining the focus information of N photographing areas includes:通过相机中的N个感光区域同时对N个拍照区域进行对焦,得到N个对焦信息;其中,所述N个感光区域是对所述相机中的一个感光芯片进行区域划分得到的,一个感光区域对应一个拍照区域。Through N photosensitive areas in the camera, N photosensitive areas are simultaneously focused to obtain N focus information; wherein, the N photosensitive areas are obtained by dividing a photosensitive chip in the camera, and one photosensitive area Corresponds to a photographing area.4.根据权利要求3所述的方法,其特征在于,所述基于所述对焦参数进行拍摄图像,得到目标图像,包括:4. The method of claim 3, wherein capturing an image based on the focus parameter to obtain a target image includes:在所述N个感光区域处于各自对应对焦距离的对焦位置处、且所述N个感光区域的拍照色彩参数均调整为所述目标色彩参数的情况下,控制所述相机中的镜头进行拍摄,得到所述N个感光区域中各像素点的RGB值;When the N photosensitive areas are at the focus positions corresponding to the focusing distances and the photographing color parameters of the N photosensitive areas are all adjusted to the target color parameters, control the lens in the camera to shoot, Obtain the RGB value of each pixel in the N photosensitive areas;根据所述N个感光区域中各像素点的RGB值,生成目标图像。A target image is generated according to the RGB value of each pixel in the N photosensitive areas.5.一种拍照装置,其特征在于,所述装置包括:5. A photographing device, characterized in that the device includes:获取模块,用于获取N个拍照区域的对焦信息,其中,所述N个拍照区域是对当前拍照场景进行区域划分得到的,N为大于1的整数;The acquisition module is used to obtain the focus information of N photographing areas, where the N photographing areas are obtained by dividing the current photographing scene into regions, and N is an integer greater than 1;确定模块,用于根据所述对焦信息,确定所述N个拍照区域的对焦参数;A determination module, configured to determine the focus parameters of the N photographing areas according to the focus information;拍照模块,用于基于所述对焦参数进行拍摄图像,得到目标图像;A camera module, used to capture images based on the focus parameters to obtain a target image;所述确定模块包括:第一确定子模块,所述第一确定子模块包括:对焦参数确定单元,用于对于每个拍照区域,通过调节不同强度的电磁力度,控制所述拍照区域对应的感光区域的感光薄膜发生形变,计算所述感光区域在不同强度下数字图像的反差大小,得到所述感光区域对应的拍照区域的对焦距离,将所述拍照区域的对焦距离,确定为所述拍照区域的对焦参数;其中,所述感光区域是对相机中的一个感光芯片进行区分划分得到的,一个感光区域对应一个拍照区域。The determination module includes: a first determination sub-module, the first determination sub-module includes: a focus parameter determination unit for controlling the photosensitivity corresponding to the photographing area by adjusting electromagnetic intensity of different intensities for each photographing area. The photosensitive film in the area is deformed, and the contrast of the digital image in the photosensitive area under different intensities is calculated to obtain the focusing distance of the photographing area corresponding to the photosensitive area, and the focusing distance of the photographing area is determined as the photographing area. The focus parameters; wherein, the photosensitive area is obtained by distinguishing and dividing a photosensitive chip in the camera, and one photosensitive area corresponds to a photographing area.6.根据权利要求5所述的装置,其特征在于,所述对焦信息还包括:拍照的色彩参数,所述色彩参数包括以下一项或多项:光线强度、对比度和白平衡;6. The device according to claim 5, wherein the focus information further includes: color parameters for taking pictures, and the color parameters include one or more of the following: light intensity, contrast and white balance;所述确定模块包括:The determination module includes:计算子模块,用于根据所述N个拍照区域的色彩参数,计算目标色彩参数;The calculation submodule is used to calculate the target color parameters according to the color parameters of the N photographed areas;第二确定子模块,用于对于每个拍照区域,将所述拍照区域的对焦距离和所述目标色彩参数,确定为所述拍照区域的对焦参数。The second determination sub-module is configured to determine, for each photographing area, the focus distance and the target color parameter of the photographing area as the focus parameters of the photographing area.7.根据权利要求5至6任一项所述的装置,其特征在于,所述获取模块包括:7. The device according to any one of claims 5 to 6, characterized in that the acquisition module includes:对焦子模块,用于通过相机中的N个感光区域同时对N个拍照区域进行对焦,得到N个对焦信息;其中,所述N个感光区域是对所述相机中的一个感光芯片进行区域划分得到的,一个感光区域对应一个拍照区域。The focusing sub-module is used to focus on N photographing areas simultaneously through N photosensitive areas in the camera to obtain N pieces of focus information; wherein the N photosensitive areas are used to divide a photosensitive chip in the camera. Obtained, a photosensitive area corresponds to a photographing area.8.根据权利要求7所述的装置,其特征在于,所述拍照模块包括:8. The device according to claim 7, wherein the camera module includes:拍照子模块,用于在所述N个感光区域处于各自对应对焦距离的对焦位置处、且所述N个感光区域的拍照色彩参数均调整为所述目标色彩参数的情况下,控制所述相机中的镜头进行拍摄,得到所述N个感光区域中各像素点的RGB值;Photography sub-module, used to control the camera when the N photosensitive areas are at the focus positions corresponding to the focusing distances and the photographing color parameters of the N photosensitive areas are all adjusted to the target color parameters. Shoot with the lens in the camera to obtain the RGB value of each pixel in the N photosensitive areas;生成子模块,用于根据所述N个感光区域中各像素点的RGB值,生成目标图像。The generation sub-module is used to generate a target image according to the RGB value of each pixel in the N photosensitive areas.9.一种电子设备,其特征在于,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至4任一项所述的拍照方法的步骤。9. An electronic device, characterized in that the electronic device includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and the program or instructions are executed by the processor. When executed, the steps of the photographing method according to any one of claims 1 to 4 are realized.10.一种可读存储介质,其特征在于,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至4任一项所述的拍照方法的步骤。10. A readable storage medium, characterized in that the readable storage medium stores programs or instructions, and when the programs or instructions are executed by a processor, the photographing method according to any one of claims 1 to 4 is implemented. A step of.
CN202111045276.8A2021-09-072021-09-07 Photography methods, devices, electronic equipment and storage mediaActiveCN113747067B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202111045276.8ACN113747067B (en)2021-09-072021-09-07 Photography methods, devices, electronic equipment and storage media

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202111045276.8ACN113747067B (en)2021-09-072021-09-07 Photography methods, devices, electronic equipment and storage media

Publications (2)

Publication NumberPublication Date
CN113747067A CN113747067A (en)2021-12-03
CN113747067Btrue CN113747067B (en)2024-02-02

Family

ID=78736791

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202111045276.8AActiveCN113747067B (en)2021-09-072021-09-07 Photography methods, devices, electronic equipment and storage media

Country Status (1)

CountryLink
CN (1)CN113747067B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114650369B (en)*2022-03-012025-01-07维沃移动通信有限公司 Imaging method and device
CN115460389B (en)*2022-09-202023-05-26北京拙河科技有限公司Image white balance area optimization method and device

Citations (16)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2004126087A (en)*2002-10-012004-04-22Olympus CorpImaging equipment and its control method
CN101064779A (en)*2006-04-272007-10-31中兴通讯股份有限公司Method for realizing minisize camera automatic focusing and minisize camera thereof
TW201238326A (en)*2011-03-042012-09-16Tung-Fa WuReal-time interactive 3D entertainment device and 3D replication
CN103685905A (en)*2012-09-172014-03-26联想(北京)有限公司Photographing method and electronic equipment
CN105204270A (en)*2015-10-152015-12-30广东欧珀移动通信有限公司 A method and device for adjusting the focusing distance of a camera terminal
CN105491294A (en)*2013-03-052016-04-13佳能株式会社Image processing apparatus, image capturing apparatus, and image processing method
CN105578024A (en)*2015-05-272016-05-11宇龙计算机通信科技(深圳)有限公司 Camera focusing method, focusing device and mobile terminal
CN106210509A (en)*2016-06-282016-12-07珠海市魅族科技有限公司A kind of focusing control method and photographing device
CN106254780A (en)*2016-08-312016-12-21宇龙计算机通信科技(深圳)有限公司A kind of dual camera camera control method, photographing control device and terminal
CN107483819A (en)*2017-08-222017-12-15北京小米移动软件有限公司 Focusing method, focusing device and electronic equipment
CN207820069U (en)*2018-01-252018-09-04深圳市杰普特光电股份有限公司Focusing mechanism and camera
CN109819152A (en)*2019-02-272019-05-28维沃移动通信有限公司 Focusing camera module and terminal equipment
JP2020043522A (en)*2018-09-122020-03-19キヤノン株式会社Imaging apparatus and control method of the same, program, and storage medium
CN111601021A (en)*2020-05-112020-08-28维沃移动通信有限公司 Photographing device, electronic device and control method
CN112135034A (en)*2019-06-242020-12-25Oppo广东移动通信有限公司Photographing method and device based on ultrasonic waves, electronic equipment and storage medium
CN113242375A (en)*2021-06-112021-08-10维沃移动通信有限公司Camera module and electronic equipment

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2004126087A (en)*2002-10-012004-04-22Olympus CorpImaging equipment and its control method
CN101064779A (en)*2006-04-272007-10-31中兴通讯股份有限公司Method for realizing minisize camera automatic focusing and minisize camera thereof
TW201238326A (en)*2011-03-042012-09-16Tung-Fa WuReal-time interactive 3D entertainment device and 3D replication
CN103685905A (en)*2012-09-172014-03-26联想(北京)有限公司Photographing method and electronic equipment
CN105491294A (en)*2013-03-052016-04-13佳能株式会社Image processing apparatus, image capturing apparatus, and image processing method
CN105578024A (en)*2015-05-272016-05-11宇龙计算机通信科技(深圳)有限公司 Camera focusing method, focusing device and mobile terminal
CN105204270A (en)*2015-10-152015-12-30广东欧珀移动通信有限公司 A method and device for adjusting the focusing distance of a camera terminal
CN106210509A (en)*2016-06-282016-12-07珠海市魅族科技有限公司A kind of focusing control method and photographing device
CN106254780A (en)*2016-08-312016-12-21宇龙计算机通信科技(深圳)有限公司A kind of dual camera camera control method, photographing control device and terminal
CN107483819A (en)*2017-08-222017-12-15北京小米移动软件有限公司 Focusing method, focusing device and electronic equipment
CN207820069U (en)*2018-01-252018-09-04深圳市杰普特光电股份有限公司Focusing mechanism and camera
JP2020043522A (en)*2018-09-122020-03-19キヤノン株式会社Imaging apparatus and control method of the same, program, and storage medium
CN109819152A (en)*2019-02-272019-05-28维沃移动通信有限公司 Focusing camera module and terminal equipment
CN112135034A (en)*2019-06-242020-12-25Oppo广东移动通信有限公司Photographing method and device based on ultrasonic waves, electronic equipment and storage medium
CN111601021A (en)*2020-05-112020-08-28维沃移动通信有限公司 Photographing device, electronic device and control method
CN113242375A (en)*2021-06-112021-08-10维沃移动通信有限公司Camera module and electronic equipment

Also Published As

Publication numberPublication date
CN113747067A (en)2021-12-03

Similar Documents

PublicationPublication DateTitle
CN109547701B (en) Image capturing method, device, storage medium and electronic device
CN112312016B (en)Shooting processing method and device, electronic equipment and readable storage medium
CN110569822A (en) Image processing method and device, electronic device and storage medium
CN112532881B (en) Image processing method, device and electronic device
CN112738397A (en)Shooting method, shooting device, electronic equipment and readable storage medium
CN106878605A (en) Method and electronic device for image generation based on electronic device
CN112822412B (en)Exposure method, exposure device, electronic equipment and storage medium
CN111756989A (en) Method and device for controlling lens focus
CN113747067B (en) Photography methods, devices, electronic equipment and storage media
CN108040204B (en) A multi-camera-based image capturing method, device and storage medium
WO2023071933A1 (en)Camera photographing parameter adjustment method and apparatus and electronic device
CN114445315A (en)Image quality enhancement method and electronic device
CN113873160B (en)Image processing method, device, electronic equipment and computer storage medium
CN114025100B (en) Shooting method, device, electronic device and readable storage medium
CN114244999A (en) Automatic focusing method, device, imaging device and storage medium
KR101797040B1 (en)Digital photographing apparatus and control method thereof
WO2023236209A1 (en)Image processing method and apparatus, electronic device, and storage medium
CN112911059B (en) Photographing method, device, electronic device and readable storage medium
CN111461950B (en) Image processing methods and devices
CN114390182B (en) Shooting method, device and electronic equipment
CN112653841B (en)Shooting method and device and electronic equipment
CN114125276B (en) Image processing method and device
CN111277754B (en)Mobile terminal shooting method and device
CN112399092A (en)Shooting method and device and electronic equipment
CN115037867A (en) Shooting method, device, computer-readable storage medium, and electronic device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp