Summary of the invention
In view of the above problems, propose the present invention to provide a kind of picture splicing implementation method overcoming the problems referred to above or solve the problem at least in part, and a kind of picture processing system.
According to one aspect of the present invention, provide a kind of picture processing system, comprising: one or more device realizing picture splicing, and one or more figure film source, wherein, one or more in described figure film source are the picture database of local figure film source or server end; The described device realizing picture splicing comprises: template base unit, picture extraction unit, matching unit and jigsaw puzzle units;
Described template base unit, is suitable for preserving multiple puzzle template;
Described picture extraction unit, is suitable for extracting from figure film source specifying the picture of number and preserving, classifies, notify described matching unit after obtaining classification results to preserved each picture; Also be suitable for when receiving the notice of described matching unit, the picture of predetermined number is deleted from preserved picture, or the picture obtaining predetermined number from figure film source is again preserved, then classification is re-started to preserved picture, classification results is notified described matching unit;
Described matching unit, be suitable for when receiving the classification results of described picture extraction unit notice, the puzzle template mated with described classification results is searched from described template base unit, if do not find the puzzle template of coupling, then send notice to described picture extraction unit, if find the puzzle template of more than one coupling, then therefrom select a puzzle template, selected puzzle template is notified described jigsaw puzzle units;
Described jigsaw puzzle units, is suitable for each picture preserved in described picture extraction unit to overlap by type in each picture frame of using in puzzle template that matching unit notifies, generates spliced picture.
Alternatively, described picture extraction unit, is suitable for classifying according to size and horizontal figure and/or perpendicular figure to preserved each picture, obtains the number of the number of the horizontal figure of often kind of size and/or the perpendicular figure of often kind of size, and notify described matching unit.
Alternatively, described matching unit, be suitable for when receiving the number of the number of horizontal figure of often kind of size of described picture extraction unit notice and/or the perpendicular figure of often kind of size, the horizontal picture frame number of searching correspondingly-sized from described template base unit is more than or equal to the horizontal figure number of the correspondingly-sized of picture extraction unit notice, and/or the perpendicular picture frame number of correspondingly-sized is more than or equal to the puzzle template of the perpendicular figure number of the correspondingly-sized of acquiring unit notice.
Alternatively, described figure film source is the picture database of local figure film source or server end; Described picture extraction unit, is suitable for extracting in the picture database from local figure film source or on server specifying the picture of number and preserving.
According to another aspect of the invention, provide a kind of picture splicing implementation method, wherein, the method comprises:
The picture of specifying number is extracted from figure film source;
The each picture obtained is classified, obtains classification results;
The puzzle template searched and mate with described classification results is comprised the template base of multiple puzzle template from what preset;
If do not find the puzzle template of coupling, then from the picture obtained, delete the picture of predetermined number, or the picture obtaining predetermined number from figure film source is again increased in the picture obtained, returns the described step that each picture obtained is classified;
If find the puzzle template of more than one coupling, then from the puzzle template of described more than one coupling, select a puzzle template, each picture obtained is overlapped in each picture frame used in selected puzzle template by type, generates spliced picture;
Repeating described extraction from figure film source specifies the picture of number to the step of the spliced picture of described generation, generates multiple spliced picture, and by specifying multiple spliced picture described in played in order.
Alternatively, described each picture to having obtained is classified, and obtains classification results and comprises:
The each picture obtained is classified according to size and horizontal figure and/or perpendicular figure, obtains the number of the number of the horizontal figure of often kind of size and/or the perpendicular figure of often kind of size.
Alternatively, describedly search the puzzle template mated with described classification results comprise from comprising the template base of multiple puzzle template of presetting:
Search from template base, the horizontal picture frame number of correspondingly-sized is more than or equal to the horizontal figure number of the correspondingly-sized obtained in picture, and/or the perpendicular picture frame number of correspondingly-sized is more than or equal to the puzzle template of the perpendicular figure number of the correspondingly-sized obtained in picture.
Alternatively, described figure film source is local figure film source; Or described figure film source is the picture database of server end.
Alternatively, described extraction from figure film source specifies the picture of number to comprise: by appointment order and/or the random picture extracting appointment number from figure film source.
Alternatively, after the spliced picture of generation, the method comprises further: the desktop background picture of described generation being set to system.
Alternatively, the method comprises further: after the spliced picture of generation, the picture of described generation is set to the desktop background lantern slide of system, returns the described step extracting the picture of specifying number from figure film source after Preset Time.
According to this picture extracting appointment number from figure film source of the present invention, each picture obtained is classified, obtains classification results, comprise the template base of multiple puzzle template from what preset the puzzle template searched and mate with described classification results, if do not find the puzzle template of coupling, then from the picture obtained, delete the picture of predetermined number, or the picture obtaining predetermined number from figure film source is again increased in the picture obtained, returns the described step that each picture obtained is classified, if find the puzzle template of more than one coupling, then from the puzzle template of described more than one coupling, select a puzzle template, the each picture obtained is overlapped by type in each picture frame used in selected puzzle template, generate the technical scheme of spliced picture, intelligent adaptation picture and template can be realized, generate spliced picture, solve the problem can only showing single picture in the application such as the setting of existing desktop and lantern slide broadcasting thus, and need manually coupling picture and template when adopting the template provided to carry out picture mosaic, the problem taken time and effort.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of instructions, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Fig. 2 shows the process flow diagram of a kind of according to an embodiment of the invention picture splicing implementation method.As shown in Figure 2, the method comprises:
Step S210, extracts the picture of specifying number from figure film source.
In one embodiment of the invention, described figure film source can be local figure film source, as being the local folders arranged, comprises picture in this file.Such as, can be place the file about the photo of a certain activity, as the photos folder about tourism, the file etc. of wedding photography.Or in another embodiment of the present invention, described figure film source also can be the picture database of server end.
In one embodiment of the invention, from figure film source, the picture of specifying number is extracted by appointment order; Or, the random picture extracting appointment number from figure film source; Again or, from figure film source, extract a part of picture by appointment order, extract another part picture at random from figure film source.
Step S220, classifies to each picture obtained, obtains classification results.
In one embodiment of the invention, can classify according to size and horizontal figure and/or perpendicular figure to each picture obtained, obtain the number of the number of the horizontal figure of often kind of size and/or the perpendicular figure of often kind of size.Specifically:
(1) if the picture obtained is all horizontal figure, then classify according to dimension of picture and horizontal figure.Such as classification results is: the horizontal figure number being of a size of a1*b1 is that x1 opens, and the horizontal figure number being of a size of c1*d1 is that y1 opens, and the horizontal figure number being of a size of e1*f1 is that z1 opens.
(2) if the picture obtained is all perpendicular figure, then classify according to dimension of picture and perpendicular figure.Such as classification results is: the perpendicular figure number being of a size of a2*b2 is that x2 opens, and the perpendicular figure number being of a size of c2*d2 is that y2 opens, and the perpendicular figure number being of a size of e2*f2 is that z2 opens.
(3) if existing horizontal figure has again perpendicular figure in the picture obtained, then classify according to dimension of picture and horizontal figure and perpendicular figure.Such as classification results is: the horizontal figure number being of a size of a1*b1 is that x3 opens, and the perpendicular figure number being of a size of c2*d2 is that y3 opens, and the perpendicular figure number being of a size of e2*f2 is that z3 opens.
Step S230, comprises the template base of multiple puzzle template from what preset the puzzle template searched and mate with described classification results.
In one embodiment of the invention, search from default comprising the template base of multiple puzzle template the puzzle template mated with described classification results to be specifically as follows: search from template base, the horizontal picture frame number of correspondingly-sized is more than or equal to the horizontal figure number of the correspondingly-sized obtained in picture, and/or the perpendicular picture frame number of correspondingly-sized is more than or equal to the puzzle template of the perpendicular figure number of the correspondingly-sized obtained in picture.
Such as, classification results is: the horizontal figure number being of a size of a1*b1 is that x1 opens, and the horizontal figure number being of a size of c1*d1 is that y1 opens, and the horizontal figure number being of a size of e1*f1 is that z1 opens.Then search from picture library, the horizontal frame number being of a size of a1*b1 is more than or equal to x1, and the horizontal frame number being of a size of c1*d1 is more than or equal to y1, the horizontal frame number being of a size of e1*f1 be greater than or the puzzle template equaling z1.
Again such as, classification results is: the horizontal figure number being of a size of a1*b1 is that x3 opens, and the perpendicular figure number being of a size of c2*d2 is that y3 opens, and the perpendicular figure number being of a size of e2*f2 is that z3 opens.Then search from picture library, the horizontal frame number being of a size of a1*b1 is more than or equal to x3, and the munnion number being of a size of c2*d2 is more than or equal to y3, and the munnion number being of a size of e2*f2 is more than or equal to the puzzle template of z3.
Here, the template of coupling is divided into " full matching template " and " subset matching template "." full matching template " refers to that the picture frame number of template is mated completely with the number of corresponding picture, the classification results of such as picture is: 3 horizontal figure and 2 being of a size of a1*b1 are of a size of the perpendicular figure of e2*f2, then " full matching template " is just in time made up of 3 the horizontal frames being of a size of a1*b1 and 2 munnions being of a size of e2*f2." subset matching template " refers to that in template, a picture frame number is more than the number of corresponding picture, the classification results of such as picture is the perpendicular figure that 2 horizontal figure and 1 being of a size of a1*b1 are of a size of e2*f2, then template be made up of 3 the horizontal frames being of a size of a1*b1 and 2 munnions being of a size of e2*f2 is " subset matching template ".For subset matching template, a pictures can allow to appear in multiple picture frame, namely repeats to be inserted in picture in additional picture frame.
Step S240, judging whether the puzzle template finding more than one coupling, is perform step S260, otherwise performs step S250.
Step S250, if the puzzle template not finding coupling, then from the picture obtained, delete the picture of predetermined number, or the picture obtaining predetermined number from figure film source is again increased in the picture obtained, and returns step S220.
In one embodiment of the invention, predetermined number can be set to 1.If namely do not find the puzzle template of coupling, then from the picture obtained, delete 1 pictures, or from figure film source, obtain 1 pictures be again increased in the picture obtained.
Step S260, if find the puzzle template of more than one coupling, then from the puzzle template of described more than one coupling, select a puzzle template, the each picture obtained is overlapped in each picture frame used in selected puzzle template by type, generates spliced picture.
In one embodiment of the invention, can from the puzzle template of described more than one coupling, Stochastic choice puzzle template.
In one embodiment of the invention, in template base, preset diversified puzzle template, be the puzzle template of 1 comprising picture frame quantity, as only included the puzzle template of 1 horizontal frame and only including the puzzle template of 1 munnion.Can ensure that it is applicable at least having a template like this.
Can realize the splicing of automatic picture by the method realizing picture splicing in the present invention, user can not participate in any editing just can obtain gorgeous picture mosaic.
After obtaining spliced picture by the method shown in Fig. 2, picture new after splicing can be outputted to and call source, as lantern slide, the preview of creation wallpaper etc.Such as:
(1), in one embodiment of the invention, after the method according to Fig. 2 generates spliced picture, the picture of generation is set to the desktop background of system.
(2) or, in one embodiment of the invention, repeatedly repeat extracting from figure film source of method shown in Fig. 2 and specify the picture of number to the step generating spliced picture, generate multiple spliced picture, by specifying the plurality of spliced picture of played in order, realizing lantern slide and playing.
(3) or, in yet another embodiment of the present invention, after method according to Fig. 2 generates spliced picture, the picture of generation is set to the desktop background lantern slide of system, the method shown in Fig. 2 of execution is returned after Preset Time, a newly-generated spliced picture, is set to the desktop background magic lantern of system, so circulates by this newly-generated picture again.
By the above-mentioned method realizing picture splicing of the present invention, automatic picture mosaic can be realized, utilize the method user that the desktop background of many figure compositions can be set, all right many chart-patterns playing lantern slides, compare former free hand drawing play mode, visual effect is abundanter, and content revealing is more diversified, and what greatly promote user sees that figure experiences.The above-mentioned method realizing picture splicing of the present invention, by the mode of operation of picture mosaic from manual editing, becomes automatic acquisition.This is a kind of operator scheme of brand-new picture mosaic, greatly simplify reciprocal process, thus makes this minority's function of existing picture mosaic become a popular application to become possibility.This is highly beneficial for the customer group expanding this type of application.
Fig. 3 shows a kind of according to an embodiment of the invention structural drawing realizing the device of picture splicing.As shown in Figure 3, this device 300 realizing picture splicing comprises: template base unit 301, picture extraction unit 302, matching unit 303 and jigsaw puzzle units 304.
Template base unit 301 is suitable for preserving multiple puzzle template.
Picture extraction unit 302 is suitable for extracting from figure film source specifying the picture of number and preserving, and classifies, notify matching unit 303 after obtaining classification results to preserved each picture; Picture extraction unit 302 is also suitable for when receiving the notice of matching unit 303, the picture of predetermined number is deleted from preserved picture, or the picture obtaining predetermined number from figure film source is again preserved, then classification is re-started to preserved picture, classification results is notified matching unit 303.
Matching unit 303 is suitable for when receiving the classification results that picture extraction unit 302 notifies, the puzzle template mated with classification results is searched from template base unit 301, if do not find the puzzle template of coupling, then send notice to picture extraction unit 302, if find the puzzle template of more than one coupling, then therefrom select a puzzle template, by selected puzzle template notice jigsaw puzzle units 304.
Jigsaw puzzle units 304 is suitable for each picture preserved in picture extraction unit 302 to overlap by type in each picture frame of using in puzzle template that matching unit 303 notifies, generates spliced picture.
In figure 3, picture extraction unit 302 is suitable for classifying according to size and horizontal figure and/or perpendicular figure to preserved each picture, obtains the number of the number of the horizontal figure of often kind of size and/or the perpendicular figure of often kind of size, and notifies matching unit.
In figure 3, matching unit 303 is suitable for when receiving the number of the number of horizontal figure of often kind of size of picture extraction unit notice and/or the perpendicular figure of often kind of size, the horizontal picture frame number of searching correspondingly-sized from template base unit is more than or equal to the horizontal figure number of the correspondingly-sized of picture extraction unit notice, and/or the perpendicular picture frame number of correspondingly-sized is more than or equal to the puzzle template of the perpendicular figure number of the correspondingly-sized of acquiring unit notice.
In figure 3, picture extraction unit 302 is suitable for extracting from local figure film source or in the database of server end specifying the picture of number and preserving.
Fig. 4 shows a kind of according to an embodiment of the invention composition frame chart of picture processing system.As shown in Figure 4, this picture processing system comprises: one or more realize picture splicing device 300 and one or more figure film source.Wherein, one or more in figure film source are the picture database 401 of local figure film source 402 or server end.Local figure film source 402 can be specifically the file of this locality arranged, and comprises picture in this file.Illustrate picture database 401 and a local figure film source 402 that three realize device 300, two server ends of picture splicing in Fig. 4, but this can not as the restriction of the number of the ingredient to the picture processing system in the present invention.
See Fig. 4, realize picture splicing device 300 be embodiment illustrated in fig. 3 described in realize picture splicing device, its function and composition structure see description above, no longer repeat here.
The device 300 realizing picture splicing can extract picture by wired or wireless mode from the picture database 401 of server end, therefore uses its annexation of dotted line in the diagram.The device 300 realizing picture splicing also can extract picture from local figure film source 402, and the solid line annexation in Fig. 4 represents local and obtains.
Fig. 5 shows the effect schematic diagram of the picture mosaic adopting the solution of the present invention to realize.See Fig. 5, adopt the method realizing picture splicing, device and the picture processing system in the present invention, all can realize intelligent adaptation picture and template, generate the picture mosaic shown in Fig. 5.In the picture mosaic shown in Fig. 5, the picture frame perfect matching in picture and template, does not have picture by the problem of excessive cutting, does not more need user manually to adjust.
Method and apparatus of the present invention can be applied in the various client for user.Such as can be applied in PC computer, smart mobile phone, panel computer and other mobile terminals.In addition, client preferably can be connected by cable network or wireless network with picture library server various on internet, for accessing and obtaining image data.Client also can access the picture stored in local folders, correspondingly realizes technical scheme of the present invention.
In sum, according to this picture extracting appointment number from figure film source of the present invention, the each picture obtained is classified, obtains classification results, comprise the template base of multiple puzzle template from what preset the puzzle template searched and mate with described classification results, if do not find the puzzle template of coupling, then from the picture obtained, delete the picture of predetermined number, or the picture obtaining predetermined number from figure film source is again increased in the picture obtained, returns the described step that each picture obtained is classified, if find the puzzle template of more than one coupling, then from the puzzle template of described more than one coupling, select a puzzle template, the each picture obtained is overlapped by type in each picture frame used in selected puzzle template, generate the technical scheme of spliced picture, intelligent adaptation picture and template can be realized, generate spliced picture, solve the problem can only showing single picture in the application such as the setting of existing desktop and lantern slide broadcasting thus, and need manually coupling picture and template when adopting the template provided to carry out picture mosaic, the problem taken time and effort.
It should be noted that:
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In instructions provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary array mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that and microprocessor or digital signal processor (DSP) can be used in practice to realize according to the some or all functions of some or all parts in the device realizing picture splicing of the embodiment of the present invention and picture processing system.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.