Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
First embodiment
It is a kind of flow chart of image processing method provided in an embodiment of the present invention referring to Fig. 1, Fig. 1, as shown in Figure 1, packet
Include following steps:
Step 101, the filling region for identifying puzzle template, and obtain the boundary information of the filling region.
In real life, people usually can upload to some pictures in social network after treatment, these pictures can
It checks or downloads for social good friend.For example, some pictures are added to puzzle template, picture is made to seem more beautiful, it can also
Multiple pictures to be added in puzzle template, keep image content richer.
Wherein, above-mentioned puzzle template can be the template for arranging multiple pictures according to preset format, picture mosaic
Template can also modify one or more pictures, keep image content more abundant, beautiful.It may include in puzzle template
Multiple color also may include image, and user can choose template similar in the filling picture color or image filled with needs,
Filling picture is filled.
Above-mentioned filling region can be understood as the region that addition filling picture is needed in puzzle template, which can be
One or more regions, a filling region can correspond to a picture.The shape of filling region may include regular shape, such as
Round, rectangular, triangle;Also irregular shape, such as leaf, flower-shape be may include, puzzle template can be to a variety of differences
The filling region of shapes and sizes is combined.For example, including 6 filling regions in puzzle template, wherein 2 filling regions are
Circle, positioned at the top of puzzle template, 4 filling regions be it is rectangular, positioned at the lower section of puzzle template.Shape, face can be passed through
Color identifies above-mentioned filling region, can also be identified according to filling region boundary position.
The boundary information of above-mentioned filling region can be the information comprising boundary position, which can be fill area
The boundary characteristic information etc. of the boundary profile in domain either filling region.If filling region is multiple filling regions, the boundary
Information may include the quantity of filling region.For example, including the filling region of 2 triangles in puzzle template, boundary information can
With the coordinate information comprising 2 vertexs of a triangle, the number of filling region is 2.It can will fill picture and picture mosaic mould
Plate generates the boundary information that picture mosaic picture obtains the filling region later, can also first obtain the boundary information of the filling region
Afterwards, filling picture and puzzle template are generated into picture mosaic picture.The present embodiment is not construed as limiting this.
Step 102 obtains filling picture, and the filling picture is filled to the fill area of the puzzle template
Domain, to obtain picture mosaic picture.
In this step, above-mentioned filling picture can be to be filled into the picture in puzzle template, can be user's needs
Carry out the picture of moditied processing.Above-mentioned filling picture can be one or plurality of pictures, which is filled to picture mosaic
The filling region of template can will fill picture filling according to the size or shape of filling picture itself when being filled
To corresponding filling region.
In addition, above-mentioned picture mosaic picture can be the picture synthesized by filling picture and puzzle template, which can be with
It is image data.
Step 103 generates the picture mosaic file including the picture mosaic picture and the boundary information, and the boundary information is used for
It is separated from the picture mosaic picture for other terminal recognitions and by the puzzle template.
In this step, above-mentioned picture mosaic picture can be image data, can be shown as image on an electronic device.It is above-mentioned
Picture mosaic file can be the set of the information such as picture mosaic picture and picture mosaic picture attribute.
After puzzle template and filling picture are generated picture mosaic picture, the boundary information of filling region can be added to spelling
Map file can make boundary information in picture mosaic picture in this way, the boundary information of filling region can be made to be included in picture mosaic file
In do not show;After boundary information can also being added in puzzle template, puzzle template and filling picture are generated into picture mosaic picture, this
Sample can be such that the boundary information of filling region had both been included in picture mosaic file, be also contained in picture mosaic picture, and boundary information is being spelled
It can be shown in figure picture.In this way, above-mentioned boundary information can be identified when other terminals obtain above-mentioned picture mosaic picture,
And puzzle template can be separated according to the boundary line that boundary information is formed.
Image processing method in the embodiment of the present invention can be applied to electronic equipment, such as: mobile phone, computer, plate
Computer (Tablet Personal Computer), laptop computer (Laptop Computer), personal digital assistant
(personal digital assistant, abbreviation PDA), mobile Internet access device (Mobile Internet Device, MID)
Or wearable device (Wearable Device) etc..
The image processing method of the embodiment of the present invention, identifies the filling region of puzzle template, and obtains the filling region
Boundary information;Filling picture is obtained, and the filling picture is filled to the filling region of the puzzle template, with
To picture mosaic picture;The picture mosaic file including the picture mosaic picture and the boundary information is generated, the boundary information is used to supply it
Its terminal recognition simultaneously separates the puzzle template from the picture mosaic picture.In this way, user can be by puzzle template and filling
Picture generates picture mosaic picture, and adds boundary information in picture mosaic picture, incite somebody to action the picture mosaic picture can according to boundary information
The picture that puzzle template is separated, so that the template in picture mosaic picture be enable to be used by others.
Second embodiment
Referring to fig. 2, Fig. 2 is the flow chart of another image processing method provided in an embodiment of the present invention.As shown in Fig. 2,
The following steps are included:
Step 201, the filling region for identifying puzzle template, and obtain the boundary information of the filling region.
In real life, people usually can upload to some pictures in social network after treatment, these pictures can
It checks or downloads for social good friend.For example, being added some pictures to puzzle template, picture is made to seem more beautiful,
Multiple pictures can also be added in puzzle template, keep image content richer.
Wherein, above-mentioned puzzle template can be the template for arranging multiple pictures according to preset format, picture mosaic
Template can also modify one or more pictures, keep image content more abundant, beautiful.It may include in puzzle template
Multiple color also may include image, and user can choose template similar in the filling picture color or image filled with needs,
Filling picture is filled.
Above-mentioned filling region can be understood as the region that addition filling picture is needed in puzzle template, which can be
One or more regions, a filling region can correspond to a picture.The shape of filling region may include regular shape, such as
Round, rectangular, triangle;Also irregular shape, such as leaf, flower-shape be may include, puzzle template can be to a variety of differences
The filling region of shapes and sizes is combined.For example, including 6 filling regions in puzzle template, wherein 2 filling regions are
Circle, positioned at the top of puzzle template, 4 filling regions be it is rectangular, positioned at the lower section of puzzle template.Shape, face can be passed through
Color identifies above-mentioned filling region, can also be identified according to filling region boundary position.
The boundary information of above-mentioned filling region can be the information comprising boundary position, which can be fill area
The boundary characteristic information etc. of the boundary profile in domain either filling region.If filling region is multiple filling regions, the boundary
Information may include the quantity of filling region.For example, including the filling region of 2 triangles in puzzle template, boundary information can
With the coordinate information comprising 2 vertexs of a triangle, the number of filling region is 2.It can will fill picture and picture mosaic mould
Plate generates the boundary information that picture mosaic picture obtains the filling region later, can also first obtain the boundary information of the filling region
Afterwards, filling picture and puzzle template are generated into picture mosaic picture.The present embodiment is not construed as limiting this.
Optionally, the boundary information is boundary marker, the filling region of the identification puzzle template, and is filled out described in acquisition
Fill the boundary information in region, comprising:
Identify the filling region of puzzle template;
The boundary marker is added in the boundary position of the filling region, obtains the boundary marker.
In this step, the boundary marker can be the information for marking the filling region boundary position, the mark
Note can be is added in a manner of point, line or figure etc..For example, in the boundary position of filling region, it is wide along the Boundary filling
Degree is the continuous pixel of 1 pixel, forms filling region boundary.The boundary marker can show on puzzle template,
Filling picture is filled after forming picture mosaic picture to puzzle template, which still may be displayed on picture mosaic picture.
In this embodiment, label is added on the boundary of the filling region of puzzle template, picture mosaic file can be realized
Storage, when other people obtain the picture mosaic file, picture mosaic picture in the available picture mosaic file, and can will be in picture mosaic picture
Puzzle template separate, fill other filling pictures, realize the multiple utilization of puzzle template, embodiment operation letter
It is single.
Optionally, the picture mosaic file further includes the second data block, and the boundary information is that the coordinate of edge feature point is believed
Breath, the boundary information for obtaining the filling region, comprising:
Obtain the coordinate information of the filling region;
The coordinate information is added to second data block of the picture mosaic file.
In this step, it may include the second data block in above-mentioned picture mosaic file, the second data block can be for storing
The data cell of data, the second data block and the first data block can be two different data block types.For portable net
Network figure (Portable Network Graphic Format, abbreviation PNG) format, the data of the picture of PNG format can be
With IEND (image stopping data) end of data block, when normally being parsed to picture, after being resolved to IEND data block, the data
Information after block is no longer parsed, and the boundary information of filling region can be added after the data block, shows picture mosaic picture
When, it does not show boundary information, will not influence the effect of picture mosaic.For the picture file of extended formatting, above-mentioned letter can also be added
Breath, for example, JPG format (Joint Photographic Experts GROUP, Joint Photographic Experts Group), BMP format
(Bitmap, bitmap) etc..
Above-mentioned edge feature point can be the point that boundary figure can be obtained according to characteristic point, for example, if boundary is polygon
Shape, boundary information can be the vertex of polygon;If the filling region of puzzle template includes multiple regions, boundary information be can wrap
The number on vertex and filling region containing polygon.Boundary information statistics to be added such as following table will be needed, it can be by these information
After IEND data block is written according to lower sheet format.
If the boundary shape of filling region is circle, edge feature point is also possible to central coordinate of circle and radius, if picture mosaic mould
The filling region of plate includes multiple regions, then boundary information can also include the number of filling region.
In this embodiment, by the second data block of the boundary information write-in picture mosaic file of puzzle template filling region
Afterwards, the boundary information for not showing addition in the picture mosaic picture generated in this way, will not influence the visual effect of picture mosaic picture, Ke Yishi
The storage of existing picture mosaic picture and the separation of puzzle template.
Optionally, the picture mosaic file further includes third data block, and the boundary information is boundary profile image, described to obtain
Take the boundary information of the filling region, comprising:
Obtain the boundary profile image of the filling region;
The boundary profile image is added to the third data block of the picture mosaic file.
In this step, above-mentioned filling region can be understood as the region that addition filling picture is needed in puzzle template, this is filled out
Filling region can be one or more regions.Above-mentioned boundary profile image can be the image comprising boundary profile.For example, filling
The boundary shape in region is circle, and it is circular image that boundary profile image, which can be profile,.
Above-mentioned picture mosaic file can be the set of the information such as picture mosaic picture and picture mosaic picture attribute, wherein the picture mosaic figure
Piece can be image data, can be shown as image on an electronic device.It may include third data block in above-mentioned picture mosaic file,
Third data block can be data cell for storing data, and third data block can be two different with the first data block
Data block type.The data of the picture of PNG format can be with IEND end of data block, when normally being parsed to picture,
After being resolved to IEND data block, the information after the data block is no longer parsed, and can add fill area after the data block
The boundary information in domain does not show boundary information, will not influence the effect of picture mosaic when showing picture mosaic picture.
Present embodiment can add boundary profile image only comprising puzzle template filling region after IEND data block
Image data block, the picture mosaic picture may include the data block of two pictures after the completion of picture mosaic, and one is comprising original spelling
The data block of figure, the other is only including the data block of puzzle template boundary profile picture.Due to the boundary profile picture of addition
Data block after IEND data block, when checking picture mosaic picture, do not show boundary profile, will not influence picture mosaic vision effect
Fruit.
In this embodiment, the boundary profile image letter of filling region is added in the third data block of picture mosaic file
Breath can use this programme when the boundary shape of the filling region of puzzle template is more complex, not influence the vision effect of picture mosaic
Fruit, and when other people open the picture mosaic picture of the picture mosaic file, the puzzle template in picture mosaic picture can be separated.
Step 202 obtains filling picture, and the filling picture is filled to the fill area of the puzzle template
Domain, to obtain picture mosaic picture.
In this step, above-mentioned filling picture can be to be filled into the picture in puzzle template, can be user's needs
Carry out the picture of moditied processing.Above-mentioned filling picture can be one or plurality of pictures, which is filled to picture mosaic
The filling region of template can will fill picture filling according to the size or shape of filling picture itself when being filled
To corresponding filling region.
In addition, above-mentioned picture mosaic picture can be the picture synthesized by filling picture and puzzle template, which can be with
It is image data.
Step 203 generates the picture mosaic file including the picture mosaic picture and the boundary information, and the boundary information is used for
It is separated from the picture mosaic picture for other terminal recognitions and by the puzzle template.
In this step, above-mentioned picture mosaic picture can be image data, can be shown as image on an electronic device.It is above-mentioned
Picture mosaic file can be the set of the information such as picture mosaic picture and picture mosaic picture attribute.
After puzzle template and filling picture are generated picture mosaic picture, the boundary information of filling region can be added to spelling
Map file can make boundary information in picture mosaic picture in this way, the boundary information of filling region can be made to be included in picture mosaic file
In do not show;After boundary information can also being added in puzzle template, puzzle template and filling picture are generated into picture mosaic picture, this
Sample can be such that the boundary information of filling region had both been included in picture mosaic file, be also contained in picture mosaic picture, and boundary information is being spelled
It can be shown in figure picture.When parsing to picture mosaic file, boundary information can be used by the spelling in picture mosaic picture
Artwork plate, which is cut out, to be come.
Step 204 adds mark in first data block of the picture mosaic file, and the mark is for indicating described
Puzzle template has the characteristic separated from the picture mosaic picture.
The step is optional step in the present embodiment.
Wherein, above-mentioned picture mosaic file can be the set of the information such as picture mosaic picture and picture mosaic picture attribute, wherein the spelling
Figure picture can be image data, can be shown as image on an electronic device.It may include the first number in above-mentioned picture mosaic file
According to block, the first data block can be data cell for storing data.For example, the tEXt data in PNG format image file
Block.
After generating picture mosaic picture, mark can be added in the first data block of picture mosaic file, above-mentioned mark can be
Puzzle template for indicating in the picture mosaic picture can be separated from the picture mosaic picture, thus after obtaining picture mosaic picture,
Picture comprising the mark can be parsed, puzzle template is cut out to come.It, can be with for example, for the picture of PNG format
It is added in the data block of data block tEXt or domain data block software (software) of zTxt
The mark of " ShareImageTemplate ".
For the picture file of extended formatting, above-mentioned mark can also be added, for example, JPG format (Joint
Photographic Experts GROUP, Joint Photographic Experts Group), BMP format (Bitmap, bitmap) etc..
In addition, other processing for image, are also referred to the image processing method of the present embodiment, for example, U.S. face, filter
Mirror etc..
The present embodiment adds mark on the basis of Fig. 1 corresponding embodiment in the data block of picture mosaic picture, and label should
Puzzle template in picture mosaic picture is separable template, can be to the picture mosaic text comprising the mark when obtaining picture mosaic file
Part is parsed, and is obtained puzzle template, is improved the efficiency of parsing.
3rd embodiment
It is the flow chart of another image processing method provided in an embodiment of the present invention referring to Fig. 3, Fig. 3, as shown in figure 3,
The following steps are included:
Step 301 obtains picture mosaic file, and the picture mosaic file includes the picture mosaic figure generated by puzzle template and filling picture
Piece, and the boundary information of the also filling region comprising the puzzle template.
When user checks the picture that social good friend uploads in social platform, if viewing interested picture, simultaneously
When wanting to obtain the template in picture, picture can be downloaded, and template is separated from picture.
In this step, above-mentioned picture mosaic file can be the set of the information such as picture mosaic picture and picture mosaic picture attribute,
In, which can be image data, can be shown as image on an electronic device.
Above-mentioned puzzle template can be the template for arranging multiple pictures according to preset format, puzzle template
One or more pictures can be modified, keep image content more abundant, beautiful.It may include a variety of face in puzzle template
Color, also may include image, and user can choose template similar in the filling picture color or image filled with needs, will fill
Picture is filled.
Above-mentioned filling picture can be to be filled into the picture in puzzle template, can be user and needs to carry out moditied processing
Picture.Above-mentioned filling picture can be one or plurality of pictures, which is filled to the fill area of puzzle template
Domain can will fill picture according to the size or shape of filling picture itself and fill to corresponding filling when being filled
Region.
Above-mentioned filling region can be understood as the region that addition filling picture is needed in puzzle template, which can be
One or more regions, a filling region can correspond to a picture.The shape of filling region may include regular shape, such as
Round, rectangular, triangle;Also irregular shape, such as leaf, flower-shape be may include, can also simultaneously include different shapes
Shape and size, puzzle template can be combined the filling region of a variety of different shapes and size.For example, being wrapped in puzzle template
Containing 6 filling regions, wherein 2 filling regions are circle, positioned at the top of puzzle template, 4 filling regions be it is rectangular, be located at
The lower section of puzzle template.
The boundary information of above-mentioned filling region can be the information comprising boundary position, which can be fill area
The boundary characteristic information etc. of the boundary profile in domain either filling region.If filling region is multiple filling regions, the boundary
Information may include the quantity of filling region.For example, including the filling region of 2 triangles in puzzle template, boundary information can
With the coordinate information comprising 2 vertexs of a triangle, the number of filling region is 2.
Step 302, the parsing picture mosaic file, obtain the boundary information.
In this step, above-mentioned picture mosaic file is parsed, the data in picture mosaic file can be parsed, obtained
The boundary information of the filling region of puzzle template.The boundary information can be the boundary profile information either boundary of filling region
Characteristic information is also possible to boundary marker etc..For example, if the filling region boundary of puzzle template is circle, the boundary information
It can be the boundary marker added along circular boundary.
Step 303 is separated the puzzle template using the boundary information from the picture mosaic picture.
According to the boundary of the available puzzle template filling region of boundary information, so that it is determined that the region of puzzle template, it can
To be cut using image Segmentation Technology along boundary, the region of puzzle template is obtained, puzzle template is separated.
For example, the filling region of puzzle template is two triangles, boundary information is the seat of the two vertexs of a triangle
Mark.After obtaining filling region number and triangular apex coordinate, triangular apex is attached, forms closed figure.Along
The boundary of the closed figure is cut, and the region disconnecting after above-mentioned two triangle will be removed in picture mosaic picture and is come out.
The image processing method of the embodiment of the present invention can be applied to electronic equipment, such as: mobile phone, computer, plate electricity
Brain (Tablet Personal Computer), laptop computer (Laptop Computer), personal digital assistant
(personal digital assistant, abbreviation PDA), mobile Internet access device (Mobile Internet Device, MID)
Or wearable device (Wearable Device) etc..
The image processing method of the embodiment of the present invention, obtains picture mosaic file, the picture mosaic file include by puzzle template and
Fill the picture mosaic picture that picture generates, and the boundary information of the also filling region comprising the puzzle template;Parse the spelling
Map file obtains the boundary information;The puzzle template is separated from the picture mosaic picture using the boundary information.This
Sample, user gets picture mosaic picture is generated by filling picture and puzzle template after, can by the puzzle template in picture mosaic picture from
It is separated in the picture mosaic picture, for users to use.
Referring to fig. 4, Fig. 4 is the flow chart that the present invention implements another image processing method provided, as shown in figure 4, packet
Include following steps:
Step 401 obtains picture mosaic file, and the picture mosaic file includes the picture mosaic figure generated by puzzle template and filling picture
Piece, and the boundary information of the also filling region comprising the puzzle template.
When user checks the picture that social good friend uploads in social platform, if viewing interested picture, simultaneously
When wanting to obtain the template in picture, picture can be downloaded, and template is separated from picture.
In this step, above-mentioned picture mosaic file can be the set of the information such as picture mosaic picture and picture mosaic picture attribute,
In, which can be image data, can be shown as image on an electronic device.
Above-mentioned puzzle template can be the template for arranging multiple pictures according to preset format, puzzle template
One or more pictures can be modified, keep image content more abundant, beautiful.It may include a variety of face in puzzle template
Color, also may include image, and user can choose template similar in the filling picture color or image filled with needs, will fill
Picture is filled.
Above-mentioned filling picture can be to be filled into the picture in puzzle template, can be user and needs to carry out moditied processing
Picture.Above-mentioned filling picture can be one or plurality of pictures, which is filled to the fill area of puzzle template
Domain can will fill picture according to the size or shape of filling picture itself and fill to corresponding filling when being filled
Region.
Above-mentioned filling region can be understood as the region that addition filling picture is needed in puzzle template, which can be
One or more regions, a filling region can correspond to a picture.The shape of filling region may include regular shape, such as
Round, rectangular, triangle;Also irregular shape, such as leaf, flower-shape be may include, can also simultaneously include different shapes
Shape and size, puzzle template can be combined the filling region of a variety of different shapes and size.For example, being wrapped in puzzle template
Containing 6 filling regions, wherein 2 filling regions are circle, positioned at the top of puzzle template, 4 filling regions be it is rectangular, be located at
The lower section of puzzle template.
The boundary information of above-mentioned filling region can be the information comprising boundary position, which can be fill area
The boundary characteristic information etc. of the boundary profile in domain either filling region.If filling region is multiple filling regions, the boundary
Information may include the quantity of filling region.For example, including the filling region of 2 triangles in puzzle template, boundary information can
With the coordinate information comprising 2 vertexs of a triangle, the number of filling region is 2.
If step 402 obtains preset mark, it is determined that the picture mosaic picture is can be by puzzle template from the picture mosaic figure
The picture separated in piece.
In the present embodiment, which is optional step.
In this step, above-mentioned preset mark can be the mark added when generating picture mosaic picture, which can be with
The puzzle template being intended to indicate that in picture mosaic picture can be separated.
Picture mosaic picture is opened, when parsing to picture mosaic file, if available above-mentioned mark, it is determined that the picture mosaic picture
In puzzle template can be separated, then can continue to parse the picture mosaic picture.For example, in PNG format image
Data block tEXt data block in add " ShareImageTemplate " mark, when being parsed to the picture, if
Get " ShareImageTemplate " field, it is determined that the picture mosaic picture is can be by puzzle template from the picture mosaic picture
Middle isolated picture then continues to parse picture mosaic file.For the picture file of extended formatting, mark can also be added, for example,
JPG, BMP etc..
Step 403, the parsing picture mosaic file, obtain the boundary information.
Above-mentioned picture mosaic file is parsed, the data in picture mosaic file can be parsed, obtain puzzle template
The boundary information of filling region.The boundary information can be the boundary profile information either boundary characteristic information of filling region,
It is also possible to boundary marker etc..For example, if the filling region boundary of puzzle template be circle, the boundary information can be along
The boundary marker of circular boundary addition.
Optionally, the boundary information is boundary marker, described to obtain the boundary information, comprising:
Obtain the boundary marker of the filling region;
It is described to be separated the puzzle template from the picture mosaic picture using the boundary information, comprising:
The region of the puzzle template is determined using the boundary marker;
The region is separated from the picture mosaic picture.
When parsing to picture mosaic file, the boundary marker in picture mosaic picture can be identified, which can be
When generating picture mosaic picture, the boundary marker of addition.Above-mentioned boundary marker can be with the formal notation of point, line or figure
's.For example, identifying continuous pixel, boundary line is obtained, the region of puzzle template is determined using the boundary line that pixel is formed,
Puzzle template is cut out along boundary line, obtains puzzle template.
In this embodiment, boundary marker is obtained, is divided the puzzle template region in picture mosaic picture using boundary marker
From in such manner, it is possible to the puzzle template in picture mosaic picture be obtained, to be used by others.
Optionally, the boundary information is the coordinate information of edge feature point, described to obtain the boundary information, comprising:
Obtain the coordinate information of the filling region;
It is described to be separated the puzzle template from the picture mosaic picture using the boundary information, comprising:
It connects the coordinate information of each filling region to form closed figure respectively, uses the closed figure
Boundary determine the region of the puzzle template;
The region is separated from the picture mosaic picture.
Above-mentioned edge feature point can be the point that boundary figure can be obtained according to characteristic point, for example, if filling region
Boundary figure is polygon, and boundary information can be the vertex of polygon;If the filling region of puzzle template includes multiple regions,
Boundary information may include the vertex of polygon and the number of filling region.The coordinate points of each filling region are connected into shape
At closed figure, the region of puzzle template is determined using the closed figure, so that puzzle template be separated.
For example, including two triangle filling regions in puzzle template, the coordinate information of two triangles is obtained, respectively
Two vertex of a triangle coordinates are connected, triangle is formed, determines and removes triangle filling region in picture mosaic picture
Part is outer, other regions are the region of puzzle template, cuts out by puzzle template along triangle boundary.
If boundary shape is circle, edge feature point is also possible to central coordinate of circle and radius, if the fill area of puzzle template
Domain includes multiple regions, then boundary information can also include the number of filling region.Circular boundary can be used by puzzle template
It separates.
In this embodiment, the coordinate information of the boundary characteristic information of each filling region is attached, obtains envelope
Figure is closed, cuts out by puzzle template along the closed figure boundary, to obtain the puzzle template, makes puzzle template
It can be reused by other people.
Optionally, the boundary information is boundary profile image, described to obtain the boundary information, comprising:
Obtain the boundary profile image of the filling region;
It is described to be separated the puzzle template from the picture mosaic picture using the boundary information, comprising:
The region of the puzzle template is determined using the boundary profile image;
The region is separated from the picture mosaic picture.
In this step, above-mentioned filling region can be understood as the region that addition filling picture is needed in puzzle template, this is filled out
Filling region can be one or more regions.Above-mentioned boundary profile image can be the image comprising boundary profile.For example, filling
The boundary shape in region is circle, and it is circular image that boundary profile image, which can be profile,.Behind the region for determining puzzle template,
It is cut along the contour line in the boundary profile image, obtains the puzzle template.
In this embodiment, the boundary profile image for obtaining the filling region, along the boundary profile figure
Contour line as in is cut, to obtain the puzzle template, puzzle template is enable to be reused by other people.
Step 404 is separated the puzzle template using the boundary information from the picture mosaic picture.
In this step, according to the boundary of the available puzzle template filling region of boundary information, so that it is determined that picture mosaic mould
The region of plate can be cut along boundary using image Segmentation Technology, obtain the region of puzzle template, by puzzle template point
It separates out and.
For example, the filling region of puzzle template is two triangles, boundary information is the seat of the two vertexs of a triangle
Mark.After obtaining filling region number and triangular apex coordinate, triangular apex is attached, forms closed figure.Along
The boundary of the closed figure is cut, and the region disconnecting after above-mentioned two triangle will be removed in picture mosaic picture and is come out.
In addition, other processing for image, are also referred to the image processing method of the present embodiment, for example, U.S. face, filter
Mirror etc..
The embodiment of the present invention is on the basis of Fig. 3 corresponding embodiment, when obtaining preset mark, to picture mosaic file into
Row parsing, to obtain boundary information, in this way, can by the picture mosaic picture generated in picture by puzzle template and filling picture into
Row parsing, to obtain template, can be improved analyzing efficiency.
5th embodiment
It is the structure chart that the present invention implements a kind of electronic equipment provided referring to Fig. 5, Fig. 5, as shown in figure 5, electronic equipment
500 include: identification module 501, filling module 502 and generation module 503, in which:
Identification module 501, the filling region of puzzle template for identification, and obtain the boundary information of the filling region;
Module 502 is filled, for obtaining filling picture, and the filling picture is filled to described in the puzzle template
Filling region, to obtain picture mosaic picture;
Generation module 503, for generating the picture mosaic file including the picture mosaic picture and the boundary information, the boundary
Information is used for for other terminal recognitions and separates the puzzle template from the picture mosaic picture.
Optionally, as shown in fig. 6, the picture mosaic file further includes the first data block, the electronic equipment 500 further include:
Adding module 504, for adding mark in first data block of the picture mosaic file, the mark is used for
Indicate that the puzzle template has the characteristic separated from the picture mosaic picture.
Optionally, as shown in fig. 7, the boundary information is boundary marker, the identification module 501 includes:
First recognition unit 5011, for identification filling region of puzzle template;
First adding unit 5012 adds the boundary marker for the boundary position in the filling region, obtains institute
State boundary marker.
Optionally, as shown in figure 8, the picture mosaic file further includes the second data block, the boundary information is boundary characteristic
The coordinate information of point, the identification module 501 include:
First acquisition unit 5013, for obtaining the coordinate information of the filling region;
Second adding unit 5014, for the coordinate information to be added to second data of the picture mosaic file
Block.
Optionally, as shown in figure 9, the picture mosaic file further includes third data block, the boundary information is boundary profile
Image, the identification module 501 include:
Second acquisition unit 5015, for obtaining the boundary profile image of the filling region;
Third adding unit 5016, for the boundary profile image to be added to the third number of the picture mosaic file
According to block.
Electronic equipment 500 can be realized each process that electronic equipment is realized in the embodiment of the method for Fig. 1 to Fig. 2, to keep away
Exempt to repeat, which is not described herein again.
The electronic equipment 500 of the embodiment of the present invention, identifies the filling region of puzzle template, and obtains the filling region
Boundary information;Filling picture is obtained, and the filling picture is filled to the filling region of the puzzle template, to obtain
Picture mosaic picture;The picture mosaic file including the picture mosaic picture and the boundary information is generated, the boundary information is used for for other
Terminal recognition simultaneously separates the puzzle template from the picture mosaic picture.In this way, user can be by puzzle template and blank map
Piece generates picture mosaic picture, and adds boundary information in picture mosaic picture, makes to be that can be incited somebody to action according to boundary information in the picture mosaic picture
The picture that puzzle template is separated, so that the template in picture mosaic picture be enable to be used by others.
Sixth embodiment
It is the structure chart that the present invention implements another electronic equipment provided, as shown in Figure 10, electronics referring to Figure 10, Figure 10
Equipment 1000 includes: to obtain module 1001, parsing module 1002 and separation module 1003, in which:
Module 1001 is obtained, for obtaining picture mosaic file, the picture mosaic file includes raw by puzzle template and filling picture
At picture mosaic picture, and also comprising the puzzle template filling region boundary information;
Parsing module 1002 obtains the boundary information for parsing the picture mosaic file;
Separation module 1003, for being separated the puzzle template from the picture mosaic picture using the boundary information.
It optionally, as shown in figure 11, include preset mark in the picture mosaic file, the parsing module 1002 includes:
Determination unit 10021, if for obtaining the mark, it is determined that the picture mosaic picture is can be by puzzle template from institute
State the picture separated in picture mosaic picture;
Resolution unit 10022 obtains the boundary information for parsing the picture mosaic file.
Optionally, as shown in figure 12, the boundary information is boundary marker, and the parsing module 1002 is described for obtaining
The boundary marker of filling region;
The separation module 1003 includes:
First uses unit 10031, for determining the region of the puzzle template using the boundary marker;
First separative unit 10032, for separating the region from the picture mosaic picture.
Optionally, as shown in figure 13, the boundary information is the coordinate information of edge feature point, the parsing module 1002
For obtaining the coordinate information of the filling region;
The separation module 1003 includes:
Second uses unit 10033, for connecting the coordinate information of each filling region to form envelope respectively
Figure is closed, the region of the puzzle template is determined using the boundary of the closed figure;
Second separative unit 10034, for separating the region from the picture mosaic picture.
Optionally, as shown in figure 14, the boundary information is boundary profile image, and the parsing module 1002 is for obtaining
The boundary profile image of the filling region;
The separation module 1003 includes:
Third uses unit 10035, for determining the region of the puzzle template using the boundary profile image;
Third separative unit 10036, for separating the region from the picture mosaic picture.
7th embodiment
It is the structure chart that the present invention implements the electronic equipment provided, as shown in figure 15, electronic equipment referring to Figure 15, Figure 15
1500 include: at least one processor 1501, memory 1502, at least one network interface 1504 and user interface 1503.Electricity
Various components in sub- equipment 1500 are coupled by bus system 1505.It is understood that bus system 1505 for realizing
Connection communication between these components.Bus system 1505 further includes power bus, control bus in addition to including data/address bus
And status signal bus in addition.But for the sake of clear explanation, various buses are all designated as bus system 1505 in Figure 15.
Wherein, user interface 1503 may include display, keyboard or pointing device (for example, mouse, trace ball
(track ball), touch-sensitive plate or touch screen etc..
It is appreciated that the memory 1502 in the embodiment of the present invention can be volatile memory or non-volatile memories
Device, or may include both volatile and non-volatile memories.Wherein, nonvolatile memory can be read-only memory
(Read-Only Memory, ROM), programmable read only memory (Programmable ROM, PROM), erasable programmable are only
Read memory (Erasable P ROM, EPROM), electrically erasable programmable read-only memory (Electrically EP ROM,
) or flash memory EEPROM.Volatile memory can be random access memory (Random Access Memory, RAM), use
Make External Cache.By exemplary but be not restricted explanation, the RAM of many forms is available, such as static random-access
Memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random-access
Memory (Synchronous D RAM, SDRAM), double data speed synchronous dynamic RAM (Double
Data Rate SD RAM, DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced SD RAM,
ESDRAM), synchronized links dynamic random access memory (Synch link D RAM, SLDRAM) and direct rambus are random
It accesses memory (Direct Rambus RAM, DRRAM).The memory 1502 of system and method described herein is intended to include
But it is not limited to the memory of these and any other suitable type.
In some embodiments, memory 1502 stores following element, executable modules or data structures, or
Their subset of person or their superset: operating system 15021 and application program 15022.
Wherein, operating system 15021 include various system programs, such as ccf layer, core library layer, driving layer etc., are used for
Realize various basic businesses and the hardware based task of processing.Application program 15022 includes various application programs, such as matchmaker
Body player (Media Player), browser (Browser) etc., for realizing various applied business.Realize that the present invention is implemented
The program of example method may be embodied in application program 15022.
In embodiments of the present invention, by the program or instruction of calling memory 1502 to store, specifically, can be application
The program or instruction stored in program 15022, processor 1501 are used for:
It identifies the filling region of puzzle template, and obtains the boundary information of the filling region;
Filling picture is obtained, and the filling picture is filled to the filling region of the puzzle template, to obtain
Picture mosaic picture;
The picture mosaic file including the picture mosaic picture and the boundary information is generated, the boundary information is used to supply other ends
End identifies and separates the puzzle template from the picture mosaic picture.
The method that the embodiments of the present invention disclose can be applied in processor 1501, or real by processor 1501
It is existing.Processor 1501 may be a kind of IC chip, the processing capacity with signal.During realization, the above method
Each step can be completed by the instruction of the integrated logic circuit of the hardware in processor 1501 or software form.Above-mentioned
Processor 1501 can be general processor, digital signal processor (Digital Signal Processor, DSP), dedicated
Integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.It is general
Processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with institute of the embodiment of the present invention
The step of disclosed method, can be embodied directly in hardware decoding processor and execute completion, or with the hardware in decoding processor
And software module combination executes completion.Software module can be located at random access memory, and flash memory, read-only memory may be programmed read-only
In the storage medium of this fields such as memory or electrically erasable programmable memory, register maturation.The storage medium is located at
The step of memory 1502, processor 1501 reads the information in memory 1502, completes the above method in conjunction with its hardware.
It is understood that embodiments described herein can with hardware, software, firmware, middleware, microcode or its
Combination is to realize.For hardware realization, processing unit be may be implemented in one or more specific integrated circuit (Application
Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing,
DSP), digital signal processing appts (DSP Device, DSPD), programmable logic device (Programmable Logic
Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general processor,
In controller, microcontroller, microprocessor, other electronic units for executing herein described function or combinations thereof.
For software implementations, it can be realized herein by executing the module (such as process, function etc.) of function described herein
The technology.Software code is storable in memory and is executed by processor.Memory can in the processor or
It is realized outside processor.
Optionally, the picture mosaic file further includes the first data block, includes the picture mosaic picture and described in described generate
After the picture mosaic file of boundary information, processor 1501 is also used to:
Mark is added in first data block of the picture mosaic file, the mark is for indicating the puzzle template
Has the characteristic separated from the picture mosaic picture.
Optionally, the boundary information is boundary marker, and processor 1501 executes the fill area of the identification puzzle template
Domain, and obtain the boundary information of the filling region, comprising:
Identify the filling region of puzzle template;
The boundary marker is added in the boundary position of the filling region, obtains the boundary marker.
Optionally, the picture mosaic file further includes the second data block, and it is boundary that processor 1501, which executes the boundary information,
The coordinate information of characteristic point, the boundary information for obtaining the filling region, comprising:
Obtain the coordinate information of the filling region;
The coordinate information is added to second data block of the picture mosaic file.
Optionally, the picture mosaic file further includes third data block, and it is boundary that processor 1501, which executes the boundary information,
Contour images, the boundary information for obtaining the filling region, comprising:
Obtain the boundary profile image of the filling region;
The boundary profile image is added to the third data block of the picture mosaic file.
Electronic equipment 1500 can be realized each process that electronic equipment is realized in the corresponding embodiment of the method for Fig. 1 to Fig. 2,
To avoid repeating, which is not described herein again.
The electronic equipment 1500 of the embodiment of the present invention, identifies the filling region of puzzle template, and obtains the filling region
Boundary information;Filling picture is obtained, and the filling picture is filled to the filling region of the puzzle template, with
To picture mosaic picture;The picture mosaic file including the picture mosaic picture and the boundary information is generated, the boundary information is used to supply it
Its terminal recognition simultaneously separates the puzzle template from the picture mosaic picture.In this way, user can be by puzzle template and filling
Picture generates picture mosaic picture, and adds boundary information in picture mosaic picture, make be in the picture mosaic picture can be according to boundary information
The picture that puzzle template is separated, so that the template in picture mosaic picture be enable to be used by others.
8th embodiment
It is the structure chart that the present invention implements the electronic equipment provided, as shown in figure 16, electronic equipment referring to Figure 16, Figure 16
1600 include: at least one processor 1601, memory 1602, at least one network interface 1604 and user interface 1603.Electricity
Various components in sub- equipment 1600 are coupled by bus system 1605.It is understood that bus system 1605 for realizing
Connection communication between these components.Bus system 1605 further includes power bus, control bus in addition to including data/address bus
And status signal bus in addition.But for the sake of clear explanation, various buses are all designated as bus system 1605 in Figure 16.
Wherein, user interface 1603 may include display, keyboard or pointing device (for example, mouse, trace ball
(track ball), touch-sensitive plate or touch screen etc..
It is appreciated that the memory 1602 in the embodiment of the present invention can be volatile memory or non-volatile memories
Device, or may include both volatile and non-volatile memories.Wherein, nonvolatile memory can be read-only memory
(Read-Only Memory, ROM), programmable read only memory (Programmable ROM, PROM), erasable programmable are only
Read memory (Erasable P ROM, EPROM), electrically erasable programmable read-only memory (Electrically EP ROM,
) or flash memory EEPROM.Volatile memory can be random access memory (Random Access Memory, RAM), use
Make External Cache.By exemplary but be not restricted explanation, the RAM of many forms is available, such as static random-access
Memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random-access
Memory (Synchronous D RAM, SDRAM), double data speed synchronous dynamic RAM (Double
Data Rate SD RAM, DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (Enhanced SD RAM,
ESDRAM), synchronized links dynamic random access memory (Synch link D RAM, SLDRAM) and direct rambus are random
It accesses memory (Direct Rambus RAM, DRRAM).The memory 1602 of system and method described herein is intended to include
But it is not limited to the memory of these and any other suitable type.
In some embodiments, memory 1602 stores following element, executable modules or data structures, or
Their subset of person or their superset: operating system 16021 and application program 16022.
Wherein, operating system 16021 include various system programs, such as ccf layer, core library layer, driving layer etc., are used for
Realize various basic businesses and the hardware based task of processing.Application program 16022 includes various application programs, such as matchmaker
Body player (Media Player), browser (Browser) etc., for realizing various applied business.Realize that the present invention is implemented
The program of example method may be embodied in application program 16022.
In embodiments of the present invention, by the program or instruction of calling memory 1602 to store, specifically, can be application
The program or instruction stored in program 16022, processor 1601 are used for:
Picture mosaic file is obtained, the picture mosaic file includes the picture mosaic picture generated by puzzle template and filling picture, and
The also boundary information of the filling region comprising the puzzle template;
The picture mosaic file is parsed, the boundary information is obtained;
The puzzle template is separated from the picture mosaic picture using the boundary information.
The method that the embodiments of the present invention disclose can be applied in processor 1601, or real by processor 1601
It is existing.Processor 1601 may be a kind of IC chip, the processing capacity with signal.During realization, the above method
Each step can be completed by the instruction of the integrated logic circuit of the hardware in processor 1601 or software form.Above-mentioned
Processor 1601 can be general processor, digital signal processor (Digital Signal Processor, DSP), dedicated
Integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components.It may be implemented or execute disclosed each method, step and the logic diagram in the embodiment of the present invention.It is general
Processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with institute of the embodiment of the present invention
The step of disclosed method, can be embodied directly in hardware decoding processor and execute completion, or with the hardware in decoding processor
And software module combination executes completion.Software module can be located at random access memory, and flash memory, read-only memory may be programmed read-only
In the storage medium of this fields such as memory or electrically erasable programmable memory, register maturation.The storage medium is located at
The step of memory 1602, processor 1601 reads the information in memory 1602, completes the above method in conjunction with its hardware.
It is understood that embodiments described herein can with hardware, software, firmware, middleware, microcode or its
Combination is to realize.For hardware realization, processing unit be may be implemented in one or more specific integrated circuit (Application
Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing,
DSP), digital signal processing appts (DSP Device, DSPD), programmable logic device (Programmable Logic
Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general processor,
In controller, microcontroller, microprocessor, other electronic units for executing herein described function or combinations thereof.
For software implementations, it can be realized herein by executing the module (such as process, function etc.) of function described herein
The technology.Software code is storable in memory and is executed by processor.Memory can in the processor or
It is realized outside processor.
It optionally, include preset mark in the picture mosaic file, processor 1601 executes the parsing picture mosaic text
Part obtains the boundary information, comprising:
If obtaining the mark, it is determined that the picture mosaic picture can separate puzzle template from the picture mosaic picture
Picture;
The picture mosaic file is parsed, the boundary information is obtained.
Optionally, the boundary information is boundary marker, and processor 1601 executes the acquisition boundary information, packet
It includes:
Obtain the boundary marker of the filling region;
It is described to be separated the puzzle template from the picture mosaic picture using the boundary information, comprising:
The region of the puzzle template is determined using the boundary marker;
The region is separated from the picture mosaic picture.
Optionally, the boundary information is the coordinate information of edge feature point, and processor 1601 executes described in the acquisition
Boundary information, comprising:
Obtain the coordinate information of the filling region;
It is described to be separated the puzzle template from the picture mosaic picture using the boundary information, comprising:
It connects the coordinate information of each filling region to form closed figure respectively, uses the closed figure
Boundary determine the region of the puzzle template;
The region is separated from the picture mosaic picture.
Optionally, the boundary information is boundary profile image, and processor 1601 executes the acquisition boundary information,
Include:
Obtain the boundary profile image of the filling region;
It is described to be separated the puzzle template from the picture mosaic picture using the boundary information, comprising:
The region of the puzzle template is determined using the boundary profile image;
The region is separated from the picture mosaic picture.
Electronic equipment 1600 can be realized each process that electronic equipment is realized in the corresponding embodiment of Fig. 3 to Fig. 4, to keep away
Exempt to repeat, which is not described herein again.
The electronic equipment 1600 of the embodiment of the present invention, obtains picture mosaic file, the picture mosaic file include by puzzle template and
Fill the picture mosaic picture that picture generates, and the boundary information of the also filling region comprising the puzzle template;Parse the spelling
Map file obtains the boundary information;The puzzle template is separated from the picture mosaic picture using the boundary information.This
Sample, user gets picture mosaic picture is generated by filling picture and puzzle template after, can by the puzzle template in picture mosaic picture from
It is separated in the picture mosaic picture, for users to use.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In embodiment provided herein, it should be understood that disclosed device and method can pass through others
Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of device or unit
It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.Some or all of unit therein can be selected to realize the embodiment of the present invention according to the actual needs
Purpose.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, ROM, RAM, magnetic or disk etc. are various can store program code
Medium.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.