[go: up one dir, main page]

CN106603928A - Shooting method and mobile terminal - Google Patents

Shooting method and mobile terminal Download PDF

Info

Publication number
CN106603928A
CN106603928A CN201710042946.8A CN201710042946A CN106603928A CN 106603928 A CN106603928 A CN 106603928A CN 201710042946 A CN201710042946 A CN 201710042946A CN 106603928 A CN106603928 A CN 106603928A
Authority
CN
China
Prior art keywords
image
subject
main body
shooting
characteristic information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710042946.8A
Other languages
Chinese (zh)
Other versions
CN106603928B (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 Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710042946.8A priority Critical patent/CN106603928B/en
Publication of CN106603928A publication Critical patent/CN106603928A/en
Application granted granted Critical
Publication of CN106603928B publication Critical patent/CN106603928B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

本发明实施例公开了一种拍摄方法及移动终端。所述方法应用于具有摄像头的移动终端,所述方法包括:在图像拍摄过程中,获取摄像头采集的每帧预览图像,对所述预览图像进行人脸识别,识别出拍摄主体,获取拍摄场景特征和所述拍摄主体的服饰特征,基于所述拍摄场景特征和所述拍摄主体的服饰特征,对所述拍摄主体进行图像处理,在图像拍摄完成后,生成经过图像处理后的目标图像。由于图像处理后的目标图像与拍摄场景特征和服饰特征匹配,因此目标图像满足了宗教或少数民族对拍摄主体穿着的服饰的特殊要求,同时本发明实施例所述方法省去了拍摄主体对指定服饰的穿着,简化了拍摄主体的拍摄操作。

The embodiment of the invention discloses a photographing method and a mobile terminal. The method is applied to a mobile terminal with a camera, and the method includes: during the image shooting process, acquiring a preview image of each frame captured by the camera, performing face recognition on the preview image, identifying the shooting subject, and acquiring the characteristics of the shooting scene and the clothing features of the shooting subject, based on the shooting scene features and the clothing features of the shooting subject, image processing is performed on the shooting subject, and after the image shooting is completed, an image-processed target image is generated. Since the target image after image processing matches the shooting scene features and clothing features, the target image meets the special requirements of religion or ethnic minorities for the clothing worn by the subject, and the method described in the embodiment of the present invention saves the subject from specifying The wearing of clothing simplifies the shooting operation of the subject.

Description

一种拍摄方法及移动终端A shooting method and mobile terminal

技术领域technical field

本发明实施例涉及通信技术领域,尤其涉及一种拍摄方法及移动终端。Embodiments of the present invention relate to the field of communication technologies, and in particular, to a photographing method and a mobile terminal.

背景技术Background technique

随着终端功能的不断发展,目前终端不仅具有拍照功能,还具有图片处理功能,如开启人脸识别功能后对人脸区域进行美白、磨皮等处理。With the continuous development of terminal functions, the current terminal not only has the function of taking pictures, but also has the function of image processing. For example, after the face recognition function is turned on, the face area can be whitened and smoothed.

现有技术中,终端开启自拍或美颜等功能后,对拍摄主体进行原物拍摄。由于终端只对拍摄主体进行原物拍摄,因此当拍摄主体的服饰不符合宗教或少数民族的特殊要求时,无法得到符合宗教或少数民族的服饰要求的拍摄图像。In the prior art, after the terminal turns on functions such as Selfie or beautification, it takes original photos of the subject. Since the terminal only takes original pictures of the subject, when the subject's clothing does not meet the special requirements of the religion or ethnic minorities, it is impossible to obtain a captured image that meets the requirements of the religious or ethnic minorities' clothing.

发明内容Contents of the invention

本发明提供了一种拍摄方法,以解决现有技术中终端只对拍摄主体进行原物拍摄,当拍摄主体的服饰不符合宗教或少数民族的特殊要求时,无法得到符合宗教或少数民族的服饰要求的拍摄图像的问题。The present invention provides a shooting method to solve the problem that in the prior art, the terminal only takes the original shooting of the shooting subject. When the clothing of the shooting subject does not meet the special requirements of religion or ethnic minorities, it is impossible to obtain clothing that meets the requirements of religion or ethnic minorities. Asked questions about capturing images.

第一方面,提供了一种拍摄方法,应用于具有摄像头的移动终端,所述方法包括:In a first aspect, a shooting method is provided, which is applied to a mobile terminal with a camera, and the method includes:

在图像拍摄过程中,获取摄像头采集的每帧预览图像;During the image capture process, obtain the preview image of each frame captured by the camera;

对所述预览图像进行人脸识别,识别出拍摄主体;Perform face recognition on the preview image to identify the subject;

获取拍摄场景特征和所述拍摄主体的服饰特征;Obtaining the characteristics of the shooting scene and the clothing characteristics of the subject;

基于所述拍摄场景特征和所述拍摄主体的服饰特征,对所述拍摄主体进行图像处理;performing image processing on the subject based on the features of the shooting scene and the clothing features of the subject;

在图像拍摄完成后,生成经过图像处理后的目标图像。After the image capture is completed, a target image after image processing is generated.

第二方面,提供了一种移动终端,所述移动终端具有摄像头,包括:In a second aspect, a mobile terminal is provided, the mobile terminal has a camera, including:

预览图像获取模块,用于在图像拍摄过程中,获取摄像头采集的每帧预览图像;The preview image acquisition module is used to acquire the preview image of each frame collected by the camera during the image capture process;

拍摄主体识别模块,用于对所述预览图像进行人脸识别,识别出拍摄主体;A shooting subject recognition module, configured to perform face recognition on the preview image to identify the shooting subject;

特征信息获取模块,用于获取拍摄场景特征和所述拍摄主体的服饰特征;A feature information acquisition module, configured to acquire the features of the shooting scene and the clothing features of the shooting subject;

图像处理模块,用于基于所述拍摄场景特征和所述拍摄主体的服饰特征,对所述拍摄主体进行图像处理;An image processing module, configured to perform image processing on the subject based on the features of the shooting scene and the clothing features of the subject;

目标图像生成模块,用于在图像拍摄完成后,生成经过图像处理后的目标图像。The target image generation module is configured to generate the target image after image processing after the image capture is completed.

这样,本发明实施例中,移动终端在图像拍摄过程中,从摄像头采集的预览图像中识别出拍摄主体,根据拍摄场景特征和拍摄主体的服饰特征,对拍摄主体进行图像处理,在图像拍摄完成后,生成经过图像处理后的目标图像。由于图像处理后的目标图像与拍摄场景特征和服饰特征匹配,因此目标图像满足了宗教或少数民族对拍摄主体穿着的服饰的特殊要求,同时本发明实施例所述方法省去了拍摄主体对指定服饰的穿着,简化了拍摄主体的拍摄操作。In this way, in the embodiment of the present invention, during the image capturing process, the mobile terminal recognizes the subject from the preview image collected by the camera, and performs image processing on the subject according to the characteristics of the shooting scene and the clothing characteristics of the subject. After that, the target image after image processing is generated. Since the target image after image processing matches the shooting scene features and clothing features, the target image meets the special requirements of religion or ethnic minorities for the clothing worn by the subject, and the method described in the embodiment of the present invention saves the subject from specifying The wearing of clothing simplifies the shooting operation of the subject.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments of the present invention. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention , for those skilled in the art, other drawings can also be obtained according to these drawings without paying creative labor.

图1是本发明一个实施例的拍摄方法的流程图;Fig. 1 is the flow chart of the photographing method of an embodiment of the present invention;

图2是本发明另一个实施例的拍摄方法的流程图;Fig. 2 is a flowchart of a shooting method according to another embodiment of the present invention;

图3是本发明一个实施例的移动终端的框图;Fig. 3 is a block diagram of a mobile terminal according to an embodiment of the present invention;

图4是本发明另一个实施例的移动终端的框图;Fig. 4 is a block diagram of a mobile terminal according to another embodiment of the present invention;

图5是本发明另一个实施例的移动终端的框图;Fig. 5 is a block diagram of a mobile terminal according to another embodiment of the present invention;

图6是本发明另一个实施例的移动终端的框图。FIG. 6 is a block diagram of a mobile terminal according to another embodiment of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

实施例一Embodiment one

图1是本发明一个实施例的拍摄方法的流程图。图1所示的拍摄方法应用于具有摄像头的移动终端,所述方法包括:Fig. 1 is a flowchart of a shooting method according to an embodiment of the present invention. The shooting method shown in Figure 1 is applied to a mobile terminal with a camera, and the method includes:

步骤101、在图像拍摄过程中,获取摄像头采集的每帧预览图像。Step 101. During the image capturing process, acquire a preview image of each frame captured by the camera.

本发明实施例所述方法应用于具有摄像头的移动终端,移动终端可以为多种形式,如手机、平板、笔记本、照相机等。The method described in the embodiment of the present invention is applied to a mobile terminal with a camera, and the mobile terminal can be in various forms, such as a mobile phone, a tablet, a notebook, a camera, and the like.

可以使用移动终端的摄像头对拍摄主体进行拍照或录像,将每个静置的画面称为一帧图像,相应地拍照一次可以得到一帧图像,录像一次可以得到多帧图像。移动终端在图像拍摄过程中,使用摄像头采集每帧预览图像,预览图像可以包括拍摄主体、拍摄场景等信息,本发明实施例所述的拍摄主体为拍摄者。The camera of the mobile terminal can be used to take pictures or videos of the subject, and each static picture is called a frame of image, correspondingly, one frame of images can be obtained by taking a picture once, and multiple frames of images can be obtained by one recording. During the image capture process, the mobile terminal uses a camera to collect a preview image of each frame. The preview image may include information such as the subject and the scene to be photographed. The subject of the photograph in the embodiment of the present invention is the photographer.

摄像头采集到一帧预览图像后,移动终端会获取采集的该帧预览图像。After the camera captures a preview image frame, the mobile terminal acquires the captured preview image frame.

步骤102、对预览图像进行人脸识别,识别出拍摄主体。Step 102 , face recognition is performed on the preview image, and the subject is identified.

人脸识别是指利用分析比较人脸视觉特征信息进行身份鉴别的技术。移动终端在获取到摄像头采集的一帧预览图像后,可以对预览图像进行人脸识别,从预览图像中识别出拍摄主体。Face recognition refers to the technology of identifying identity by analyzing and comparing visual feature information of faces. After the mobile terminal acquires a frame of preview image collected by the camera, it can perform face recognition on the preview image, and identify the subject from the preview image.

步骤103、获取拍摄场景特征和拍摄主体的服饰特征。Step 103, acquiring the characteristics of the shooting scene and the clothing characteristics of the shooting subject.

服饰特征可以指示多种信息,如拍摄主体的性别、宗教属性、民族属性等。可以在从预览图像中识别出拍摄主体后,提取拍摄主体的服饰信息,并对提取的服饰信息进行分析,得到拍摄主体的服饰特征。例如,提取到的拍摄主体的服饰信息为蒙古袍,蒙古袍可以指示拍摄主体的民族属性为蒙古族,则确定蒙古袍为服饰特征。Clothing features can indicate a variety of information, such as the subject's gender, religious attributes, and ethnic attributes. After the subject is identified from the preview image, clothing information of the subject can be extracted, and the extracted clothing information can be analyzed to obtain clothing features of the subject. For example, the extracted clothing information of the photographed subject is a Mongolian robe, and the Mongolian robe may indicate that the nationality attribute of the photographed subject is Mongolian, and the Mongolian robe is determined to be the clothing feature.

拍摄场景特征可以指示多种信息,如通过建筑风格指示拍摄主体所处的地域、宗教属性、民族属性等。可以从获取的预览图像中提取拍摄场景信息并对其进行分析,得到拍摄场景特征。The characteristics of the shooting scene can indicate a variety of information, such as indicating the region, religious attributes, and ethnic attributes of the subject through the architectural style. The shooting scene information can be extracted from the acquired preview image and analyzed to obtain the shooting scene features.

由于不同宗教或民族对拍摄主体的服饰的要求存在不同、拍摄主体所处的拍摄场景存在不同,因此本发明实施例在识别出拍摄主体后,可以获取拍摄场景特征和拍摄主体的服饰特征,之后根据拍摄场景特征和拍摄主体的服饰特征确定拍摄主体信仰的宗教或所属的民族,进一步确定出对应的图像处理方式,使用确定的处理方式对拍摄主体的服饰进行处理,从而使得拍摄的图像中拍摄主体的服饰满足宗教或民族的要求。Since different religions or nationalities have different requirements for the clothing of the subject and the shooting scenes where the subject is located, the embodiment of the present invention can obtain the characteristics of the shooting scene and the clothing characteristics of the shooting subject after the subject is identified, and then According to the characteristics of the shooting scene and the clothing characteristics of the shooting subject, the religion or nationality of the shooting subject is determined, and the corresponding image processing method is further determined, and the clothing of the shooting subject is processed using the determined processing method, so that The clothing of the main body meets the requirements of religion or nationality.

步骤104、基于拍摄场景特征和拍摄主体的服饰特征,对拍摄主体进行图像处理。Step 104: Perform image processing on the subject based on the features of the shooting scene and the clothing features of the subject.

本发明实施例可以预先针对不同拍摄场景特征和不同服饰特征设置对应的图像处理方式,移动终端获取到拍摄场景特征和拍摄主体的服饰特征后,可以依据预设的特征信息与图像处理方式的对应关系,确定当前所需的图像处理方式,之后采取所需的图像处理方式对预览图像中的拍摄主体进行图像处理。In the embodiment of the present invention, corresponding image processing methods can be set in advance for different shooting scene features and different clothing features. relationship, determine the currently required image processing method, and then adopt the required image processing method to perform image processing on the subject in the preview image.

例如,宗教A要求拍摄者的面部需要用面纱遮挡,预先建立指示宗教A的服饰特征与用面纱遮挡拍摄者面部的处理方式的对应关系,在实际图像拍摄过程中,如果拍摄主体的服饰特征指示拍摄主体的宗教属性为宗教A,则移动终端会用预先设置的面纱图像对预览图像中拍摄者的面部进行遮挡,以使所得图像满足宗教要求。For example, religion A requires that the photographer’s face needs to be covered with a veil, and the corresponding relationship between the clothing characteristics indicating religion A and the processing method for covering the photographer’s face with a veil is established in advance. If the religious attribute of the shooting subject is religion A, the mobile terminal will use a preset veil image to block the face of the photographer in the preview image, so that the obtained image meets the religious requirements.

步骤105、在图像拍摄完成后,生成经过图像处理后的目标图像。Step 105, after the image capture is completed, generate a target image after image processing.

在图像拍摄完成以及图像处理结束后,生成经过图像处理后的、与拍摄场景特征和拍摄主体的服饰特征匹配的目标图像,满足了对拍摄图像的特殊需求,丰富了移动终端的拍摄功能。After the image capture and image processing are completed, a target image after image processing that matches the characteristics of the shooting scene and the clothing characteristics of the shooting subject is generated, which meets the special requirements for shooting images and enriches the shooting functions of the mobile terminal.

对于具有宗教信仰或少数民族的拍摄者的拍摄者,使用具有上述功能的移动终端进行图像拍摄时,拍摄者可以不必穿着宗教或民族要求的服饰,在拍摄过程中,移动终端可以根据获取的拍摄场景特征和拍摄者的服装特征,选择对应的图像处理方式对预览图像中拍摄者的服饰进行处理,如增加遮挡物,从而使生成的目标图像满足宗教或民族对服饰的要求,省去了拍摄者对指定服饰的穿戴步骤。For photographers with religious beliefs or ethnic minorities, when using a mobile terminal with the above-mentioned functions to shoot images, the photographer does not have to wear religious or ethnic costumes. During the shooting process, the mobile terminal can Scene features and clothing features of the photographer, select the corresponding image processing method to process the clothing of the photographer in the preview image, such as adding occluders, so that the generated target image meets the requirements of religion or ethnicity for clothing, eliminating the need for shooting The procedure for wearing the specified clothing.

依据本发明实施例,移动终端在图像拍摄过程中,从摄像头采集的预览图像中识别出拍摄主体,根据拍摄场景特征和拍摄主体的服饰特征,对拍摄主体进行图像处理,在图像拍摄完成后,生成经过图像处理后的目标图像。由于图像处理后的目标图像与拍摄场景特征和服饰特征匹配,因此目标图像满足了宗教或少数民族对拍摄主体穿着的服饰的特殊要求,同时本发明实施例所述方法省去了拍摄主体对指定服饰的穿着,简化了拍摄主体的拍摄操作。According to the embodiment of the present invention, during the image capturing process, the mobile terminal recognizes the subject from the preview image collected by the camera, performs image processing on the subject according to the characteristics of the shooting scene and the clothing characteristics of the subject, and after the image capturing is completed, Generate the target image after image processing. Since the target image after image processing matches the shooting scene features and clothing features, the target image meets the special requirements of religion or ethnic minorities for the clothing worn by the subject, and the method described in the embodiment of the present invention saves the subject from specifying The wearing of clothing simplifies the shooting operation of the subject.

实施例二Embodiment two

图2是本发明一个实施例的拍摄方法的流程图。图2所示的拍摄方法应用于具有摄像头的移动终端,所述方法包括:Fig. 2 is a flowchart of a shooting method according to an embodiment of the present invention. The shooting method shown in Figure 2 is applied to a mobile terminal with a camera, and the method includes:

步骤201、在图像拍摄过程中,获取摄像头采集的每帧预览图像。Step 201. During the image capturing process, acquire a preview image of each frame captured by the camera.

本发明实施例中,移动终端具有摄像头,可以为多种形式,如手机、平板、笔记本、照相机等。可以使用移动终端的摄像头进行图像拍摄,以帧为单位得到一帧或多帧拍摄图像。In the embodiment of the present invention, the mobile terminal has a camera, which can be in various forms, such as a mobile phone, a tablet, a notebook, a camera, and the like. The camera of the mobile terminal can be used to capture images, and one or more frames of captured images can be obtained in units of frames.

步骤202、对预览图像进行人脸识别,识别出拍摄主体。Step 202, performing face recognition on the preview image to identify the subject.

采用人脸识别技术,对预览图像进行人脸识别,将识别出的每个人脸分别确定为拍摄主体。之后针对各拍摄主体,分析其是否需要进行图像处理,对需要图像处理的一个或多个拍摄主体进行图像处理。Face recognition technology is used to perform face recognition on the preview image, and each recognized face is determined as the subject of the shot. Then, for each subject, it is analyzed whether image processing is required, and image processing is performed on one or more subjects requiring image processing.

步骤203、获取拍摄场景特征和拍摄主体的服饰特征。Step 203, acquiring the characteristics of the shooting scene and the clothing characteristics of the shooting subject.

完成对拍摄主体的识别后,获取拍摄场景特征和拍摄主体的服饰特征。After the identification of the subject is completed, the features of the shooting scene and the clothing features of the subject are acquired.

例如,宗教A要求女性拍照时用面纱遮挡面部以及穿着指定袍子,在使用移动终端的摄像头对信仰宗教A的女性拍照时,移动终端获取摄像头采集的每帧预览图像,并使用人脸识别技术从每帧预览图像中识别出拍摄主体,之后获取拍摄场景特征和拍摄主体的服饰特征,拍摄场景特征可以为具有一定宗教风格的建筑,拍摄主体的服饰特征可以为信仰宗教A的女性穿着的袍子。For example, religion A requires women to cover their faces with veils and wear specified robes when taking pictures. When using the camera of a mobile terminal to take pictures of women of religion A, the mobile terminal obtains the preview image of each frame collected by the camera, and uses face recognition technology from The subject is identified in the preview image of each frame, and then the shooting scene feature and the clothing feature of the shooting subject are obtained. The shooting scene feature can be a building with a certain religious style, and the clothing feature of the shooting subject can be a robe worn by a woman who believes in religion A.

步骤204、基于拍摄场景特征和拍摄主体的服饰特征,确定拍摄主体的宗教属性。Step 204, based on the features of the shooting scene and the clothing features of the subject, determine the religious attributes of the subject.

由于不同宗教对拍摄主体穿着的服饰有不同的要求,如要求使用面纱遮挡面部、使用头巾包裹头部等,因此在对拍摄图像中拍摄主体的服饰进行图像处理之前,需要先确定出拍摄主体的宗教属性,之后再采取与确定出的宗教属性对应的图像处理方式,对采集的图像进行处理,从而得到符合宗教要求的拍摄图像。Since different religions have different requirements for the clothing worn by the subject, such as requiring the use of veils to cover the face and the use of headscarves to wrap the head, etc., before image processing of the clothing of the subject in the captured image, it is necessary to determine the subject’s clothing Religious attributes, and then adopt an image processing method corresponding to the determined religious attributes to process the collected images, so as to obtain photographed images that meet religious requirements.

由于拍摄场景特征和拍摄主体的服饰特征可以指示拍摄主体所处区域、拍摄主体信仰的宗教等,因此可以在获取到拍摄场景特征和拍摄主体的服饰特征后,根据拍摄场景特征和拍摄主体的服饰特征,确定出拍摄主体的宗教属性。Since the characteristics of the shooting scene and the clothing characteristics of the subject can indicate the area where the subject is located, the religion the subject believes in, etc., after obtaining the characteristics of the shooting scene and the clothing characteristics of the shooting subject, according to the characteristics of the shooting scene and the clothing of the shooting subject Features to determine the religious attributes of the subject.

例如,在对步骤203中信仰宗教A的女性拍照时,获取的拍摄场景特征为具有宗教A风格的建筑,获取的拍摄主体的服饰特征为宗教A指定的袍子,根据建筑风格和拍摄主体穿着的袍子,确定出拍摄主体的宗教属性为宗教A。For example, when taking a picture of a woman who believes in religion A in step 203, the acquired shooting scene feature is a building with the style of religion A, and the acquired clothing feature of the subject is the robe specified by religion A. According to the architectural style and the clothing worn by the subject, Robe, determine the religious attribute of the subject as religion A.

步骤205、获取拍摄主体图像区域。Step 205, acquiring the subject image area.

本发明实施例根据拍摄场景特征和拍摄主体的服饰特征,确定出拍摄主体的宗教属性,当判定拍摄主体的服饰不满足宗教对拍摄主体服饰的要求时,会对拍摄主体进行图像处理,以使拍摄主体的服饰满足宗教要求。In the embodiment of the present invention, the religious attribute of the subject is determined according to the characteristics of the shooting scene and the clothing characteristics of the shooting subject. The subject's attire meets religious requirements.

在对拍摄主体进行图像处理之前,需要确定出拍摄主体所在的图像区域,之后在拍摄主体区域对拍摄主体进行图像处理。Before performing image processing on the subject, it is necessary to determine the image area where the subject is located, and then perform image processing on the subject in the subject area.

例如,完成对拍摄主体的拍摄后,如果确定拍摄主体的宗教属性为宗教A,且拍摄主体的面部未使用面纱遮挡,则获取该女性所在的图像区域。For example, after the shooting of the subject is completed, if it is determined that the religious attribute of the subject is religion A, and the face of the subject is not covered by a veil, the image area where the woman is located is acquired.

步骤206、基于拍摄主体的宗教属性,确定拍摄主体图像区域对应的图像素材。Step 206, based on the religious attribute of the subject, determine the image material corresponding to the image area of the subject.

本发明实施例中宗教属性为宗教种类。不同宗教对穿着的服饰有不同的要求,如要求使用面纱遮挡面部、使用头巾包裹头部等,本发明实施例可以预先针对不同宗教设置不同的图像素材并存储在移动终端的预设存储空间中,图像素材用于遮挡拍摄图像中拍摄主体的指定部位,图像素材可以为多种形式,如头饰图像、面饰图像等。In the embodiment of the present invention, the religious attribute is the type of religion. Different religions have different requirements on the clothing they wear, such as requiring the use of veils to cover the face, the use of headscarves to wrap the head, etc., the embodiment of the present invention can pre-set different image materials for different religions and store them in the preset storage space of the mobile terminal , the image material is used to block the specified part of the subject in the captured image, and the image material can be in various forms, such as headgear images, face decoration images, etc.

本发明实施例在根据拍摄场景特征和拍摄主体的服饰特征确定出拍摄主体的宗教属性后,可以根据预先针对不同种类的宗教设置的图像素材,确定出当前确定的宗教属性对应图像素材,之后使用选择的图像素材对拍摄主体图像区域进行图像处理。In the embodiment of the present invention, after determining the religious attributes of the shooting subject according to the characteristics of the shooting scene and the clothing characteristics of the shooting subject, the image material corresponding to the currently determined religious attribute can be determined according to the image materials set in advance for different types of religions, and then used The selected image material performs image processing on the subject image area.

例如,与宗教A对应设置的图像素材为面纱,在根据拍摄场景特征和拍摄主体的服饰特征确定拍摄主体的宗教属性为宗教A,以及确定拍摄主体未戴面纱后,依据预先针对宗教A设置的图像素材为面纱的对应关系,确定拍摄主体图像区域对应的图像素材为面纱。For example, the image material set corresponding to religion A is a veil. After determining that the religious attribute of the subject is religion A according to the characteristics of the shooting scene and the clothing characteristics of the subject, and determining that the subject is not wearing a veil, according to the pre-set religion A The image material is the corresponding relationship of the veil, and it is determined that the image material corresponding to the subject image area is the veil.

步骤207、基于图像素材,对拍摄主体图像区域进行图像处理。Step 207 , based on the image material, perform image processing on the subject image area.

确定出处理预览图像所使用的图像素材后,使用确定的图像素材对拍摄主体图像区域进行图像处理。After the image material used for processing the preview image is determined, image processing is performed on the subject image area by using the determined image material.

例如,确定出针对宗教A设置的图像素材为面纱后,使用面纱对拍摄图像中拍摄主体的面部进行遮挡,具体地可以提取针对宗教A对应设置的面纱,将面纱叠加在拍摄主体的面部区域上,使得生成的图像中拍摄主体的面部使用面纱遮挡,使得拍摄图像满足宗教要求。For example, after determining that the image material set for religion A is a veil, use the veil to block the face of the subject in the captured image. Specifically, the veil set for religion A can be extracted, and the veil can be superimposed on the face area of the subject , so that the face of the subject in the generated image is covered by a veil, so that the captured image meets religious requirements.

优选地,步骤207具体可以包括:Preferably, step 207 may specifically include:

基于拍摄主体图像区域,调整图像素材的大小、角度和/或形状。其中,图像素材可以至少包括头饰图像和/或面饰图像。Adjust the size, angle and/or shape of the image footage based on the subject image area. Wherein, the image material may at least include a headgear image and/or a face decoration image.

具体地,由于拍摄的不同预览图像中拍摄主体的大小不同、角度不同和/或形状不同,因此在确定拍摄主体图像区域对应的图像素材后,首先需要确定拍摄主体图像区域中该图像素材待叠加的预设区域,然后根据该预设区域调整图像素材的大小、角度和/或形状,以使调整后的图像素材的大小、角度和/或形状与拍摄主体图像区域中的该预设区域相匹配,处理后得到合格的图像。Specifically, since the subject has different sizes, angles, and/or shapes in different preview images captured, after determining the image material corresponding to the subject image area, it is first necessary to determine that the image material in the subject image area is to be superimposed and then adjust the size, angle and/or shape of the image material according to the preset area, so that the size, angle and/or shape of the adjusted image material is consistent with the preset area in the image area of the subject After matching, a qualified image is obtained after processing.

例如,当图像素材为面纱,则首先确定拍摄主体图像区域中该图像素材待叠加的预设区域为拍摄主体的头部,当拍摄主体的头部具有一定的倾斜角度时,则移动终端在提取对应设置的面纱后,调整面纱大小使其与拍摄主体A的面部大小匹配,还需要调整面纱的角度,使其能将拍摄主体的面部覆盖。For example, when the image material is a veil, it is first determined that the preset area to be superimposed on the image material in the image area of the subject is the head of the subject. When the head of the subject has a certain inclination angle, the mobile terminal extracts After matching the set veil, adjust the size of the veil to match the face size of subject A, and adjust the angle of the veil so that it can cover the face of the subject.

在基于拍摄主体图像区域,调整图像素材的大小、角度和/或形状之后,将调整后的图像素材叠加显示在拍摄主体图像区域的预设区域。After the size, angle and/or shape of the image material is adjusted based on the image area of the subject, the adjusted image material is superimposed and displayed in a preset area of the image area of the subject.

完成对图像素材的调整后,将调整后的图像素材叠加显示在拍摄主体图像区域的预设区域,实现对预设区域的遮挡。可以根据图像素材确定拍摄主体图像区域的预设区域,如图像素材为面纱,则拍摄主体图像区域的预设区域为面部;图像素材为头纱,则拍摄主体图像区域的预设区域为头部。After the adjustment of the image material is completed, the adjusted image material is superimposed and displayed in the preset area of the image area of the shooting subject, so as to realize the occlusion of the preset area. The preset area of the subject image area can be determined according to the image material. If the image material is a veil, the preset area of the subject image area is the face; if the image material is a veil, the preset area of the subject image area is the head .

步骤208、在图像拍摄完成后,生成经过图像处理后的目标图像。Step 208 , after the image capture is completed, generate a target image after image processing.

将图像素材叠加显示在拍摄主体图像区域的预设区域后,完成图像处理,在图像拍摄完成后,生成叠加显示图像素材的符合要求的目标图像。After the image material is superimposed and displayed in the preset area of the image area of the shooting subject, the image processing is completed, and after the image shooting is completed, a target image meeting the requirements of the superimposed display image material is generated.

优选地,在步骤208之后,所述方法可以进一步包括:获取拍摄主体的人脸特征信息,并存储人脸特征信息。Preferably, after step 208, the method may further include: acquiring facial feature information of the photographed subject, and storing the facial feature information.

如果目标图像中只包括一个拍摄主体,则记录该拍摄主体的人脸特征信息;如果目标图像中包括多个拍摄主体,则记录不同图像位置处的拍摄主体的人脸特征信息。人脸特征信息可以包括多种,如五官结构、五官大小以及瞳孔颜色等多种信息中的一种或多种。If only one subject is included in the target image, the facial feature information of the subject is recorded; if multiple subjects are included in the target image, the facial feature information of the subjects at different image positions is recorded. The facial feature information may include multiple types, such as one or more of facial features structure, facial features size, and pupil color.

处理后的目标图像可以包括一个或多个拍摄主体。本发明实施例在执行存储人脸特征信息的步骤之后,可以接收请求者对目标图像中一目标拍摄主体的查看指令,如接收用户对目标图像中一目标拍摄主体的点击操作,移动终端在接收到对目标拍摄主体的查看指令后,开启摄像头对请求者进行人脸图像采集,得到请求者的人脸图像,之后提取请求者的人脸图像中的人脸特征信息,将人脸图像中的人脸特征信息与预先存储的目标拍摄主体的人脸特征信息进行比对,当人脸图像中的人脸特征信息与目标拍摄主体的人脸特征信息相匹配时,判定请求者即为目标图像中的目标拍摄主体,请求者要查看自己的图像,这时去除目标拍摄主体上所叠加显示的图像素材,让目标拍摄主体查看未被图像素材遮挡的初始图像。The processed target image may include one or more subjects. In the embodiment of the present invention, after the step of storing facial feature information is performed, the requester may receive an instruction to view a target subject in the target image, such as receiving a user's click operation on a target subject in the target image, and the mobile terminal receives After receiving the viewing command of the target subject, turn on the camera to collect the face image of the requester, obtain the face image of the requester, then extract the face feature information in the face image of the requester, and convert the face image The face feature information is compared with the pre-stored face feature information of the target subject, and when the face feature information in the face image matches the face feature information of the target subject, it is determined that the requester is the target image The target subject in , and the requester wants to view his own image, at this time, the image material superimposed on the target subject is removed, so that the target subject can view the initial image that is not blocked by the image material.

例如,目标图像中拍摄主体A的面部叠加显示面纱,当拍摄主体A查看处理后的目标图像时要查看自己的面部图像,则会执行预设操作如点击目标图像中拍摄主体A的面纱,相应地,移动终端接收到该操作后,会开启摄像头采集拍摄主体A的人脸图像,识别出拍摄主体A的人脸特征信息,之后将当前识别的人脸特征信息与针对拍摄主体A预先存储的人脸特征信息进行比对,在判断二者相同后,确定请求者为拍摄主体A,这时去除目标图像中拍摄主体A面部的面纱。For example, the face of subject A in the target image is overlaid with a veil. When subject A views the processed target image and wants to view his own face image, the preset operation will be performed, such as clicking on the veil of subject A in the target image, and the corresponding Specifically, after the mobile terminal receives the operation, it will turn on the camera to collect the face image of the subject A, recognize the face feature information of the subject A, and then compare the currently recognized face feature information with the pre-stored face image for the subject A. Comparing the face feature information, after judging that the two are the same, it is determined that the requester is the subject A, and at this time, the veil of the subject A’s face in the target image is removed.

优选地,本发明实施例可以在存储人脸特征信息的步骤之后,开启摄像头进行人脸识别,识别出人脸特征信息,当识别出的人脸特征信息与目标图像中的一个拍摄主体的人脸特征信息相匹配时,去除所匹配的拍摄主体上所叠加显示的图像素材。Preferably, in the embodiment of the present invention, after the step of storing the face feature information, the camera is turned on for face recognition, and the face feature information is recognized. When the face feature information matches, the image material superimposed on the matched subject is removed.

用户查看目标图像时,可不需要用户的任何操作,自动开启摄像头进行人脸识别,识别出摄像头采集的用户的人脸特征信息,并将识别出的人脸特征信息分别与目标图像中的一个或多个拍摄主体的人脸特征信息进行比对,当识别出的人脸特征信息与一拍摄主体的人脸特征信息相匹配时,确定摄像头采集的用户即为该拍摄主体,这时去除所匹配的拍摄主体上所叠加显示的图像素材,让用户查看未被图像素材遮挡的初始图像。When the user views the target image, the camera is automatically turned on for face recognition without any user operation, and the user's face feature information collected by the camera is recognized, and the recognized face feature information is compared with one or more of the target image. Compare the face feature information of multiple subjects, and when the recognized face feature information matches the face feature information of a subject, it is determined that the user captured by the camera is the subject, and the matched The image material superimposed on the subject of the camera allows the user to view the original image that is not blocked by the image material.

本发明实施例可以通过人脸特征信息对比的方式,判断查看目标图像的用户是否为目标图像中的一拍摄主体,如果是,则去除目标图像中该拍摄主体上所叠加显示的图像素材,让用户查看其未被图像素材遮挡的初始图像,从而满足用户对自己的面部信息的查看需求,同时实现了自己的脸部信息不被其他人获取,保证了拍摄主体的隐私安全。The embodiment of the present invention can judge whether the user viewing the target image is a subject in the target image by comparing the facial feature information, and if so, remove the image material superimposed and displayed on the subject in the target image, so that Users view their initial images that are not blocked by image materials, thereby satisfying users' needs for viewing their own facial information, and at the same time realizing that their own facial information is not obtained by others, ensuring the privacy and security of the subject.

优选地,步骤208具体可以包括:在图像拍摄完成后,同时生成未经过图像处理的初始图像和经过图像处理后的目标图像;将所述初始图像和所述目标图像分别存储至第一存储空间或第二存储空间,或将所述初始图像和所述目标图像分别分享至第一即时通信应用程序和第二即时通信应用程序。Preferably, step 208 may specifically include: after the image capture is completed, simultaneously generating an initial image without image processing and a target image after image processing; storing the initial image and the target image respectively in the first storage space or the second storage space, or share the initial image and the target image to the first instant messaging application program and the second instant messaging application program respectively.

在图像拍摄完成以及图像处理结束后,自动生成经过图像处理后的目标图像以及未经过图像处理的初始图像两种版本,供用户自由取舍,供后续查看和使用。After the image capture and image processing are completed, two versions of the target image after image processing and the initial image without image processing are automatically generated for users to choose freely for subsequent viewing and use.

移动终端在同时生成未经过图像处理的初始图像和经过图像处理后的目标图像后,可以将初始图像存储至第一存储空间,只有拍摄主体或具有访问权限的少数用户才能通过访问第一存储空间查看初始图像,从而保证了初始图像的私密性,保证了拍摄主体的隐私安全。当拍摄主体本人或少数权限用户有查看初始图像的需求时,可以访问第一存储空间查看初始图像,相应地网络终端在检测到拍摄主体的私有账号或输入的正确密码或输入的正确问题答案后,允许拍摄主体进入第一存储空间查看初始图像。与此同时,将处理后的目标图像存储至第二存储空间,拍摄主体以及其他用户可以通过访问第二存储空间查看目标图像。After the mobile terminal simultaneously generates the initial image without image processing and the target image after image processing, it can store the initial image in the first storage space, and only the subject or a small number of users with access rights can access the first storage space Check the initial image, thereby ensuring the privacy of the initial image and ensuring the privacy and security of the subject. When the subject himself or a few authorized users need to view the initial image, they can access the first storage space to view the initial image. Correspondingly, after the network terminal detects the subject's private account or the correct password or the correct answer to the question to allow the subject to enter the first storage space to view the initial image. At the same time, the processed target image is stored in the second storage space, and the subject and other users can view the target image by accessing the second storage space.

移动终端在同时生成未经过图像处理的初始图像和经过图像处理后的目标图像后,还可以将初始图像分享至第一即时通信应用程序,只有拍摄主体或具有访问权限的少数用户才能通过使用第一即时通信应用程序查看初始图像。与此同时,将经过图像处理后的目标图像分享至第二即时通信应用程序,拍摄主体以及其他用户可以通过使用第二即时通信应用程序查看目标图像。After the mobile terminal simultaneously generates the initial image without image processing and the target image after image processing, it can also share the initial image to the first instant messaging application program. Only the subject or a small number of users with access rights can use the first An instant messaging application to view the initial image. At the same time, the image-processed target image is shared to the second instant messaging application, and the subject and other users can view the target image by using the second instant messaging application.

本发明实施例将生成的初始图像和处理后的目标图像分区域存储或分享至不同即使通信应用程序,使得未经图像处理的初始图像仅能被拍摄主体或具有访问权限的少数用户查看,保证了初始图像可以被查看的同时,保证了初始图像的私密性,保证了拍摄主体的隐私安全。In the embodiment of the present invention, the generated initial image and the processed target image are stored or shared in different instant communication applications, so that the original image without image processing can only be viewed by the subject or a small number of users with access rights, ensuring While ensuring that the initial image can be viewed, the privacy of the initial image is guaranteed, and the privacy and security of the shooting subject are guaranteed.

依据本发明实施例,移动终端在图像拍摄过程中,从摄像头采集的预览图像中识别出拍摄主体,根据拍摄场景特征和拍摄主体的服饰特征,对拍摄主体进行图像处理,在图像拍摄完成后,生成经过图像处理后的目标图像。由于图像处理后的目标图像与拍摄场景特征和服饰特征匹配,因此目标图像满足了宗教或少数民族对拍摄主体穿着的服饰的特殊要求,同时本发明实施例所述方法省去了拍摄主体对指定服饰的穿着,简化了拍摄主体的拍摄操作。According to the embodiment of the present invention, during the image capturing process, the mobile terminal recognizes the subject from the preview image collected by the camera, performs image processing on the subject according to the characteristics of the shooting scene and the clothing characteristics of the subject, and after the image capturing is completed, Generate the target image after image processing. Since the target image after image processing matches the shooting scene features and clothing features, the target image meets the special requirements of religion or ethnic minorities for the clothing worn by the subject, and the method described in the embodiment of the present invention saves the subject from specifying The wearing of clothing simplifies the shooting operation of the subject.

实施例三Embodiment three

图3是本发明一个实施例的移动终端的框图。图3所示的移动终端包括摄像头,所述移动终端包括:FIG. 3 is a block diagram of a mobile terminal according to an embodiment of the present invention. The mobile terminal shown in Figure 3 includes a camera, and the mobile terminal includes:

预览图像获取模块301,用于在图像拍摄过程中,获取摄像头采集的每帧预览图像。The preview image acquisition module 301 is configured to acquire a preview image of each frame captured by the camera during the image capturing process.

拍摄主体识别模块302,用于对所述预览图像进行人脸识别,识别出拍摄主体。The subject identification module 302 is configured to perform face recognition on the preview image to identify the subject.

特征信息获取模块303,用于获取拍摄场景特征和所述拍摄主体的服饰特征。The characteristic information obtaining module 303 is used to obtain the characteristics of the shooting scene and the clothing characteristics of the shooting subject.

图像处理模块304,用于基于所述拍摄场景特征和所述拍摄主体的服饰特征,对所述拍摄主体进行图像处理。The image processing module 304 is configured to perform image processing on the subject based on the features of the shooting scene and the clothing features of the subject.

目标图像生成模块305,用于在图像拍摄完成后,生成经过图像处理后的目标图像。The target image generating module 305 is configured to generate a target image after image processing after the image capture is completed.

参照图4,在图3的基础上,对移动终端还包含的模块,以及模块包含的子模块进行说明。Referring to FIG. 4 , on the basis of FIG. 3 , the modules further included in the mobile terminal and the submodules included in the modules are described.

本发明实施例中,所述图像处理模块404包括:In the embodiment of the present invention, the image processing module 404 includes:

宗教属性确定子模块4041,用于在特征信息获取模块403获取拍摄场景特征和所述拍摄主体的服饰特征后,基于所述拍摄场景特征和所述拍摄主体的服饰特征,确定所述拍摄主体的宗教属性;The religious attribute determination sub-module 4041 is used to determine the shooting scene characteristics and the clothing characteristics of the shooting subject based on the shooting scene characteristics and the clothing characteristics of the shooting subject after the feature information obtaining module 403 obtains the Religious attributes;

图像区域获取子模块4042,用于获取所述拍摄主体图像区域;An image area acquisition sub-module 4042, configured to acquire the image area of the subject;

图像素材确定子模块4043,用于基于所述拍摄主体的宗教属性,确定所述拍摄主体图像区域对应的图像素材;The image material determination sub-module 4043 is configured to determine the image material corresponding to the image area of the subject based on the religious attribute of the subject;

图像修改子模块4044,用于基于所述图像素材,对所述拍摄主体图像区域进行图像处理。The image modification sub-module 4044 is configured to perform image processing on the subject image area based on the image material.

本发明实施例中,所述图像修改子模块4044包括:In the embodiment of the present invention, the image modification sub-module 4044 includes:

图像素材调整单元40441,用于基于所述拍摄主体图像区域,调整所述图像素材的大小、角度和/或形状;An image material adjustment unit 40441, configured to adjust the size, angle and/or shape of the image material based on the subject image area;

图像素材叠加单元40442,用于将调整后的所述图像素材叠加显示在所述拍摄主体图像区域的预设区域;An image material superimposition unit 40442, configured to superimpose and display the adjusted image material in a preset area of the subject image area;

其中,所述图像素材至少包括头饰图像和/或面饰图像。Wherein, the image material includes at least a headgear image and/or a face decoration image.

本发明实施例中,所述移动终端还包括:In the embodiment of the present invention, the mobile terminal further includes:

人脸特征信息获取模块406,用于在图像拍摄完成后,生成经过图像处理后的目标图像的步骤之后,获取所述拍摄主体的人脸特征信息;The facial feature information acquiring module 406 is used to acquire the facial feature information of the shooting subject after the image capture is completed, after the step of generating the image-processed target image;

人脸特征信息存储模块407,用于存储所述人脸特征信息。The face feature information storage module 407 is configured to store the face feature information.

本发明实施例中,所述移动终端还包括:In the embodiment of the present invention, the mobile terminal further includes:

查看指令接收模块408,用于在存储所述人脸特征信息之后,接收请求者对所述目标图像中一目标拍摄主体的查看指令;A viewing instruction receiving module 408, configured to receive a viewing instruction from a requester for a target subject in the target image after storing the facial feature information;

人脸图像得到模块409,用于开启摄像头对所述请求者进行人脸图像采集,得到所述请求者的人脸图像;Facial image obtaining module 409, used to turn on the camera to collect the facial image of the requester to obtain the facial image of the requester;

人脸特征信息提取模块410,用于提取所述人脸图像中的人脸特征信息;Facial feature information extraction module 410, used to extract the facial feature information in the human face image;

人脸特征信息比对模块411,用于将所述人脸图像中的人脸特征信息与预先存储的所述目标拍摄主体的人脸特征信息进行比对;Facial feature information comparison module 411, configured to compare the facial feature information in the face image with the pre-stored facial feature information of the target subject;

第一图像素材去除模块412,用于当所述人脸图像中的人脸特征信息与所述目标拍摄主体的人脸特征信息相匹配时,去除所述目标拍摄主体上所叠加显示的图像素材。The first image material removal module 412 is configured to remove the image material superimposed on the target subject when the face feature information in the face image matches the face feature information of the target subject .

本发明实施例中,所述移动终端还包括:In the embodiment of the present invention, the mobile terminal further includes:

人脸特征信息识别模块413,用于在存储所述人脸特征信息之后,开启摄像头进行人脸识别,识别出人脸特征信息;Facial feature information identification module 413, for after storing described facial feature information, open camera and carry out face recognition, identify facial feature information;

第二图像素材去除模块414,用于当识别出的人脸特征信息与所述目标图像中的一个拍摄主体的人脸特征信息相匹配时,去除所匹配的拍摄主体上所叠加显示的图像素材。The second image material removal module 414 is configured to remove the image material superimposed on the matched subject when the recognized facial feature information matches the facial feature information of a subject in the target image .

本发明实施例中,所述目标图像生成模块405包括:In the embodiment of the present invention, the target image generation module 405 includes:

图像生成子模块4051,用于在图像拍摄完成后,同时生成未经过图像处理的初始图像和经过图像处理后的目标图像;The image generation sub-module 4051 is used to simultaneously generate an initial image without image processing and a target image after image processing after the image capture is completed;

图像存储子模块4052,用于将所述初始图像和所述目标图像分别存储至第一存储空间或第二存储空间,或将所述初始图像和所述目标图像分别分享至第一即时通信应用程序和第二即时通信应用程序。The image storage sub-module 4052 is configured to store the initial image and the target image in the first storage space or the second storage space respectively, or share the initial image and the target image to the first instant messaging application respectively program and a second instant messaging application.

本发明实施例中,所述拍摄主体识别模块402,具体用于预览图像获取模块401在图像拍摄过程中,获取摄像头采集的每帧预览图像后,对所述预览图像进行人脸识别,将识别出的每个人脸分别确定为所述拍摄主体。In the embodiment of the present invention, the subject identification module 402 is specifically used for the preview image acquisition module 401 to perform face recognition on the preview image after acquiring each frame of preview image captured by the camera during the image capture process, and recognize Each human face is determined as the subject respectively.

本发明实施例的移动终端在图像拍摄过程中,从摄像头采集的预览图像中识别出拍摄主体,根据拍摄场景特征和拍摄主体的服饰特征,对拍摄主体进行图像处理,在图像拍摄完成后,生成经过图像处理后的目标图像。由于图像处理后的目标图像与拍摄场景特征和服饰特征匹配,因此目标图像满足了宗教或少数民族对拍摄主体穿着的服饰的特殊要求,同时本发明实施例所述方法省去了拍摄主体对指定服饰的穿着,简化了拍摄主体的拍摄操作。During the image capturing process, the mobile terminal in the embodiment of the present invention recognizes the subject from the preview image collected by the camera, performs image processing on the subject according to the characteristics of the shooting scene and the clothing characteristics of the subject, and generates The target image after image processing. Since the target image after image processing matches the shooting scene features and clothing features, the target image meets the special requirements of religion or ethnic minorities for the clothing worn by the subject, and the method described in the embodiment of the present invention saves the subject from specifying The wearing of clothing simplifies the shooting operation of the subject.

实施例五Embodiment five

图5是本发明另一个实施例的移动终端的框图。图5所示的移动终端500包括:至少一个处理器501、存储器502、至少一个网络接口504、用户接口503和摄像头506。移动终端500中的各个组件通过总线系统505耦合在一起。可理解,总线系统505用于实现这些组件之间的连接通信。总线系统505除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图5中将各种总线都标为总线系统505。FIG. 5 is a block diagram of a mobile terminal according to another embodiment of the present invention. The mobile terminal 500 shown in FIG. 5 includes: at least one processor 501 , a memory 502 , at least one network interface 504 , a user interface 503 and a camera 506 . Various components in the mobile terminal 500 are coupled together through the bus system 505 . It can be understood that the bus system 505 is used to realize connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for clarity of illustration, the various buses are labeled as bus system 505 in FIG. 5 .

其中,用户接口503可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(trackball)、触感板或者触摸屏等。Wherein, the user interface 503 may include a display, a keyboard, or a pointing device (for example, a mouse, a trackball (trackball), a touch panel, or a touch screen, and the like.

可以理解,本发明实施例中的存储器502可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data RateSDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(DirectRambus RAM,DRRAM)。本发明实施例描述的系统和方法的存储器502旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 502 in the embodiment of the present invention may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Wherein, the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electronically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash. The volatile memory can be Random Access Memory (RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data RateSDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (Synchlink DRAM, SLDRAM) and Direct memory bus random access memory (DirectRambus RAM, DRRAM). The memory 502 of the systems and methods described in embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

在一些实施方式中,存储器502存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:操作系统5021和应用程序5022。In some implementations, the memory 502 stores the following elements, executable modules or data structures, or their subsets, or their extended sets: an operating system 5021 and an application program 5022 .

其中,操作系统5021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序5022,包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序5022中。Among them, the operating system 5021 includes various system programs, such as framework layer, core library layer, driver layer, etc., for realizing various basic services and processing tasks based on hardware. The application program 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., and is used to implement various application services. The program for realizing the method of the embodiment of the present invention may be included in the application program 5022 .

在本发明实施例中,通过调用存储器502存储的程序或指令,具体的,可以是应用程序5022中存储的程序或指令,处理器501用于在图像拍摄过程中,获取摄像头采集的每帧预览图像,对所述预览图像进行人脸识别,识别出拍摄主体,获取拍摄场景特征和所述拍摄主体的服饰特征,基于所述拍摄场景特征和所述拍摄主体的服饰特征,对所述拍摄主体进行图像处理,在图像拍摄完成后,生成经过图像处理后的目标图像。In the embodiment of the present invention, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application program 5022, the processor 501 is used to obtain a preview of each frame captured by the camera during the image shooting process. image, face recognition is performed on the preview image, the subject is identified, the shooting scene features and the clothing features of the shooting subject are acquired, and based on the shooting scene features and the clothing features of the shooting subject, the Image processing is performed, and after the image capture is completed, an image-processed target image is generated.

上述本发明实施例揭示的方法可以应用于处理器501中,或者由处理器501实现。处理器501可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器501中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器501可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(FieldProgrammable GateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器502,处理器501读取存储器502中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the foregoing embodiments of the present invention may be applied to the processor 501 or implemented by the processor 501 . The processor 501 may be an integrated circuit chip and has signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 501 or instructions in the form of software. The above-mentioned processor 501 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable Logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502, and completes the steps of the above method in combination with its hardware.

可以理解的是,本发明实施例描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital SignalProcessing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(ProgrammableLogic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。It can be understood that the embodiments described in the embodiments of the present invention may be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing device (DSP Device, DSPD), programmable logic Device (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing the functions described in this application or a combination thereof.

对于软件实现,可通过执行本发明实施例所述功能的模块(例如过程、函数等)来实现本发明实施例所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For software implementation, the techniques described in the embodiments of the present invention may be implemented through modules (such as procedures, functions, etc.) that execute the functions described in the embodiments of the present invention. Software codes can be stored in memory and executed by a processor. Memory can be implemented within the processor or external to the processor.

可选地,处理器501还用于:基于所述拍摄场景特征和所述拍摄主体的服饰特征,确定所述拍摄主体的宗教属性;获取所述拍摄主体图像区域;基于所述拍摄主体的宗教属性,确定所述拍摄主体图像区域对应的图像素材;基于所述图像素材,对所述拍摄主体图像区域进行图像处理。Optionally, the processor 501 is further configured to: determine the religious attribute of the photographed subject based on the characteristics of the photographed scene and the clothing characteristics of the photographed subject; acquire the image area of the photographed subject; attribute, determining the image material corresponding to the subject image area; and performing image processing on the subject image area based on the image material.

可选地,处理器501还用于:基于所述拍摄主体图像区域,调整所述图像素材的大小、角度和/或形状;将调整后的所述图像素材叠加显示在所述拍摄主体图像区域的预设区域;其中,所述图像素材至少包括头饰图像和/或面饰图像。Optionally, the processor 501 is further configured to: adjust the size, angle and/or shape of the image material based on the image area of the subject; superimpose and display the adjusted image material on the image area of the subject The preset area; wherein, the image material includes at least a headgear image and/or a face decoration image.

可选地,处理器501还用于:所述在图像拍摄完成后,生成经过图像处理后的目标图像的步骤之后,获取所述拍摄主体的人脸特征信息;存储所述人脸特征信息。Optionally, the processor 501 is further configured to: acquire the facial feature information of the photographed subject after the step of generating the image-processed target image after the image capturing is completed; and store the facial feature information.

可选地,处理器501还用于:所述存储所述人脸特征信息的步骤之后,接收请求者对所述目标图像中一目标拍摄主体的查看指令;开启摄像头对所述请求者进行人脸图像采集,得到所述请求者的人脸图像;提取所述人脸图像中的人脸特征信息;将所述人脸图像中的人脸特征信息与预先存储的所述目标拍摄主体的人脸特征信息进行比对;当所述人脸图像中的人脸特征信息与所述目标拍摄主体的人脸特征信息相匹配时,去除所述目标拍摄主体上所叠加显示的图像素材。Optionally, the processor 501 is further configured to: after the step of storing the facial feature information, receive an instruction from the requester to view a target subject in the target image; Face image collection, to obtain the face image of the requester; extract the face feature information in the face image; combine the face feature information in the face image with the pre-stored person of the target subject The face feature information is compared; when the face feature information in the face image matches the face feature information of the target subject, the image material superimposed on the target subject is removed.

可选地,处理器501还用于:所述存储所述人脸特征信息的步骤之后,开启摄像头进行人脸识别,识别出人脸特征信息;当识别出的人脸特征信息与所述目标图像中的一个拍摄主体的人脸特征信息相匹配时,去除所匹配的拍摄主体上所叠加显示的图像素材。Optionally, the processor 501 is further configured to: after the step of storing the facial feature information, turn on the camera for face recognition, and identify the facial feature information; when the recognized facial feature information is consistent with the target When the facial feature information of a subject in the image matches, the image material superimposed and displayed on the matched subject is removed.

可选地,处理器501还用于:在图像拍摄完成后,同时生成未经过图像处理的初始图像和经过图像处理后的目标图像;将所述初始图像和所述目标图像分别存储至第一存储空间或第二存储空间,或将所述初始图像和所述目标图像分别分享至第一即时通信应用程序和第二即时通信应用程序。Optionally, the processor 501 is further configured to: generate an initial image without image processing and a target image after image processing at the same time after the image capture is completed; store the initial image and the target image in the first storage space or a second storage space, or share the initial image and the target image to the first instant messaging application program and the second instant messaging application program respectively.

可选地,处理器501还用于:对所述预览图像进行人脸识别,将识别出的每个人脸分别确定为所述拍摄主体。Optionally, the processor 501 is further configured to: perform face recognition on the preview image, and determine each recognized face as the subject.

移动终端500能够实现前述实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。The mobile terminal 500 can implement various processes implemented by the mobile terminal in the foregoing embodiments, and to avoid repetition, details are not repeated here.

依据本发明实施例,移动终端在图像拍摄过程中,从摄像头采集的预览图像中识别出拍摄主体,根据拍摄场景特征和拍摄主体的服饰特征,对拍摄主体进行图像处理,在图像拍摄完成后,生成经过图像处理后的目标图像。由于图像处理后的目标图像与拍摄场景特征和服饰特征匹配,因此目标图像满足了宗教或少数民族对拍摄主体穿着的服饰的特殊要求,同时本发明实施例所述方法省去了拍摄主体对指定服饰的穿着,简化了拍摄主体的拍摄操作。According to the embodiment of the present invention, during the image capturing process, the mobile terminal recognizes the subject from the preview image collected by the camera, performs image processing on the subject according to the characteristics of the shooting scene and the clothing characteristics of the subject, and after the image capturing is completed, Generate the target image after image processing. Since the target image after image processing matches the shooting scene features and clothing features, the target image meets the special requirements of religion or ethnic minorities for the clothing worn by the subject, and the method described in the embodiment of the present invention saves the subject from specifying The wearing of clothing simplifies the shooting operation of the subject.

实施例六Embodiment six

图6是本发明另一个实施例的移动终端的框图。具体地,图6中的移动终端600可以为手机、平板电脑、个人数字助理(Personal Digital Assistant,PDA)、或车载电脑等。FIG. 6 is a block diagram of a mobile terminal according to another embodiment of the present invention. Specifically, the mobile terminal 600 in FIG. 6 may be a mobile phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), or a vehicle-mounted computer.

图6中的移动终端600包括射频(Radio Frequency,RF)电路610、存储器620、输入单元630、显示单元640、摄像头650、处理器660、音频电路670、WiFi(Wireless Fidelity)模块680和电源690。Mobile terminal 600 in Fig. 6 comprises radio frequency (Radio Frequency, RF) circuit 610, memory 620, input unit 630, display unit 640, camera 650, processor 660, audio frequency circuit 670, WiFi (Wireless Fidelity) module 680 and power supply 690 .

其中,输入单元630可用于接收用户输入的数字或字符信息,以及产生与移动终端600的用户设置以及功能控制有关的信号输入。具体地,本发明实施例中,该输入单元630可以包括触控面板631。触控面板631,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板631上的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板631可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给该处理器660,并能接收处理器660发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板631。除了触控面板631,输入单元630还可以包括其他输入设备632,其他输入设备632可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。Wherein, the input unit 630 can be used to receive number or character information input by the user, and generate signal input related to the user setting and function control of the mobile terminal 600 . Specifically, in the embodiment of the present invention, the input unit 630 may include a touch panel 631 . The touch panel 631, also referred to as a touch screen, can collect user's touch operations on or near it (such as the user's operation on the touch panel 631 using any suitable object or accessory such as a finger, a stylus), and The specified program drives the corresponding connected device. Optionally, the touch panel 631 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 660, and can receive and execute commands sent by the processor 660. In addition, the touch panel 631 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 631, the input unit 630 may also include other input devices 632, which may include but not limited to physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, etc. one or more of.

其中,显示单元640可用于显示由用户输入的信息或提供给用户的信息以及移动终端600的各种菜单界面。显示单元640可包括显示面板641,可选的,可以采用LCD或有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板641。Wherein, the display unit 640 can be used to display information input by the user or information provided to the user and various menu interfaces of the mobile terminal 600 . The display unit 640 may include a display panel 641. Optionally, the display panel 641 may be configured in the form of an LCD or an organic light-emitting diode (Organic Light-Emitting Diode, OLED).

应注意,触控面板631可以覆盖显示面板641,形成触摸显示屏,当该触摸显示屏检测到在其上或附近的触摸操作后,传送给处理器660以确定触摸事件的类型,随后处理器660根据触摸事件的类型在触摸显示屏上提供相应的视觉输出。It should be noted that the touch panel 631 can cover the display panel 641 to form a touch display screen. When the touch display screen detects a touch operation on or near it, it is sent to the processor 660 to determine the type of the touch event, and then the processor 660 provides corresponding visual output on the touch display screen according to the type of the touch event.

触摸显示屏包括应用程序界面显示区及常用控件显示区。该应用程序界面显示区及该常用控件显示区的排列方式并不限定,可以为上下排列、左右排列等可以区分两个显示区的排列方式。该应用程序界面显示区可以用于显示应用程序的界面。每一个界面可以包含至少一个应用程序的图标和/或widget桌面控件等界面元素。该应用程序界面显示区也可以为不包含任何内容的空界面。该常用控件显示区用于显示使用率较高的控件,例如,设置按钮、界面编号、滚动条、电话本图标等应用程序图标等。The touch display screen includes an application program interface display area and a common control display area. The arrangement of the display area of the application program interface and the display area of the commonly used controls is not limited, and may be an arrangement in which the two display areas can be distinguished, such as vertical arrangement, left-right arrangement, and the like. The application program interface display area can be used to display the interface of the application program. Each interface may include at least one interface element such as an icon of an application program and/or a widget desktop control. The application program interface display area can also be an empty interface without any content. The commonly used control display area is used to display controls with a high usage rate, for example, application icons such as setting buttons, interface numbers, scroll bars, and phonebook icons.

其中处理器660是移动终端600的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在第一存储器621内的软件程序和/或模块,以及调用存储在第二存储器622内的数据,执行移动终端600的各种功能和处理数据,从而对移动终端600进行整体监控。可选的,处理器660可包括一个或多个处理单元。Wherein the processor 660 is the control center of the mobile terminal 600, utilizes various interfaces and lines to connect the various parts of the whole mobile phone, by running or executing the software programs and/or modules stored in the first memory 621, and calling the software programs and/or modules stored in the second memory 621. The data in the memory 622 executes various functions of the mobile terminal 600 and processes data, so as to monitor the mobile terminal 600 as a whole. Optionally, the processor 660 may include one or more processing units.

在本发明实施例中,通过调用存储该第一存储器621内的软件程序和/或模块和/或该第二存储器622内的数据,处理器660用于在图像拍摄过程中,获取摄像头采集的每帧预览图像,对所述预览图像进行人脸识别,识别出拍摄主体,获取拍摄场景特征和所述拍摄主体的服饰特征,基于所述拍摄场景特征和所述拍摄主体的服饰特征,对所述拍摄主体进行图像处理,在图像拍摄完成后,生成经过图像处理后的目标图像。In the embodiment of the present invention, by calling the software programs and/or modules stored in the first memory 621 and/or the data in the second memory 622, the processor 660 is used to obtain the data collected by the camera during the image shooting process. For each frame of the preview image, face recognition is performed on the preview image, the subject is identified, the shooting scene features and the clothing features of the shooting subject are acquired, and based on the shooting scene features and the clothing features of the shooting subject, the Image processing is performed on the subject to be photographed, and an image-processed target image is generated after the image is captured.

可选地,处理器660还用于:基于所述拍摄场景特征和所述拍摄主体的服饰特征,确定所述拍摄主体的宗教属性;获取所述拍摄主体图像区域;基于所述拍摄主体的宗教属性,确定所述拍摄主体图像区域对应的图像素材;基于所述图像素材,对所述拍摄主体图像区域进行图像处理。Optionally, the processor 660 is further configured to: determine the religious attribute of the photographed subject based on the characteristics of the photographed scene and the clothing characteristics of the photographed subject; acquire the image area of the photographed subject; attribute, determining the image material corresponding to the subject image area; and performing image processing on the subject image area based on the image material.

可选地,处理器660还用于:基于所述拍摄主体图像区域,调整所述图像素材的大小、角度和/或形状;将调整后的所述图像素材叠加显示在所述拍摄主体图像区域的预设区域;其中,所述图像素材至少包括头饰图像和/或面饰图像。Optionally, the processor 660 is further configured to: adjust the size, angle and/or shape of the image material based on the image area of the subject; superimpose and display the adjusted image material on the image area of the subject The preset area; wherein, the image material includes at least a headgear image and/or a face decoration image.

可选地,处理器660还用于:所述在图像拍摄完成后,生成经过图像处理后的目标图像的步骤之后,获取所述拍摄主体的人脸特征信息;存储所述人脸特征信息。Optionally, the processor 660 is further configured to: acquire the facial feature information of the photographed subject after the step of generating the image-processed target image after the image capturing is completed; and store the facial feature information.

可选地,处理器660还用于:所述存储所述人脸特征信息的步骤之后,接收请求者对所述目标图像中一目标拍摄主体的查看指令;开启摄像头对所述请求者进行人脸图像采集,得到所述请求者的人脸图像;提取所述人脸图像中的人脸特征信息;将所述人脸图像中的人脸特征信息与预先存储的所述目标拍摄主体的人脸特征信息进行比对;当所述人脸图像中的人脸特征信息与所述目标拍摄主体的人脸特征信息相匹配时,去除所述目标拍摄主体上所叠加显示的图像素材。Optionally, the processor 660 is further configured to: after the step of storing the facial feature information, receive an instruction from the requester to view a target subject in the target image; Face image collection, to obtain the face image of the requester; extract the face feature information in the face image; combine the face feature information in the face image with the pre-stored person of the target subject The face feature information is compared; when the face feature information in the face image matches the face feature information of the target subject, the image material superimposed on the target subject is removed.

可选地,处理器660还用于:所述存储所述人脸特征信息的步骤之后,开启摄像头进行人脸识别,识别出人脸特征信息;当识别出的人脸特征信息与所述目标图像中的一个拍摄主体的人脸特征信息相匹配时,去除所匹配的拍摄主体上所叠加显示的图像素材。Optionally, the processor 660 is further configured to: after the step of storing the facial feature information, turn on the camera for face recognition, and identify the facial feature information; when the recognized facial feature information is consistent with the target When the facial feature information of a subject in the image matches, the image material superimposed and displayed on the matched subject is removed.

可选地,处理器660还用于:在图像拍摄完成后,同时生成未经过图像处理的初始图像和经过图像处理后的目标图像;将所述初始图像和所述目标图像分别存储至第一存储空间或第二存储空间,或将所述初始图像和所述目标图像分别分享至第一即时通信应用程序和第二即时通信应用程序。Optionally, the processor 660 is further configured to: generate an initial image without image processing and a target image after image processing at the same time after the image capture is completed; store the initial image and the target image in the first storage space or a second storage space, or share the initial image and the target image to the first instant messaging application program and the second instant messaging application program respectively.

可选地,处理器660还用于:对所述预览图像进行人脸识别,将识别出的每个人脸分别确定为所述拍摄主体。Optionally, the processor 660 is further configured to: perform face recognition on the preview image, and determine each recognized face as the subject.

可见,依据本发明实施例,移动终端在图像拍摄过程中,从摄像头采集的预览图像中识别出拍摄主体,根据拍摄场景特征和拍摄主体的服饰特征,对拍摄主体进行图像处理,在图像拍摄完成后,生成经过图像处理后的目标图像。由于图像处理后的目标图像与拍摄场景特征和服饰特征匹配,因此目标图像满足了宗教或少数民族对拍摄主体穿着的服饰的特殊要求,同时本发明实施例所述方法省去了拍摄主体对指定服饰的穿着,简化了拍摄主体的拍摄操作。It can be seen that according to the embodiment of the present invention, the mobile terminal recognizes the subject from the preview image collected by the camera during the image capture process, and performs image processing on the subject according to the characteristics of the shooting scene and the clothing characteristics of the subject, and the subject is processed after the image capture is completed. After that, the target image after image processing is generated. Since the target image after image processing matches the shooting scene features and clothing features, the target image meets the special requirements of religion or ethnic minorities for the clothing worn by the subject, and the method described in the embodiment of the present invention saves the subject from specifying The wearing of clothing simplifies the shooting operation of the subject.

本领域普通技术人员可以意识到,结合本发明实施例中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those of ordinary skill in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (16)

1. a kind of image pickup method, is applied to the mobile terminal with photographic head, it is characterised in that methods described includes:
In image shoot process, every frame preview image of photographic head collection is obtained;
Recognition of face is carried out to the preview image, shooting main body is identified;
Obtain the garment ornament of photographed scene feature and the shooting main body;
Based on the photographed scene feature and the garment ornament of the shooting main body, image procossing is carried out to the shooting main body;
After the completion of image taking, the target image after image procossing is generated.
2. method according to claim 1, it is characterised in that described based on the photographed scene feature and the shooting master The garment ornament of body, to it is described shooting main body carry out image procossing the step of, including:
Based on the photographed scene feature and the garment ornament of the shooting main body, the religion attribute for shooting main body is determined;
Obtain the shooting main image area;
Based on the religion attribute for shooting main body, the corresponding picture material in the shooting main image area is determined;
Based on described image material, image procossing is carried out to the shooting main image area.
3. method according to claim 2, it is characterised in that described based on described image material, to the shooting main body The step of image-region carries out image procossing, including:
Based on the shooting main image area, size, angle and/or the shape of described image material are adjusted;
By the described image material Overlapping display after adjustment the shooting main image area predeterminable area;
Wherein, described image material at least includes headwear image and/or facial ornament image.
4. method according to claim 3, it is characterised in that described after the completion of image taking, generates at image After the step of target image after reason, methods described also includes:
Obtain the face characteristic information for shooting main body;
Store the face characteristic information.
5. method according to claim 4, it is characterised in that after the step of the storage face characteristic information, Methods described also includes:
Receive requestor main body is shot to a target in the target image and check instruction;
Opening photographic head carries out man face image acquiring to the requestor, obtains the facial image of the requestor;
Extract the face characteristic information in the facial image;
Face characteristic information in the facial image and the target for prestoring are shot into the face characteristic information of main body Compare;
When the face characteristic information that the face characteristic information in the facial image shoots main body with the target matches, go Except the target shoots the picture material of institute's Overlapping display in main body.
6. method according to claim 4, it is characterised in that after the step of the storage face characteristic information, Methods described also includes:
Opening photographic head carries out recognition of face, identifies face characteristic information;
When the face characteristic information of a shooting main body in the face characteristic information for identifying with the target image matches When, remove the picture material of institute's Overlapping display in matched shooting main body.
7. method according to claim 1, it is characterised in that described after the completion of image taking, generates at image The step of target image after reason, including:
After the completion of image taking, while generating the target figure without the initial pictures of image procossing and after image procossing Picture;
The initial pictures and the target image are stored respectively to the first memory space or the second memory space, or will be described Initial pictures are shared to the first instant messaging application program and the second instant messaging application program respectively with the target image.
8. method according to claim 1, it is characterised in that described that recognition of face, identification are carried out to the preview image Go out the step of shooting main body, including:
Recognition of face is carried out to the preview image, each face that will identify that is identified as the shooting main body.
9. a kind of mobile terminal, including photographic head, it is characterised in that the mobile terminal also includes:
Preview image acquisition module, for, in image shoot process, obtaining every frame preview image of photographic head collection;
Main body identification module is shot, and for recognition of face being carried out to the preview image, identifies shooting main body;
Characteristic information acquisition module, for obtaining the garment ornament of photographed scene feature and the shooting main body;
Image processing module, for the garment ornament based on the photographed scene feature and the shooting main body, to the shooting Main body carries out image procossing;
Target image generation module, for, after the completion of image taking, generating the target image after image procossing.
10. mobile terminal according to claim 9, it is characterised in that described image processing module includes:
Religion attribute determination sub-module, for the garment ornament based on the photographed scene feature and the shooting main body, it is determined that The religion attribute for shooting main body;
Image-region acquisition submodule, for obtaining the shooting main image area;
Picture material determination sub-module, for based on the religion attribute for shooting main body, determining the shooting subject image area The corresponding picture material in domain;
Amending image submodule, for based on described image material, carrying out image procossing to the shooting main image area.
11. mobile terminals according to claim 10, it is characterised in that described image modification submodule includes:
Picture material adjustment unit, for based on the shooting main image area, adjusting size, the angle of described image material And/or shape;
Picture material superpositing unit, for by the described image material Overlapping display after adjustment in the shooting main image area Predeterminable area;
Wherein, described image material at least includes headwear image and/or facial ornament image.
12. mobile terminals according to claim 11, it is characterised in that the mobile terminal also includes:
Face characteristic information acquisition module, for, after the completion of image taking, generating the target image after image procossing After step, the face characteristic information for shooting main body is obtained;
Face characteristic information memory module, for storing the face characteristic information.
13. mobile terminals according to claim 12, it is characterised in that the mobile terminal also includes:
Command reception module is checked, for requestor after the face characteristic information is stored, being received to the target image In a target shoot main body and check instruction;
Facial image obtains module, carries out man face image acquiring to the requestor for opening photographic head, obtains the request The facial image of person;
Face characteristic information extraction module, for extracting the face characteristic information in the facial image;
Face characteristic information comparing module, for by the face characteristic information in the facial image and the mesh for prestoring Mark shoots the face characteristic information of main body and compares;
First picture material removes module, for shooting main body with the target when the face characteristic information in the facial image Face characteristic information when matching, remove the picture material that the target shoots institute's Overlapping display in main body.
14. mobile terminals according to claim 12, it is characterised in that the mobile terminal also includes:
Face characteristic information identification module, carries out face knowledge for after the face characteristic information is stored, opening photographic head Not, identify face characteristic information;
Second picture material removes module, for when a shooting in the face characteristic information for identifying with the target image When the face characteristic information of main body matches, the picture material of institute's Overlapping display in matched shooting main body is removed.
15. mobile terminals according to claim 9, it is characterised in that the target image generation module includes:
Image generates submodule, for after the completion of image taking, while generating the initial pictures and Jing without image procossing The target image crossed after image procossing;
Image sub-module stored, for the initial pictures and the target image are stored respectively to the first memory space or Two memory spaces, or the initial pictures and the target image are shared respectively to the first instant messaging application program and second Instant messaging application program.
16. mobile terminals according to claim 9, it is characterised in that the shooting main body identification module, specifically for right The preview image carries out recognition of face, and each face that will identify that is identified as the shooting main body.
CN201710042946.8A 2017-01-20 2017-01-20 A kind of image pickup method and mobile terminal Active CN106603928B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710042946.8A CN106603928B (en) 2017-01-20 2017-01-20 A kind of image pickup method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710042946.8A CN106603928B (en) 2017-01-20 2017-01-20 A kind of image pickup method and mobile terminal

Publications (2)

Publication Number Publication Date
CN106603928A true CN106603928A (en) 2017-04-26
CN106603928B CN106603928B (en) 2019-09-27

Family

ID=58586151

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710042946.8A Active CN106603928B (en) 2017-01-20 2017-01-20 A kind of image pickup method and mobile terminal

Country Status (1)

Country Link
CN (1) CN106603928B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107424117A (en) * 2017-07-17 2017-12-01 广东欧珀移动通信有限公司 Image U.S. face method, apparatus, computer-readable recording medium and computer equipment
CN108259746A (en) * 2018-01-24 2018-07-06 维沃移动通信有限公司 A kind of image color detection method and mobile terminal
CN109509141A (en) * 2017-09-15 2019-03-22 阿里巴巴集团控股有限公司 Image processing method, head portrait setting method and device
CN109712104A (en) * 2018-11-26 2019-05-03 深圳艺达文化传媒有限公司 The exposed method of self-timer video cartoon head portrait and Related product
CN109862276A (en) * 2019-03-31 2019-06-07 联想(北京)有限公司 A kind of information processing method and device
CN110225255A (en) * 2019-06-21 2019-09-10 网易(杭州)网络有限公司 A kind of camera control method and device
CN110334568A (en) * 2019-03-30 2019-10-15 深圳市晓舟科技有限公司 Track generates and monitoring method, device, equipment and storage medium
CN110992276A (en) * 2019-11-18 2020-04-10 北京字节跳动网络技术有限公司 Image processing method, device, medium and electronic equipment
CN111640194A (en) * 2020-06-07 2020-09-08 上海商汤智能科技有限公司 AR scene image display control method and device, electronic equipment and storage medium
CN112637491A (en) * 2020-12-18 2021-04-09 维沃移动通信(杭州)有限公司 Photographing method and photographing apparatus
CN112750072A (en) * 2020-12-30 2021-05-04 五八有限公司 Information processing method and device
CN112843690A (en) * 2020-12-31 2021-05-28 上海米哈游天命科技有限公司 Shooting method, device, equipment and storage medium
CN115841432A (en) * 2023-02-09 2023-03-24 北京达佳互联信息技术有限公司 Beauty effect data determination and model training method, device, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1453719A (en) * 2002-04-28 2003-11-05 上海友讯网络资讯有限公司 Forming method and system of virtual images and virtual scenes capable of being combined freely
US20140240354A1 (en) * 2013-02-28 2014-08-28 Samsung Electronics Co., Ltd. Augmented reality apparatus and method
KR20140108450A (en) * 2013-02-28 2014-09-11 (주)클로버추얼패션 Avatar clothes automatically wearing method
CN104616330A (en) * 2015-02-10 2015-05-13 广州视源电子科技股份有限公司 Picture generation method and device
CN106210468A (en) * 2016-07-15 2016-12-07 网易(杭州)网络有限公司 A kind of augmented reality display packing and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1453719A (en) * 2002-04-28 2003-11-05 上海友讯网络资讯有限公司 Forming method and system of virtual images and virtual scenes capable of being combined freely
US20140240354A1 (en) * 2013-02-28 2014-08-28 Samsung Electronics Co., Ltd. Augmented reality apparatus and method
KR20140108450A (en) * 2013-02-28 2014-09-11 (주)클로버추얼패션 Avatar clothes automatically wearing method
CN104616330A (en) * 2015-02-10 2015-05-13 广州视源电子科技股份有限公司 Picture generation method and device
CN106210468A (en) * 2016-07-15 2016-12-07 网易(杭州)网络有限公司 A kind of augmented reality display packing and device

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107424117A (en) * 2017-07-17 2017-12-01 广东欧珀移动通信有限公司 Image U.S. face method, apparatus, computer-readable recording medium and computer equipment
CN109509141A (en) * 2017-09-15 2019-03-22 阿里巴巴集团控股有限公司 Image processing method, head portrait setting method and device
CN108259746A (en) * 2018-01-24 2018-07-06 维沃移动通信有限公司 A kind of image color detection method and mobile terminal
CN108259746B (en) * 2018-01-24 2021-02-02 维沃移动通信有限公司 Image color detection method and mobile terminal
CN109712104A (en) * 2018-11-26 2019-05-03 深圳艺达文化传媒有限公司 The exposed method of self-timer video cartoon head portrait and Related product
CN110334568B (en) * 2019-03-30 2022-09-16 深圳市晓舟科技有限公司 Track generation and monitoring method, device, equipment and storage medium
CN110334568A (en) * 2019-03-30 2019-10-15 深圳市晓舟科技有限公司 Track generates and monitoring method, device, equipment and storage medium
CN109862276A (en) * 2019-03-31 2019-06-07 联想(北京)有限公司 A kind of information processing method and device
CN109862276B (en) * 2019-03-31 2020-11-20 联想(北京)有限公司 Information processing method and device
CN110225255A (en) * 2019-06-21 2019-09-10 网易(杭州)网络有限公司 A kind of camera control method and device
CN110225255B (en) * 2019-06-21 2021-02-09 网易(杭州)网络有限公司 Photographing control method and device
CN110992276A (en) * 2019-11-18 2020-04-10 北京字节跳动网络技术有限公司 Image processing method, device, medium and electronic equipment
CN111640194A (en) * 2020-06-07 2020-09-08 上海商汤智能科技有限公司 AR scene image display control method and device, electronic equipment and storage medium
CN112637491A (en) * 2020-12-18 2021-04-09 维沃移动通信(杭州)有限公司 Photographing method and photographing apparatus
CN112750072A (en) * 2020-12-30 2021-05-04 五八有限公司 Information processing method and device
CN112843690A (en) * 2020-12-31 2021-05-28 上海米哈游天命科技有限公司 Shooting method, device, equipment and storage medium
CN115841432A (en) * 2023-02-09 2023-03-24 北京达佳互联信息技术有限公司 Beauty effect data determination and model training method, device, equipment and medium
CN115841432B (en) * 2023-02-09 2023-08-08 北京达佳互联信息技术有限公司 Method, device, equipment and medium for determining and training beauty special effect data

Also Published As

Publication number Publication date
CN106603928B (en) 2019-09-27

Similar Documents

Publication Publication Date Title
CN106603928B (en) A kind of image pickup method and mobile terminal
CN106331510B (en) A backlight photographing method and mobile terminal
CN106570110B (en) Image duplicate removal method and device
CN105915782A (en) Picture obtaining method based on face identification, and mobile terminal
CN107395965B (en) A kind of image processing method and mobile terminal
CN107566717B (en) A shooting method, mobile terminal and computer-readable storage medium
CN106056533B (en) A kind of method and terminal taken pictures
WO2019001152A1 (en) Photographing method and mobile terminal
CN105827952A (en) Photographing method for removing specified object and mobile terminal
CN107257439A (en) A kind of image pickup method and mobile terminal
CN106358069A (en) Video data processing method and mobile terminal
CN106713764A (en) Photographic method and mobile terminal
CN105847674A (en) Preview image processing method based on mobile terminal, and mobile terminal therein
CN106027900A (en) Photographing method and mobile terminal
CN106791438A (en) A kind of photographic method and mobile terminal
CN106060386A (en) Preview image generation method and mobile terminal
CN107357540A (en) The method of adjustment and mobile terminal of a kind of display direction
CN107181913A (en) A kind of photographic method and mobile terminal
CN106506962A (en) A kind of image processing method and mobile terminal
CN108037863A (en) A kind of method and apparatus for showing image
CN107124543A (en) A kind of image pickup method and mobile terminal
CN108304708A (en) Mobile terminal, face unlocking method and related product
CN106161932B (en) A camera method and mobile terminal
CN106096043B (en) A camera method and mobile terminal
WO2017181842A1 (en) Image processing method and device for electronic mirror, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant