CN108171803A - An image production method and related device - Google Patents
An image production method and related device Download PDFInfo
- Publication number
- CN108171803A CN108171803A CN201711161804.XA CN201711161804A CN108171803A CN 108171803 A CN108171803 A CN 108171803A CN 201711161804 A CN201711161804 A CN 201711161804A CN 108171803 A CN108171803 A CN 108171803A
- Authority
- CN
- China
- Prior art keywords
- image
- camera
- character image
- head
- terminal device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/61—Control of cameras or camera modules based on recognised objects
- H04N23/611—Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Architecture (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computer Graphics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- User Interface Of Digital Computer (AREA)
- Processing Or Creating Images (AREA)
Abstract
Description
技术领域technical field
本申请涉及图像处理领域,尤其涉及一种娱乐海报的制作方法及相关装置。The present application relates to the field of image processing, in particular to a method for making entertainment posters and related devices.
背景技术Background technique
随着科技的发展,相机的普及度越来越高,人们对相机对功能的要求也越来越高,例如,一些商场或娱乐场所会放置一些具有拍摄功能终端设备供游客们摆拍,为游客留下一些质量较高的图像,给游客的游玩带来更多的乐趣。With the development of science and technology, the popularity of cameras is getting higher and higher, and people have higher and higher requirements for the functions of cameras. For example, some shopping malls or entertainment places will place some terminal devices with shooting functions for tourists to pose for photos Tourists leave some high-quality images to bring more fun to tourists.
但是,有些终端设备中的摄像头由于位置和角度的问题,有时候并不能拍出一些令人满意的图像,而且一些拍摄后的图像也没有后续利用,运用到更多的娱乐项目中去,降低了游客的体验。However, due to the position and angle of the cameras in some terminal devices, sometimes some satisfactory images cannot be taken, and some of the captured images are not used in the follow-up, and are used in more entertainment projects, reducing the tourists' experience.
发明内容Contents of the invention
本发明提供一种图像制作方法和终端设备,以期根据用户的身高自动调节摄像头的高度,提高拍照图像的质量,并且将图像用来制作娱乐海报,提高图像的观赏性,提高用户的体验。The present invention provides an image production method and terminal equipment, in order to automatically adjust the height of the camera according to the height of the user, improve the quality of the photographed image, and use the image to make entertainment posters, improve the appreciation of the image, and improve the user experience.
第一方面,本发明提供一种图像制作方法,包括:In a first aspect, the present invention provides an image production method, comprising:
获取摄像头在第一位置采集的第一人物图像,识别所述第一人物图像中距离头部上方最近的标识点;Obtaining a first person image collected by a camera at a first position, and identifying a mark point closest to the top of the head in the first person image;
获取所述第一人物图像的头部和所述标识点的高度差;Acquiring the height difference between the head of the first person image and the identification point;
根据所述标识点确定所述摄像头调节方向,根据所述高度差确定所述摄像头的调节高度,将所述摄像头调节至第二位置;determining the adjustment direction of the camera according to the identification point, determining the adjustment height of the camera according to the height difference, and adjusting the camera to a second position;
获取所述摄像头在第二位置采集的第二人物图像,提取所述第二人物图像的人脸图像。Acquiring a second person image captured by the camera at a second position, and extracting a face image of the second person image.
第二方面,本发明提供一种图像制作的终端设备,包括:In a second aspect, the present invention provides a terminal device for image production, including:
获取单元,用于获取第一人物图像,识别所述第一人物图像中距离头顶上方最近的标识点,所述第一人物图像为摄像头在第一位置拍摄得到的;An acquiring unit, configured to acquire a first person image, and identify the identification point closest to the top of the head in the first person image, where the first person image is captured by a camera at a first position;
计算单元,用于计算所述第一人物图像中的头顶和所述标识点的高度差;a calculation unit, configured to calculate the height difference between the top of the head in the first person image and the identification point;
确定单元,用于根据所述标识点确定所述摄像头调节方向,根据所述高度差确定所述摄像头的调节高度,将所述摄像头调节至第二位置;a determination unit, configured to determine the adjustment direction of the camera according to the identification point, determine the adjustment height of the camera according to the height difference, and adjust the camera to a second position;
提取单元,用于提取所述第二人物图像的人脸图像,所述第二人物图像为所述摄像头在第二位置拍摄得到的。An extracting unit, configured to extract a face image of the second person image, where the second person image is captured by the camera at a second location.
第三方面,本申请实施例提供一种终端设备,包括一个或多个处理器、一个或多个存储器、一个或多个收发器,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述一个或多个处理器执行,所述程序包括用于执行如第一方面所述的方法中的步骤的指令。In the third aspect, the embodiment of the present application provides a terminal device, including one or more processors, one or more memories, one or more transceivers, and one or more programs, and the one or more programs are controlled by Stored in the memory and configured to be executed by the one or more processors, the program includes instructions for performing the steps in the method as described in the first aspect.
第四方面,本申请实施例提供一种计算机可读存储介质,其存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如第一方面所述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program for electronic data exchange, wherein the computer program causes a computer to execute the method as described in the first aspect.
第五方面,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如第一方面所述的方法。In a fifth aspect, an embodiment of the present application provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the computer program described in the first aspect. described method.
采用本申请实施例,具有以下有益效果:Using the embodiment of the present application has the following beneficial effects:
现有技术中,一些商场的娱乐机都是在固定位置对用户进行图像的采集,没有考虑用户身高的差异性,而本发明在图像采集区域的座椅的背板上设置了一系列的标识点,可以根据用户的身高自动调节娱乐机摄像头的高度,从而在最合适的位置采集到高质量的图像,另外,本发明的娱乐机还进一步操作采集到的人物图像,提取人物图像中的头部图,将头部图和预存的3D模型图进行虚拟试戴,生成新的头部图,并将新的头部图和预存的背景图像结合完成娱乐海报的制作,并打印生成的娱乐海报以供用户观赏,大大提高了图像的娱乐性,提高了用户体验。In the prior art, some entertainment machines in shopping malls collect images of users at fixed positions without considering the difference in height of users. However, the present invention sets a series of signs on the back panel of the seat in the image collection area point, the height of the entertainment machine camera can be automatically adjusted according to the height of the user, so as to collect high-quality images at the most suitable position. In addition, the entertainment machine of the present invention further operates the collected character images to extract the head in the character image. The head image and the pre-stored 3D model image are used for virtual try-on to generate a new head image, and the new head image and the pre-stored background image are combined to complete the production of entertainment posters, and the generated entertainment posters are printed For users to watch, the entertainment of the image is greatly improved, and the user experience is improved.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.
图1是本申请实施例提供的一种一种图像制作方法的流程示意图;FIG. 1 is a schematic flow diagram of an image production method provided in an embodiment of the present application;
图2是本申请实施例提供的图像采集区域的标识点的设置示意图;Fig. 2 is a schematic diagram of the setting of the identification points in the image acquisition area provided by the embodiment of the present application;
图3是本申请实施例提供的一种3D模型图选择图标示意图;Fig. 3 is a schematic diagram of a 3D model map selection icon provided by the embodiment of the present application;
图4是本申请实施例提供的另一种图像制作方法的流程示意图;Fig. 4 is a schematic flow chart of another image production method provided by the embodiment of the present application;
图5是本申请实施例提供的另一种终端设备的结构示意图;FIG. 5 is a schematic structural diagram of another terminal device provided by an embodiment of the present application;
图6是本申请实施例提供的另一种终端设备的结构示意图;FIG. 6 is a schematic structural diagram of another terminal device provided by an embodiment of the present application;
图7是本申请实施例提供的处理单元的结构示意图。FIG. 7 is a schematic structural diagram of a processing unit provided by an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is an embodiment of a part of the application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.
以下分别进行详细说明。Each will be described in detail below.
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second", "third" and "fourth" in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order . Furthermore, the terms "include" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or devices.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The occurrences of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is understood explicitly and implicitly by those skilled in the art that the embodiments described herein can be combined with other embodiments.
以下,对本发明中的部分用语进行解释,以便于本领域技术人员理解。Hereinafter, some terms used in the present invention are explained to facilitate the understanding of those skilled in the art.
终端设备是一种向用户提供语音和/或数据连通性的设备,例如,具有无线连接功能的手持式设备、车载设备等。常见的终端设备例如包括:手机、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(mobile internet device,MID)、可穿戴设备,例如智能手表、智能手环、计步器等。A terminal device is a device that provides voice and/or data connectivity to users, for example, a handheld device with a wireless connection function, a vehicle-mounted device, and the like. Common terminal devices include, for example: mobile phones, tablet computers, notebook computers, handheld computers, mobile internet devices (mobile internet devices, MIDs), wearable devices, such as smart watches, smart bracelets, and pedometers.
首先,参见图1,图1为本申请实施例提供的一种图像制作方法的流程示意图,该方法包括:First, referring to FIG. 1, FIG. 1 is a schematic flow chart of an image production method provided in an embodiment of the present application, the method comprising:
步骤101:终端设备获取第一人物图像,识别所述第一人物图像中距离头顶上方最近的标识点,所述第一人物图像为摄像头在第一位置拍摄得到的。Step 101: The terminal device acquires a first person image, and identifies the marking point closest to the top of the head in the first person image, and the first person image is captured by a camera at a first position.
其中,所述第一位置为所述摄像头处于未工作状态下的固定位置,所述第一位置是由所述用户的坐高和所述图像采集区域的座椅的高度共同决定的。Wherein, the first position is a fixed position when the camera is not working, and the first position is jointly determined by the sitting height of the user and the height of the seat in the image collection area.
举例来说,一般的,在三岁以上的不同人中最小坐高值通常为0.45m,最大坐高值通常为1.05m,若将所述座椅的高度设置为0.35m,则所述摄像头的第一位置设置范围为0.8m~1.4m,具体的可以将所述摄像头的第一位置设置为1.0m。For example, in general, the minimum sitting height value is usually 0.45m, and the maximum sitting height value is usually 1.05m among different people over three years old. If the height of the seat is set to 0.35m, the camera The setting range of the first position of the camera is 0.8m to 1.4m. Specifically, the first position of the camera can be set to 1.0m.
进一步地,所述摄像头在所述第一位置采集第一人物图像,识别所述第一人物图像中的标识点,可以理解的是,所述采集区域的座椅后面的背板上可以设置多个标识点,,不同位置的标识点代表不同的高度。Further, the camera captures the first person image at the first position, and recognizes the identification points in the first person image. It can be understood that multiple Marking points, the marking points at different positions represent different heights.
进一步地,所述多个标识点在所述座椅后面的背板上的连线为一条竖直直线,所述多个标识点是不同的,可以是形状上的不同,也可以是颜色上的不同,等等。Further, the connection line of the plurality of identification points on the back panel behind the seat is a vertical straight line, and the plurality of identification points are different, and may be different in shape or color. different, and so on.
进一步地,在所述终端设备识别所述第一人物图像中的标识点时,若能够检测到所述座椅上的所有标识点,则说明所述用户没有挡住标识点,偏离所述图像采集区域,所述终端设备则无法正常采集所述用户的所述第一人物图像,则在所述终端显示界面展示提示信息,所述提示信息用于提示所述用户调整位置,坐在所述座椅的正中心,以便于所述摄像头更好的采集所述用户的第一人物图像。Further, when the terminal device recognizes the identification points in the first person image, if all the identification points on the seat can be detected, it means that the user has not blocked the identification points and deviated from the image acquisition. If the terminal device cannot normally collect the image of the first person of the user, it will display prompt information on the display interface of the terminal. The prompt information is used to prompt the user to adjust the position and sit in the seat. the center of the chair, so that the camera can better capture the image of the first person of the user.
举例来说,在所述采集区域的座椅后面的背板上设置六个标识点,如图2所示,第一个标识点代表的高度为0.6m,第二个标识点代表的高度为0.8m,第三个标识点代表的高度为1.0m,第四个标识点代表的高度为1.2m,第五个标识点代表的高度为1.4m,第六个标识点代表的高度为1.6m,将所述第一位置设置在第三个标识点对应的高度1.0m处,即让所述摄像头在初始时对准第三个标识点,当所述用户坐在所述图像采集区域的座椅的正中心时,所述摄像头开始采集所述用户的第一人物图像,识别采集所述第一人物图像中的标识点,可以理解的是,由于所述用户遮挡标识点的缘故,所述第一人物图像中可能只包含所述第六个标识点,也有可能包含所述第六个标识点和所述第五个标识点,……,等等。For example, six marking points are set on the backboard behind the seat in the collection area, as shown in Figure 2, the height represented by the first marking point is 0.6m, and the height represented by the second marking point is 0.8m, the height represented by the third mark point is 1.0m, the height represented by the fourth mark point is 1.2m, the height represented by the fifth mark point is 1.4m, and the height represented by the sixth mark point is 1.6m , set the first position at a height of 1.0m corresponding to the third mark point, that is, let the camera aim at the third mark point initially, when the user sits in the seat of the image collection area When the center of the chair is in the center, the camera starts to collect the first person image of the user, and recognizes and collects the identification points in the first person image. It can be understood that because the user blocks the identification points, the The first character image may contain only the sixth identification point, or may include the sixth identification point and the fifth identification point, . . . , and so on.
举例来说,若所述第一人物图像中包含所述第四个标识点、所述第五个标识点和所述第六个标识点,则离所述用户头顶最近的是第四个标识点。For example, if the first character image contains the fourth identification point, the fifth identification point and the sixth identification point, then the fourth identification point is closest to the top of the user's head point.
步骤102:所述终端设备计算所述第一人物图像中的头顶和所述标识点的高度差。Step 102: The terminal device calculates a height difference between the top of the head in the image of the first person and the identification point.
其中,在计算所述第一人物图像中所述标识点与所述用户的头顶的高度差,所述高度差由所述第一人物图像中所述用户的头顶和所述标识点之间的距离决定的,所述高度差例如可以是0.01m,0.02m,0.04m,0.06m或者是其他值。Wherein, when calculating the height difference between the top of the user's head and the top of the user's head in the first person image, the height difference is determined by the difference between the top of the user's head and the top of the user's head in the first person image. Depending on the distance, the height difference may be, for example, 0.01m, 0.02m, 0.04m, 0.06m or other values.
步骤103:所述终端设备根据所述标识点确定所述摄像头调节方向,根据所述高度差确定所述摄像头的调节高度,将所述摄像头调节至第二位置。Step 103: The terminal device determines an adjustment direction of the camera according to the identification point, determines an adjustment height of the camera according to the height difference, and adjusts the camera to a second position.
其中,所述根据所述标识点确定所述摄像头调节方向的具体实施方式有:在所述终端设备识别所述标识点之后,将所述标识点与所述第三个标识点进行对比,若所述标识点是所述第三个标识点下方的标识点,则确定所述摄像头的调节方向向下,若所述标识点是所述第三标识点上方的标识点,则确定所述摄像头的调节方向向上。Wherein, the specific implementation manner of determining the adjustment direction of the camera according to the identification point includes: after the terminal device recognizes the identification point, compare the identification point with the third identification point, if If the identification point is an identification point below the third identification point, it is determined that the adjustment direction of the camera is downward, and if the identification point is an identification point above the third identification point, then it is determined that the adjustment direction of the camera is downward. The adjustment direction is upward.
其中,所述根据所述高度差确定所述摄像头的调节高度的具体实施方式有:所述终端设备读取所述第一人物图像中任意两个相邻的标识点之间的距离h,结合所述背景图像中任意两个相邻的标识点之间的真实距离为0.2m,可以确定所述第一人物图像的缩放比例k=0.2/h。Wherein, the specific implementation manner of determining the adjustment height of the camera according to the height difference includes: the terminal device reads the distance h between any two adjacent identification points in the first person image, and combines The real distance between any two adjacent identification points in the background image is 0.2m, and the scaling ratio k=0.2/h of the first person image can be determined.
所述终端设备获取所述第一人物图像的头顶和所述标识点的高度差h1,则可以计算出所述摄像头的调节高度为h2=K×h1,根据所述调节方向和所述调节高度将所述摄像头调节至所述第二位置。The terminal device acquires the height difference h 1 between the top of the head of the first person image and the identification point, and can calculate the adjustment height of the camera as h 2 =K×h 1 , according to the adjustment direction and the adjusting the height to adjust the camera to the second position.
举例来说,假如所述终端设备识别出所述距离所述用户头顶最近的标识点为所述第四标识点,则可以确定所述摄像头的调节方向为向上调节,假如所述终端设备读取到所述第一人物图像中任意两个相邻的标识点之间的距离h=0.05m,则可以确定所述缩放比例k=40,若所述终端设备读取到所述用户的头顶与所述第三表示点之间的高度差h1=0.04m,则可以确定所述摄像头的调节距离h2=40*0.04=0.16m,所述终端设备将所述摄像头往上调节0.16m,将调节后摄像头的位置作为第二位置。For example, if the terminal device recognizes that the identification point closest to the top of the user's head is the fourth identification point, it may determine that the adjustment direction of the camera is upward adjustment, if the terminal device reads The distance between any two adjacent identification points in the first person image is h=0.05m, and the zoom ratio k=40 can be determined. If the terminal device reads that the top of the user's head and If the height difference between the third representation points is h 1 =0.04m, then the adjustment distance of the camera can be determined as h 2 =40*0.04=0.16m, and the terminal device adjusts the camera up by 0.16m, Use the position of the adjusted camera as the second position.
步骤104:所述终端设备获取第二人物图像,提取所述第二人物图像的人脸图像,所述第二人物图像为所述摄像头在第二位置拍摄得到的。Step 104: The terminal device acquires a second person image, and extracts a face image of the second person image, where the second person image is captured by the camera at a second location.
其中,在将所述摄像头调节至所述第二位置之后,所述摄像头在所述第二位置采集所述用户的第二人物图像,所述终端设备对所述第二人物图像进行图像分割,将所述第二人物图像分割成人像和背景图像两个区域,图像分割可以采用如下的方法:基于阈值的分割方法、基于边缘的分割方法、基于区域的分割方法,等等。Wherein, after the camera is adjusted to the second position, the camera captures a second person image of the user at the second position, and the terminal device performs image segmentation on the second person image, The second person image is segmented into two regions of a portrait and a background image, and the following methods may be used for image segmentation: threshold-based segmentation methods, edge-based segmentation methods, region-based segmentation methods, and so on.
进一步地,所述提取所述第二人物图像的人脸图像的具体实施方式有:将所述第二人物图像转换成灰度图像,先确定一个灰度阈值,所述确定的灰度阈值为背景图像的灰度值和人物图像灰度值的分界值,然后将所述第二人物图像中各像素的灰度值都与该所述灰度阈值相比较,根据比较结果将对应的像素分割为像素的灰度值大于所述灰度阈值的一类和像素的灰度值小于所述灰度阈值一类,则像素的灰度值大于所述灰度阈值的一类为人像区域,将所述区域的像素点的灰度值设为1,像素的灰度值小于所述灰度阈值一类为背景区域,将所述背景区域的像素点的灰度值设为0。Further, the specific implementation method of extracting the face image of the second person image includes: converting the second person image into a grayscale image, first determining a grayscale threshold, and the determined grayscale threshold is The grayscale value of the background image and the boundary value of the grayscale value of the character image, and then compare the grayscale value of each pixel in the second character image with the grayscale threshold, and segment the corresponding pixel according to the comparison result A category whose grayscale value is greater than the grayscale threshold and a category with a pixel grayscale value smaller than the grayscale threshold, then a category whose grayscale value is greater than the grayscale threshold is a portrait area, and The grayscale value of the pixels in the area is set to 1, and the grayscale value of the pixel is smaller than the grayscale threshold, which is the background area, and the grayscale value of the pixel points in the background area is set to 0.
进一步地,当所述用户出现眨眼,转头等动作时,可能会导致摄像头拍摄的第二人物图像中出现闭眼、五官模糊等情况,为了保证采集的第二人物图像为一张正常的人物图像,可控制所述摄像头在调节到所述第二位置后,在预定时间T内连续拍摄多张图像,例如,可控制所述摄像头在到达所述第二位置后3S时间内拍摄多张图像,再对多张图像进行图像识别和图像质量评价,然后从所述多张图像中筛选一张质量最优的图像作为所述第二人物图像。Furthermore, when the user blinks, turns his head, etc., it may cause closed eyes and blurred facial features in the second person image captured by the camera. In order to ensure that the collected second person image is a normal person image, after the camera is adjusted to the second position, it can be controlled to continuously capture multiple images within a predetermined time T, for example, the camera can be controlled to capture multiple images within 3 seconds after reaching the second position , performing image recognition and image quality evaluation on multiple images, and then selecting an image with the best quality from the multiple images as the second person image.
在一示例中,所述在提取所述第二人物图像的人脸图像之后,所述方法还包括:In an example, after extracting the face image of the second person image, the method further includes:
获取所述人脸图像的位置参数,所述位置参数包括:眼睛的位置参数和头发的位置参数;Acquiring the position parameters of the face image, the position parameters include: the position parameters of the eyes and the position parameters of the hair;
根据所述位置参数,将序列化后的3D模型图依次设置在所述人脸图像相对应的位置,生成头部图像,所述D模型图至少包括以下一种:头发的3D模型图、眼镜的3D模型图或帽子的3D模型图。According to the position parameters, the serialized 3D model diagrams are sequentially set at the positions corresponding to the face images to generate head images, and the D model diagrams include at least one of the following: 3D model diagrams of hair, glasses 3D model illustration of a hat or a 3D model illustration of a hat.
其中,所述将序列化后的3D模型图依次设置在所述人脸图像相对应的位置的具体实施方式有:根据所述用户在所述终端设备的选图界面选择3D模型图的顺序,依次将所述选择的3D模型图按照所述人脸图像的位置参数设置在对应的位置。Wherein, the specific implementation manner of sequentially setting the sequenced 3D model diagrams at positions corresponding to the face images includes: according to the order in which the user selects the 3D model diagrams on the diagram selection interface of the terminal device, The selected 3D model diagram is sequentially set at a corresponding position according to the position parameters of the face image.
举例来说,如图3所示,在所述用户在选图界面第一次点击头发的3D模型图图标后,在所述选图界面弹出三个头发类型的选择图标,若所述用户点击蘑菇头的选择图标,则所述终端设备根据所述人脸图像的头发的位置参数,将选择的蘑菇头的3D模型图设置在所述人脸图像的对应位置,在所述用户第二次点击眼镜的3D模型图图标后,在所述选图界面弹出三个眼镜类型的选择图标,若所述用户点击太阳镜的选择图标,则所述终端设备根据所述人脸图像的眼睛的位置参数,将选择的眼镜的3D模型图设置在所述人脸图像的对应位置,在所述用户第三次点击帽子的3D模型图图标后,在所述选图界面弹出三个帽子类型的选择图标,若所述用户点击鸭舌帽的选择图标,则所述终端设备根据所述人脸图像的头发的位置参数,将选择的鸭舌帽的3D模型图设置在所述人脸图像的对应位置。For example, as shown in Figure 3, after the user clicks the hair 3D model icon on the image selection interface for the first time, three hair type selection icons pop up on the image selection interface. mushroom head selection icon, the terminal device will set the 3D model of the selected mushroom head at the corresponding position of the face image according to the hair position parameters of the face image, and the second time the user After clicking the 3D model diagram icon of the glasses, three selection icons of glasses types will pop up on the image selection interface. If the user clicks the selection icon of sunglasses, the terminal device will , setting the 3D model diagram of the selected glasses at the corresponding position of the face image, and after the user clicks the 3D model diagram icon of the hat for the third time, three selection icons of hat types pop up on the diagram selection interface , if the user clicks the selection icon of the peaked cap, the terminal device sets the 3D model of the selected peaked cap at the corresponding position of the face image according to the position parameters of the hair of the face image.
在一示例中,所述在生成头部图像之后,所述方法还包括:In an example, after the head image is generated, the method further includes:
获取背景图像和所述背景图像中头部的位置参数,将所述头部图像设置在所述背景图像中头部的位置,生成第二人物图像。Obtain the background image and the position parameters of the head in the background image, set the head image at the head position in the background image, and generate a second person image.
举例来说,所述用户在所述终端设备的选图界面点击《雪国列车》图标,则所述终端设备读取由《雪国列车》的海报制成的背景图像,所述背景图像经过预先处理,已经设定好要替换的人物并将所述要替换的人物的头部图抠除,所述终端设备根据背景图像和要替换的人物的映射关系获取所述背景图中所述要替换的人物头部的位置参数,所述终端设备根据所述头部的位置参数将所述头部图像设置在所述背景图像中头部的位置,生成第二人物图像。For example, if the user clicks the "Snowpiercer" icon on the image selection interface of the terminal device, the terminal device reads a background image made of a poster of "Snowpiercer", and the background image has been pre-processed The character to be replaced has been set and the head image of the character to be replaced has been cut out, and the terminal device obtains the character to be replaced in the background image according to the mapping relationship between the background image and the character to be replaced. The position parameter of the person's head, the terminal device sets the head image at the position of the head in the background image according to the head position parameter, and generates a second person image.
在一示例中,所述在生成第二人物图像之后,所述方法还包括:In an example, after the second person image is generated, the method further includes:
在第一显示界面上展示打印图标,所述打印图标用于提醒用户选择打印方式,所述打印方式至少包括以下一种:直接打印一张所述第二人物图像、直接打印多张所述第二人物图像、彩色打印一张印所述第二人物图像或彩色打印多张所述第二人物图像。A printing icon is displayed on the first display interface, and the printing icon is used to remind the user to select a printing method, and the printing method includes at least one of the following: directly printing one image of the second person, directly printing multiple images of the second person Two person images, color print one image of the second person or color print multiple images of the second person.
将所述第二人物图像发送至打印端,根据所述用户选择的打印方式打印所述第二人物图像。sending the second character image to a printing terminal, and printing the second character image according to the printing method selected by the user.
在一示例中,所述在用户选择的打印方式打印所述第二人物图像之后,所述方法还包括:In an example, after printing the second person image in the printing mode selected by the user, the method further includes:
若收到结束此次操作的请求指令,则将所述摄像头调整至所述第一位置;If a request instruction to end the operation is received, adjusting the camera to the first position;
若收到继续制作图像的请求指令,则在第二显示界面展示选图图标,所述选图图标包括3D模型图选择图标和背景图像选择图标。If a request instruction for continuing to make an image is received, an image selection icon is displayed on the second display interface, and the image selection icon includes a 3D model image selection icon and a background image selection icon.
现有技术中,一些商场的娱乐机都是在固定位置对用户进行图像的采集,没有考虑用户身高的差异性,而本发明在图像采集区域的座椅的背板上设置了一系列的标识点,可以根据用户的身高自动调节娱乐机摄像头的高度,从而在最合适的位置采集到高质量的图像,另外,本发明的娱乐机还进一步操作采集到的人物图像,提取人物图像中的头部图,将头部图和预存的3D模型图进行虚拟试戴,生成新的头部图,并将新的头部图和预存的背景图像结合完成娱乐海报的制作,并打印生成的娱乐海报以供用户观赏,大大提高了图像的娱乐性,提高了用户体验。In the prior art, some entertainment machines in shopping malls collect images of users at fixed positions without considering the difference in height of users. However, the present invention sets a series of signs on the back panel of the seat in the image collection area point, the height of the entertainment machine camera can be automatically adjusted according to the height of the user, so as to collect high-quality images at the most suitable position. In addition, the entertainment machine of the present invention further operates the collected character images to extract the head in the character image. The head image and the pre-stored 3D model image are used for virtual try-on to generate a new head image, and the new head image and the pre-stored background image are combined to complete the production of entertainment posters, and the generated entertainment posters are printed For users to watch, the entertainment of the image is greatly improved, and the user experience is improved.
本申请实施例还提供了另一种更为详细的方法流程,如图4所示,该方法包括:The embodiment of the present application also provides another more detailed method flow, as shown in Figure 4, the method includes:
步骤401:摄像头在第一位置采集的第一人物图像。Step 401: The image of the first person captured by the camera at the first position.
步骤402:终端设备获取所述摄像头采集的所述第一人物图像。Step 402: The terminal device acquires the image of the first person captured by the camera.
步骤403:所述终端设备识别所述第一人物图像中距离头顶上方最近的标识点。Step 403: The terminal device recognizes an identification point that is closest to the top of the head in the image of the first person.
步骤404:所述终端设备获取所述第一人物图像的头部和所述标识点的高度差。Step 404: The terminal device acquires a height difference between the head of the first person image and the identification point.
步骤405:所述终端设备根据所述标识点以及所述高度差确定所述摄像头的调节参数。Step 405: The terminal device determines an adjustment parameter of the camera according to the marker point and the height difference.
步骤406:所述终端设备根据所述调节参数将所述摄像头调节至第二位置。Step 406: The terminal device adjusts the camera to a second position according to the adjustment parameter.
步骤407:所述摄像头在所述第二位置采集第二人物图像。Step 407: The camera captures a second person image at the second location.
步骤408:所述终端设备获取所述摄像头在第二位置采集的所述第二人物图像,提取所述第二人物图像的人脸图像。Step 408: The terminal device acquires the second person image captured by the camera at the second location, and extracts a face image of the second person image.
步骤409:所述终端设备获取所述人脸图像的位置参数,所述位置参数包括:眼睛的位置参数和头发的位置参数。Step 409: The terminal device acquires position parameters of the face image, where the position parameters include: eye position parameters and hair position parameters.
步骤410:所述终端设备根据所述位置参数,将选择的序列化后的3D模型图依次设置在所述人脸图像相对应的位置,生成头部图像,所述D模型图至少包括以下一种:头发的3D模型图、眼镜的3D模型图或帽子的3D模型图。Step 410: According to the position parameters, the terminal device sequentially sets the selected serialized 3D model diagram at the position corresponding to the face image to generate a head image, and the D model diagram includes at least one of the following: Types: 3D model diagram of hair, 3D model diagram of glasses or 3D model diagram of hat.
步骤411:所述终端设备展示打印图标,所述打印图标用于提醒用户选择打印方式,所述打印方式至少包括以下一种:直接打印一张所述第二人物图像、直接打印多张所述第二人物图像、彩色打印一张印所述第二人物图像或彩色打印多张所述第二人物图像。Step 411: The terminal device displays a printing icon, the printing icon is used to remind the user to select a printing method, and the printing method includes at least one of the following: directly printing one image of the second person, directly printing multiple images of the For the second character image, one color print of the second character image is printed, or multiple color prints of the second character image are printed.
步骤412:所述终端设备将所述第二人物图像发送至打印端,根据所述用户选择的打印方式打印所述第二人物图像。Step 412: The terminal device sends the second character image to a printing terminal, and prints the second character image according to the printing mode selected by the user.
步骤413:所述终端设备判断是否继续制作图像。Step 413: The terminal device judges whether to continue making images.
若是,则执行步骤410;If yes, execute step 410;
若否,则执行步骤414。If not, go to step 414 .
步骤414:所述终端设备将所述摄像头调整至所述第一位置。Step 414: The terminal device adjusts the camera to the first position.
上述详细阐述了本申请实施例的方法,下面提供了本申请实施例的装置。The method of the embodiment of the present application has been described in detail above, and the device of the embodiment of the present application is provided below.
请参见图5,图5是本申请实施例提供的一种终端设备500,包括:至少一个处理器、至少一个存储器和至少一个通信接口;以及一个或多个程序;Please refer to FIG. 5. FIG. 5 is a terminal device 500 provided by an embodiment of the present application, including: at least one processor, at least one memory, and at least one communication interface; and one or more programs;
所述一个或多个程序被存储在所述存储器中,并且被配置成由所述处理器执行,所述程序包括用于执行以下步骤的指令:The one or more programs are stored in the memory and configured to be executed by the processor, the programs including instructions for performing the following steps:
获取摄像头在第一位置采集的第一人物图像,识别所述第一人物图像中距离头部上方最近的标识点;Obtaining a first person image collected by a camera at a first position, and identifying a mark point closest to the top of the head in the first person image;
获取所述第一人物图像的头部和所述标识点的高度差;Acquiring the height difference between the head of the first person image and the identification point;
根据所述标识点确定所述摄像头调节方向,根据所述高度差确定所述摄像头的调节高度,将所述摄像头调节至第二位置;determining the adjustment direction of the camera according to the identification point, determining the adjustment height of the camera according to the height difference, and adjusting the camera to a second position;
获取所述摄像头在第二位置采集的第二人物图像,提取所述第二人物图像的人脸图像。Acquiring a second person image captured by the camera at a second position, and extracting a face image of the second person image.
在一示例中,所述在提取所述第二人物图像的人脸图像之后,所述程序还用于执行以下步骤的指令:In an example, after the face image of the second person image is extracted, the program is further configured to execute the following steps:
获取所述人脸图像的位置参数,所述位置参数包括:眼睛的位置参数和头发的位置参数;Acquiring the position parameters of the face image, the position parameters include: the position parameters of the eyes and the position parameters of the hair;
根据所述位置参数,将选择的序列化后的3D模型图依次设置在所述人脸图像相对应的位置,生成头部图像,所述D模型图至少包括以下一种:头发的3D模型图、眼镜的3D模型图或帽子的3D模型图。According to the position parameter, the selected serialized 3D model diagram is sequentially set at the position corresponding to the face image to generate a head image, and the D model diagram includes at least one of the following: 3D model diagram of hair , a 3D model diagram of glasses or a 3D model diagram of a hat.
在一示例中,所述在将选择的序列化后的3D模型图依次设置在所述人脸图像相对应的位置,生成头部图像之后,所述程序还用于执行以下步骤的指令:In an example, after the selected serialized 3D model diagram is sequentially set at the position corresponding to the face image and the head image is generated, the program is further configured to execute the following steps:
获取背景图像和所述背景图像中头部的位置参数,将所述头部图像设置在所述背景图像中头部的位置,生成第二人物图像。Obtain the background image and the position parameters of the head in the background image, set the head image at the head position in the background image, and generate a second person image.
在一示例中,所述在将所述头部图像设置在所述背景图像中头部的位置,生成第二人物图像之后,所述程序还用于执行以下步骤的指令:In an example, after setting the head image at the position of the head in the background image and generating the second person image, the program is further configured to execute the following steps:
在第一显示界面上展示打印图标,所述打印图标用于提醒用户选择打印方式,所述打印方式至少包括以下一种:直接打印一张所述第二人物图像、直接打印多张所述第二人物图像、彩色打印一张印所述第二人物图像或彩色打印多张所述第二人物图像。A printing icon is displayed on the first display interface, and the printing icon is used to remind the user to select a printing method, and the printing method includes at least one of the following: directly printing one image of the second person, directly printing multiple images of the second person Two person images, color print one image of the second person or color print multiple images of the second person.
将所述第二人物图像发送至打印端,根据所述用户选择的打印方式打印所述第二人物图像。sending the second character image to a printing terminal, and printing the second character image according to the printing method selected by the user.
在一示例中,所述在根据所述用户选择的打印方式打印所述第二人物图像之后,所述程序还用于执行以下步骤的指令:In an example, after the second character image is printed according to the printing method selected by the user, the program is further configured to execute the following steps:
若收到结束此次操作的请求指令,则将所述摄像头调整至所述第一位置;If a request instruction to end the operation is received, adjusting the camera to the first position;
若收到继续制作图像的请求指令,则在第二显示界面展示选图图标,所述选图图标包括3D模型图选择图标和背景图像选择图标。If a request instruction for continuing to make an image is received, an image selection icon is displayed on the second display interface, and the image selection icon includes a 3D model image selection icon and a background image selection icon.
需要说明的是,本实施例所述的内容的具体实现方式可参见上述方法,在此不再叙述。It should be noted that, reference may be made to the above-mentioned method for a specific implementation manner of the content described in this embodiment, which will not be described here again.
上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,终端设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The foregoing mainly introduces the solutions of the embodiments of the present application from the perspective of executing the process on the method side. It can be understood that, in order to realize the above functions, the terminal device includes hardware structures and/or software modules corresponding to each function. Those skilled in the art should easily realize that the present application can be implemented in the form of hardware or a combination of hardware and computer software in combination with the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Skilled artisans 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 application.
本申请实施例可以根据上述方法示例对终端设备进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiment of the present application may divide the terminal device into functional units according to the above method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic, and is only a logical function division, and there may be another division manner in actual implementation.
在采用集成的单元的情况下,图6示出了上述实施例中所涉及的终端设备的一种可能的功能单元组成框图。终端设备600包括:处理单元601、通信单元602和存储单元603,处理单元601包括获取单元6011、计算单元6012、确定单元6013、提取单元6014、头部图像生成单元6015、人物图像生成单元6016、打印单元6017和调整单元6018,如图7所示。存储单元603用于存储终端设备的程序代码和数据。通信单元602用于支持终端设备与其他设备的通信。上述某些单元(获取集单元6011、计算单元6012、确定单元6013、提取单元6014、头部图像生成单元6015、人物图像生成单元6016、打印单元6017和调整单元6018)用于执行上述方法的相关步骤。In the case of using integrated units, FIG. 6 shows a possible functional unit composition block diagram of the terminal device involved in the above embodiment. The terminal device 600 includes: a processing unit 601, a communication unit 602, and a storage unit 603. The processing unit 601 includes an acquisition unit 6011, a calculation unit 6012, a determination unit 6013, an extraction unit 6014, a head image generation unit 6015, a character image generation unit 6016, The printing unit 6017 and the adjustment unit 6018 are as shown in FIG. 7 . The storage unit 603 is used to store program codes and data of the terminal device. The communication unit 602 is used to support communication between the terminal device and other devices. Some of the above-mentioned units (acquisition set unit 6011, calculation unit 6012, determination unit 6013, extraction unit 6014, head image generation unit 6015, person image generation unit 6016, printing unit 6017, and adjustment unit 6018) are used to perform the correlation of the above-mentioned methods. step.
其中,处理单元601可以是处理器或控制器,(例如可以是中央处理器(CentralProcessing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等)。存储单元603可以是存储器,通信单元602可以是收发器、收发电路、射频芯片、通信接口等。Wherein, the processing unit 601 may be a processor or a controller, (for example, it may be a central processing unit (Central Processing Unit, CPU), a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC), Field Programmable Gate Array (Field Programmable Gate Array, FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can realize or perform the described in conjunction with the application disclosure Various exemplary logical blocks, modules and circuits. The processor may also be a combination that realizes computing functions, for example, a combination of one or more microprocessors, a combination of DSP and a microprocessor, etc.). The storage unit 603 may be a memory, and the communication unit 602 may be a transceiver, a transceiver circuit, a radio frequency chip, a communication interface, and the like.
所述计算单元6012,用于其中,所述获取集单元6011用于获取第一人物图像,识别所述第一人物图像中距离头顶上方最近的标识点,所述第一人物图像为摄像头在第一位置拍摄得到的;The calculation unit 6012 is used for wherein, the acquisition set unit 6011 is used for acquiring a first person image, and identifying the identification point closest to the top of the head in the first person image, and the first person image is the camera at the second Captured from a position;
计算所述第一人物图像中的头顶和所述标识点的高度差;calculating the height difference between the top of the head in the first person image and the identification point;
所述确定单元6013,用于根据所述标识点确定所述摄像头调节方向,根据所述高度差确定所述摄像头的调节高度,将所述摄像头调节至第二位置;The determination unit 6013 is configured to determine the adjustment direction of the camera according to the identification point, determine the adjustment height of the camera according to the height difference, and adjust the camera to a second position;
所述提取单元6014,用于提取所述第二人物图像的人脸图像,所述第二人物图像为所述摄像头在第二位置拍摄得到的。The extracting unit 6014 is configured to extract a face image of the second person image, and the second person image is captured by the camera at a second location.
在一示例中,在所述提取单元6014提取所述第二人物图像的人脸图像之后,所述终端设备还包括:In an example, after the extracting unit 6014 extracts the face image of the second person image, the terminal device further includes:
头部图像生成单元6015,用于获取所述人脸图像的位置参数,所述位置参数包括:眼睛的位置参数和头发的位置参数;The head image generation unit 6015 is used to acquire the position parameters of the face image, the position parameters include: the position parameters of the eyes and the position parameters of the hair;
在一示例中,所述头部图像生成单元6015还用于:In an example, the head image generation unit 6015 is also configured to:
根据所述位置参数,将序列化后的3D模型图依次设置在所述人脸图像相对应的位置,生成头部图像,所述D模型图至少包括以下一种:头发的3D模型图、眼镜的3D模型图或帽子的3D模型图。According to the position parameters, the serialized 3D model diagrams are sequentially set at the positions corresponding to the face images to generate head images, and the D model diagrams include at least one of the following: 3D model diagrams of hair, glasses 3D model illustration of a hat or a 3D model illustration of a hat.
在一示例中,在所述头部图像生成单元6015生成头部图像之后,所述终端设备还包括:In an example, after the head image generating unit 6015 generates the head image, the terminal device further includes:
人物图像生成单元6016,用于获取背景图像和所述背景图像中头部的位置参数,根据所述背景图像中头部的位置参数将所述头部图像设置在所述背景图像中头部的位置,生成第二人物图像。A character image generating unit 6016, configured to acquire a background image and a position parameter of the head in the background image, and set the head image at the position of the head in the background image according to the position parameter of the head in the background image position to generate a second person image.
在一示例中,在所述人物图像生成单元6016生成第二人物图像之后,所述终端设备还包括:In an example, after the character image generating unit 6016 generates the second character image, the terminal device further includes:
打印单元6017,用于在第一显示界面上展示打印图标,所述打印图标用于提醒用户选择打印方式,所述打印方式至少包括以下一种:直接打印一张所述第二人物图像、直接打印多张所述第二人物图像、彩色打印一张印所述第二人物图像或彩色打印多张所述第二人物图像。The printing unit 6017 is configured to display a printing icon on the first display interface, the printing icon is used to remind the user to select a printing method, and the printing method includes at least one of the following: directly printing an image of the second person, directly printing Print multiple images of the second character, print one image of the second character in color, or print multiple images of the second character in color.
在一示例中,所述打印单元6017还用于:In an example, the printing unit 6017 is also used to:
将所述第二人物图像发送至打印端,根据所述用户选择的打印方式打印所述第二人物图像。sending the second character image to a printing terminal, and printing the second character image according to the printing method selected by the user.
在一示例中,在所述打印单元6017根据所述用户选择的打印方式打印所述第二人物图像之后,所述终端设备还包括:In an example, after the printing unit 6017 prints the second person image according to the printing method selected by the user, the terminal device further includes:
调整单元6018,用于若收到结束此次操作的请求指令,则将所述摄像头调整至所述第一位。The adjustment unit 6018 is configured to adjust the camera to the first position if a request instruction to end the operation is received.
在一示例中,所述调整单元6018还用于:In an example, the adjustment unit 6018 is also used to:
若收到继续制作图像的请求指令,则在第二显示界面展示选图图标,所述选图图标包括3D模型图选择图标和背景图像选择图标。If a request instruction for continuing to make an image is received, an image selection icon is displayed on the second display interface, and the image selection icon includes a 3D model image selection icon and a background image selection icon.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤,所述计算机包括终端设备。An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables the computer to execute some or all of the steps of any method described in the above method embodiments , the computer includes a terminal device.
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,所述计算机包括终端设备。The embodiment of the present application also provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable the computer to execute the method described in the above method embodiments Some or all of the steps of any method. The computer program product may be a software installation package, and the computer includes a terminal device.
本申请实施例所描述的方法或者算法的步骤可以以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read OnlyMemory,ROM)、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。另外,该ASIC可以位于接入网设备、目标网络设备或核心网设备中。当然,处理器和存储介质也可以作为分立组件存在于接入网设备、目标网络设备或核心网设备中。The steps of the methods or algorithms described in the embodiments of the present application may be implemented in the form of hardware, or may be implemented in the form of a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (Random Access Memory, RAM), flash memory, read only memory (Read Only Memory, ROM), erasable programmable read only memory (Erasable Programmable ROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), registers, hard disk, removable hard disk, compact disc (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be a component of the processor. The processor and storage medium can be located in the ASIC. In addition, the ASIC may be located in an access network device, a target network device or a core network device. Certainly, the processor and the storage medium may also exist in the access network device, the target network device or the core network device as discrete components.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请实施例所描述的功能可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DigitalSubscriber Line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字视频光盘(DigitalVideo Disc,DVD))、或者半导体介质(例如,固态硬盘(Solid State Disk,SSD))等。Those skilled in the art should be aware that, in the above one or more examples, the functions described in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website, computer, server or data center Transmission to another website site, computer, server or data center by wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (Digital Video Disc, DVD)), or a semiconductor medium (for example, a solid state disk (Solid State Disk, SSD)) Wait.
以上所述的具体实施方式,对本申请实施例的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本申请实施例的具体实施方式而已,并不用于限定本申请实施例的保护范围,凡在本申请实施例的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本申请实施例的保护范围之内。The specific implementation manners described above further describe the purpose, technical solutions and beneficial effects of the embodiments of the present application in detail. To limit the protection scope of the embodiments of the present application, any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711161804.XA CN108171803B (en) | 2017-11-21 | 2017-11-21 | Image making method and related device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711161804.XA CN108171803B (en) | 2017-11-21 | 2017-11-21 | Image making method and related device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108171803A true CN108171803A (en) | 2018-06-15 |
| CN108171803B CN108171803B (en) | 2021-09-21 |
Family
ID=62527128
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711161804.XA Active CN108171803B (en) | 2017-11-21 | 2017-11-21 | Image making method and related device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108171803B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116913012A (en) * | 2023-07-21 | 2023-10-20 | 深圳市瑞琦智能有限公司 | Photography method and device of self-service physical examination machine |
| CN119183006A (en) * | 2024-08-21 | 2024-12-24 | 河南翔宇医疗设备股份有限公司 | Camera adjusting method and system based on weight-loss gait rehabilitation platform |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1503567A (en) * | 2002-11-26 | 2004-06-09 | ���µ�����ҵ��ʽ���� | Image processing method and device thereof |
| CN203827438U (en) * | 2014-02-21 | 2014-09-10 | 北京海鑫科金高科技股份有限公司 | Portrait shooting system |
| CN104408702A (en) * | 2014-12-03 | 2015-03-11 | 浩云星空信息技术(北京)有限公司 | Image processing method and device |
| US20160100098A1 (en) * | 2014-10-06 | 2016-04-07 | Furyu Corporation | Image providing device and image providing method |
| US20160269633A1 (en) * | 2013-05-22 | 2016-09-15 | Sony Corporation | Information processing apparatus, information processing method, and program |
| CN106419923A (en) * | 2016-10-27 | 2017-02-22 | 南京阿凡达机器人科技有限公司 | Height measurement method based on monocular machine vision |
| CN107197149A (en) * | 2017-06-14 | 2017-09-22 | 深圳传音通讯有限公司 | The generation method and device of certificate photograph |
-
2017
- 2017-11-21 CN CN201711161804.XA patent/CN108171803B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1503567A (en) * | 2002-11-26 | 2004-06-09 | ���µ�����ҵ��ʽ���� | Image processing method and device thereof |
| US20160269633A1 (en) * | 2013-05-22 | 2016-09-15 | Sony Corporation | Information processing apparatus, information processing method, and program |
| CN203827438U (en) * | 2014-02-21 | 2014-09-10 | 北京海鑫科金高科技股份有限公司 | Portrait shooting system |
| US20160100098A1 (en) * | 2014-10-06 | 2016-04-07 | Furyu Corporation | Image providing device and image providing method |
| CN104408702A (en) * | 2014-12-03 | 2015-03-11 | 浩云星空信息技术(北京)有限公司 | Image processing method and device |
| CN106419923A (en) * | 2016-10-27 | 2017-02-22 | 南京阿凡达机器人科技有限公司 | Height measurement method based on monocular machine vision |
| CN107197149A (en) * | 2017-06-14 | 2017-09-22 | 深圳传音通讯有限公司 | The generation method and device of certificate photograph |
Non-Patent Citations (1)
| Title |
|---|
| EUN SOM JEON ET AL.: "Human Detection Based on the Generation of a Background Image by Using a Far-Infrared Light Camera", 《SENSORS 2015》 * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116913012A (en) * | 2023-07-21 | 2023-10-20 | 深圳市瑞琦智能有限公司 | Photography method and device of self-service physical examination machine |
| CN119183006A (en) * | 2024-08-21 | 2024-12-24 | 河南翔宇医疗设备股份有限公司 | Camera adjusting method and system based on weight-loss gait rehabilitation platform |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108171803B (en) | 2021-09-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20220383592A1 (en) | Automated three dimensional model generation | |
| EP3454250B1 (en) | Facial image processing method and apparatus and storage medium | |
| CN107105130B (en) | Electronic device and method of operation | |
| US11030733B2 (en) | Method, electronic device and storage medium for processing image | |
| US9697415B2 (en) | Recording medium, image processing method, and information terminal | |
| CN114549718A (en) | Rendering method, device, augmented reality device and storage medium for virtual information | |
| CN107835367A (en) | A kind of image processing method, device and mobile terminal | |
| CN108229269A (en) | Method for detecting human face, device and electronic equipment | |
| CN111008935B (en) | Face image enhancement method, device, system and storage medium | |
| WO2021143282A1 (en) | Three-dimensional facial model generation method and apparatus, computer device and storage medium | |
| JP7342366B2 (en) | Avatar generation system, avatar generation method, and program | |
| CN108921856B (en) | Image cropping method and device, electronic equipment and computer readable storage medium | |
| JP6969878B2 (en) | Discriminator learning device and discriminator learning method | |
| CN114845158B (en) | Video cover generation method, video release method and related equipment | |
| CN109660748A (en) | Image processing method and its system for the correction of eyeball sight | |
| US20070223827A1 (en) | Face Image Creation Device and Method | |
| CN107909100A (en) | Method, device and equipment for determining distance and storage medium | |
| JP2019046239A (en) | Image processing apparatus, image processing method, program, and image data for synthesis | |
| CN108009998A (en) | Composition method of cutting out, device, equipment and the storage medium of a kind of character image | |
| KR101820503B1 (en) | Service systembased on face recognition inference, and face recognition inference method and storage medium thereof | |
| JP2024500224A (en) | Method and apparatus for hair styling analysis | |
| CN107767326B (en) | Object transformation processing method, device and computing device in image | |
| CN108171803A (en) | An image production method and related device | |
| CN110766631A (en) | Face image modification method and device, electronic equipment and computer readable medium | |
| CN103353879B (en) | Image processing method and apparatus |
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 |