CN111246078A - Image processing method and device - Google Patents
Image processing method and device Download PDFInfo
- Publication number
- CN111246078A CN111246078A CN201811447831.8A CN201811447831A CN111246078A CN 111246078 A CN111246078 A CN 111246078A CN 201811447831 A CN201811447831 A CN 201811447831A CN 111246078 A CN111246078 A CN 111246078A
- Authority
- CN
- China
- Prior art keywords
- image
- terminal
- camera
- collective
- faces
- 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.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/62—Control of parameters via user interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/61—Control of cameras or camera modules based on recognised objects
- H04N23/611—Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/265—Mixing
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Studio Devices (AREA)
Abstract
Description
技术领域technical field
本公开涉及图像技术领域,尤其涉及一种影像处理方法及装置。The present disclosure relates to the field of image technology, and in particular, to an image processing method and device.
背景技术Background technique
为了给生活留下美好的回忆,在一些出行或聚会的过程中,用户可以使用手机将生活中的美好瞬间都录制下来,以便于以后查阅或观看。In order to leave good memories in life, during some travels or gatherings, users can use their mobile phones to record all the good moments in life for later reference or viewing.
相关技术中,手机的前后分别设置有第二摄像头和第一摄像头,当用户拍摄美景或者为好友拍照时,可以开启第一摄像头进行拍摄;当用户拍摄自拍照时,可以开启第二摄像头进行拍摄。In the related art, the front and rear of the mobile phone are respectively provided with a second camera and a first camera. When the user takes pictures of beautiful scenery or takes pictures of friends, the first camera can be turned on to take pictures; when the user takes self-portraits, the second camera can be turned on to take pictures. .
发明内容SUMMARY OF THE INVENTION
为克服相关技术中存在的问题,本公开实施例提供一种影像处理方法及装置。所述技术方案如下:To overcome the problems existing in the related art, embodiments of the present disclosure provide an image processing method and apparatus. The technical solution is as follows:
根据本公开实施例的第一方面,提供一种影像处理方法,包括:According to a first aspect of the embodiments of the present disclosure, an image processing method is provided, including:
确定终端当前是否预备使用第一摄像头拍摄集体影像,所述影像包括视频或照片;determining whether the terminal is currently ready to use the first camera to shoot a collective image, the image including video or photo;
若所述终端当前预备使用第一摄像头拍摄集体影像,开启所述终端的第二摄像头;If the terminal is currently preparing to use the first camera to capture a collective image, turning on the second camera of the terminal;
在预设时间段内分别获取所述第一摄像头拍摄的集体影像和所述第二摄像头拍摄的第二影像。The collective image captured by the first camera and the second image captured by the second camera are acquired respectively within a preset time period.
本公开的实施例提供的技术方案可以包括以下有益效果:当确定用户使用终端的后置摄像头拍摄集体影像时,可以指示前置摄像头开启,并同时获取后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像,避免了拍摄者无法拍照留念的情况,提高了终端拍照的灵活性以及拍摄照片的多样性,进而提高了用户体验。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: when it is determined that the user uses the rear camera of the terminal to shoot a collective image, the front camera can be instructed to be turned on, and the collective image captured by the rear camera and the front camera can be acquired simultaneously The captured second image avoids the situation that the photographer cannot take pictures for souvenirs, improves the flexibility of the terminal to take pictures and the diversity of the pictures taken, thereby improving the user experience.
在一个实施例中,所述方法还包括:In one embodiment, the method further includes:
根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像。According to the collective image and the second image, a combined image of the collective image and the second image is acquired.
本公开的实施例提供的技术方案可以包括以下有益效果:当获取到后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像之后,可以将第二影像与集体影像进行拼接或融合,使得第二影像中的拍摄者以及集体影像中的多个被拍摄者能够共同出现在该合并影像中,避免了拍摄者无法拍照留念的情况,提高了终端的实用性,进而提高了用户体验。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: after the collective image captured by the rear camera and the second image captured by the front camera are acquired, the second image and the collective image may be spliced or merged, so that The photographer in the second image and multiple subjects in the collective image can co-appear in the combined image, which avoids the situation where the photographer cannot take pictures, improves the practicability of the terminal, and further improves the user experience.
在一个实施例中,所述根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像包括:In one embodiment, acquiring a combined image of the collective image and the second image according to the collective image and the second image includes:
确定所述第二影像是否包括预设人脸信息;determining whether the second image includes preset face information;
若所述第二影像包括所述预设人脸信息,根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像。If the second image includes the preset face information, a combined image of the collective image and the second image is acquired according to the collective image and the second image.
本公开的实施例提供的技术方案可以包括以下有益效果:当确定第二影像中的拍摄者为授权用户时,获取集体影像和第二影像的合并影像,避免了随意获取并存储合成影像造成的存储资源的浪费,提高了存储资源的有效利用率。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: when it is determined that the photographer in the second image is an authorized user, the combined image of the collective image and the second image is obtained, avoiding the random acquisition and storage of the combined image. The waste of storage resources improves the effective utilization of storage resources.
在一个实施例中,所述方法还包括:In one embodiment, the method further includes:
建立所述集体影像和所述第二影像的对应关系;establishing a corresponding relationship between the collective image and the second image;
按照所述集体影像和所述第二影像的对应关系,存储所述集体影像和所述第二影像。According to the corresponding relationship between the collective image and the second image, the collective image and the second image are stored.
本公开的实施例提供的技术方案可以包括以下有益效果:当获取到后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像之后,可以按照集体影像和第二影像的对应关系,同时存储集体影像和第二影像,避免了拍摄者无法拍照留念的情况,提高了终端的实用性,进而提高了用户体验。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: after the collective image captured by the rear camera and the second image captured by the front camera are acquired, the corresponding relationship between the collective image and the second image may be stored at the same time. The collective image and the second image avoid the situation that the photographer cannot take pictures for souvenirs, improve the practicability of the terminal, and further improve the user experience.
在一个实施例中,所述确定终端当前是否预备使用第一摄像头拍摄集体影像包括:In one embodiment, the determining whether the terminal is currently ready to use the first camera to capture a collective image includes:
在检测到所述第一摄像头开启时,确定所述终端当前界面上显示的图像中人脸的数量是否大于或等于数量阈值;When it is detected that the first camera is turned on, determine whether the number of faces in the image displayed on the current interface of the terminal is greater than or equal to a number threshold;
若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确认所述终端当前预备使用所述第一摄像头拍摄集体影像。If the number of human faces in the image displayed on the current interface of the terminal is greater than or equal to the number threshold, it is confirmed that the terminal is currently preparing to use the first camera to shoot a collective image.
本公开的实施例提供的技术方案可以包括以下有益效果:通过第一摄像头开启时终端当前界面上显示的图像中人脸的数量来确定终端当前是否预备使用第一摄像头拍摄集体影像,提高了终端确定是否拍摄集体影像的便捷性和精确度,进而提高了用户体验。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: it is determined whether the terminal is currently ready to use the first camera to shoot a collective image by the number of faces in the images displayed on the current interface of the terminal when the first camera is turned on, which improves the performance of the terminal. The ease and accuracy of determining whether to capture a group image improves the user experience.
在一个实施例中,所述若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确认所述终端当前预备使用所述第一摄像头拍摄集体影像包括:In one embodiment, if the number of faces in the image displayed on the current interface of the terminal is greater than or equal to a number threshold, confirming that the terminal is currently preparing to use the first camera to shoot a collective image includes:
若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确定所述终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离是否小于或等于预设距离阈值;If the number of faces in the image displayed on the current interface of the terminal is greater than or equal to the number threshold, determine whether the distance between any two adjacent faces among the multiple faces included in the image displayed on the current interface of the terminal is less than or equal to or equal to the preset distance threshold;
若所述终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离小于或等于所述预设距离阈值,确定所述终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积是否满足预设面积范围;If the distance between any two adjacent faces among the multiple faces included in the image displayed on the current interface of the terminal is less than or equal to the preset distance threshold, it is determined that the image displayed on the current interface of the terminal includes multiple faces. Whether the area of the display area occupied by any one of the personal faces meets the preset area range;
若所述终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积满足所述预设面积范围,确认所述终端当前预备使用所述第一摄像头拍摄集体影像。If the area of the display area occupied by any one of the faces included in the image displayed on the current interface of the terminal satisfies the preset area range, it is confirmed that the terminal is currently ready to use the first camera to capture a collective image.
本公开的实施例提供的技术方案可以包括以下有益效果:通过第一摄像头开启时终端当前界面上显示的图像中人脸占用的显示区域以及人脸与人脸之间的距离来确定终端当前是否预备使用第一摄像头拍摄集体影像,提高了终端确定是否拍摄集体影像的便捷性和精确度,进而提高了用户体验。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: determining whether the terminal is currently occupied by the display area occupied by the human face and the distance between the human face and the human face in the image displayed on the current interface of the terminal when the first camera is turned on Preparing to use the first camera to shoot a collective image improves the convenience and accuracy of the terminal in determining whether to shoot a collective image, thereby improving user experience.
在一个实施例中,所述确定终端当前是否预备使用第一摄像头拍摄集体影像包括:In one embodiment, the determining whether the terminal is currently ready to use the first camera to capture a collective image includes:
获取第一操作指令,响应于所述第一操作指令检测所述终端的第一摄像头是否开启;acquiring a first operation instruction, and detecting whether the first camera of the terminal is turned on in response to the first operation instruction;
当所述终端的第一摄像头开启时,确定所述终端当前是否预备使用第一摄像头拍摄集体影像。When the first camera of the terminal is turned on, it is determined whether the terminal is currently ready to use the first camera to shoot a collective image.
本公开的实施例提供的技术方案可以包括以下有益效果:终端可以根据用户的指示,在终端当前预备使用第一摄像头拍摄集体影像时,同时获取后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像,避免了随意获取并存储前置摄像头拍摄的第二影像造成的存储资源的浪费,提高了存储资源的有效利用率。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: according to the user's instruction, when the terminal is currently preparing to use the first camera to capture a collective image, the terminal can simultaneously acquire the collective image captured by the rear camera and the image captured by the front camera. The second image avoids the waste of storage resources caused by randomly acquiring and storing the second image captured by the front camera, and improves the effective utilization of storage resources.
根据本公开实施例的第二方面,提供一种影像处理装置,包括:According to a second aspect of the embodiments of the present disclosure, an image processing apparatus is provided, including:
确定模块,用于确定终端当前是否预备使用第一摄像头拍摄集体影像,所述影像包括视频或照片;a determining module, configured to determine whether the terminal is currently ready to use the first camera to shoot a collective image, the image including video or photo;
开启模块,用于在所述终端当前预备使用第一摄像头拍摄集体影像时,开启所述终端的第二摄像头;an opening module, configured to turn on the second camera of the terminal when the terminal is currently preparing to use the first camera to shoot a collective image;
第一获取模块,用于在预设时间段内分别获取所述第一摄像头拍摄的集体影像和所述第二摄像头拍摄的第二影像。The first acquisition module is configured to acquire the collective image captured by the first camera and the second image captured by the second camera respectively within a preset time period.
在一个实施例中,所述装置还包括:In one embodiment, the apparatus further comprises:
第二获取模块,用于根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像。A second acquiring module, configured to acquire a combined image of the collective image and the second image according to the collective image and the second image.
在一个实施例中,所述第二获取模块包括:In one embodiment, the second obtaining module includes:
第一确定子模块,用于确定所述第二影像是否包括预设人脸信息;a first determination submodule, configured to determine whether the second image includes preset face information;
第一获取子模块,用于在所述第二影像包括所述预设人脸信息时,根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像。a first acquisition submodule, configured to acquire a combined image of the collective image and the second image according to the collective image and the second image when the second image includes the preset face information .
在一个实施例中,所述装置还包括:In one embodiment, the apparatus further includes:
建立模块,用于建立所述集体影像和所述第二影像的对应关系;establishing a module for establishing a corresponding relationship between the collective image and the second image;
存储模块,用于按照所述集体影像和所述第二影像的对应关系,存储所述集体影像和所述第二影像。The storage module is configured to store the collective image and the second image according to the corresponding relationship between the collective image and the second image.
在一个实施例中,所述确定模块包括:In one embodiment, the determining module includes:
第二确定子模块,用于在检测到所述第一摄像头开启时,确定所述终端当前界面上显示的图像中人脸的数量是否大于或等于数量阈值;a second determination submodule, configured to determine whether the number of faces in the image displayed on the current interface of the terminal is greater than or equal to a number threshold when it is detected that the first camera is turned on;
第一确认子模块,用于在所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值时,确认所述终端当前预备使用所述第一摄像头拍摄集体影像。The first confirmation sub-module is configured to confirm that the terminal is currently preparing to use the first camera to shoot a collective image when the number of faces in the image displayed on the current interface of the terminal is greater than or equal to a number threshold.
在一个实施例中,所述第一确认子模块包括:In one embodiment, the first confirmation submodule includes:
第一确定单元,用于若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确定所述终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离是否小于或等于预设距离阈值;A first determining unit, configured to determine any two adjacent persons among the multiple faces included in the image displayed on the current interface of the terminal if the number of human faces in the image displayed on the current interface of the terminal is greater than or equal to the number threshold; Whether the distance between faces is less than or equal to the preset distance threshold;
第二确定单元,用于在所述终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离小于或等于所述预设距离阈值时,确定所述终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积是否满足预设面积范围;A second determining unit, configured to determine the current state of the terminal when the distance between any two adjacent faces among the multiple faces included in the image displayed on the current interface of the terminal is less than or equal to the preset distance threshold Whether the area of the display area occupied by any one of the multiple faces included in the image displayed on the interface satisfies the preset area range;
确认单元,用于在所述终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积满足所述预设面积范围时,确认所述终端当前预备使用所述第一摄像头拍摄集体影像。A confirmation unit, configured to confirm that the terminal is currently preparing to use the first A camera captures the collective image.
在一个实施例中,所述确定模块包括:In one embodiment, the determining module includes:
第二获取子模块,用于获取第一操作指令,响应于所述第一操作指令检测所述终端的第一摄像头是否开启;a second acquisition submodule, configured to acquire a first operation instruction, and detect whether the first camera of the terminal is turned on in response to the first operation instruction;
第三确定子模块,用于在所述终端的第一摄像头开启时,确定所述终端当前是否预备使用第一摄像头拍摄集体影像。The third determination sub-module is configured to determine whether the terminal is currently ready to use the first camera to shoot a collective image when the first camera of the terminal is turned on.
根据本公开实施例的第三方面,提供一种影像处理装置,包括:According to a third aspect of the embodiments of the present disclosure, an image processing apparatus is provided, including:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,所述处理器被配置为:wherein the processor is configured to:
确定终端当前是否预备使用第一摄像头拍摄集体影像,所述影像包括视频或照片;determining whether the terminal is currently ready to use the first camera to shoot a collective image, the image including video or photo;
若所述终端当前预备使用第一摄像头拍摄集体影像,开启所述终端的第二摄像头;If the terminal is currently preparing to use the first camera to capture a collective image, turning on the second camera of the terminal;
在预设时间段内分别获取所述第一摄像头拍摄的集体影像和所述第二摄像头拍摄的第二影像。The collective image captured by the first camera and the second image captured by the second camera are acquired respectively within a preset time period.
根据本公开实施例的第四方面,提供一种一种计算机可读存储介质,其上存储有计算机指令,其特征在于,该指令被处理器执行时实现上述第一方面任意一个实施例所述的方法的步骤。According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium on which computer instructions are stored, characterized in that, when the instructions are executed by a processor, the instructions described in any one of the embodiments of the first aspect are implemented. steps of the method.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。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.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.
图1a是根据一示例性实施例示出的影像处理方法的流程图。Fig. 1a is a flowchart of an image processing method according to an exemplary embodiment.
图1b是根据一示例性实施例示出的影像处理方法的流程图。Fig. 1b is a flowchart of an image processing method according to an exemplary embodiment.
图1c是根据一示例性实施例示出的合并影像的示意图。FIG. 1c is a schematic diagram illustrating a merged image according to an exemplary embodiment.
图1d是根据一示例性实施例示出的合并影像的示意图。FIG. 1d is a schematic diagram illustrating a merged image according to an exemplary embodiment.
图1e是根据一示例性实施例示出的影像处理方法的流程图。FIG. 1e is a flowchart of an image processing method according to an exemplary embodiment.
图1f是根据一示例性实施例示出的影像处理方法的流程图。Fig. 1f is a flowchart of an image processing method according to an exemplary embodiment.
图1g是根据一示例性实施例示出的影像处理方法的流程图。FIG. 1g is a flowchart of an image processing method according to an exemplary embodiment.
图1h是根据一示例性实施例示出的影像处理方法的流程图。FIG. 1h is a flowchart of an image processing method according to an exemplary embodiment.
图1i是根据一示例性实施例示出的相邻人脸的距离和人脸显示区域面积的示意图。Fig. 1i is a schematic diagram showing the distance between adjacent faces and the area of the face display area according to an exemplary embodiment.
图1j是根据一示例性实施例示出的影像处理方法的流程图。Fig. 1j is a flowchart of an image processing method according to an exemplary embodiment.
图2是根据一示例性实施例示出的影像处理方法的流程图。FIG. 2 is a flowchart of an image processing method according to an exemplary embodiment.
图3是根据一示例性实施例示出的影像处理方法的流程图。FIG. 3 is a flowchart of an image processing method according to an exemplary embodiment.
图4a是根据一示例性实施例示出的影像处理装置的结构示意图。FIG. 4a is a schematic structural diagram of an image processing apparatus according to an exemplary embodiment.
图4b是根据一示例性实施例示出的影像处理装置的结构示意图。FIG. 4b is a schematic structural diagram of an image processing apparatus according to an exemplary embodiment.
图4c是根据一示例性实施例示出的影像处理装置的结构示意图。FIG. 4c is a schematic structural diagram of an image processing apparatus according to an exemplary embodiment.
图4d是根据一示例性实施例示出的影像处理装置的结构示意图。FIG. 4d is a schematic structural diagram of an image processing apparatus according to an exemplary embodiment.
图4e是根据一示例性实施例示出的影像处理装置的结构示意图。FIG. 4e is a schematic structural diagram of an image processing apparatus according to an exemplary embodiment.
图4f是根据一示例性实施例示出的影像处理装置的结构示意图。FIG. 4f is a schematic structural diagram of an image processing apparatus according to an exemplary embodiment.
图4g是根据一示例性实施例示出的影像处理装置的结构示意图。FIG. 4g is a schematic structural diagram of an image processing apparatus according to an exemplary embodiment.
图5是根据一示例性实施例示出的影像处理装置的结构框图。FIG. 5 is a structural block diagram of an image processing apparatus according to an exemplary embodiment.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure, as recited in the appended claims.
本公开实施例提供的技术方案涉及终端,所述终端可以为手机,平板电脑以及其他设置有两个摄像头的设备,该两个摄像头可以分别为前置摄像头和后置摄像头。相关技术中,用户在使用终端为多个好友拍摄集体照时,作为拍摄者的用户无法在相同时间拍照留念,拍摄完成的照片也由于没有作为拍摄者的用户而不够圆满,用户体验不佳。本公开的实施例提供的技术方案中,终端在确定用户使用后置摄像头拍摄集体影像时,可以指示前置摄像头开启,并同时获取后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像,避免了拍摄者无法拍照留念的情况,提高了终端拍照的灵活性以及拍摄照片的多样性,进而提高了用户体验。The technical solutions provided by the embodiments of the present disclosure relate to a terminal, and the terminal may be a mobile phone, a tablet computer, or other devices provided with two cameras, and the two cameras may be a front camera and a rear camera respectively. In the related art, when a user uses a terminal to take group photos for multiple friends, the user who is the photographer cannot take pictures at the same time, and the completed photos are not satisfactory because there is no user who is the photographer, and the user experience is poor. In the technical solutions provided by the embodiments of the present disclosure, when it is determined that the user uses the rear camera to capture a collective image, the terminal may instruct the front camera to turn on, and simultaneously acquire the collective image captured by the rear camera and the second image captured by the front camera , which avoids the situation that the photographer cannot take pictures for souvenirs, improves the flexibility of the terminal to take pictures and the diversity of the pictures taken, thereby improving the user experience.
图1a是根据一示例性实施例示出的一种影像处理方法的流程图,该影像处理方法用于终端,如图1a所示,该影像处理方法包括以下步骤101至步骤103:Fig. 1a is a flow chart of an image processing method according to an exemplary embodiment. The image processing method is used in a terminal. As shown in Fig. 1a, the image processing method includes the following
在步骤101中,确定终端当前是否预备使用第一摄像头拍摄集体影像。In
示例的,该影像可以包括视频或照片。Illustratively, the imagery may include video or photos.
本公开实施例以第一摄像头为后置摄像头,第二摄像头为前置摄像头为例进行说明。当终端检测到后置摄像头开启时,终端的界面可以显示通过后置摄像头采集的图像,并通过该图像调整后置摄像头的焦点和焦距,进而拍摄影像。The embodiments of the present disclosure are described by taking an example that the first camera is a rear camera and the second camera is a front camera. When the terminal detects that the rear camera is turned on, the interface of the terminal can display the image collected by the rear camera, and adjust the focus and focal length of the rear camera through the image, and then shoot the image.
具体的,终端可以通过后置摄像头开启后,界面上显示的图像中包括的人脸数量确定终端当前预备使用第一摄像头拍摄集体影像,若终端界面上显示的图像中包括的人脸数量较多,则可以确认终端当前预备使用后置摄像头拍摄集体照片。Specifically, after the terminal is turned on through the rear camera, the number of faces included in the image displayed on the interface determines that the terminal is currently ready to use the first camera to capture collective images. If the image displayed on the terminal interface includes a large number of faces , it can be confirmed that the terminal is currently ready to use the rear camera to take group photos.
在步骤102中,若终端当前预备使用第一摄像头拍摄集体影像,开启终端的第二摄像头。In
示例的,在终端检测到界面上显示的图像中包括的人脸数量较多时,可以指示前置摄像头开启。For example, when the terminal detects that the image displayed on the interface includes a large number of faces, it may instruct the front camera to be turned on.
在步骤103中,在预设时间段内分别获取第一摄像头拍摄的集体影像和第二摄像头拍摄的第二影像。In
示例的,在终端通过后置摄像头拍摄集体影像时,终端可以同时通过前置摄像头拍摄作为拍摄者的用户的第二影像。或者,在终端通过后置摄像头拍摄集体影像之后,终端可以在10s之后通过前置摄像头拍摄作为拍摄者的用户的第二影像,在这10s内作为拍摄者的用户可以调整姿势和表情。实际应用中,该预设时间段可以根据具体情况进行设置,本公开实施例对此不作限定。For example, when the terminal shoots a collective image through the rear camera, the terminal may simultaneously shoot the second image of the user who is the photographer through the front camera. Alternatively, after the terminal shoots the collective image through the rear camera, the terminal may use the front camera to shoot the second image of the user as the photographer 10s later, and the user as the photographer can adjust the posture and expression within the 10s. In practical applications, the preset time period may be set according to specific conditions, which is not limited in this embodiment of the present disclosure.
本公开的实施例提供的技术方案中,当确定用户使用终端的后置摄像头拍摄集体影像时,可以指示前置摄像头开启,并同时获取后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像,避免了拍摄者无法拍照留念的情况,提高了终端拍照的灵活性以及拍摄照片的多样性,进而提高了用户体验。In the technical solutions provided by the embodiments of the present disclosure, when it is determined that the user uses the rear camera of the terminal to capture a collective image, the user may instruct the front camera to turn on, and simultaneously acquire the collective image captured by the rear camera and the second image captured by the front camera. The image avoids the situation that the photographer cannot take pictures for souvenirs, improves the flexibility of the terminal to take pictures and the diversity of the pictures taken, thereby improving the user experience.
在一个实施例中,如图1b所示,方法还包括步骤104:In one embodiment, as shown in Figure 1b, the method further includes step 104:
在步骤104中,根据集体影像和第二影像,获取集体影像和第二影像的合并影像。In
示例的,终端可以采用合并的方式获取集体影像和第二影像的合并影像,如图1c所示,终端获取到集体影像10a和第二影像10b之后,可以将集体影像10a和第二影像10b拼接在一起,合成合并影像10c。具体的,集体影像10a和第二影像10b可以如图1c一样按照上下结构拼接在一起,也可以按照左右结构拼接在一起,或者还可以将第二影像10b缩小后嵌入集体影像10a没有人脸信息的区域。For example, the terminal may acquire the combined image of the collective image and the second image in a combined manner. As shown in FIG. 1c , after acquiring the
实际应用中,终端还可以采用融合的方式获取集体影像和第二影像的合并影像,如图1d所示,终端获取到集体影像10a和第二影像10b之后,可以采用图像处理技术,将第二影像10b包括的用户的影像提取出来,融合进集体影像10a中,获取合并影像10c。In practical applications, the terminal may also acquire the combined image of the collective image and the second image in a fusion manner. As shown in FIG. 1d, after the terminal acquires the
本公开的实施例提供的技术方案中,当获取到后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像之后,可以将第二影像与集体影像进行拼接或融合,使得第二影像中的拍摄者以及集体影像中的多个被拍摄者能够共同出现在该合并影像中,避免了拍摄者无法拍照留念的情况,提高了终端的实用性,进而提高了用户体验。In the technical solution provided by the embodiments of the present disclosure, after the collective image captured by the rear camera and the second image captured by the front camera are acquired, the second image and the collective image can be spliced or fused, so that the second image is The photographer and multiple subjects in the collective image can co-appear in the combined image, which avoids the situation where the photographer cannot take pictures, improves the practicability of the terminal, and further improves the user experience.
在一个实施例中,如图1e所示,在步骤104中,根据集体影像和第二影像,获取集体影像和第二影像的合并影像可以通过步骤1041和步骤1042实现:In one embodiment, as shown in FIG. 1e, in
在步骤1041中,确定第二影像是否包括预设人脸信息。In
在步骤1042中,若第二影像包括预设人脸信息,根据集体影像和第二影像,获取集体影像和第二影像的合并影像。In
示例的,初始化时,可以在终端中设置预设人脸信息,当终端获取到集体影像和第二影像之后,可以首先获取第二影像中包括的人脸信息,然后确定该人脸信息与预设人脸信息是否匹配,若该人脸信息与预设人脸信息匹配,说明第二影像中包括预设人脸信息,即第二影像中包括的人脸信息对应的作为拍摄者的用户为授权用户,此时终端可以获取集体影像和第二影像的合并影像。For example, during initialization, preset face information can be set in the terminal, and after the terminal obtains the collective image and the second image, it can first obtain the face information included in the second image, and then determine the face information and the preset. Assuming whether the face information matches, if the face information matches the preset face information, it means that the preset face information is included in the second image, that is, the user as the photographer corresponding to the face information included in the second image is Authorize the user, at this time, the terminal can obtain the combined image of the collective image and the second image.
本公开的实施例提供的技术方案中,当确定第二影像中的拍摄者为授权用户时,获取集体影像和第二影像的合并影像,避免了随意获取并存储合成影像造成的存储资源的浪费,提高了存储资源的有效利用率。In the technical solutions provided by the embodiments of the present disclosure, when it is determined that the photographer in the second image is an authorized user, a combined image of the collective image and the second image is obtained, thereby avoiding the waste of storage resources caused by arbitrarily acquiring and storing the combined image. , which improves the effective utilization of storage resources.
在一个实施例中,如图1f所示,方法还包括步骤105和步骤106:In one embodiment, as shown in Figure 1f, the method further includes
在步骤105中,建立集体影像和第二影像的对应关系。In
在步骤106中,按照集体影像和第二影像的对应关系,存储集体影像和第二影像。In
示例的,终端在获取到集体影像和第二影像之后,可以按照拍摄的时间生成标签,然后将该标签同时写集体影像和第二影像的属性信息中,然后分别存储集体影像和第二影像。用户在查阅相册时,终端可以实时读取当前界面显示的照片的属性信息,然后确定相册中是否存在与其属性信息相同的照片,若存在,则可以将属性信息相同的照片同时显示在界面上,以便于用户查看。For example, after acquiring the collective image and the second image, the terminal may generate a tag according to the shooting time, and then write the tag into the attribute information of the collective image and the second image at the same time, and then store the collective image and the second image respectively. When a user is viewing an album, the terminal can read the attribute information of the photo displayed on the current interface in real time, and then determine whether there is a photo with the same attribute information in the album. If there is, the photo with the same attribute information can be displayed on the interface at the same time. for user viewing.
本公开的实施例提供的技术方案中,当获取到后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像之后,可以按照集体影像和第二影像的对应关系,同时存储集体影像和第二影像,避免了拍摄者无法拍照留念的情况,提高了终端的实用性,进而提高了用户体验。In the technical solution provided by the embodiments of the present disclosure, after the collective image captured by the rear camera and the second image captured by the front camera are acquired, the collective image and the second image may be stored simultaneously according to the corresponding relationship between the collective image and the second image. The second image avoids the situation that the photographer cannot take pictures for souvenirs, improves the practicability of the terminal, and further improves the user experience.
在一个实施例中,如图1g所示,在步骤101中,确定终端当前是否预备使用第一摄像头拍摄集体影像可以通过步骤1011和步骤1012实现:In one embodiment, as shown in FIG. 1g, in
在步骤1011中,在检测到第一摄像头开启时,确定终端当前界面上显示的图像中人脸的数量是否大于或等于数量阈值。In
在步骤1012中,若终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确认终端当前预备使用第一摄像头拍摄集体影像。In
示例的,终端可以实时检测后置摄像头是否开启,若检测到后置摄像头开启,则终端的当前界面上显示有后置摄像头采集到的影像,此时终端可以确定当前界面上显示的影像中人脸数量是否大于或等于数量阈值,若当前界面上显示的影像中人脸数量大于或等于数量阈值,说明此时后置摄像头采集的区域的人数较多,因此可以确定终端当前预备使用后置摄像头拍摄集体影像。For example, the terminal can detect in real time whether the rear camera is turned on. If it is detected that the rear camera is turned on, the current interface of the terminal displays the image captured by the rear camera. At this time, the terminal can determine the person in the image displayed on the current interface. Whether the number of faces is greater than or equal to the number threshold, if the number of faces in the image displayed on the current interface is greater than or equal to the number threshold, it means that there are many people in the area captured by the rear camera at this time, so it can be determined that the terminal is currently ready to use the rear camera Take group images.
例如,终端可以确定当前界面上显示的影像中人脸数量是否大于或等于3,若当前界面上显示的影像中人脸数量大于或等于3,即可确定终端当前预备使用后置摄像头拍摄集体影像。实际应用中,该数量阈值可以根据实际情况进行调整,本公开实施例对此不作限定。For example, the terminal can determine whether the number of faces in the image displayed on the current interface is greater than or equal to 3, and if the number of faces in the image displayed on the current interface is greater than or equal to 3, it can be determined that the terminal is currently preparing to use the rear camera to shoot a collective image . In practical applications, the quantity threshold may be adjusted according to actual conditions, which is not limited in this embodiment of the present disclosure.
上述实施例同样适用于图1b、图1e和图1f所述的技术方案。The above embodiments are also applicable to the technical solutions described in FIG. 1b, FIG. 1e and FIG. 1f.
本公开的实施例提供的技术方案中,通过第一摄像头开启时终端当前界面上显示的图像中人脸的数量来确定终端当前是否预备使用第一摄像头拍摄集体影像,提高了终端确定是否拍摄集体影像的便捷性和精确度,进而提高了用户体验。In the technical solutions provided by the embodiments of the present disclosure, whether the terminal is currently ready to use the first camera to shoot a group image is determined by the number of faces in the image displayed on the current interface of the terminal when the first camera is turned on, which improves the ability of the terminal to determine whether to shoot a group image. Convenience and accuracy of imagery, which in turn improves the user experience.
在一个实施例中,如图1h所示,在步骤1012中,若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确认所述终端当前预备使用所述第一摄像头拍摄集体影像,可以通过步骤1012a至步骤1012c实现:In one embodiment, as shown in FIG. 1h, in
在步骤1012a中,若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确定所述终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离是否小于或等于预设距离阈值。In
在步骤1012b中,若终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离小于或等于预设距离阈值,确定终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积是否满足预设面积范围。In step 1012b, if the distance between any two adjacent faces among the multiple faces included in the image displayed on the current interface of the terminal is less than or equal to a preset distance threshold, determine the multiple faces included in the image displayed on the current interface of the terminal Whether the area of the display area occupied by any face in the face meets the preset area range.
在步骤1012c中,若终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积满足预设面积范围,确认终端当前预备使用第一摄像头拍摄集体影像。In
示例的,如果用户在人流量比较大的旅游胜地拍摄照片,由于其他游人的影响,即便是用户正在为朋友拍摄单人照,终端也很容易将当前场景误判为预备拍摄集体影像。因此,终端在确定当前界面上显示的影像中人脸数量大于或等于数量阈值之后,还需要进行进一步的判断。For example, if the user takes a photo in a tourist resort with a high traffic flow, even if the user is taking a single photo for a friend, the terminal can easily misjudge the current scene as a group image ready to be taken due to the influence of other tourists. Therefore, the terminal needs to make further judgment after determining that the number of faces in the image displayed on the current interface is greater than or equal to the number threshold.
通常的,用户在为多个朋友拍摄集体影像时,各朋友之间的距离不会过大。同时,为了拍摄清楚每个朋友的脸部特征,拍摄终端至作为拍摄主体的该多个朋友之间的距离不会过远,因此每个朋友的脸部在拍摄终端的界面上显示时占用的显示区域不会过小也不会过大。综上所述,初始化时,终端可以设置预设距离阈值和预设面积范围,在确定当前界面上显示的影像中人脸数量大于或等于数量阈值之后,还可以继续确定可以确定当前界面上显示的影像包括的多个人脸中任意两个相邻人脸之间的距离是否小于或等于预设距离阈值,并在任意两个相邻人脸之间的距离小于或等于预设距离阈值时,接着确定该多个人脸中任意一个人脸占用的显示区域的面积是否满足预设面积范围,若任意一个人脸占用的显示区域的面积满足预设面积范围,则说明终端当前预备拍摄集体影像。Generally, when a user shoots a group image for a plurality of friends, the distance between the friends is not too large. At the same time, in order to clearly photograph the facial features of each friend, the distance between the photographing terminal and the multiple friends who are the subjects of photographing is not too far, so the face of each friend occupies the space when displayed on the interface of the photographing terminal. The display area is neither too small nor too large. To sum up, during initialization, the terminal can set a preset distance threshold and a preset area range. After determining that the number of faces in the image displayed on the current interface is greater than or equal to the number threshold, it can continue to determine that the number of faces displayed on the current interface can be determined. Whether the distance between any two adjacent faces in the multiple faces included in the image is less than or equal to the preset distance threshold, and when the distance between any two adjacent faces is less than or equal to the preset distance threshold, Next, it is determined whether the area of the display area occupied by any one of the faces satisfies the preset area range, and if the area of the display area occupied by any one face meets the preset area range, it indicates that the terminal is currently preparing to shoot a collective image.
示例的,该预设距离阈值和预设面积范围均可以通过终端显示屏的像素来表征。例如,如图1i所示,在确定当前界面上显示的影像中人脸数量大于或等于3之后,终端还可以确定当前界面上显示的影像包括的多个人脸中任意两个相邻人脸之间的距离L是否小于或等于200像素,若任意两个相邻人脸之间的距离L小于或等于200像素,确定终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域S的面积是否大于或等于300像素小于或等于500像素,若任意一个人脸占用的显示区域S的面积大于或等于300像素小于或等于500像素,则确认终端当前预备拍摄集体影像。实际应用中,终端可以预先设置遍历方向,在确定当前界面上显示的影像中人脸数量大于或等于3之后,终端可以沿预设的遍历方向依次获取当前界面上显示的影像中各个人脸的位置,人脸的位置可以通过每个人脸中鼻子的位置进行标记,然后按照该遍历方向上两个相邻的鼻子的位置确定两个相邻的人脸。Exemplarily, both the preset distance threshold and the preset area range may be characterized by the pixels of the terminal display screen. For example, as shown in Figure 1i, after determining that the number of faces in the image displayed on the current interface is greater than or equal to 3, the terminal can also determine the number of any two adjacent faces among the multiple faces included in the image displayed on the current interface. Whether the distance L between them is less than or equal to 200 pixels, and if the distance L between any two adjacent faces is less than or equal to 200 pixels, determine the amount of space occupied by any one of the multiple faces included in the image displayed on the current interface of the terminal. Whether the area of the display area S is greater than or equal to 300 pixels and less than or equal to 500 pixels, if the area of the display area S occupied by any one face is greater than or equal to 300 pixels and less than or equal to 500 pixels, confirm that the terminal is currently ready to shoot group images. In practical applications, the terminal can preset the traversal direction. After determining that the number of faces in the image displayed on the current interface is greater than or equal to 3, the terminal can sequentially acquire the traversal direction of each face in the image displayed on the current interface along the preset traversal direction. The position of the face can be marked by the position of the nose in each face, and then two adjacent faces are determined according to the positions of the two adjacent noses in the traversing direction.
实际应用中预设距离阈值和预设面积范围也可以通过数学量度厘米或者毫米进行表征。例如,在确定当前界面上显示的影像中人脸数量大于或等于3之后,终端还可以确定当前界面上显示的影像包括的多个人脸中任意两个相邻人脸之间的距离是否小于或等于10毫米,若任意两个相邻人脸之间的距离小于或等于10毫米,确定终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积是否大于或等于15毫米小于或等于30毫米,若任意一个人脸占用的显示区域的面积大于或等于15毫米小于或等于30毫米,则确认终端当前预备拍摄集体影像。In practical applications, the preset distance threshold and the preset area range can also be characterized by mathematical measures of centimeters or millimeters. For example, after determining that the number of faces in the image displayed on the current interface is greater than or equal to 3, the terminal may also determine whether the distance between any two adjacent faces among the multiple faces included in the image displayed on the current interface is less than or equal to 3 It is equal to 10 mm. If the distance between any two adjacent faces is less than or equal to 10 mm, determine whether the area of the display area occupied by any one of the multiple faces included in the image displayed on the current interface of the terminal is greater than or equal to 15 mm is less than or equal to 30 mm. If the area of the display area occupied by any face is greater than or equal to 15 mm and less than or equal to 30 mm, it is confirmed that the terminal is currently preparing to shoot a group image.
上述实施例同样适用于图1b、图1e和图1f所述的技术方案。The above embodiments are also applicable to the technical solutions described in FIG. 1b, FIG. 1e and FIG. 1f.
本公开的实施例提供的技术方案中,通过第一摄像头开启时终端当前界面上显示的图像中人脸占用的显示区域以及人脸与人脸之间的距离来确定终端当前是否预备使用第一摄像头拍摄集体影像,提高了终端确定是否拍摄集体影像的便捷性和精确度,进而提高了用户体验。In the technical solution provided by the embodiments of the present disclosure, whether the terminal is currently ready to use the first camera is determined by the display area occupied by the face in the image displayed on the current interface of the terminal and the distance between the face and the face when the first camera is turned on. The camera shoots the collective image, which improves the convenience and accuracy of the terminal in determining whether to shoot the collective image, thereby improving the user experience.
在一个实施例中,如图1j所示,在步骤101中,确定终端当前是否预备使用第一摄像头拍摄集体影像可以通过步骤1013和步骤1014实现:In one embodiment, as shown in FIG. 1j, in
在步骤1013中,获取第一操作指令,响应于第一操作指令检测终端的第一摄像头是否开启。In
在步骤1014中,当终端的第一摄像头开启时,确定终端当前是否预备使用第一摄像头拍摄集体影像。In
示例的,终端可以根据用户指示确定是否需要在预备使用后置摄像头拍摄集体影像时,开启前置摄像头获取第二影像。具体的,终端上可以预先安装拍摄应用,当用户需要拍摄影像时,可以点击该应用的图标,终端在检测到该次点击之后,打开该拍摄应用。该拍摄应用上设置有是否同时开启前后摄像头的选项,用户可以根据需求进行选择。若用户选择开启,则可以点击屏幕上与该选项对应的位置,终端在检测到该次点击之后,确认接收到该第一操作指令。此时。终端打开同时开启前后摄像头的功能,并实时检测终端的后置摄像头是否开启,然后在后置摄像头开启时,确定当前是否预备使用后置摄像头拍摄集体影像,进而在确定当前预备使用后置摄像头拍摄集体影像时,开启前置摄像头获取第二影像。For example, the terminal may determine, according to the user's instruction, whether it is necessary to turn on the front camera to acquire the second image when preparing to use the rear camera to shoot the group image. Specifically, a shooting application may be pre-installed on the terminal. When the user needs to shoot an image, the user may click on the icon of the application, and the terminal will open the shooting application after detecting the click. The shooting application has an option of whether to turn on the front and rear cameras at the same time, and the user can choose according to their needs. If the user chooses to enable, the user may click on the position corresponding to the option on the screen, and after detecting the click, the terminal confirms receipt of the first operation instruction. at this time. The terminal turns on the function of turning on the front and rear cameras at the same time, and detects in real time whether the rear camera of the terminal is turned on. Then, when the rear camera is turned on, it determines whether the rear camera is currently ready to be used to shoot a collective image, and then determines whether the rear camera is currently ready to shoot. For group images, turn on the front camera to obtain the second image.
上述实施例同样适用于图1b、图1e、图1f、图1g和图1h所述的技术方案。The above embodiments are also applicable to the technical solutions described in FIGS. 1b , 1e , 1f , 1g and 1h .
本公开的实施例提供的技术方案中,终端可以根据用户的指示,在终端当前预备使用第一摄像头拍摄集体影像时,同时获取后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像,避免了随意获取并存储前置摄像头拍摄的第二影像造成的存储资源的浪费,提高了存储资源的有效利用率。In the technical solution provided by the embodiments of the present disclosure, the terminal may, according to the user's instruction, simultaneously acquire the collective image captured by the rear camera and the second image captured by the front camera when the terminal is currently preparing to use the first camera to capture the collective image, The waste of storage resources caused by randomly acquiring and storing the second image captured by the front camera is avoided, and the effective utilization rate of the storage resources is improved.
下面通过几个实施例详细介绍实现过程。The implementation process is described in detail below through several embodiments.
图2是根据一示例性实施例示出的一种影像处理方法的流程图,执行主体为终端,该终端设置有后置摄像头和前置摄像头,如图2所示,包括以下步骤201至步骤208:Fig. 2 is a flowchart of an image processing method according to an exemplary embodiment, the execution subject is a terminal, and the terminal is provided with a rear camera and a front camera, as shown in Fig. 2, including the following
在步骤201中,获取第一操作指令,响应于该第一操作指令检测终端的后置摄像头是否开启,执行步骤202。In
在步骤202中,在检测到后置摄像头开启时,确定终端当前界面上显示的图像中人脸的数量是否大于或等于数量阈值;若终端当前界面上显示的图像中人脸的数量小于数量阈值,执行步骤203;若终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,执行步骤204。In
在步骤203中,获取并存储后置摄像头拍摄的集体影像,本流程结束。In
在步骤204中,开启终端的前置摄像头,执行步骤205。In
在步骤205中,在预设时间段内分别获取后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像,执行步骤206。In
在步骤206中,确定该第二影像是否包括预设人脸信息;若该第二影像没有包括预设人脸信息,执行步骤207;若该第二影像包括预设人脸信息,执行步骤208。In
在步骤207中,存储后置摄像头拍摄的集体影像,本流程结束。In
在步骤208中,获取该集体影像和该第二影像的合并影像。In
本公开的实施例提供一种影像处理方法,当确定用户使用终端的后置摄像头拍摄集体影像时,可以指示前置摄像头开启,同时获取后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像,并获取该集体影像和第二影像的合并影像,避免了拍摄者无法拍照留念的情况,提高了终端拍照的灵活性以及拍摄照片的多样性,进而提高了用户体验。An embodiment of the present disclosure provides an image processing method, when it is determined that a user uses a rear camera of a terminal to capture a collective image, the front camera can be instructed to turn on, and a collective image captured by the rear camera and a second image captured by the front camera are acquired simultaneously. image, and obtain the combined image of the collective image and the second image, which avoids the situation that the photographer cannot take pictures, improves the flexibility of the terminal to take pictures and the diversity of the pictures taken, thereby improving the user experience.
图3是根据一示例性实施例示出的一种影像处理方法的流程图,执行主体为终端,该终端设置有后置摄像头和前置摄像头,如图3所示,包括以下步骤301至步骤310:Fig. 3 is a flowchart of an image processing method according to an exemplary embodiment, the execution subject is a terminal, and the terminal is provided with a rear camera and a front camera, as shown in Fig. 3, including the following
在步骤301中,获取第一操作指令,响应于该第一操作指令检测终端的后置摄像头是否开启,执行步骤302。In
在步骤302中,在检测到后置摄像头开启时,确定终端当前界面上显示的图像中人脸的数量是否大于或等于数量阈值;若终端当前界面上显示的图像中人脸的数量小于数量阈值,执行步骤303;若终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,执行步骤304。In
在步骤303中,获取并存储后置摄像头拍摄的集体影像,本流程结束。In
在步骤304中,确定终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离是否小于或等于预设距离阈值;若确定终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离大于预设距离阈值,执行步骤303;若确定终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离小于或等于预设距离阈值,执行步骤305。In
在步骤305中,确定终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积是否满足预设面积范围;若终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积不满足预设面积范围,执行步骤303;若终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积满足预设面积范围,执行步骤306。In
在步骤306中,开启终端的前置摄像头,执行步骤307。In
在步骤307中,在预设时间段内分别获取后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像,执行步骤308。In
在步骤308中,确定该第二影像是否包括预设人脸信息;若该第二影像没有包括预设人脸信息,执行步骤309;若该第二影像包括预设人脸信息,执行步骤310。In
在步骤309中,存储后置摄像头拍摄的集体影像,本流程结束。In
在步骤310中,获取该集体影像和该第二影像的合并影像。In
本公开的实施例提供一种影像处理方法,当确定用户使用终端的后置摄像头拍摄集体影像时,可以指示前置摄像头开启,同时获取后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像,并获取该集体影像和第二影像的合并影像,避免了拍摄者无法拍照留念的情况,提高了终端拍照的灵活性以及拍摄照片的多样性,进而提高了用户体验。An embodiment of the present disclosure provides an image processing method, when it is determined that a user uses a rear camera of a terminal to capture a collective image, the front camera can be instructed to turn on, and a collective image captured by the rear camera and a second image captured by the front camera are acquired simultaneously. image, and obtain the combined image of the collective image and the second image, which avoids the situation that the photographer cannot take pictures, improves the flexibility of the terminal to take pictures and the diversity of the pictures taken, thereby improving the user experience.
下述为本公开装置实施例,可以用于执行本公开方法实施例。The following are the apparatus embodiments of the present disclosure, which can be used to execute the method embodiments of the present disclosure.
图4a是根据一示例性实施例示出的一种影像处理装置40的结构示意图,该装置40可以通过软件、硬件或者两者的结合实现成为电子设备的部分或者全部。如图4a所示,该影像处理装置40包括确定模块401,开启模块402和第一获取模块403。FIG. 4a is a schematic structural diagram of an image processing apparatus 40 according to an exemplary embodiment, and the apparatus 40 may be implemented as part or all of an electronic device through software, hardware, or a combination of the two. As shown in FIG. 4 a , the image processing apparatus 40 includes a determining module 401 , an enabling module 402 and a first acquiring module 403 .
其中,确定模块401,用于确定终端当前是否预备使用第一摄像头拍摄集体影像,所述影像包括视频或照片。The determining module 401 is configured to determine whether the terminal is currently preparing to use the first camera to shoot a collective image, and the image includes a video or a photo.
开启模块402,用于在所述终端当前预备使用第一摄像头拍摄集体影像时,开启所述终端的第二摄像头。The turning-on module 402 is configured to turn on the second camera of the terminal when the terminal is currently preparing to use the first camera to shoot a collective image.
第一获取模块403,用于在预设时间段内分别获取所述第一摄像头拍摄的集体影像和所述第二摄像头拍摄的第二影像。The first acquiring module 403 is configured to acquire the collective image captured by the first camera and the second image captured by the second camera respectively within a preset time period.
在一个实施例中,如图4b所示,所述装置40还包括第二获取模块404。In one embodiment, as shown in FIG. 4b , the apparatus 40 further includes a second obtaining module 404 .
所述第二获取模块404,用于根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像。The second obtaining module 404 is configured to obtain a combined image of the collective image and the second image according to the collective image and the second image.
在一个实施例中,如图4c所示,所述第二获取模块404包括第一确定子模块4041和第一获取子模块4042。In one embodiment, as shown in FIG. 4 c , the second obtaining module 404 includes a first determining sub-module 4041 and a first obtaining sub-module 4042 .
其中,第一确定子模块4041,用于确定所述第二影像是否包括预设人脸信息。The first determination sub-module 4041 is configured to determine whether the second image includes preset face information.
第一获取子模块4042,用于在所述第二影像包括所述预设人脸信息时,根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像。The first obtaining sub-module 4042 is configured to obtain a combination of the collective image and the second image according to the collective image and the second image when the second image includes the preset face information image.
在一个实施例中,如图4d所示,所述装置40还包括建立模块405和存储模块406。In one embodiment, as shown in FIG. 4d , the apparatus 40 further includes a creation module 405 and a storage module 406 .
其中,建立模块405,用于建立所述集体影像和所述第二影像的对应关系。Wherein, the establishing module 405 is used for establishing the corresponding relationship between the collective image and the second image.
存储模块406,用于按照所述集体影像和所述第二影像的对应关系,存储所述集体影像和所述第二影像。The storage module 406 is configured to store the collective image and the second image according to the corresponding relationship between the collective image and the second image.
在一个实施例中,如图4e所示,所述确定模块401包括第二确定子模块4011和第一确认子模块4012。In one embodiment, as shown in FIG. 4e , the determining module 401 includes a second determining sub-module 4011 and a first confirming sub-module 4012 .
其中,第二确定子模块4011,用于在检测到所述第一摄像头开启时,确定所述终端当前界面上显示的图像中人脸的数量是否大于或等于数量阈值。The second determination sub-module 4011 is configured to determine whether the number of human faces in the image displayed on the current interface of the terminal is greater than or equal to a number threshold when it is detected that the first camera is turned on.
第一确认子模块4012,用于在所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值时,确认所述终端当前预备使用所述第一摄像头拍摄集体影像。The first confirmation sub-module 4012 is configured to confirm that the terminal is currently ready to use the first camera to shoot a collective image when the number of faces in the image displayed on the current interface of the terminal is greater than or equal to a number threshold.
上述实施例同样适用于图4b、图4c和图4d所示的影像处理装置40。The above embodiments are also applicable to the image processing apparatus 40 shown in FIG. 4b, FIG. 4c and FIG. 4d.
在一个实施例中,如图4f所示,所述第一确认子模块4012包括第一确定单元4012a,第二确定单元4012b和确认单元4012c。In one embodiment, as shown in FIG. 4f, the first confirming sub-module 4012 includes a first determining unit 4012a, a second determining unit 4012b and a confirming unit 4012c.
其中,第一确定单元4012a,用于若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确定所述终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离是否小于或等于预设距离阈值。Wherein, the first determining unit 4012a is configured to determine any two of the multiple faces included in the image displayed on the current interface of the terminal if the number of faces in the image displayed on the current interface of the terminal is greater than or equal to the number threshold Whether the distance between adjacent faces is less than or equal to the preset distance threshold.
第二确定单元4012b,用于在所述终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离小于或等于所述预设距离阈值时,确定所述终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积是否满足预设面积范围。The second determining unit 4012b is configured to determine the terminal when the distance between any two adjacent faces among the multiple faces included in the image displayed on the current interface of the terminal is less than or equal to the preset distance threshold Whether the area of the display area occupied by any one of the multiple faces included in the image displayed on the current interface satisfies the preset area range.
确认单元4012c,用于在所述终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积满足所述预设面积范围时,确认所述终端当前预备使用所述第一摄像头拍摄集体影像。Confirmation unit 4012c, configured to confirm that the terminal is currently ready to use the display area when the area of the display area occupied by any one of the faces included in the image displayed on the current interface of the terminal meets the preset area range. The first camera captures a collective image.
上述实施例同样适用于图4b、图4c和图4d所示的影像处理装置40。The above embodiments are also applicable to the image processing apparatus 40 shown in FIG. 4b, FIG. 4c and FIG. 4d.
在一个实施例中,如图4g所示,所述确定模块401包括第二获取子模块4013和第三确定子模块4014。In one embodiment, as shown in FIG. 4g , the determining module 401 includes a second obtaining sub-module 4013 and a third determining sub-module 4014 .
其中,第二获取子模块4013,用于获取第一操作指令,响应于所述第一操作指令检测所述终端的第一摄像头是否开启。The second obtaining sub-module 4013 is configured to obtain a first operation instruction, and detect whether the first camera of the terminal is turned on in response to the first operation instruction.
第三确定子模块4014,用于在所述终端的第一摄像头开启时,确定所述终端当前是否预备使用第一摄像头拍摄集体影像。The third determination sub-module 4014 is configured to determine whether the terminal is currently ready to use the first camera to shoot a collective image when the first camera of the terminal is turned on.
上述实施例同样适用于图4b、图4c、图4d、图4e和图4f所示的影像处理装置40。The above embodiments are also applicable to the image processing apparatus 40 shown in FIGS. 4b , 4c , 4d , 4e and 4f .
本公开的实施例提供一种影像处理装置,当确定用户使用终端的后置摄像头拍摄集体影像时,该装置可以指示终端的前置摄像头开启,并同时获取后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像,避免了拍摄者无法拍照留念的情况,提高了终端拍照的灵活性以及拍摄照片的多样性,进而提高了用户体验。An embodiment of the present disclosure provides an image processing apparatus. When it is determined that a user uses a rear camera of a terminal to shoot a collective image, the apparatus can instruct the front camera of the terminal to turn on, and simultaneously acquire the collective image and the front camera captured by the rear camera. The second image captured by the camera avoids the situation that the photographer cannot take pictures for souvenirs, improves the flexibility of the terminal to take pictures and the diversity of the pictures taken, thereby improving the user experience.
本公开实施例提供一种影像处理装置,包括:Embodiments of the present disclosure provide an image processing apparatus, including:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,处理器被配置为:where the processor is configured as:
确定终端当前是否预备使用第一摄像头拍摄集体影像,所述影像包括视频或照片。It is determined whether the terminal is currently preparing to use the first camera to capture a collective image, where the image includes a video or a photo.
若所述终端当前预备使用第一摄像头拍摄集体影像,开启所述终端的第二摄像头。If the terminal is currently preparing to use the first camera to capture a collective image, the second camera of the terminal is turned on.
在预设时间段内分别获取所述第一摄像头拍摄的集体影像和所述第二摄像头拍摄的第二影像。The collective image captured by the first camera and the second image captured by the second camera are acquired respectively within a preset time period.
在一个实施例中,上述处理器还可被配置为:根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像。In one embodiment, the processor may be further configured to obtain a combined image of the collective image and the second image according to the collective image and the second image.
在一个实施例中,上述处理器还可被配置为:确定所述第二影像是否包括预设人脸信息;若所述第二影像包括所述预设人脸信息,根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像。In one embodiment, the processor may be further configured to: determine whether the second image includes preset face information; if the second image includes the preset face information, according to the collective image and For the second image, a combined image of the collective image and the second image is obtained.
在一个实施例中,上述处理器还可被配置为:建立所述集体影像和所述第二影像的对应关系;按照所述集体影像和所述第二影像的对应关系,存储所述集体影像和所述第二影像。In one embodiment, the above-mentioned processor may be further configured to: establish a corresponding relationship between the collective image and the second image; and store the collective image according to the corresponding relationship between the collective image and the second image and the second image.
在一个实施例中,上述处理器还可被配置为:在检测到所述第一摄像头开启时,确定所述终端当前界面上显示的图像中人脸的数量是否大于或等于数量阈值;若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确认所述终端当前预备使用所述第一摄像头拍摄集体影像。In one embodiment, the processor may be further configured to: when detecting that the first camera is turned on, determine whether the number of faces in the image displayed on the current interface of the terminal is greater than or equal to a number threshold; If the number of faces in the image displayed on the current interface of the terminal is greater than or equal to the number threshold, it is confirmed that the terminal is currently preparing to use the first camera to shoot a collective image.
在一个实施例中,上述处理器还可被配置为:若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确定所述终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离是否小于或等于预设距离阈值;若所述终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离小于或等于所述预设距离阈值,确定所述终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积是否满足预设面积范围;若所述终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积满足所述预设面积范围,确认所述终端当前预备使用所述第一摄像头拍摄集体影像。In one embodiment, the processor may be further configured to: if the number of human faces in the image displayed on the current interface of the terminal is greater than or equal to a number threshold, determine a plurality of persons included in the image displayed on the current interface of the terminal Whether the distance between any two adjacent faces in the face is less than or equal to the preset distance threshold; if the distance between any two adjacent faces among the multiple faces included in the image displayed on the current interface of the terminal is less than or equal to the preset distance threshold, determine whether the area of the display area occupied by any one of the multiple faces included in the image displayed on the current interface of the terminal meets the preset area range; if the current interface of the terminal displays The area of the display area occupied by any one of the faces included in the image satisfies the preset area range, and it is confirmed that the terminal is currently preparing to use the first camera to shoot a collective image.
在一个实施例中,上述处理器还可被配置为:获取第一操作指令,响应于所述第一操作指令检测所述终端的第一摄像头是否开启;当所述终端的第一摄像头开启时,确定所述终端当前是否预备使用第一摄像头拍摄集体影像。In one embodiment, the above-mentioned processor may be further configured to: obtain a first operation instruction, and detect whether the first camera of the terminal is turned on in response to the first operation instruction; when the first camera of the terminal is turned on , and determine whether the terminal is currently ready to use the first camera to shoot a collective image.
本公开的实施例提供一种影像处理装置,当确定用户使用终端的后置摄像头拍摄集体影像时,该装置可以指示终端的前置摄像头开启,并同时获取后置摄像头拍摄的集体影像和前置摄像头拍摄的第二影像,避免了拍摄者无法拍照留念的情况,提高了终端拍照的灵活性以及拍摄照片的多样性,进而提高了用户体验。An embodiment of the present disclosure provides an image processing apparatus. When it is determined that a user uses a rear camera of a terminal to shoot a collective image, the apparatus can instruct the front camera of the terminal to turn on, and simultaneously acquire the collective image and the front camera captured by the rear camera. The second image captured by the camera avoids the situation that the photographer cannot take pictures for souvenirs, improves the flexibility of the terminal to take pictures and the diversity of the pictures taken, thereby improving the user experience.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned 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 described in detail here.
图5是根据一示例性实施例示出的一种用于影像处理装置50的结构框图,该装置50适用于终端。例如,装置50可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。FIG. 5 is a structural block diagram of an
装置50可以包括以下一个或多个组件:处理组件502,存储器504,电源组件506,多媒体组件508,音频组件510,输入/输出(I/O)的接口512,传感器组件514,以及通信组件516。
处理组件502通常控制装置50的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件502可以包括一个或多个处理器520来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件502可以包括一个或多个模块,便于处理组件502和其他组件之间的交互。例如,处理组件502可以包括多媒体模块,以方便多媒体组件508和处理组件502之间的交互。The
存储器504被配置为存储各种类型的数据以支持在装置50的操作。这些数据的示例包括用于在装置50上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器504可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件506为装置50的各种组件提供电力。电源组件506可以包括电源管理系统,一个或多个电源,及其他与为装置50生成、管理和分配电力相关联的组件。
多媒体组件508包括在所述装置50和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件508包括一个第二摄像头和/或第一摄像头。当装置50处于操作模式,如拍摄模式或视频模式时,第二摄像头和/或第一摄像头可以接收外部的多媒体数据。每个第二摄像头和第一摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件510被配置为输出和/或输入音频信号。例如,音频组件510包括一个麦克风(MIC),当装置50处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器504或经由通信组件516发送。在一些实施例中,音频组件510还包括一个扬声器,用于输出音频信号。
I/O接口512为处理组件502和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/
传感器组件514包括一个或多个传感器,用于为装置50提供各个方面的状态评估。例如,传感器组件514可以检测到装置50的打开/关闭状态,组件的相对定位,例如所述组件为装置50的显示器和小键盘,传感器组件514还可以检测装置50或装置50一个组件的位置改变,用户与装置50接触的存在或不存在,装置50方位或加速/减速和装置50的温度变化。传感器组件514可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件514还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件514还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件516被配置为便于装置50和其他设备之间有线或无线方式的通信。装置50可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件516经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件516还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置50可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子组件实现,用于执行上述方法。In an exemplary embodiment,
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器504,上述指令可由装置50的处理器520执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as a
本公开实施例还提供一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置50的处理器执行时,使得装置50能够执行上述影像处理方法,所述方法包括:Embodiments of the present disclosure further provide a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the
确定终端当前是否预备使用第一摄像头拍摄集体影像,所述影像包括视频或照片;determining whether the terminal is currently ready to use the first camera to shoot a collective image, the image including video or photo;
若所述终端当前预备使用第一摄像头拍摄集体影像,开启所述终端的第二摄像头;If the terminal is currently preparing to use the first camera to capture a collective image, turning on the second camera of the terminal;
在预设时间段内分别获取所述第一摄像头拍摄的集体影像和所述第二摄像头拍摄的第二影像。The collective image captured by the first camera and the second image captured by the second camera are acquired respectively within a preset time period.
在一个实施例中,所述方法还包括:根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像。In one embodiment, the method further comprises: obtaining a combined image of the collective image and the second image based on the collective image and the second image.
在一个实施例中,所述根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像包括:确定所述第二影像是否包括预设人脸信息;若所述第二影像包括所述预设人脸信息,根据所述集体影像和所述第二影像,获取所述集体影像和所述第二影像的合并影像。In one embodiment, acquiring a combined image of the collective image and the second image according to the collective image and the second image includes: determining whether the second image includes preset face information; If the second image includes the preset face information, a combined image of the collective image and the second image is acquired according to the collective image and the second image.
在一个实施例中,所述方法还包括:建立所述集体影像和所述第二影像的对应关系;按照所述集体影像和所述第二影像的对应关系,存储所述集体影像和所述第二影像。In one embodiment, the method further includes: establishing a corresponding relationship between the collective image and the second image; storing the collective image and the second image according to the corresponding relationship between the collective image and the second image Second image.
在一个实施例中,所述确定终端当前是否预备使用第一摄像头拍摄集体影像包括:在检测到所述第一摄像头开启时,确定所述终端当前界面上显示的图像中人脸的数量是否大于或等于数量阈值;若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确认所述终端当前预备使用所述第一摄像头拍摄集体影像。In one embodiment, the determining whether the terminal is currently preparing to use the first camera to shoot a collective image includes: when detecting that the first camera is turned on, determining whether the number of faces in the image displayed on the current interface of the terminal is greater than or equal to the number threshold; if the number of faces in the image displayed on the current interface of the terminal is greater than or equal to the number threshold, it is confirmed that the terminal is currently preparing to use the first camera to shoot a collective image.
在一个实施例中,所述若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确认所述终端当前预备使用所述第一摄像头拍摄集体影像包括:若所述终端当前界面上显示的图像中人脸的数量大于或等于数量阈值,确定所述终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离是否小于或等于预设距离阈值;若所述终端当前界面上显示的图像包括的多个人脸中任意两个相邻人脸之间的距离小于或等于所述预设距离阈值,确定所述终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积是否满足预设面积范围;若所述终端当前界面上显示的图像包括的多个人脸中任意一个人脸占用的显示区域的面积满足所述预设面积范围,确认所述终端当前预备使用所述第一摄像头拍摄集体影像。In one embodiment, if the number of faces in the image displayed on the current interface of the terminal is greater than or equal to a number threshold, confirming that the terminal is currently preparing to use the first camera to shoot a collective image includes: if the terminal is The number of faces in the image displayed on the current interface is greater than or equal to the number threshold, and it is determined whether the distance between any two adjacent faces among the multiple faces included in the image displayed on the current interface of the terminal is less than or equal to a preset value distance threshold; if the distance between any two adjacent faces among the multiple faces included in the image displayed on the current interface of the terminal is less than or equal to the preset distance threshold, determine the image displayed on the current interface of the terminal Whether the area of the display area occupied by any one of the included multiple faces satisfies the preset area range; if the area of the display area occupied by any one of the multiple faces included in the image displayed on the current interface of the terminal satisfies The preset area range confirms that the terminal is currently ready to use the first camera to capture a collective image.
在一个实施例中,所述确定终端当前是否预备使用第一摄像头拍摄集体影像包括:获取第一操作指令,响应于所述第一操作指令检测所述终端的第一摄像头是否开启;当所述终端的第一摄像头开启时,确定所述终端当前是否预备使用第一摄像头拍摄集体影像。In one embodiment, the determining whether the terminal is currently ready to use the first camera to shoot the collective image includes: acquiring a first operation instruction, and detecting whether the first camera of the terminal is turned on in response to the first operation instruction; When the first camera of the terminal is turned on, it is determined whether the terminal is currently ready to use the first camera to shoot a collective image.
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or techniques in the technical field not disclosed by the present disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (16)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811447831.8A CN111246078A (en) | 2018-11-29 | 2018-11-29 | Image processing method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811447831.8A CN111246078A (en) | 2018-11-29 | 2018-11-29 | Image processing method and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN111246078A true CN111246078A (en) | 2020-06-05 |
Family
ID=70875909
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811447831.8A Pending CN111246078A (en) | 2018-11-29 | 2018-11-29 | Image processing method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111246078A (en) |
Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120014561A1 (en) * | 2006-12-27 | 2012-01-19 | Fujifilm Corporation | Image taking apparatus and image taking method |
| CN105391866A (en) * | 2015-11-30 | 2016-03-09 | 东莞酷派软件技术有限公司 | A photographing method, device and terminal |
| CN105391949A (en) * | 2015-10-29 | 2016-03-09 | 深圳市金立通信设备有限公司 | Photographing method and terminal |
| CN105430258A (en) * | 2015-10-30 | 2016-03-23 | 努比亚技术有限公司 | Method and device for taking self-timer group photos |
| US20160295101A1 (en) * | 2015-04-02 | 2016-10-06 | Canon Kabushiki Kaisha | Image capturing apparatus and control method thereof |
| CN106161916A (en) * | 2015-04-08 | 2016-11-23 | 联想(北京)有限公司 | A kind of image-pickup method and electronic equipment |
| CN107124551A (en) * | 2017-05-18 | 2017-09-01 | 惠州Tcl移动通信有限公司 | A kind of mobile terminal is taken pictures the method being automatically synthesized, storage device and mobile terminal |
| CN107426502A (en) * | 2017-09-19 | 2017-12-01 | 北京小米移动软件有限公司 | Image pickup method and device, electronic equipment |
| CN107807772A (en) * | 2017-10-17 | 2018-03-16 | 广东欧珀移动通信有限公司 | Image processing method, device and mobile terminal |
| CN108111754A (en) * | 2017-12-18 | 2018-06-01 | 维沃移动通信有限公司 | A kind of method and mobile terminal of definite image acquisition modality |
-
2018
- 2018-11-29 CN CN201811447831.8A patent/CN111246078A/en active Pending
Patent Citations (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20120014561A1 (en) * | 2006-12-27 | 2012-01-19 | Fujifilm Corporation | Image taking apparatus and image taking method |
| US20160295101A1 (en) * | 2015-04-02 | 2016-10-06 | Canon Kabushiki Kaisha | Image capturing apparatus and control method thereof |
| CN106161916A (en) * | 2015-04-08 | 2016-11-23 | 联想(北京)有限公司 | A kind of image-pickup method and electronic equipment |
| CN105391949A (en) * | 2015-10-29 | 2016-03-09 | 深圳市金立通信设备有限公司 | Photographing method and terminal |
| CN105430258A (en) * | 2015-10-30 | 2016-03-23 | 努比亚技术有限公司 | Method and device for taking self-timer group photos |
| CN105391866A (en) * | 2015-11-30 | 2016-03-09 | 东莞酷派软件技术有限公司 | A photographing method, device and terminal |
| CN107124551A (en) * | 2017-05-18 | 2017-09-01 | 惠州Tcl移动通信有限公司 | A kind of mobile terminal is taken pictures the method being automatically synthesized, storage device and mobile terminal |
| CN107426502A (en) * | 2017-09-19 | 2017-12-01 | 北京小米移动软件有限公司 | Image pickup method and device, electronic equipment |
| CN107807772A (en) * | 2017-10-17 | 2018-03-16 | 广东欧珀移动通信有限公司 | Image processing method, device and mobile terminal |
| CN108111754A (en) * | 2017-12-18 | 2018-06-01 | 维沃移动通信有限公司 | A kind of method and mobile terminal of definite image acquisition modality |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR101834674B1 (en) | Method and device for image photographing | |
| CN108419016B (en) | Shooting method and device and terminal | |
| US10270975B2 (en) | Preview image display method, apparatus and storage medium | |
| WO2016029641A1 (en) | Photograph acquisition method and apparatus | |
| CN109922252A (en) | The generation method and device of short-sighted frequency, electronic equipment | |
| CN104869314A (en) | Photographing method and device | |
| CN109600549A (en) | Photographic method, device, equipment and storage medium | |
| CN105847627B (en) | A kind of method and apparatus of display image data | |
| CN114009003A (en) | Image acquisition method, device, equipment and storage medium | |
| CN111586296A (en) | Image capturing method, image capturing device and storage medium | |
| CN105915795A (en) | Multi-terminal linkage shooting method and multi-terminal linkage shooting device | |
| CN105549300A (en) | Automatic focusing method and device | |
| CN114339022B (en) | Method for determining camera shooting parameters and training method for neural network model | |
| EP3211879B1 (en) | Method and device for automatically capturing photograph, electronic device | |
| CN105959563B (en) | Image storage method and image storage device | |
| CN111461950B (en) | Image processing methods and devices | |
| CN106572306A (en) | Image shooting method and electronic equipment | |
| CN106412417A (en) | Method and device for shooting images | |
| CN114339019B (en) | Focusing method, focusing device and storage medium | |
| CN111246078A (en) | Image processing method and device | |
| CN107395962A (en) | Image capturing method and device | |
| CN114697515A (en) | Method and device for collecting image and readable storage medium | |
| CN113766115B (en) | Image acquisition method, mobile terminal, device and storage medium | |
| CN106713748B (en) | Method and device for sending pictures | |
| CN107682623A (en) | Method and device for taking pictures |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200605 |