CN106934848A - A kind of image processing method and mobile terminal - Google Patents
A kind of image processing method and mobile terminal Download PDFInfo
- Publication number
- CN106934848A CN106934848A CN201710150732.2A CN201710150732A CN106934848A CN 106934848 A CN106934848 A CN 106934848A CN 201710150732 A CN201710150732 A CN 201710150732A CN 106934848 A CN106934848 A CN 106934848A
- Authority
- CN
- China
- Prior art keywords
- background
- processed
- physical
- picture
- template
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/60—Editing figures and text; Combining figures or text
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
本发明提供一种图片处理方法及移动终端,该方法包括:若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。由于对实物背景与目标图片是否匹配进行了判断,并将不匹配的实物背景确定为待处理实物背景,然后将待处理实物背景进行清除,从而提高了目标图片与拼图模板的协调性,因此提高了图片添加拼图模板后的画面显示效果。
The present invention provides a picture processing method and a mobile terminal. The method includes: if receiving an operation instruction input by a user to add a jigsaw template for a target picture, acquiring template information of the jigsaw template, the jigsaw template including a border and a The object background, the template information includes the object category of the object background and the position information of the object background; in the object background of the jigsaw puzzle template determined according to the object category, the object background to be processed that does not match the picture type of the target picture; The background of the object to be processed is cleared according to the position information of the background of the object to be processed. Since it is judged whether the object background matches the target picture, and the unmatched object background is determined as the object background to be processed, and then the object background to be processed is cleared, the coordination between the target image and the jigsaw template is improved. The screen display effect after the picture is added to the collage template.
Description
技术领域technical field
本发明涉及图片处理技术领域,尤其涉及一种图片处理方法及移动终端。The present invention relates to the technical field of image processing, in particular to an image processing method and a mobile terminal.
背景技术Background technique
众所周知,现有的图片在添加拼图模板时,通常将图片置于拼图模板的指定区域进行显示即可。在拼图模板中通常中设置了实物背景,在对图片添加拼图模板后,图片和实物背景均会显示出来。但是由于不同类型的图片,对应可以匹配的实物背景不同,若实物背景与图片不匹配,将会造成图片添加拼图模板后,显示效果较差。As we all know, when adding a collage template to an existing picture, the picture is usually placed in a designated area of the collage template for display. The physical background is usually set in the collage template. After adding the collage template to the picture, both the picture and the physical background will be displayed. However, due to different types of pictures, the corresponding physical backgrounds that can be matched are different. If the physical background does not match the picture, it will cause poor display effect after adding the collage template to the picture.
发明内容Contents of the invention
本发明实施例提供一种图片处理方法及移动终端,以解决实物背景与图片不匹配,导致图片添加拼图模板后,显示效果较差的问题。Embodiments of the present invention provide a picture processing method and a mobile terminal to solve the problem that the background of the real object does not match the picture, resulting in a poor display effect after the picture is added with a collage template.
第一方面,本发明实施例提供了一种图片处理方法,包括:In a first aspect, an embodiment of the present invention provides an image processing method, including:
若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;If the operation instruction of adding a jigsaw template for the target picture input by the user is received, the template information of the jigsaw template is obtained. Background location information;
根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;Determining, among the physical backgrounds of the jigsaw template, the backgrounds of the physical objects to be processed that do not match the picture type of the target picture according to the physical object category;
根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。The background of the object to be processed is cleared according to the position information of the background of the object to be processed.
第二方面,本发明实施例还提供一种移动终端,包括:In the second aspect, the embodiment of the present invention also provides a mobile terminal, including:
获取模块,用于若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;The acquisition module is used to acquire the template information of the jigsaw template if an operation instruction input by the user is received to add a jigsaw template to the target picture, the jigsaw template includes a frame and a physical background located within the frame, and the template information includes a physical background The location information of the physical category and the physical background;
确定模块,用于根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;A determining module, configured to determine, in the physical background of the jigsaw template, the background of the physical object to be processed that does not match the picture type of the target picture according to the physical object category;
处理模块,用于根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。A processing module, configured to clear the background of the object to be processed according to the position information of the background of the object to be processed.
这样,本发明实施例中,若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。由于对实物背景与目标图片是否匹配进行了判断,并将不匹配的实物背景确定为待处理实物背景,然后将待处理实物背景进行清除,从而提高了目标图片与拼图模板的协调性,因此提高了图片添加拼图模板后的画面显示效果。In this way, in the embodiment of the present invention, if the operation instruction of adding a collage template for the target picture input by the user is received, the template information of the collage template is obtained. Including the physical category of the physical background and the position information of the physical background; determining the physical background of the jigsaw template according to the physical category, the physical background to be processed that does not match the picture type of the target picture; according to the physical background of the pending processing The location information clears the background of the object to be processed. Since it is judged whether the object background matches the target picture, and the unmatched object background is determined as the object background to be processed, and then the object background to be processed is cleared, the coordination between the target image and the jigsaw template is improved. The screen display effect after the picture is added to the collage template.
附图说明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 based on these drawings without any creative effort.
图1是本发明第一实施例提供的图片处理方法的流程图;Fig. 1 is a flow chart of the image processing method provided by the first embodiment of the present invention;
图2是本发明第二实施例提供的图片处理方法的流程图之一;Fig. 2 is one of the flowcharts of the picture processing method provided by the second embodiment of the present invention;
图3是本发明第二实施例提供的图片处理方法的流程图之二;Fig. 3 is the second flowchart of the image processing method provided by the second embodiment of the present invention;
图4是本发明第二实施例提供的图片处理方法中确定待处理实物背景的流程图;Fig. 4 is a flowchart of determining the background of the object to be processed in the image processing method provided by the second embodiment of the present invention;
图5是本发明第三实施例提供的移动终端的结构图;FIG. 5 is a structural diagram of a mobile terminal provided by a third embodiment of the present invention;
图6是本发明第三实施例提供的移动终端中处理模块的结构图;6 is a structural diagram of a processing module in a mobile terminal provided by a third embodiment of the present invention;
图7是本发明第三实施例提供的移动终端中确定模块的结构图;FIG. 7 is a structural diagram of a determination module in a mobile terminal provided by a third embodiment of the present invention;
图8是本发明第四实施例提供的移动终端的结构图;FIG. 8 is a structural diagram of a mobile terminal provided by a fourth embodiment of the present invention;
图9是本发明第五实施例提供的移动终端的结构图。Fig. 9 is a structural diagram of a mobile terminal provided by a fifth 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.
第一实施例first embodiment
参见图1,图1是本发明实施例提供的图片处理方法的流程图,如图1所示,包括以下步骤:Referring to FIG. 1, FIG. 1 is a flow chart of an image processing method provided by an embodiment of the present invention, as shown in FIG. 1, including the following steps:
步骤101,若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;Step 101, if the operation instruction of adding a collage template to the target picture input by the user is received, the template information of the collage template is obtained. location information of category and physical background;
本实施例提供的图片处理方法主要应用在图片处理系统中,用于对图片添加拼图模板进行控制管理。例如,在移动终端安装的图片处理应用中对图片添加的拼图模板,以修饰美化图片时,可以对添加的拼图模板进行处理,以提高拼图模板与图片的匹配度。The image processing method provided in this embodiment is mainly applied in an image processing system to control and manage adding a collage template to an image. For example, when adding a collage template to a picture in a picture processing application installed on a mobile terminal to modify and beautify the picture, the added collage template may be processed to improve the matching degree between the collage template and the picture.
该步骤中,上述目标图片为储存在本地的图片,可以是用户拍照获取的图片,也可以是他人分享的图片。In this step, the above-mentioned target picture is a picture stored locally, which may be a picture taken by the user, or a picture shared by others.
上述拼图模板为预先储存的拼图模板,也可以是用户下载的拼图模板。具体地,用户在对目标图片添加边框时,可以首先选择目标图片;然后选择添加拼图模板功能时,输出相应的拼图模板供用户选择。在其他的实施例中,还可以采用其他的方式对目标图片和拼图模板进行选择,例如提供两个操作界面,一个操作界面用于选择目标图片,另一个操作界面用于选择拼图模板等,在此不再一一列举。The above collage templates are pre-stored collage templates, and may also be collage templates downloaded by users. Specifically, when adding a frame to a target picture, the user may first select the target picture; then, when selecting the function of adding a collage template, a corresponding collage template is output for the user to select. In other embodiments, other methods can also be used to select the target picture and the collage template, for example, two operation interfaces are provided, one operation interface is used to select the target picture, and the other operation interface is used to select the collage template, etc. This will not list them one by one.
具体地,上述拼图模板包括边框和位于所述边框内的实物背景,该实物背景的数量和类型均可以根据实际需要进行设置,例如在一个边框中包括一个实物背景或者多个实物背景,同时,在存在多个实物背景时,可以为同一类型的实物背景,也可以为多种类型的实物背景。具体地,实物背景的分类规则可以根据实际需要进行设置,例如可以将实物背景的类别分为人像、动物、建筑、风景、日出日落、天空、美食、饮料和水果等类别。在其他实施例中,还可以采用其他的划分方式,在此不一一列举。在其他实施例中,还可以采用其他的划分方式,在此不一一列举。其中,实物背景位于边框内是指实物背景的像素坐标包含于边框的像素坐标中,也就是说在画面显示时,实物背景的显示区域位于边框的显示区域内。Specifically, the above collage template includes a frame and a physical background located in the frame, the number and type of the physical background can be set according to actual needs, for example, a frame includes a physical background or a plurality of physical backgrounds, and at the same time, When there are multiple physical backgrounds, they may be the same type of physical background, or multiple types of physical backgrounds. Specifically, the classification rules of the physical background can be set according to actual needs, for example, the categories of the physical background can be divided into categories such as portrait, animal, building, landscape, sunrise and sunset, sky, food, drink, and fruit. In other embodiments, other division methods may also be used, which are not listed here. In other embodiments, other division methods may also be used, which are not listed here. The fact that the physical background is located within the frame means that the pixel coordinates of the physical background are included in the pixel coordinates of the frame, that is to say, when the screen is displayed, the display area of the physical background is located within the display area of the frame.
需要说明的是,拼图模板由边框和实物背景组成,可以将实物背景置于边框中,从而形成拼图模板,使得实物背景被包含在边框内;也可以将边框覆盖在实物背景对应的图片上,从而形成拼图模板,此时边框的外边缘与实物背景对应图片的外边缘相互重合,使得实物背景被包含在边框内。It should be noted that the collage template is composed of a frame and a real background, and the real background can be placed in the frame to form a collage template, so that the real background is included in the frame; the frame can also be overlaid on the picture corresponding to the real background, Thus, a jigsaw puzzle template is formed. At this time, the outer edge of the frame and the outer edge of the picture corresponding to the physical background overlap each other, so that the physical background is included in the frame.
当用户选择了目标图片的拼图模板后,可以对拼图模板进行识别操作,以获取该目标模板包括的实物背景的实物类别以及实物背景的位置信息。After the user selects the collage template of the target picture, the collage template can be identified, so as to obtain the physical category of the physical background included in the target template and the location information of the physical background.
步骤102,根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;Step 102, determining, according to the object category, the object background to be processed that does not match the image type of the target image among the object backgrounds of the jigsaw puzzle template;
该步骤中,图片类型的分类规则可以根据实际需要进行设置,例如可以与实物类别一致,分为人像、动物、建筑、风景、日出日落、天空、美食、饮料和水果等类别。在其他实施例中,还可以采用其他的划分方式,在此不一一列举。具体地,图片类型和实物类别的匹配规则可以根据实际需要进行设置,例如,图片类型为人像的目标图片,可以匹配的实物背景包括建筑、风景、日出日落和天空等;图片类型为风景的目标图片,可以匹配的实物背景包括人像和动物等。In this step, the classification rules of the picture type can be set according to actual needs, for example, it can be consistent with the physical category, and can be divided into categories such as portrait, animal, building, landscape, sunrise and sunset, sky, food, drink and fruit. In other embodiments, other division methods may also be used, which are not listed here. Specifically, the matching rules for the picture type and object category can be set according to actual needs. For example, for a target image whose image type is a portrait, the object backgrounds that can be matched include buildings, landscapes, sunrise, sunset, and sky; The target picture can be matched with physical backgrounds including portraits and animals.
步骤103,根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。Step 103, clearing the background of the object to be processed according to the position information of the background of the object to be processed.
该步骤中,在进行待处理实物背景清除时,清除的方式可以采用多种,例如可以采用边框的背景像素进行替代,即在删除的实物背景的位置呈现边框的背景颜色。当然,还可以采用其他像素进行替代,例如预设的实物背景或者上述图片上的部分像素进行替换等。In this step, when clearing the background of the object to be processed, there may be various ways of clearing, for example, the background pixels of the frame may be used to replace it, that is, the background color of the frame is displayed at the position of the background of the object to be deleted. Of course, other pixels may also be used for replacement, such as a preset physical background or some pixels on the above picture for replacement.
例如当目标图片为人像,实物背景包括风景、天空、饮料和美食,则可以根据预设的规则进行匹配得到饮料和美食两种实物背景与目标图片不匹配,并定义该不匹配的实物背景为待处理实物背景,此时可以删除饮料和美食两种待处理实物背景,以保证拼图模板与目标图片的协调性。For example, when the target picture is a portrait, and the physical background includes landscape, sky, drink and food, it can be matched according to the preset rules to obtain that the two physical backgrounds of drinks and food do not match the target picture, and define the unmatched physical background as The background of the object to be processed. At this time, the two backgrounds of the beverage and the food to be processed can be deleted to ensure the coordination between the puzzle template and the target picture.
本发明实施例中,上述移动终端可以任何具备显示和安装应用程序功能的智能终端,例如:手机、平板电脑(Tablet Personal Computer)、膝上型电脑(Laptop Computer)、个人数字助理(personal digital assistant,简称PDA)、移动上网装置(Mobile InternetDevice,MID)或可穿戴式设备(Wearable Device)等。In the embodiment of the present invention, the above-mentioned mobile terminal can be any intelligent terminal with the function of displaying and installing application programs, such as: mobile phone, tablet computer (Tablet Personal Computer), laptop computer (Laptop Computer), personal digital assistant (personal digital assistant) , referred to as PDA), mobile Internet device (Mobile Internet Device, MID) or wearable device (Wearable Device) and so on.
这样,本发明实施例中,若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。由于对实物背景与目标图片是否匹配进行了判断,并将不匹配的实物背景确定为待处理实物背景,然后将待处理实物背景进行清除,从而提高了目标图片与拼图模板的协调性,因此提高了图片添加拼图模板后的画面显示效果。In this way, in the embodiment of the present invention, if the operation instruction of adding a collage template for the target picture input by the user is received, the template information of the collage template is obtained. Including the physical category of the physical background and the position information of the physical background; determining the physical background of the jigsaw template according to the physical category, the physical background to be processed that does not match the picture type of the target picture; according to the physical background of the pending processing The location information clears the background of the object to be processed. Since it is judged whether the object background matches the target picture, and the unmatched object background is determined as the object background to be processed, and then the object background to be processed is cleared, the coordination between the target image and the jigsaw template is improved. The screen display effect after the picture is added to the collage template.
第二实施例second embodiment
参照图2,提供了本发明图片处理方法的流程图,在本发明图片处理方法的第二实施例中,与本发明第一实施例的区别在于,本实施例中进一步的限定了对待处理实物背景清除的方式,如图2所示,上述步骤103包括:Referring to FIG. 2 , a flow chart of the image processing method of the present invention is provided. In the second embodiment of the image processing method of the present invention, the difference from the first embodiment of the present invention is that in this embodiment, the object to be processed is further limited. The mode of background clearing, as shown in Figure 2, above-mentioned step 103 comprises:
根据所述待处理实物背景的位置信息,将所述待处理实物背景的像素点替换为,边框与待处理实物背景重合的像素点。According to the position information of the background of the object to be processed, the pixel points of the background of the object to be processed are replaced with the pixels whose frame overlaps with the background of the object to be processed.
该步骤中,上述待处理实物背景的位置信息包括实物背景中各像素点的像素坐标。具体的,在对每一待处理实物背景的像素点替换时,可以获取该待处理实物背景的像素点的像素坐标,然后根据获取的像素坐标查找边框对应像素点的像素值,然后将待处理实物背景的像素点的像素值替换为边框对应像素点的像素值即可。从而在待处理实物背景对应的位置显示了边框的背景颜色,达到了对实物背景清除的目的。In this step, the above-mentioned position information of the object background to be processed includes pixel coordinates of each pixel in the object background. Specifically, when replacing the pixels of the background of each object to be processed, the pixel coordinates of the pixels of the background of the object to be processed can be obtained, and then the pixel value of the corresponding pixel of the border can be found according to the obtained pixel coordinates, and then the Just replace the pixel value of the pixel point of the physical background with the pixel value of the corresponding pixel point of the frame. Therefore, the background color of the border is displayed at the position corresponding to the background of the object to be processed, and the purpose of clearing the background of the object is achieved.
进一步地,由于对待处理实物背景进行清除的方式不同,对应的,在本实施例中,还可以将上述步骤103替换为其他的清除方式,具体地,参照图3,上述步骤103可以替换为:步骤1031至步骤1033。Further, due to the different ways of clearing the background of the object to be processed, correspondingly, in this embodiment, the above step 103 can also be replaced by other clearing methods. Specifically, referring to FIG. 3, the above step 103 can be replaced by: Step 1031 to step 1033.
步骤1031、获取预设用于替换所述待处理实物背景的预存参考背景;Step 1031. Obtain a pre-stored reference background preset to replace the background of the object to be processed;
该步骤中,上述预存参考背景可以为用户手动进行下载的,也可以是拼图模板自带的,在此不做进行的限定。例如,每一种目标图片对应设有多个用户替换的预存背景,根据目标图片的类型输出对应可用于替换的预存参考背景。该预存参考背景的实物类型可以与目标图片的类型一致,也可以是相互匹配的关系。例如,当目标图片为人像时,该预存的目标照片可以为人像、风景和天空中的任意一者。In this step, the above-mentioned pre-stored reference background can be manually downloaded by the user, or it can be provided with the collage template, which is not limited here. For example, each target picture corresponds to multiple pre-stored backgrounds that can be replaced by the user, and the output corresponds to a pre-stored reference background that can be used for replacement according to the type of the target picture. The object type of the pre-stored reference background may be consistent with the type of the target picture, or may be in a mutual matching relationship. For example, when the target picture is a portrait, the prestored target picture may be any one of portrait, landscape and sky.
步骤1032、输出预览界面,显示获取的预存参考背景;Step 1032, outputting a preview interface, displaying the obtained pre-stored reference background;
该步骤中,上述预存参考背景的数量可以为多个,在本实施例中,可以输出相应的预览界面,显示预存参考背景。然后用户可以对预设实物背景进行浏览,并可以确认选择需要替换的预存参考背景。In this step, the number of the above-mentioned pre-stored reference backgrounds may be multiple. In this embodiment, a corresponding preview interface may be output to display the pre-stored reference backgrounds. Then the user can browse the preset physical background, and can confirm to select the pre-stored reference background to be replaced.
步骤1033、根据用户基于所述预览界面选择的预存参考背景的像素点对所述待处理实物背景的像素点进行替换操作。Step 1033: Perform a replacement operation on the pixel points of the object background to be processed according to the pixel points of the pre-stored reference background selected by the user based on the preview interface.
该步骤中,上述预存参考背景可以采用九宫格或者单个图片序列的方式进行显示,用户可在对预存参考背景进行拖动浏览;然后可以单击显示的预存参考背景,从而选择需要替换显示的预存参考背景。In this step, the above-mentioned pre-stored reference background can be displayed in the form of a nine-square grid or a single picture sequence. The user can drag and browse the pre-stored reference background; and then click the displayed pre-stored reference background to select the pre-stored reference that needs to be replaced. background.
本实施例中,由于可以采用预存参考背景对实物背景进行替换,从而可以有效避免由于清除拼图模板上的实物背景,造成拼图模板单一的问题,因此提高了图片显示的灵活性。In this embodiment, since the pre-stored reference background can be used to replace the physical background, the problem of a single collage template caused by clearing the physical background on the collage template can be effectively avoided, thereby improving the flexibility of picture display.
进一步地,参照图4,上述步骤102包括:Further, referring to FIG. 4, the above step 102 includes:
步骤1021,识别所述目标图片的图片类型;Step 1021, identifying the picture type of the target picture;
该步骤中,可以根据图像识别算法对上述目标图片进行识别,从而得到目标图片的类型。对目标图片的图片类型判断原则可以根据实际需要进行设置,例如,可以根据识别图像识别算法对上述目标图片进行识别获得的对象的信息确定图片类型。一般的,在一张图片上包含多个对象(如人像、动物和风景等),可以根据对象的信息确定各对象的主次关系,从而确定目标图片的类型,也可以说是目标图片的主题。In this step, the target picture may be identified according to an image recognition algorithm, so as to obtain the type of the target picture. The principle of judging the picture type of the target picture can be set according to actual needs, for example, the picture type can be determined according to the information of the object obtained by recognizing the above target picture through the recognition image recognition algorithm. Generally, a picture contains multiple objects (such as portraits, animals, and landscapes, etc.), and the primary and secondary relationships of each object can be determined according to the information of the objects, so as to determine the type of the target picture, which can also be said to be the theme of the target picture .
可选的,在本实施例中,上述步骤1021包括:识别所述目标图片的对象;根据各对象相对于所述目标图片所占的比例,确定所述目标图片的图片类型。例如,当目标图片中包括人像和动物时,可以根据人像和动物在目标图片中所占的比例确定的目标图片为人像类型还是动物类型。此外,还可以对图片中的每一对象设置权重值,结合各对象相对于所述目标图片所占的比例以及对应的权重值进行比对,从而确定目标图片的类型。Optionally, in this embodiment, the above step 1021 includes: identifying the objects of the target picture; and determining the picture type of the target picture according to the proportion of each object relative to the target picture. For example, when the target picture includes portraits and animals, it may be determined whether the target picture is a portrait type or an animal type according to the proportions of the portraits and animals in the target picture. In addition, it is also possible to set a weight value for each object in the picture, and compare the proportion of each object with respect to the target picture and the corresponding weight value, so as to determine the type of the target picture.
步骤1022,获取所述图片类型对应的目标匹配集合,所述目标匹配集合包括所述图片类型匹配的实物类别;Step 1022, obtaining a target matching set corresponding to the picture type, the target matching set including the category of objects matched by the picture type;
该步骤中,可以对每一图片类型设置相应的匹配集合,并进行储存。例如,可以设置人像的图片类型,对应的匹配集合包括建筑、风景、日出日落和天空;设置风景的图片类型,对应的匹配集合包括人像和动物。在储存的匹配集合中查找并获取目标图片的图片类型所对应的目标匹配集合。In this step, a corresponding matching set can be set and stored for each picture type. For example, the picture type of portrait can be set, and the corresponding matching set includes architecture, landscape, sunrise and sunset, and sky; the picture type of landscape can be set, and the corresponding matching set includes portrait and animal. The target matching set corresponding to the picture type of the target picture is searched in the stored matching set and obtained.
步骤1023,将所述拼图模板的实物类别与所述目标匹配集合中的实物类别进行比对;Step 1023, comparing the physical category of the puzzle template with the physical category in the target matching set;
该步骤中,将拼图模板中识别出的实物类别与目标匹配集合进行比对,确定拼图模板中识别出的实物类别哪些存在于目标匹配集合中,哪些不存在于目标匹配集合中。In this step, the object categories identified in the puzzle template are compared with the target matching set, and it is determined which of the object categories identified in the puzzle template exist in the target matching set and which ones do not exist in the target matching set.
步骤1024,将实物类别不存在于所述目标匹配集合的所述实物背景设定为待处理实物背景。Step 1024, setting the object background whose type does not exist in the target matching set as the object background to be processed.
该步骤中,将统计出的所有不存在于所述目标匹配集合的实物类别对应的实物背景设定为待处理实物背景。例如,上述目标图片为人像,人像对应的目标匹配集合包括建筑、风景、日出日落和天空,上述拼图模板中的实物背景包括风景、天空、饮料和美食,则在进行比对后,将会统计出饮料和美食不存在于目标匹配集合中,从而将饮料和美食设定为待处理实物背景。最后对待处理实物背景进行清除即可,从而可以有效提高目标图片与拼图模板的协调性。In this step, all the statistical object backgrounds corresponding to the object categories that do not exist in the target matching set are set as the object backgrounds to be processed. For example, the above-mentioned target picture is a portrait, and the target matching set corresponding to the portrait includes architecture, landscape, sunrise, sunset, and sky. The physical background in the above-mentioned puzzle template includes landscape, sky, drink, and food. After comparison, it will be It is counted that beverages and delicacies do not exist in the target matching set, so that beverages and delicacies are set as the object background to be processed. Finally, it is enough to clear the background of the object to be processed, so that the coordination between the target picture and the puzzle template can be effectively improved.
可以理解的是,由于在本实施例中,通过设置集合的方式设置图片类型对应的匹配集合,因此用户可以根据自己的需求和习惯选择调整相应的匹配集合,从而提高了拼图模板中清除实物背景的灵活性。进一步地,当目标图片的类型或者拼图模板的实物背景无法获知时,则不对拼图模板的实物背景进行清除操作。It can be understood that since in this embodiment, the matching set corresponding to the picture type is set by setting the set, the user can choose to adjust the corresponding matching set according to his own needs and habits, thereby improving the ability to remove the physical background in the collage template. flexibility. Further, when the type of the target picture or the physical background of the collage template cannot be known, the physical background of the collage template is not cleared.
第三实施例third embodiment
参见图5,图5是本发明实施提供的移动终端的结构图,能够实现第一至第二实施例中图片处理方法的细节,并达到相同的效果。如图5所示,移动终端500包括获取模块501、确定模块502和处理模块503,获取模块501与确定模块502连接,确定模块502还与处理模块503连接,其中,Referring to FIG. 5, FIG. 5 is a structural diagram of a mobile terminal provided by the implementation of the present invention, which can realize the details of the image processing methods in the first to second embodiments and achieve the same effect. As shown in Figure 5, the mobile terminal 500 includes an acquisition module 501, a determination module 502 and a processing module 503, the acquisition module 501 is connected to the determination module 502, and the determination module 502 is also connected to the processing module 503, wherein,
获取模块501,用于若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;The acquisition module 501 is configured to acquire the template information of the collage template if an operation instruction input by the user is received to add a collage template to the target picture, the collage template includes a frame and a physical background located within the frame, and the template information includes a real object The physical category of the background and the location information of the physical background;
确定模块502,用于根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;A determining module 502, configured to determine, according to the category of the physical object, the background of the physical object to be processed that does not match the picture type of the target picture in the physical background of the jigsaw template;
处理模块503,用于根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。The processing module 503 is configured to clear the background of the object to be processed according to the position information of the background of the object to be processed.
可选的,处理模块503具体用于:根据所述待处理实物背景的位置信息,将所述待处理实物背景的像素点替换为,边框与待处理实物背景重合的像素点。Optionally, the processing module 503 is specifically configured to: according to the position information of the background of the physical object to be processed, replace the pixel points of the background of the physical object to be processed with the pixels whose frame overlaps with the background of the physical object to be processed.
进一步地,参照图6,上述处理模块503包括:Further, referring to FIG. 6, the above-mentioned processing module 503 includes:
背景获取单元5031,用于获取预设用于替换所述待处理实物背景的预存参考背景;A background acquiring unit 5031, configured to acquire a pre-stored reference background preset to replace the background of the object to be processed;
显示单元5032,用于输出预览界面,显示获取的预存参考背景;A display unit 5032, configured to output a preview interface and display the acquired pre-stored reference background;
像素处理单元5033,用于根据用户基于所述预览界面选择的预存参考背景的像素点对所述待处理实物背景的像素点进行替换操作。The pixel processing unit 5033 is configured to replace the pixel points of the object background to be processed according to the pixel points of the pre-stored reference background selected by the user based on the preview interface.
进一步地,参照图7,上述确定模块502包括:Further, referring to FIG. 7, the above determination module 502 includes:
识别单元5021,用于识别所述目标图片的图片类型;An identifying unit 5021, configured to identify the image type of the target image;
集合获取单元5022,获取所述图片类型对应的目标匹配集合,所述目标匹配集合包括所述图片类型匹配的实物类别;The set acquisition unit 5022 is configured to acquire a target matching set corresponding to the picture type, where the target matching set includes the category of objects matched by the picture type;
比对单元5023,用于将所述拼图模板的实物类别与所述目标匹配集合中的实物类别进行比对;A comparing unit 5023, configured to compare the physical category of the jigsaw template with the physical category in the target matching set;
设定单元5024,用于将实物类别不存在于所述目标匹配集合的所述实物背景设定为待处理实物背景。The setting unit 5024 is configured to set the object background whose type does not exist in the target matching set as the object background to be processed.
进一步地,所述识别单元5021具体用于:识别所述目标图片的对象;根据各对象相对于所述目标图片所占的比例,确定所述目标图片的图片类型。Further, the identification unit 5021 is specifically configured to: identify the objects of the target picture; determine the picture type of the target picture according to the proportion of each object relative to the target picture.
本发明实施例中,若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。由于对实物背景与目标图片是否匹配进行了判断,并将不匹配的实物背景确定为待处理实物背景,然后将待处理实物背景进行清除,从而提高了目标图片与拼图模板的协调性,因此提高了图片添加拼图模板后的画面显示效果。In the embodiment of the present invention, if the operation instruction of adding a collage template for the target picture input by the user is received, the template information of the collage template is obtained. The physical category of the background and the position information of the physical background; determine the physical background of the jigsaw template according to the physical category, the physical background to be processed that does not match the picture type of the target picture; according to the position information of the physical background to be processed The background of the object to be processed is cleared. Since it is judged whether the object background matches the target picture, and the unmatched object background is determined as the object background to be processed, and then the object background to be processed is cleared, the coordination between the target image and the jigsaw template is improved. The screen display effect after the picture is added to the collage template.
第四实施例Fourth embodiment
参见图8,图8是本发明实施例提供的移动终端的结构图,能够实现第一至第二实施例中图片处理方法的细节,并达到相同的效果。如图8所示,移动终端800包括:至少一个处理器801、存储器802、至少一个网络接口804和用户接口803。移动终端800中的各个组件通过总线系统805耦合在一起。可理解,总线系统805用于实现这些组件之间的连接通信。总线系统805除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图8中将各种总线都标为总线系统805。Referring to FIG. 8 , FIG. 8 is a structural diagram of a mobile terminal provided by an embodiment of the present invention, which can implement details of the image processing methods in the first to second embodiments and achieve the same effect. As shown in FIG. 8 , a mobile terminal 800 includes: at least one processor 801 , a memory 802 , at least one network interface 804 and a user interface 803 . Various components in the mobile terminal 800 are coupled together through a bus system 805 . It can be understood that the bus system 805 is used to realize connection and communication between these components. In addition to the data bus, the bus system 805 also includes a power bus, a control bus and a status signal bus. However, the various buses are labeled as bus system 805 in FIG. 8 for clarity of illustration.
其中,用户接口803可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(track ball)、触感板或者触摸屏等。Wherein, the user interface 803 may include a display, a keyboard or a pointing device (for example, a mouse, a track ball (track ball), a touch panel or a touch screen, and the like.
可以理解,本发明实施例中的存储器802可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(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)。本文描述的系统和方法的存储器802旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 802 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). Memory 802 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
在一些实施方式中,存储器802存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:操作系统8021和应用程序8022。In some implementations, the memory 802 stores the following elements, executable modules or data structures, or their subsets, or their extended sets: an operating system 8021 and an application program 8022 .
其中,操作系统8021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序8022,包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序8022中。Among them, the operating system 8021 includes various system programs, such as framework layer, core library layer, driver layer, etc., for realizing various basic services and processing hardware-based tasks. The application program 8022 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 8022 .
在本发明实施例中,通过调用存储器802存储的程序或指令,具体的,可以是应用程序8022中存储的程序或指令,处理器801用于:若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。In the embodiment of the present invention, by calling the program or instruction stored in the memory 802, specifically, the program or instruction stored in the application program 8022, the processor 801 is configured to: The operation instruction is to obtain the template information of the jigsaw template, the jigsaw template includes a frame and a physical background located in the frame, the template information includes the physical category of the physical background and the position information of the physical background; determine the jigsaw puzzle according to the physical category Among the object backgrounds of the template, the object backgrounds to be processed that do not match the image type of the target image; the object backgrounds to be processed are cleared according to the position information of the object backgrounds to be processed.
上述本发明实施例揭示的方法可以应用于处理器801中,或者由处理器801实现。处理器801可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器801中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器801可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(FieldProgrammable GateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器802,处理器801读取存储器802中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the foregoing embodiments of the present invention may be applied to the processor 801 or implemented by the processor 801 . The processor 801 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 801 or instructions in the form of software. The above-mentioned processor 801 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 802, and the processor 801 reads the information in the memory 802, and completes the steps of the above method in combination with its hardware.
可以理解的是,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(ApplicationSpecific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable LogicDevice,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。It should be understood that the embodiments described herein 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 a software implementation, the techniques described herein can be implemented through modules (eg, procedures, functions, and so on) that perform the functions described herein. Software codes can be stored in memory and executed by a processor. Memory can be implemented within the processor or external to the processor.
可选的,处理器801还用于:根据所述待处理实物背景的位置信息,将所述待处理实物背景的像素点替换为,边框与待处理实物背景重合的像素点。Optionally, the processor 801 is further configured to: according to the position information of the background of the physical object to be processed, replace the pixel points of the background of the physical object to be processed with the pixels whose frame overlaps with the background of the physical object to be processed.
可选的,处理器801还用于:获取预设用于替换所述待处理实物背景的预存参考背景;输出预览界面,显示获取的预存参考背景;根据用户基于所述预览界面选择的预存参考背景的像素点对所述待处理实物背景的像素点进行替换操作。Optionally, the processor 801 is further configured to: obtain a pre-stored reference background preset to replace the background of the object to be processed; output a preview interface to display the acquired pre-stored reference background; The pixels of the background are replaced by the pixels of the background of the object to be processed.
可选的,处理器801还用于:识别所述目标图片的图片类型;获取所述图片类型对应的目标匹配集合,所述目标匹配集合包括所述图片类型匹配的实物类别;将所述拼图模板的实物类别与所述目标匹配集合中的实物类别进行比对;将实物类别不存在于所述目标匹配集合的所述实物背景设定为待处理实物背景。Optionally, the processor 801 is further configured to: identify the picture type of the target picture; obtain a target matching set corresponding to the picture type, where the target matching set includes the category of objects matched by the picture type; The object category of the template is compared with the object category in the target matching set; and the object background whose object category does not exist in the target matching set is set as the object background to be processed.
可选的,处理器801还用于:识别所述目标图片的对象;根据各对象相对于所述目标图片所占的比例,确定所述目标图片的图片类型。Optionally, the processor 801 is further configured to: identify objects in the target picture; and determine a picture type of the target picture according to a proportion of each object relative to the target picture.
本发明实施例中,若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。由于对实物背景与目标图片是否匹配进行了判断,并将不匹配的实物背景确定为待处理实物背景,然后将待处理实物背景进行清除,从而提高了目标图片与拼图模板的协调性,因此提高了图片添加拼图模板后的画面显示效果。In the embodiment of the present invention, if the operation instruction of adding a collage template for the target picture input by the user is received, the template information of the collage template is obtained. The physical category of the background and the position information of the physical background; determine the physical background of the jigsaw template according to the physical category, the physical background to be processed that does not match the picture type of the target picture; according to the position information of the physical background to be processed The background of the object to be processed is cleared. Since it is judged whether the object background matches the target picture, and the unmatched object background is determined as the object background to be processed, and then the object background to be processed is cleared, the coordination between the target image and the jigsaw template is improved. The screen display effect after the picture is added to the collage template.
第五实施例fifth embodiment
请参阅图9,图9是本发明实施例提供的移动终端的结构图,能够实现第一至第二实施例中图片处理方法的细节,并达到相同的效果。如图9所示,移动终端900包括射频(Radio Frequency,RF)电路910、存储器920、输入单元930、显示单元940、处理器950、音频电路960、通信模块970、和电源980,还包括摄像头(图中未示出)。Please refer to FIG. 9. FIG. 9 is a structural diagram of a mobile terminal provided by an embodiment of the present invention, which can implement details of the image processing methods in the first to second embodiments and achieve the same effect. As shown in Figure 9, the mobile terminal 900 includes a radio frequency (Radio Frequency, RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a processor 950, an audio circuit 960, a communication module 970, and a power supply 980, and also includes a camera (not shown in the figure).
其中,输入单元930可用于接收用户输入的数字或字符信息,以及产生与移动终端900的用户设置以及功能控制有关的信号输入。具体地,本发明实施例中,该输入单元930可以包括触控面板931。触控面板931,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板931上的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板931可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给该处理器950,并能接收处理器950发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板931。除了触控面板931,输入单元930还可以包括其他输入设备932,其他输入设备932可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。Wherein, the input unit 930 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 900 . Specifically, in the embodiment of the present invention, the input unit 930 may include a touch panel 931 . The touch panel 931, 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 931 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 931 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 950, and can receive and execute commands sent by the processor 950. In addition, the touch panel 931 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 931, the input unit 930 may also include other input devices 932, 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.
其中,显示单元940可用于显示由用户输入的信息或提供给用户的信息以及移动终端900的各种菜单界面。显示单元940可包括显示面板941,可选的,可以采用LCD或有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板941。Wherein, the display unit 940 can be used to display information input by the user or provided to the user and various menu interfaces of the mobile terminal 900 . The display unit 940 may include a display panel 941. Optionally, the display panel 941 may be configured in the form of an LCD or an organic light-emitting diode (Organic Light-Emitting Diode, OLED).
应注意,触控面板931可以覆盖显示面板941,形成触摸显示屏,当该触摸显示屏检测到在其上或附近的触摸操作后,传送给处理器950以确定触摸事件的类型,随后处理器950根据触摸事件的类型在触摸显示屏上提供相应的视觉输出。It should be noted that the touch panel 931 can cover the display panel 941 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 950 to determine the type of the touch event, and then the processor The 950 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.
其中处理器950是移动终端900的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在第一存储器921内的软件程序和/或模块,以及调用存储在第二存储器922内的数据,执行移动终端900的各种功能和处理数据,从而对移动终端900进行整体监控。可选的,处理器950可包括一个或多个处理单元。Wherein the processor 950 is the control center of the mobile terminal 900, utilizes various interfaces and lines to connect various parts of the whole mobile phone, and runs or executes the software programs and/or modules stored in the first memory 921, and calls the software programs and/or modules stored in the second memory 921. The data in the memory 922 executes various functions of the mobile terminal 900 and processes data, so as to monitor the mobile terminal 900 as a whole. Optionally, the processor 950 may include one or more processing units.
在本发明实施例中,通过调用存储该第一存储器921内的软件程序和/或模块和/或该第二存储器922内的数据,处理器950用于:若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。In the embodiment of the present invention, by calling the software programs and/or modules stored in the first memory 921 and/or the data in the second memory 922, the processor 950 is used to: The operation instruction of the jigsaw template is to obtain the template information of the jigsaw template, the jigsaw template includes a frame and a physical background located in the frame, the template information includes the physical category of the physical background and the position information of the physical background; determine according to the physical category In the physical background of the jigsaw template, the background of the physical object to be processed that does not match the picture type of the target picture; the background of the physical object to be processed is cleared according to the position information of the physical object background to be processed.
可选的,处理器950还用于:根据所述待处理实物背景的位置信息,将所述待处理实物背景的像素点替换为,边框与待处理实物背景重合的像素点。Optionally, the processor 950 is further configured to: according to the position information of the background of the physical object to be processed, replace the pixel points of the background of the physical object to be processed with the pixels whose frame overlaps with the background of the physical object to be processed.
可选的,处理器950还用于:获取预设用于替换所述待处理实物背景的预存参考背景;输出预览界面,显示获取的预存参考背景;根据用户基于所述预览界面选择的预存参考背景的像素点对所述待处理实物背景的像素点进行替换操作。Optionally, the processor 950 is further configured to: obtain a pre-stored reference background preset to replace the background of the object to be processed; output a preview interface to display the acquired pre-stored reference background; The pixels of the background are replaced by the pixels of the background of the object to be processed.
可选的,处理器950还用于:识别所述目标图片的图片类型;获取所述图片类型对应的目标匹配集合,所述目标匹配集合包括所述图片类型匹配的实物类别;将所述拼图模板的实物类别与所述目标匹配集合中的实物类别进行比对;将实物类别不存在于所述目标匹配集合的所述实物背景设定为待处理实物背景。Optionally, the processor 950 is further configured to: identify the picture type of the target picture; acquire a target matching set corresponding to the picture type, where the target matching set includes the object category matched by the picture type; The object category of the template is compared with the object category in the target matching set; and the object background whose object category does not exist in the target matching set is set as the object background to be processed.
可选的,处理器950还用于:识别所述目标图片的对象;根据各对象相对于所述目标图片所占的比例,确定所述目标图片的图片类型。Optionally, the processor 950 is further configured to: identify objects in the target picture; and determine a picture type of the target picture according to a proportion of each object relative to the target picture.
本发明实施例中,若接收用户输入的为目标图片添加拼图模板的操作指令,获取拼图模板的模板信息,所述拼图模板包括边框和位于所述边框内的实物背景,所述模板信息包括实物背景的实物类别和实物背景的位置信息;根据实物类别确定所述拼图模板的实物背景中,与所述目标图片的图片类型不匹配的待处理实物背景;根据所述待处理实物背景的位置信息对所述待处理实物背景进行清除。由于对实物背景与目标图片是否匹配进行了判断,并将不匹配的实物背景确定为待处理实物背景,然后将待处理实物背景进行清除,从而提高了目标图片与拼图模板的协调性,因此提高了图片添加拼图模板后的画面显示效果。In the embodiment of the present invention, if the operation instruction of adding a collage template for the target picture input by the user is received, the template information of the collage template is obtained. The physical category of the background and the position information of the physical background; determine the physical background of the jigsaw template according to the physical category, the physical background to be processed that does not match the picture type of the target picture; according to the position information of the physical background to be processed The background of the object to be processed is cleared. Since it is judged whether the object background matches the target picture, and the unmatched object background is determined as the object background to be processed, and then the object background to be processed is cleared, the coordination between the target image and the jigsaw template is improved. The screen display effect after the picture is added to the collage template.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein 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 displayed 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 the embodiment of the present invention.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。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 method described in each embodiment 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 (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710150732.2A CN106934848A (en) | 2017-03-14 | 2017-03-14 | A kind of image processing method and mobile terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710150732.2A CN106934848A (en) | 2017-03-14 | 2017-03-14 | A kind of image processing method and mobile terminal |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106934848A true CN106934848A (en) | 2017-07-07 |
Family
ID=59432289
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710150732.2A Pending CN106934848A (en) | 2017-03-14 | 2017-03-14 | A kind of image processing method and mobile terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106934848A (en) |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108961302A (en) * | 2018-07-16 | 2018-12-07 | Oppo广东移动通信有限公司 | Image processing method, image processing device, mobile terminal and computer readable storage medium |
| CN111212269A (en) * | 2020-01-16 | 2020-05-29 | 深圳慧源创新科技有限公司 | Unmanned aerial vehicle image display method and device, electronic equipment and storage medium |
| CN112312189A (en) * | 2019-08-02 | 2021-02-02 | 百度在线网络技术(北京)有限公司 | Video generation method and video generation system |
| CN112884867A (en) * | 2021-03-17 | 2021-06-01 | 杭州太火鸟科技有限公司 | Picture-based combined template generation method, device, equipment and storage medium |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102541554A (en) * | 2011-12-27 | 2012-07-04 | 重庆新媒农信科技有限公司 | Method for realizing dynamic transparent specially good display effect of input box |
| CN103166945A (en) * | 2011-12-14 | 2013-06-19 | 北京千橡网景科技发展有限公司 | Image processing method and system |
| US20160140740A1 (en) * | 2014-11-19 | 2016-05-19 | Seiko Epson Corporation | Information processing device, information processing system, and information processing method |
| CN106408628A (en) * | 2016-11-25 | 2017-02-15 | 维沃移动通信有限公司 | Image processing method and image processing device |
-
2017
- 2017-03-14 CN CN201710150732.2A patent/CN106934848A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103166945A (en) * | 2011-12-14 | 2013-06-19 | 北京千橡网景科技发展有限公司 | Image processing method and system |
| CN102541554A (en) * | 2011-12-27 | 2012-07-04 | 重庆新媒农信科技有限公司 | Method for realizing dynamic transparent specially good display effect of input box |
| US20160140740A1 (en) * | 2014-11-19 | 2016-05-19 | Seiko Epson Corporation | Information processing device, information processing system, and information processing method |
| CN106408628A (en) * | 2016-11-25 | 2017-02-15 | 维沃移动通信有限公司 | Image processing method and image processing device |
Non-Patent Citations (1)
| Title |
|---|
| "《网页配色与实战》" * |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108961302A (en) * | 2018-07-16 | 2018-12-07 | Oppo广东移动通信有限公司 | Image processing method, image processing device, mobile terminal and computer readable storage medium |
| CN108961302B (en) * | 2018-07-16 | 2021-03-02 | Oppo广东移动通信有限公司 | Image processing method, device, mobile terminal, and computer-readable storage medium |
| CN112312189A (en) * | 2019-08-02 | 2021-02-02 | 百度在线网络技术(北京)有限公司 | Video generation method and video generation system |
| CN111212269A (en) * | 2020-01-16 | 2020-05-29 | 深圳慧源创新科技有限公司 | Unmanned aerial vehicle image display method and device, electronic equipment and storage medium |
| CN112884867A (en) * | 2021-03-17 | 2021-06-01 | 杭州太火鸟科技有限公司 | Picture-based combined template generation method, device, equipment and storage medium |
| CN112884867B (en) * | 2021-03-17 | 2022-03-11 | 杭州太火鸟科技有限公司 | Picture-based combined template generation method, device, equipment and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11128802B2 (en) | Photographing method and mobile terminal | |
| CN107172346B (en) | Virtualization method and mobile terminal | |
| CN107464206A (en) | A kind of watermark adding method and mobile terminal | |
| CN106358069A (en) | Video data processing method and mobile terminal | |
| CN106327185A (en) | Starting method for payment application and mobile terminal | |
| CN107678644A (en) | A kind of image processing method and mobile terminal | |
| CN106126108A (en) | A kind of breviary map generalization method and mobile terminal | |
| CN106777329A (en) | The processing method and mobile terminal of a kind of image information | |
| CN107707823A (en) | A kind of image pickup method and mobile terminal | |
| CN106598623A (en) | Picture combination template generation method and mobile terminal | |
| CN107404577A (en) | A kind of image processing method, mobile terminal and computer-readable recording medium | |
| CN106528160A (en) | Adding method of application icons and terminal | |
| CN106408628A (en) | Image processing method and image processing device | |
| CN106060422A (en) | Image exposure method and mobile terminal | |
| CN107509030A (en) | A focusing method and mobile terminal | |
| CN106791182A (en) | A kind of chat method and mobile terminal based on image | |
| CN107643912A (en) | A kind of information sharing method and mobile terminal | |
| CN107659837A (en) | A kind of multi-medium data control method for playing back and mobile terminal | |
| CN106934848A (en) | A kind of image processing method and mobile terminal | |
| CN107302655A (en) | It is a kind of to shoot the adjusting method and mobile terminal found a view | |
| CN106506801A (en) | A method for adjusting camera zoom factor and mobile terminal | |
| CN107483821A (en) | Image processing method and mobile terminal | |
| CN106528080B (en) | A method for placing application icons of a mobile terminal and the mobile terminal | |
| CN106886350A (en) | A kind of communication information display method and mobile terminal based on image | |
| CN106371745A (en) | Interface switching method and mobile terminal |
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 | ||
| TA01 | Transfer of patent application right |
Effective date of registration: 20171107 Address after: 283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue Applicant after: VIVO MOBILE COMMUNICATION CO., LTD. Applicant after: Wewo Mobile Communication Co. Ltd. Beijing branch Address before: 283 No. 523860 Guangdong province Dongguan city Changan town usha BBK Avenue Applicant before: VIVO MOBILE COMMUNICATION CO., LTD. |
|
| TA01 | Transfer of patent application right | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170707 |
|
| RJ01 | Rejection of invention patent application after publication |