Abstract:
A picture synthesis method and apparatus, an instant messaging method and a picture synthesis server/device are disclosed. The method comprises: after at least two pictures to be synthesized are acquired, determining a visual center of each of the pictures to be synthesized; cutting the corresponding pictures to be synthesized in accordance with the visual center of each of the pictures to be synthesized and a first set specification; and synthesizing all of the cut pictures to be synthesized to obtain a synthesized picture. Due to full consideration of the visual center of each of the pictures to be synthesized, a visual effect of the finally obtained synthesized picture is ensured, thereby improving the user experience.

Description:
CROSS REFERENCE TO RELATED PATENT APPLICATIONS 
       [0001]    This application claims priority to and is a continuation of PCT Patent Application No. PCT/CN2016/076695 filed on 18 Mar. 2016, and is related to and claims priority to Chinese Patent Application No. 201510159422.8, filed on Apr. 3, 2015, entitled “Picture Synthesis Method and Apparatus, Instant Messaging Method and Picture Synthesis Server,” which are hereby incorporated by reference in their entirety. 
     
    
     TECHNICAL FIELD 
       [0002]    The present disclosure relates to the technological field of picture processing, and particularly, to picture synthesis methods and apparatuses, instant communication methods, and picture synthesis servers. 
       BACKGROUND 
       [0003]    Along with the rapid development of multimedia technologies, user demands for processing pictures have also increased. Picture processing includes picture clipping, picture color change, picture synthesis, etc. Picture synthesis refers to presenting multiple pictures to be combined in a background wall to obtain a combined picture, and thus achieving a goal of presenting the multiple pictures to be combined in a single combined picture. An existing picture synthesis method is described in detail herein. 
         [0004]    According to an existing picture synthesis method, at least two pictures to be combined are obtained. Each picture to be combined is proportionally compressed in size according to a size of a background wall. Each reduced-size picture to be combined is pasted in the background wall at a specific location to obtain a combined picture, thus completing a combination of multiple pictures. This method only performs simple proportional compression and pasting for each picture to be combined, without considering a visual center of a combined picture. The combined picture obtained thereby has a very poor visual effect, and seriously affects the experience of a user. 
       SUMMARY 
       [0005]    This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify all key features or essential features of the claimed subject matter, nor is it intended to be used alone as an aid in determining the scope of the claimed subject matter. The term “techniques,” for instance, may refer to device(s), system(s), method(s) and/or computer-readable instructions as permitted by the context above and throughout the present disclosure. 
         [0006]    Embodiments of the present disclosure provide a method and an apparatus of picture synthesis, an instant communication method, and a picture synthesis server, to solve the existence of the problem of poor visual effects of a combined picture which seriously affect user experience in existing technologies. 
         [0007]    According to the embodiments of the present disclosure, a picture synthesis method is provided, which includes obtaining at least two pictures to be combined; determining a visual center of each picture to be combined; tailoring a corresponding picture to be combined according to the visual center of each picture to be combined and a first set specification; and combining each tailored picture to be combined to obtain a combined picture. 
         [0008]    In implementations, determining the visual center of each picture to be combined may include dividing a respective picture to be combined into sub-pictures having a size of a second set specification for each picture to be combined; calculating a set target identification value for each sub-picture using a set target identification algorithm; and clustering each sub-picture to obtain a visual center of the respective picture to be combined based on the set target recognition value of each sub-picture and a clustering algorithm. 
         [0009]    In implementations, the method further includes storing each tailored picture to be combined into a picture bank; assigning a universal resource locator (URL) to storing each tailored picture to be combined; and storing the URL of each tailored picture to be combined into a distributed database. 
         [0010]    In implementations, combining each tailored picture to be combined to obtain the combined picture may include obtaining the URL of each tailored picture to be combined from the distributed database; obtaining the respective tailored picture to be combined from the picture bank based on the URL of each tailored picture to be combined; and combining each tailored picture to be combined to obtain the combined picture. 
         [0011]    In implementations, the method further includes keeping tracking of a time duration of an existence of the combined picture; determining whether the time duration of existence is greater than a set time period; destroying the combined picture in response to determining that the time of existence is greater than the set time period. 
         [0012]    According to the embodiments of the present disclosure, a picture synthesis apparatus is also provided, which includes an acquisition unit configured to obtain at least two pictures to be combined; a determination unit configured to determine a visual center of each picture to be combined; a tailoring unit configured to tailor a corresponding picture to be combined according to the visual center of each picture to be combined and a first set specification; and a combination unit configured to combine each tailored picture to be combined to obtain a combined picture. 
         [0013]    In implementations, the determination unit, which is configured to determine the visual center of each picture to be combined, may be configured to divide a respective picture to be combined into sub-pictures having a size of a second set specification for each picture to be combined, calculate a set target identification value for each sub-picture using a set target identification algorithm, and cluster each sub-picture to obtain a visual center of the respective picture to be combined based on the set target recognition value of each sub-picture and a clustering algorithm. 
         [0014]    In implementations, the apparatus further include a first storage unit configured to store each tailored picture to be combined into a picture bank; an assigning unit configured to assign a universal resource locator (URL) to storing each tailored picture to be combined; and a second storage unit configured to store the URL of each tailored picture to be combined into a distributed database. 
         [0015]    In implementations, the combination unit, which is configured to combine each tailored picture to be combined to obtain the combined picture, may be configured to obtain the URL of each tailored picture to be combined from the distributed database, obtain the respective tailored picture to be combined from the picture bank based on the URL of each tailored picture to be combined, and combine each tailored picture to be combined to obtain the combined picture. 
         [0016]    In implementations, the apparatus further includes a time tracking unit configured to keep tracking of a time duration of an existence of the combined picture; a detection unit configured to determine whether the time duration of existence is greater than a set time period; a destroying unit configured to destroy the combined picture in response to determining that the time of existence is greater than the set time period. 
         [0017]    According to the embodiments of the present disclosure, an instant communication method is further provided, which includes separately receiving pictures to be combined from at least two clients that conduct an instant communication; determining a visual center of each picture to be combined; tailoring a corresponding picture to be combined according to the visual center of each picture to be combined and a first set specification; combining each tailored picture to be combined to obtain a combined picture; separately sending the combined picture to the at least two clients, to cause the at least two clients to present the combined picture. 
         [0018]    According to the embodiments of the present disclosure, a picture synthesis server is further provided. At least two clients conduct an instant communications via the picture synthesis server. The picture synthesis server includes a receiving unit configured to separately receive pictures to be combined from at least two clients that conduct an instant communication; a determination unit configured to determine a visual center of each picture to be combined; a tailoring unit configured to tailor a corresponding picture to be combined according to the visual center of each picture to be combined and a first set specification; a combination unit configured to combine each tailored picture to be combined to obtain a combined picture; a sending unit configured to separately send the combined picture to the at least two clients, to cause the at least two clients to present the combined picture. 
         [0019]    The present disclosure provides a method and an apparatus of picture synthesis, an instant communication method, and a picture synthesis server. After obtaining at least two pictures to be combined, a visual center of each picture to be combined is determined. A respective picture to be combined is tailored according to the visual center of each picture to be combined and a first set specification. The tailored pictures to be combined are combined to form a combined picture. In this solution, when combining at least two pictures to be combined, a visual center of each picture to be combined is determined. Tailoring is then performed according to the visual center and a first set specification, and the tailored pictures to be combined are combined. Since a visual center of each picture to be combined has been fully taken into consideration, a visual effect of a combined picture that is obtained is ensured, thus improving the experience of a user. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0020]    Accompanying drawings described herein are provided to enable a further understanding of the present disclosure, and are constituted as a portion of the present disclosure. Illustrative embodiments of the present disclosure and descriptions thereof are used for describing the present disclosure, and are not to be construed as improper limitations to the present disclosure. In the accompanying drawings: 
           [0021]      FIG. 1  shows a flowchart of a picture synthesis method in accordance with the embodiments of the present disclosure. 
           [0022]      FIG. 2  shows a structural diagram of a first picture synthesis apparatus in accordance with the embodiments of the present disclosure. 
           [0023]      FIG. 3  shows a structural diagram of a second picture synthesis apparatus in accordance with the embodiments of the present disclosure. 
           [0024]      FIG. 4  shows a structural diagram of a third picture synthesis apparatus in accordance with the embodiments of the present disclosure. 
           [0025]      FIG. 5  shows a flowchart of an instant communication method in accordance with the embodiments of the present disclosure. 
           [0026]      FIG. 6  shows a structural diagram of a picture synthesis server in accordance with the embodiments of the present disclosure. 
       
    
    
     DETAILED DESCRIPTION 
       [0027]    In order to facilitate understanding of the technical problems to be solved by the present disclosure, and the technical solutions and beneficial effects, the present disclosure is described in further detail hereinafter in conjunction with the accompanying drawings and the embodiments. It should be noted that the specific embodiments described herein are merely used for describing the present disclosure, and are not used as limitations to the present disclosure. 
         [0028]    In order to solve the existence of the problem of poor visual effects of a combined picture which seriously affect user experience in existing technologies, the embodiments of the present disclosure provide a picture synthesis method  100  as shown in  FIG. 1 . The method  100  can be, but is not limited to being, applied in a terminal or a picture synthesis server/device. As shown in  FIG. 1 , the method  100  may include the following operations. 
         [0029]    S 102  obtains at least two pictures to be combined. 
         [0030]    When combining pictures, original pictures are needed first. These original pictures may be called as pictures to be combined. The number of pictures to be combined may be two or more, e.g., two, three, four, etc. 
         [0031]    S 104  determines a visual center of each picture to be combined. 
         [0032]    A visual center is the most intense and most important portion of a picture to be combined. A determination of a visual center of each picture to be combined is to ensure to obtain a crux for visual effects of a combined picture. 
         [0033]    S 106  tailors a corresponding picture to be combined according to the visual center of each picture to be combined and a first set specification. 
         [0034]    Generally, when the pictures to be combined are combined, a specification for each picture to be combined is configured first. A first set specification may be defined. First set specifications of the pictures to be combined may be the same or different, and may be set up according to actual needs. When each picture to be combined is tailored, the visual center of each picture to be combined may be set as the center. A picture to be combined may be clipped to become a picture having a size as a first set specification, and thus tailoring the picture to be combined is achieved. In implementations, tailoring a picture may include clipping, cropping, or resizing (e.g., shrinking) the picture, for example. 
         [0035]    An optional method includes starting two threads, one thread being used for storing each obtained picture to be combined to facilitate subsequent uses, and another thread being used for performing S 104  and S 106  to determine the visual center of each picture to be combined and to tailor the pictures to be combined. 
         [0036]    S 108  combines each tailored picture to be combined to obtain a combined picture. 
         [0037]    In this operation, a preset background wall may be used when pictures are combined. Each tailored picture is pasted at a corresponding position to obtain a combined picture. Alternatively, each tailored picture is pasted at a corresponding position according to requirements defined by a user to obtain a combined picture. 
         [0038]    In this solution, a visual center of each picture to be combined is determined when at least two pictures to be combined are combined. Tailoring is performed according to the visual center and a first set specification, and each tailored picture to be combined is combined. Since a visual center of each picture to be combined has been fully taken into consideration, a visual effect of a combined picture that is obtained is ensured, thus improving the experience of a user. 
         [0039]    The above operations are described in further detail hereinafter. 
         [0040]    In implementations, determining the visual center of each picture to be combined at S 104  may include for each picture to be combined, dividing a current picture to be combined into sub-pictures having a size of a second set specification; calculating a set target identification value for each sub-picture using a set target identification algorithm; and clustering each sub-picture to obtain a visual center of the current picture to be combined based on the set target recognition value of each sub-picture and a clustering algorithm. 
         [0041]    The pictures to be combined can be successively selected for determining respective visual centers, and a currently selected picture to be combined is the current picture to be combined. 
         [0042]    When determining a visual center of a current picture to be combined, the current picture to be combined is needed to be divided first, and may be divided into sub-pictures of a size of a second set specification. The second set specification may be defined according to actual needs, and may be, for example, 256×256, 256×128, 1080×512, etc. 
         [0043]    Defined target(s) is/are then identified from each sub-picture. A set target recognition algorithm is used for calculating a defined target identification value of each sub-picture. Defined target(s) may include a human face, an object, a building, a scene, etc. Different recognition algorithms are used for different defined targets. For example, when the defined target is a human face, a human face recognition algorithm may be used for calculating a human face identification value. When the defined target is a tie, a tie recognition algorithm may be used for calculating a tie identification value. 
         [0044]    Finally, clustering may be performed on the sub-pictures according to respective set target identification values of the sub-pictures using a clustering algorithm. Accordingly, a visual center of the current picture to be combined is determined. A know clustering algorithm, such as K-means clustering algorithm, may be used for performing clustering. 
         [0045]    In an optional implementation, based on a picture synthesis as shown in  FIG. 1 , the method further includes storing each tailored picture to be combined into a picture bank; assigning a universal resource locator (URL) to storing each tailored picture to be combined; and storing the URL of each tailored picture to be combined into a distributed database. 
         [0046]    Correspondingly, combining each tailored picture to be combined to obtain the combined picture at S 108  may include obtaining the URL of each tailored picture to be combined from the distributed database; obtaining the respective tailored picture to be combined from the picture bank based on the URL of each tailored picture to be combined; and combining each tailored picture to be combined to obtain the combined picture. 
         [0047]    In order to use each tailored picture to be combined easily, each tailored picture to be combined may be stored in a picture bank. The picture bank stores a number of tailored pictures to be combined. Each picture to be combined is assigned with a URL. The URL is stored in a distributed database. The distributed database stores URLs of tailored pictures to be combined. Correspondingly, when combining tailored pictures to be combined, URLs of the tailored pictures to be combined are obtained from the distributed database, and the tailored pictures to be combined are obtained from the picture bank based on the URLs. As such, the process of determining visual centers of the tailored pictures to be combined and the process of tailoring can be skipped, thus saving the time of picture synthesis and improving the efficiency of the picture synthesis. 
         [0048]    In implementations, based on a picture synthesis as shown in  FIG. 1 , the method further includes timing a duration of existence of the combined picture; determining whether the duration of existence is greater than a set time period; destroying the combined picture in response to determining that the time of existence is greater than the set time period. 
         [0049]    In order to ensure the security of the combined picture, a time duration of existence of the combined picture is counted, and a detection is made as to whether the duration of existence is greater than a defined time period. In response to detecting that the duration of existence is greater than the defined time period, the combined picture may be destroyed. The defined time period can ensure the maximum period of time that a user can view the combined picture. A value of the defined time period can be set up according to actual needs, and can be set up as 10 seconds, 15 seconds, 20 seconds, for example. 
         [0050]    Based on the same innovative concept, the embodiments of the present disclosure provide a picture synthesis apparatus  200  as shown in  FIG. 2 . In implementations, the apparatus  200  may be deployed in a picture synthesis server (or device), or a terminal. In other implementations, the apparatus  200  may include a computing device, such as a terminal, or may be a portion of a computing device. By way of example and not limitations, the apparatus  200  may include one or more processors  202 , an input/output interface  204 , a network interface  206 , and memory  208 . 
         [0051]    The memory  208  may include a form of computer readable media such as a volatile memory, a random access memory (RAM) and/or a non-volatile memory, for example, a read-only memory (ROM) or a flash RAM. The memory  208  is an example of a computer readable media. 
         [0052]    The computer readable media may include a volatile or non-volatile type, a removable or non-removable media, which may achieve storage of information using any method or technology. The information may include a computer-readable instruction, a data structure, a program module or other data. Examples of computer storage media include, but not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electronically erasable programmable read-only memory (EEPROM), quick flash memory or other internal storage technology, compact disk read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission media, which may be used to store information that may be accessed by a computing device. As defined herein, the computer readable media does not include transitory media, such as modulated data signals and carrier waves. 
         [0053]    In implementations, the memory  208  may include program units  210  and program data  212 . The program units  210  may include an acquisition unit  214 , a determination unit  216 , a tailoring unit  218  and a combination unit  220 . 
         [0054]    The acquisition unit  214  is configured to obtain at least two pictures to be combined. The determination unit  216  is configured to determine a visual center of each picture to be combined. The tailoring unit  218  is configured to tailor a corresponding picture to be combined according to the visual center of each picture to be combined and a first set specification. The combination unit  220  is configured to combine each tailored picture to be combined to obtain a combined picture. 
         [0055]    In this solution, a visual center of each picture to be combined is determined when at least two pictures to be combined are combined. Tailoring is performed according to the visual center and a first set specification, and each tailored picture to be combined is combined. Since a visual center of each picture to be combined has been fully taken into consideration, a visual effect of a combined picture that is obtained is ensured, thus improving the experience of a user. 
         [0056]    In implementations, the determination unit  216 , which is configured to determine the visual center of each picture to be combined, may be configured to divide a respective picture to be combined into sub-pictures having a size of a second set specification for each picture to be combined, calculate a set target identification value for each sub-picture using a set target identification algorithm, and cluster each sub-picture to obtain a visual center of the respective picture to be combined based on the set target recognition value of each sub-picture and a clustering algorithm. 
         [0057]      FIG. 3  shows a structural diagram of a second picture synthesis apparatus  300  in accordance with the embodiments of the present disclosure. In implementations, the apparatus  300  may include one or more processors  202 , an input/output interface  204 , a network interface  206 , and memory  208 . In implementations, the memory  208  may include program units  210  and program data  212 . The program units  210  may include an acquisition unit  214 , a determination unit  216 , a tailoring unit  218  and a combination unit  220 . Details of these units can be found in the foregoing description, and are not repeatedly described herein. 
         [0058]    In implementations, the apparatus  300  may further include a first storage unit  302 , an assigning unit  304 , and a second storage unit  306 . 
         [0059]    The first storage unit  302  is configured to store each tailored picture to be combined into a picture bank. The assigning unit  304  is configured to assign a URL to storing each tailored picture to be combined. The second storage unit  306  is configured to store the URL of each tailored picture to be combined into a distributed database. 
         [0060]    In implementations, the combination unit  220 , which is configured to combine each tailored picture to be combined to obtain the combined picture, may be configured to obtain the URL of each tailored picture to be combined from the distributed database, obtain the respective tailored picture to be combined from the picture bank based on the URL of each tailored picture to be combined, and combine each tailored picture to be combined to obtain the combined picture. 
         [0061]      FIG. 4  shows a structural diagram of a third picture synthesis apparatus  400  in accordance with the embodiments of the present disclosure. In implementations, the apparatus  400  may include one or more processors  202 , an input/output interface  204 , a network interface  206 , and memory  208 . In implementations, the memory  208  may include program units  210  and program data  212 . The program units  210  may include an acquisition unit  214 , a determination unit  216 , a tailoring unit  218  and a combination unit  220 . Details of these units can be found in the foregoing description, and are not repeatedly described herein. 
         [0062]    In implementations, the apparatus  400  may further include a time tracking unit  402 , a detection unit  404 , and a destroying unit  406 . 
         [0063]    The time tracking unit  402  is configured to keep track of a duration of existence of the combined picture. The detection unit  404  is configured to determine whether the duration of existence is greater than a set time period. The destroying unit  406  is configured to destroy the combined picture in response to determining that the duration of existence is greater than the set time period. 
         [0064]    A method and an apparatus of picture synthesis are described above. Based on the same concept, the embodiments of the present disclosure further provide an instant communication method  500 . The method  500  may be applied in a picture synthesis server/device. At least two clients can conduct an instant communication with each other via the picture synthesis server/device. As shown in  FIG. 5 , the method  500  may include includes the following. 
         [0065]    S 502  separately receives pictures to be combined from at least two clients that conduct an instant communication. 
         [0066]    Along with the rapid development of networking technologies, the number of social applications increases daily. Commonly used applications include QQ, WeChat, Fetion, Alitalk, etc. Multiple users can use these applications for conducting communications, thus achieving instant communications among multiple users of different places. Currently, an increasing number of users select to use applications (which are abbreviated as clients herein) of client terminals to share private information, e.g., personal photos, scenery photos, pet photos, etc. In order to protect private information of a user, the picture synthesis server/device will not directly send a picture to other clients after receiving the picture from a client conducting instant communications with the other clients. Rather, the picture synthesis server/device performs sending after combining pictures sent by various client terminals that conduct instant communications with each other. Since pictures sent by various clients that conduct instant communications with each other are to be combined, these pictures can be treated as pictures to be combined. These pictures to be combined may not need to reach the picture synthesis server/device at the same time. Therefore, the picture synthesis server/device will individually receive pictures to be combined from clients that conduct instant communications with each other. 
         [0067]    It should be noted that a user needs to provide picture(s) to be combined first when using a client to send the picture(s) to be combined to the picture synthesis server/device. There are a number of different ways of provision. For example, the user may select picture(s) to be combined from a local album, or capture image(s) to obtain picture(s) to be combined using an image capturing device deployed on a terminal, and send the picture(s) to be combined from the client to the picture synthesis server/device. 
         [0068]    S 504  determines a visual center of each picture to be combined. 
         [0069]    A description of this operation can be referenced to the description of S 102 . 
         [0070]    S 506  tailors a corresponding picture to be combined according to the visual center of each picture to be combined and a first set specification. 
         [0071]    A description of this operation can be referenced to the description of S 104 . 
         [0072]    S 508  combines each tailored picture to be combined to obtain a combined picture. 
         [0073]    A description of this operation can be referenced to the description of S 13 . 
         [0074]    S 510  separately sends the combined picture to the at least two clients, to cause the at least two clients to present the combined picture. 
         [0075]    Continuing with the above example, the picture synthesis server/device combines all pictures to be combined that are received. The number of pictures to be combined is at least two, and may be two, three, four, etc. The combined picture is then separately sent to the at least two clients that conducts instant communications with each other. Each client may present the combined picture to facilitate browsing by a user thereof. 
         [0076]    In this solution, after combining pictures to be combined that are sent by at least two clients conducting instant communications, the picture synthesis server/device sends a combined picture to each client. The combined picture includes the pictures to be combined that are sent by the at least two clients conducting instant communications. In other words, users, who conduct instant communications with each other, share pictures of other parties only after sharing pictures of their own. Therefore, respective privacy of the users who conduct the instant communications can be protected. 
         [0077]    Based on the same innovative concept, the embodiments of the present disclosure further provide a picture synthesis server/device  600  as shown in  FIG. 6 . At least two clients conduct instant communications via the picture synthesis server/device  600 . In implementations, the picture synthesis server  600  may include a computing device, or may be a portion of a computing device. By way of example and not limitations, the picture synthesis server/device  600  may include one or more processors  602 , an input/output interface  604 , a network interface  606 , and memory  608 . The memory  608  is an example of a computer readable media as described in the foregoing description. 
         [0078]    In implementations, the memory  608  may include program units  610  and program data  612 . The program units  610  may include a receiving unit  614 , a determination unit  616 , a tailoring unit  618 , a combination unit  620 , and a sending unit  622 . 
         [0079]    The receiving unit  614  is configured to separately receive pictures to be combined from at least two clients that conduct an instant communication. 
         [0080]    The determination unit  616  is configured to determine a visual center of each picture to be combined. 
         [0081]    The tailoring unit  618  is configured to tailor a corresponding picture to be combined according to the visual center of each picture to be combined and a first set specification. 
         [0082]    The combination unit  620  is configured to combine each tailored picture to be combined to obtain a combined picture. 
         [0083]    The sending unit  622  is configured to separately send the combined picture to the at least two clients, to cause the at least two clients to present the combined picture. 
         [0084]    In this solution, after combining pictures to be combined that are sent by at least two clients conducting instant communications, the picture synthesis server/device sends a combined picture to each client. The combined picture includes the pictures to be combined that are sent by the at least two clients conducting instant communications. In other words, users, who conduct instant communications with each other, share pictures of other parties only after sharing pictures of their own. Therefore, respective privacy of the users who conduct the instant communications can be protected. 
         [0085]    Exemplary embodiments of the present disclosures are illustrated and described above. However, as described above, the present disclosure should not be limited to the forms described in the current specification, and should not be construed as excluding other embodiments. The present disclosure can be used in other combinations, modifications and environments, and can be changed within the creative scope of the present disclosure based on technologies and knowledge of related fields or the foregoing teachings. Changes and variations made by one skill in the art that are not outside the spirit and scope of the present disclosure shall fall in the scope of protection of the appended claims of the present disclosure.