WO2016155515A1 - 图片合成方法、装置及即时通信方法、图片合成服务器 - Google Patents
图片合成方法、装置及即时通信方法、图片合成服务器 Download PDFInfo
- Publication number
- WO2016155515A1 WO2016155515A1 PCT/CN2016/076695 CN2016076695W WO2016155515A1 WO 2016155515 A1 WO2016155515 A1 WO 2016155515A1 CN 2016076695 W CN2016076695 W CN 2016076695W WO 2016155515 A1 WO2016155515 A1 WO 2016155515A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- picture
- synthesized
- combined
- composited
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—Two-dimensional [2D] image generation
- G06T11/60—Creating or editing images; Combining images with text
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Definitions
- the present application relates to the field of image processing technologies, and in particular, to a picture synthesis method, device, instant communication method, and picture synthesis server.
- Image processing includes image cropping, image color changing, image synthesis, and the like.
- the image synthesis is to synthesize and display a plurality of pictures to be combined in a background wall to obtain a composite picture, thereby achieving the purpose of displaying a plurality of pictures to be combined in one composite picture.
- the existing image synthesis method will be described in detail below.
- each image to be composited is compressed in an equal proportion according to the size of the background wall, and each compressed image to be composited is pasted in the set position of the background wall.
- the embodiment of the present invention provides a picture synthesizing method, a device, an instant communication method, and a picture synthesizing server, which are used to solve the problem that the visual effect of the synthesized picture existing in the prior art is poor and seriously affects the user experience.
- a method for synthesizing a picture including:
- determining a visual center of each picture to be synthesized includes:
- a clustering operation is performed on each sub-picture according to the set target identification value and the clustering algorithm of each sub-picture to obtain a visual center of the current picture to be synthesized.
- it also includes:
- the clipped URL of each image to be composited is saved in a distributed database.
- each of the to-be-composed images after the cropping is synthesized, and a composite image is obtained, which specifically includes:
- it also includes:
- a picture synthesizing apparatus including:
- An obtaining unit configured to obtain at least two images to be combined
- a determining unit for determining a visual center of each picture to be combined
- a cropping unit configured to crop a corresponding picture to be synthesized according to a visual center of each picture to be combined and a first setting specification
- the synthesizing unit is configured to synthesize each of the cropped pictures to be combined to obtain a composite picture.
- the determining unit is configured to determine a visual center of each picture to be synthesized, specifically for:
- a clustering operation is performed on each sub-picture according to the set target identification value and the clustering algorithm of each sub-picture to obtain a visual center of the current picture to be synthesized.
- it also includes:
- a first saving unit configured to save each of the cropped images to be combined in a picture bank
- An allocating unit configured to allocate a uniform resource locator URL for each of the to-be-composited pictures after the cropping
- the second saving unit is configured to save the clipped URL of each image to be synthesized in a distributed database.
- the synthesizing unit is configured to synthesize each picture to be synthesized after the cropping, to obtain a composite picture, specifically for:
- it also includes:
- timing unit configured to time the duration of the presence of the composite picture
- a detecting unit configured to detect whether the existing duration exceeds a set duration
- a destroying unit configured to: if the detecting unit detects that the existing duration exceeds the set duration, destroying the composite picture.
- an instant communication method including:
- a picture synthesizing server is further provided, where at least two clients perform instant communication through the picture synthesizing server, where the picture synthesizing server includes:
- a receiving unit configured to separately receive a to-be-composited picture sent by the at least two clients
- a determining unit for determining a visual center of each picture to be combined
- a cropping unit configured to crop a corresponding picture to be synthesized according to a visual center of each picture to be combined and a first setting specification
- a synthesizing unit configured to synthesize each of the cropped images to be combined to obtain a composite image
- a sending unit configured to separately send the composite picture to the at least two clients, so that the at least two The client displays the composite picture.
- the embodiment of the present invention provides a picture synthesizing method, device, and instant communication method, and a picture synthesizing server. After acquiring at least two pictures to be synthesized, determining a visual center of each picture to be synthesized; according to a visual center of each picture to be synthesized The picture to be combined corresponding to the first setting specification cropping; synthesizing each of the to-be-composed pictures after the cropping to obtain a composite picture.
- the visual center of each picture to be combined is determined, and then the cropping is performed according to the visual center and the first setting specification, and finally each picture to be composited is cut. The synthesis is performed, and since the visual center of each picture to be synthesized is fully taken into consideration, the visual effect of the finally obtained composite picture is ensured, thereby improving the user experience.
- FIG. 1 is a flowchart of a method for synthesizing pictures according to an embodiment of the present application
- FIG. 2 is a schematic structural diagram of a first picture synthesizing apparatus according to an embodiment of the present application
- FIG. 3 is a schematic structural diagram of a second picture synthesizing apparatus according to an embodiment of the present application.
- FIG. 4 is a schematic structural diagram of a third picture synthesizing apparatus in the embodiment of the present application.
- FIG. 5 is a flowchart of an instant messaging method according to an embodiment of the present application.
- FIG. 6 is a schematic structural diagram of a picture synthesizing server according to an embodiment of the present application.
- the embodiment of the present application provides a picture synthesizing method, which may be, but is not limited to, being applied to a terminal or a picture synthesizing server.
- the process of the method is shown in FIG. 1 , and specifically includes the following steps:
- the original pictures are first needed, and these original pictures can be called pictures to be combined.
- the number of images to be combined should be more than two, and it can be two, three, four, and so on.
- the visual center is the strongest and most important part of the picture to be synthesized, and the visual center of each picture to be synthesized is determined. It is the key to ensuring the visual effect of the resulting composite picture. Therefore, after acquiring the picture to be synthesized, it is necessary to determine the visual center of each picture to be combined.
- the specification of each picture to be combined is preset, which may be defined as a first setting specification, and the first setting specification of each picture to be combined may be the same or different, specifically Set according to actual needs.
- the picture to be combined is cut, the picture to be combined is cut into a picture whose size is the first setting specification, and the picture to be combined is tailored.
- An optional way is to start two threads, one thread is used to store each picture to be synthesized for subsequent use; another thread is used to execute S12 and S13, determine the visual center of the picture to be synthesized, and Crop the composite image.
- a preset background wall can be used, and each of the cropped pictures can be pasted in the corresponding position to obtain a composite picture; each picture after cropping can also be customized according to the user's custom requirements. Paste in the corresponding position to get a composite picture.
- the visual center of each picture to be combined is determined, and then the cropping is performed according to the visual center and the first setting specification, and finally each picture to be composited is cut.
- the synthesis is performed, and since the visual center of each picture to be synthesized is fully taken into consideration, the visual effect of the finally obtained composite picture is ensured, thereby improving the user experience.
- the determining, in the foregoing S12, the visual center of each picture to be synthesized includes:
- each sub-picture is clustered to obtain a visual center of the current picture to be synthesized.
- the picture to be synthesized may be selected to determine the visual center, and the currently selected picture to be synthesized is the current picture to be combined.
- the current picture to be combined needs to be divided first, and may be divided into sub-pictures whose size is the second setting specification, and the second setting specification may be set according to actual needs, for example, Can be 256 * 256, 256 * 128, 1080 * 512 and so on.
- the target recognition is performed for each sub-picture, and the set target recognition value is calculated by setting the target recognition algorithm, and the set target can be a face, an item, a building, a landscape, etc., when the target is different.
- the recognition algorithm used may also be different. For example, when the target is set to face, the face recognition algorithm may be used to calculate the face recognition value; when the target is set to tie, the tie recognition algorithm may be used to calculate the tie recognition value.
- a clustering algorithm can be used to cluster each sub-picture according to the set target recognition value of each sub-picture, thereby determining the visual center of the current picture to be synthesized, and the existing clustering algorithm can be used for clustering operation.
- Kmeans clustering algorithm Kmeans clustering algorithm and so on.
- An optional implementation manner based on the image synthesis shown in FIG. 1, further includes:
- the clipped URL of each image to be composited is saved in a distributed database.
- each of the to-be-composited pictures in the S14 is synthesized to obtain a composite picture, which specifically includes:
- each cropped image to be composited may be saved in the image bank, and the plurality of cropped images to be composited are saved in the image bank; then a URL is assigned to each image to be composited.
- the URL is stored in the distributed data, and the distributed database stores the URL of the clipped to-be-composited image saved in the image bank; correspondingly, each of the to-be-composited images after the trimming can be firstly Obtaining the URL of each clipped image to be synthesized in the distributed database, and then obtaining the cropped image to be synthesized according to the URL to the image bank, thereby eliminating the process of determining the visual center of the image to be combined and the cropping process, thereby It can save picture synthesis time and improve picture synthesis efficiency.
- An optional implementation manner based on the image synthesis shown in FIG. 1, further includes:
- the timing is the maximum length of time that the user can see the composite picture.
- the length of the set time can be based on the actual size. Need to set, for example, can be set to 10 seconds, 15 seconds, 20 seconds, and so on.
- the embodiment of the present application further provides a picture synthesizing device, which may be configured in a picture synthesizing server, or may be disposed in a terminal.
- the structure of the device is as shown in FIG. 2, including an obtaining unit 21, and determining Unit 22, crop unit 23 and synthesis unit 24, wherein:
- the obtaining unit 21 is configured to acquire at least two pictures to be combined.
- the determining unit 22 is configured to determine a visual center of each picture to be synthesized.
- the cutting unit 23 is configured to crop the corresponding picture to be combined according to the visual center of each picture to be combined and the first setting specification.
- the synthesizing unit 24 is configured to synthesize each of the cropped pictures to be combined to obtain a composite picture.
- the visual center of each picture to be combined is determined, and then the cropping is performed according to the visual center and the first setting specification, and finally each picture to be composited is cut.
- the synthesis is performed, and since the visual center of each picture to be synthesized is fully taken into consideration, the visual effect of the finally obtained composite picture is ensured, thereby improving the user experience.
- the determining unit 22 is configured to determine a visual center of each picture to be synthesized, specifically for:
- each sub-picture is clustered to obtain a visual center of the current picture to be synthesized.
- FIG. 3 is a schematic structural diagram of a second picture synthesizing apparatus according to an embodiment of the present application. The same unit as that of FIG. 2 is omitted. On the basis of FIG. 2, the first saving unit 25 and the allocating unit are further included. 26 and a second saving unit 27, wherein:
- the first saving unit 25 is configured to save each of the cropped images to be merged in the picture bank;
- the foregoing allocation unit 26 is configured to allocate a URL for each of the to-be-composited pictures after the cropping;
- the second saving unit 27 is configured to save the clipped URL of each picture to be synthesized in a distributed database.
- the synthesizing unit 24 is configured to synthesize each picture to be synthesized after the cropping, to obtain a composite picture, specifically for:
- FIG. 4 is a schematic structural diagram of a third picture synthesizing apparatus according to an embodiment of the present application. The same unit as that of FIG. 2 is omitted. On the basis of FIG. 2, a timing unit 28, a detecting unit 29, and Destruction unit 30, wherein:
- the timing unit 28 is configured to time the duration of the presence of the synthesized picture
- the detecting unit 29 is configured to detect whether the existing duration exceeds a set duration
- the destruction unit 30 is configured to destroy the composite picture if the detection unit detects that the presence time exceeds the set duration.
- the embodiment of the present application further provides an instant communication method, which can be applied to a picture synthesis server, and at least two clients can perform instant communication through the picture synthesis server.
- the flow of the method is shown in FIG. 5, and specifically includes the following:
- S51 Receive a picture to be synthesized sent by at least two clients that perform instant communication with each other.
- the client's application hereinafter referred to as the client
- private information such as personal photos, landscape photos, pet photos, etc.
- the image synthesizing server receives each other. After the picture sent by one client for instant communication is not directly sent to other clients, the pictures sent by each client that communicates with each other in real time are synthesized and then sent, because they need to communicate with each other instantaneously.
- the pictures sent by each client are combined, and these pictures can be used as pictures to be combined.
- the pictures to be synthesized do not necessarily arrive at the picture composition server at the same time. Therefore, the picture composition server separately receives the pictures to be combined sent by each client that performs instant communication with each other.
- the user when the user sends a to-be-composited picture to the picture composition server, the user needs to provide the picture to be synthesized first.
- the user can select at least one picture to be synthesized from the local album of the terminal. You can also use the camera set on the terminal to take a picture to get the picture to be combined, and then use the client to send the picture to be combined to the picture composition server.
- S53 Crop the corresponding picture to be synthesized according to the visual center of each picture to be synthesized and the first setting specification.
- S55 Send the composite picture to at least two clients separately, so that at least two clients display the composite picture.
- the image composition server synthesizes all the to-be-composited pictures received, and at least two pictures to be combined, specifically two, three, four, etc.; then the composite pictures are sent to each other. At least two clients of instant messaging, each client can display the composite picture for the user to browse.
- the picture synthesizing server synthesizes the to-be-composited pictures sent by at least two clients that perform instant communication with each other and sends them to each client, and the composite picture includes the to-be-composited picture sent by each client that performs instant communication with each other. That is to say, each user who performs instant communication with each other can share the picture of another person after sharing the respective picture, so that the privacy of each user who performs instant communication with each other can be well protected.
- the embodiment of the present application further provides a picture synthesizing server, where at least two clients perform instant communication through a picture synthesizing server.
- the structure of the picture synthesizing server is as shown in FIG. 6 , and includes a receiving unit 61 and a determining unit 62. , a cropping unit 63, a synthesizing unit 64, and a transmitting unit 65, wherein:
- the receiving unit 61 is configured to receive the to-be-composited picture sent by at least two clients respectively.
- the determining unit 62 is configured to determine a visual center of each picture to be synthesized
- the cutting unit 63 is configured to crop a corresponding picture to be combined according to a visual center of each picture to be combined and a first setting specification
- the synthesizing unit 64 is configured to synthesize each of the cropped pictures to be combined to obtain a composite picture
- the sending unit 65 is configured to separately send the composite picture to the at least two clients, so that at least two clients display the composite picture.
- the picture synthesizing server synthesizes the to-be-composited pictures sent by at least two clients that perform instant communication with each other and sends them to each client, and the composite picture includes the to-be-composited picture sent by each client that performs instant communication with each other. That is to say, each user who performs instant communication with each other can share the picture of another person after sharing the respective picture, so that the privacy of each user who performs instant communication with each other can be well protected.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Editing Of Facsimile Originals (AREA)
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
提供了一种图片合成方法、装置及即时通信方法、图片合成服务器,该方法包括:在获取至少两张待合成图片后,确定每张待合成图片的视觉中心;按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片;合成裁剪后的每张待合成图片,得到合成图片。该方案中,在对至少两张待合成图片进行合成时,会确定每张待合成图片的视觉中心,然后根据视觉中心和第一设定规格进行裁剪,最后将剪裁后的每张待合成图片进行合成,由于充分考虑到每张待合成图片的视觉中心,从而确保最终得到的合成图片的视觉效果,进而提升用户体验。
Description
本申请涉及图片处理技术领域,尤其涉及一种图片合成方法、装置及即时通信方法、图片合成服务器。
随着多媒体技术的飞速发展,用户对于图片处理的需求也日益增多,图片处理包括图片裁剪、图片换色、图片合成等等。其中,图片合成是将多张待合成图片合成显示在一个背景墙中,得到合成图片,从而达到在一张合成图片中显示多张待合成图片的目的。下面详细介绍现有的图片合成方法。
按照现有的图片合成方法,获取至少两张待合成图片,将每张待合成图片根据背景墙大小进行等比例压缩,将压缩后的每张待合成图片粘贴在背景墙的设定位置中,得到合成图片,从而完成多张图片合成。该方法只是对每张待合成图片进行简单地等比例压缩和粘贴,并没有考虑到待合成图片的视觉中心,这样得到的合成图片的视觉效果很差,严重影响用户体验。
发明内容
本申请实施例提供一种图片合成方法、装置及即时通信方法、图片合成服务器,用以解决现有技术中存在的合成图片的视觉效果很差,严重影响用户体验的问题。
根据本申请实施例,提供一种图片合成方法,包括:
获取至少两张待合成图片;
确定每张待合成图片的视觉中心;
按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片;
合成裁剪后的每张待合成图片,得到合成图片。
具体的,确定每张待合成图片的视觉中心,具体包括:
针对每张待合成图片,执行:
将当前待合成图片分割成大小为第二设定规格的子图片;
采用设定目标识别算法计算每张子图片的设定目标识别值;
根据每张子图片的设定目标识别值和聚类算法对每张子图片进行聚类运算,得到所述当前待合成图片的视觉中心。
可选的,还包括:
将裁剪后的每张待合成图片保存在图片银行中;
为裁剪后的每张待合成图片分配统一资源定位符URL;
将裁剪后的每张待合成图片的URL保存在分布式数据库中。
具体的,合成裁剪后的每张待合成图片,得到合成图片,具体包括:
从所述分布式数据库中获取裁剪后的每张待合成图片的URL;
根据裁剪后的每张待合成图片的URL从所述图片银行中获取对应的裁剪后的待合成图片;
合成获取的裁剪后的每张待合成图片,得到合成图片。
可选的,还包括:
对得到所述合成图片后的存在时长进行计时;
检测所述存在时长是否超过设定时长;
若检测到所述存在时长超过所述设定时长,则销毁所述合成图片。
根据本申请实施例,还提供一种图片合成装置,包括:
获取单元,用于获取至少两张待合成图片;
确定单元,用于确定每张待合成图片的视觉中心;
裁剪单元,用于按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片;
合成单元,用于合成裁剪后的每张待合成图片,得到合成图片。
具体的,所述确定单元,用于确定每张待合成图片的视觉中心,具体用于:
针对每张待合成图片,执行:
将当前待合成图片分割成大小为第二设定规格的子图片;
采用设定目标识别算法计算每张子图片的设定目标识别值;
根据每张子图片的设定目标识别值和聚类算法对每张子图片进行聚类运算,得到所述当前待合成图片的视觉中心。
可选的,还包括:
第一保存单元,用于将裁剪后的每张待合成图片保存在图片银行中;
分配单元,用于为裁剪后的每张待合成图片分配统一资源定位符URL;
第二保存单元,用于将裁剪后的每张待合成图片的URL保存在分布式数据库中。
具体的,所述合成单元,用于合成裁剪后的每张待合成图片,得到合成图片,具体用于:
从所述分布式数据库中获取裁剪后的每张待合成图片的URL;
根据裁剪后的每张待合成图片的URL从所述图片银行中获取对应的裁剪后的待合成图片;
合成获取的裁剪后的每张待合成图片,得到合成图片。
可选的,还包括:
计时单元,用于对得到所述合成图片后的存在时长进行计时;
检测单元,用于检测所述存在时长是否超过设定时长;
销毁单元,用于若所述检测单元检测到所述存在时长超过所述设定时长,则销毁所述合成图片。
根据本申请实施例,还提供一种即时通信方法,包括:
分别接收相互进行即时通信的至少两个客户端发送的待合成图片;
确定每张待合成图片的视觉中心;
按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片;
合成裁剪后的每张待合成图片,得到合成图片;
将所述合成图片分别发送给所述至少两个客户端,以使所述至少两个客户端展示所述合成图片。
根据本申请实施例,还提供一种图片合成服务器,至少两个客户端通过所述图片合成服务器进行即时通信,所述图片合成服务器包括:
接收单元,用于分别接收所述至少两个客户端发送的待合成图片;
确定单元,用于确定每张待合成图片的视觉中心;
裁剪单元,用于按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片;
合成单元,用于合成裁剪后的每张待合成图片,得到合成图片;
发送单元,用于将所述合成图片分别发送给所述至少两个客户端,以使所述至少两个
客户端展示所述合成图片。
本申请实施例提供一种图片合成方法、装置及即时通信方法及图片合成服务器,在获取至少两张待合成图片后,确定每张待合成图片的视觉中心;按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片;合成裁剪后的每张待合成图片,得到合成图片。该方案中,在对至少两张待合成图片进行合成时,会确定每张待合成图片的视觉中心,然后根据视觉中心和第一设定规格进行裁剪,最后将剪裁后的每张待合成图片进行合成,由于充分考虑到每张待合成图片的视觉中心,从而确保最终得到的合成图片的视觉效果,进而提升用户体验。
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1为本申请实施例中一种图片合成方法的流程图;
图2为本申请实施例中第一种图片合成装置的结构示意图;
图3为本申请实施例中第二种图片合成装置的结构示意图;
图4为本申请实施例中第三种图片合成装置的结构示意图;
图5为本申请实施例中一种即时通信方法的流程图;
图6为本申请实施例中一种图片合成服务器的结构示意图。
为了使本申请所要解决的技术问题、技术方案及有益效果更加清楚、明白,以下结合附图和实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
为了解决现有技术中存在的合成图片的视觉效果很差,严重影响用户体验的问题,本申请实施例提供一种图片合成方法,该方法可以但不限于应用在终端或者图片合成服务器中,该方法的流程如图1所示,具体包括如下步骤:
S11:获取至少两张待合成图片。
在对图片进行合成时,首先需要原始图片,这些原始图片可以称为待合成图片。待合成图片的数量应该在两张以上,可以为两张、三张、四张等等。
S12:确定每张待合成图片的视觉中心。
视觉中心是待合成图片中最强烈、最主要的部分,确定出每张待合成图片的视觉中心
是确保最终得到的合成图片的视觉效果的关键所在,因此,在获取待合成图片后,必须要确定每张待合成图片的视觉中心。
S13:按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片。
通常,在对待合成图片进行合成时,会预先设定每张待合成图片的规格,可以定义为第一设定规格,每张待合成图片的第一设定规格可以相同也可以不同,具体可以依据实际需要进行设定。在剪裁每张待合成图片时,可以该待合成图片的视觉中心为中心,将该待合成图片剪裁成大小为第一设定规格的图片,从而实现对该待合成图片进行剪裁。
一种可选的方式为,启动两个线程,一个线程用于存储获取的每张待合成图片,以便于后续使用;另一个线程用于执行S12和S13,确定待合成图片的视觉中心,并对待合成图片进行裁剪。
S14:合成裁剪后的每张待合成图片,得到合成图片。
在该步骤中,合成图片时可以使用预先设定的背景墙,将裁剪后的每张图片粘贴在对应的位置,得到合成图片;也可以根据用户的自定义需求,将裁剪后的每张图片粘贴在对应的位置,得到合成图片。
该方案中,在对至少两张待合成图片进行合成时,会确定每张待合成图片的视觉中心,然后根据视觉中心和第一设定规格进行裁剪,最后将剪裁后的每张待合成图片进行合成,由于充分考虑到每张待合成图片的视觉中心,从而确保最终得到的合成图片的视觉效果,进而提升用户体验。
下面进一步详细描述上述各个步骤。
具体的,上述S12中的确定每张待合成图片的视觉中心,具体包括:
针对每张待合成图片,执行:
将当前待合成图片分割成大小为第二设定规格的子图片;
采用设定目标识别算法计算每张子图片的设定目标识别值;
根据每张子图片的设定目标识别值和聚类算法对每张子图片进行聚类运算,得到当前待合成图片的视觉中心。
可以依次选取待合成图片确定视觉中心,当前选取的待合成图片为当前待合成图片。
在确定当前待合成图片的视觉中心时,首先需要将当前待合成图片进行分割,具体可以分割成大小为第二设定规格的子图片,第二设定规格可以根据实际需要进行设定,例如可以为256*256、256*128、1080*512等等。
然后对每张子图片进行设定目标识别,采用设定目标识别算法计算每张子图片的设定目标识别值,设定目标可以为人脸、物品、建筑、风景等等,设定目标不同时,采用的识别算法也可能不同,例如,设定目标为人脸时,可以采用人脸识别算法计算人脸识别值;设定目标为领带时,可以采用领带识别算法计算领带识别值。
最后可以采用聚类算法根据每张子图片的设定目标识别值对每张子图片进行聚类运算,从而确定出当前待合成图片的视觉中心,可以采用已有的聚类算法进行聚类运算,例如Kmeans聚类算法等等。
一种可选的实施方式,在如图1所示的图片合成的基础上,还包括:
将裁剪后的每张待合成图片保存在图片银行中;
为裁剪后的每张待合成图片分配统一资源定位符(Uniform Resource Locator,URL);
将裁剪后的每张待合成图片的URL保存在分布式数据库中。
相应地,上述S14中的合成裁剪后的每张待合成图片,得到合成图片,具体包括:
从分布式数据库中获取裁剪后的每张待合成图片的URL;
根据裁剪后的每张待合成图片的URL从图片银行中获取对应的裁剪后的待合成图片;
合成获取的裁剪后的每张待合成图片,得到合成图片。
为了便于后续使用裁剪后的待合成图片,可以将裁剪后的每张待合成图片保存在图片银行中,图片银行中保存多张裁剪后的待合成图片;然后为每张待合成图片分配一个URL,该URL保存在分布式数据中,分布式数据库中保存的是在图片银行中保存的裁剪后的待合成图片的URL;相应地,在合成剪裁后的每张待合成图片时,可以首先从分布式数据库中获取裁剪后的每张待合成图片的URL,然后根据该URL到图片银行中获取裁剪后的待合成图片,这样就可以省去确定待合成图片的视觉中心以及裁剪的过程,从而可以节省图片合成时间,提高图片合成效率。
一种可选的实施方式,在如图1所示的图片合成的基础上,还包括:
对得到合成图片后的存在时长进行计时;
检测存在时长是否超过设定时长;
若检测到存在时长超过设定时长,则销毁合成图片。
为了保证合成图片的安全性,还可以对得到合成图片后的存在时长进行计时,并检测存在时长是否超过设定时长,当检测到存在时长超过设定时长后,可以销毁该合成图片,该设定时长是可以确保用户能够看到合成图片的最大时长,设定时长的大小可以根据实际
需要进行设定,例如可以设定为10秒、15秒、20秒等等。
基于同一发明构思,本申请实施例还提供的一种图片合成装置,该装置可以设置图片合成服务器中,也可以设置在终端中,该装置的结构如2图所示,包括获取单元21、确定单元22、裁剪单元23和合成单元24,其中:
上述获取单元21,用于获取至少两张待合成图片。
上述确定单元22,用于确定每张待合成图片的视觉中心。
上述裁剪单元23,用于按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片。
上述合成单元24,用于合成裁剪后的每张待合成图片,得到合成图片。
该方案中,在对至少两张待合成图片进行合成时,会确定每张待合成图片的视觉中心,然后根据视觉中心和第一设定规格进行裁剪,最后将剪裁后的每张待合成图片进行合成,由于充分考虑到每张待合成图片的视觉中心,从而确保最终得到的合成图片的视觉效果,进而提升用户体验。
具体的,上述确定单元22,用于确定每张待合成图片的视觉中心,具体用于:
针对每张待合成图片,执行:
将当前待合成图片分割成大小为第二设定规格的子图片;
采用设定目标识别算法计算每张子图片的设定目标识别值;
根据每张子图片的设定目标识别值和聚类算法对每张子图片进行聚类运算,得到当前待合成图片的视觉中心。
如图3所示为本申请实施例的第二种图片合成装置的结构示意图,该装置与图2相同的单元省略不表,在图2的基础上,还包括第一保存单元25、分配单元26和第二保存单元27,其中:
上述第一保存单元25,用于将裁剪后的每张待合成图片保存在图片银行中;
上述分配单元26,用于为裁剪后的每张待合成图片分配URL;
上述第二保存单元27,用于将裁剪后的每张待合成图片的URL保存在分布式数据库中。
具体的,上述合成单元24,用于合成裁剪后的每张待合成图片,得到合成图片,具体用于:
从分布式数据库中获取裁剪后的每张待合成图片的URL;
根据裁剪后的每张待合成图片的URL从图片银行中获取对应的裁剪后的待合成图片;
合成获取的裁剪后的每张待合成图片,得到合成图片。
如图4所示为本申请实施例的第三种图片合成装置的结构示意图,该装置与图2相同的单元省略不表,在图2的基础上,还包括计时单元28、检测单元29和销毁单元30,其中:
上述计时单元28,用于对得到合成图片后的存在时长进行计时;
上述检测单元29,用于检测存在时长是否超过设定时长;
上述销毁单元30,用于若检测单元检测到存在时长超过设定时长,则销毁合成图片。
以上介绍了图片合成方法和装置,基于同一发明构思,本申请实施例还提供一种即时通信方法,该方法可以应用在图片合成服务器中,至少两个客户端可以通过该图片合成服务器进行即时通信,该方法的流程如图5所示,具体包括如下:
S51:分别接收相互进行即时通信的至少两个客户端发送的待合成图片。
随着网络技术的飞速发展,社交类的应用程序日益增多,常用的有QQ、微信、飞信、阿里旺旺等等,多个用户之间可以使用这些应用程序进行交流,实现处于异地的多个用户之间的即时通信。目前,越来越多的用户选择使用客户端的应用程序(以下简称客户端)分享隐私信息,例如个人照片、风景照片、宠物照片等等,为了保护用户的隐私信息,图片合成服务器在接收到相互进行即时通信的一个客户端发送的图片后,不会直接发送给其他的客户端,而是将相互进行即时通信的各个客户端发送的图片进行合成后再发送,由于要对相互进行即时通信的各个客户端发送的图片进行合成,这些图片可以作为待合成图片。这些待合成图片不一定会同时到达图片合成服务器,因此,图片合成服务器会分别接收相互进行即时通信的各个客户端发送的待合成图片。
需要说明的是,用户使用客户端向图片合成服务器发送待合成图片时,需要首先提供待合成图片,提供的方式有很多种,例如,用户可以从终端本地的相册中选取至少一张待合成图片,也可以使用终端上设置的摄像装置拍摄图片得到待合成图片,然后再使用客户端将待合成图片发送给图片合成服务器。
S52:确定每张待合成图片的视觉中心。
该步骤的描述参见S11的描述。
S53:按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片。
该步骤的描述参见S12的描述。
S54:合成裁剪后的每张待合成图片,得到合成图片。
该步骤的描述参见S23的描述。
S55:将合成图片分别发送给至少两个客户端,以使至少两个客户端展示合成图片。
继续沿用上例,图片合成服务器将接收到的所有的待合成图片进行合成,待合成图片至少两张,具体可以是两张、三张、四张等等;然后将合成图片分别发送给相互进行即时通信的至少两个客户端,每个客户端可以显示该合成图片,以便于用户进行浏览。
该方案中,图片合成服务器将相互进行即时通信的至少两个客户端发送的待合成图片进行合成后发送给各个客户端,合成图片中包括相互进行即时通信的每个客户端发送的待合成图片,也就是说相互进行即时通信的各个用户共享各自的图片后才能共享他人的图片,从而可以很好地保护相互进行即时通信的每个用户的隐私。
基于同一发明构思,本申请实施例还提供一种图片合成服务器,至少两个客户端通过图片合成服务器进行即时通信,该图片合成服务器的结构如图6所示,包括接收单元61、确定单元62、裁剪单元63、合成单元64和发送单元65,其中:
上述接收单元61,用于分别接收至少两个客户端发送的待合成图片;
上述确定单元62,用于确定每张待合成图片的视觉中心;
上述裁剪单元63,用于按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片;
上述合成单元64,用于合成裁剪后的每张待合成图片,得到合成图片;
上述发送单元65,用于将合成图片分别发送给至少两个客户端,以使至少两个客户端展示所述合成图片。
该方案中,图片合成服务器将相互进行即时通信的至少两个客户端发送的待合成图片进行合成后发送给各个客户端,合成图片中包括相互进行即时通信的每个客户端发送的待合成图片,也就是说相互进行即时通信的各个用户共享各自的图片后才能共享他人的图片,从而可以很好地保护相互进行即时通信的每个用户的隐私。
上述说明示出并描述了本申请的优选实施例,但如前所述,应当理解本申请并非局限于本文所披露的形式,不应看作是对其他实施例的排除,而可用于各种其他组合、修改和环境,并能够在本文所述发明构想范围内,通过上述教导或相关领域的技术或知识进行改动。而本领域人员所进行的改动和变化不脱离本申请的精神和范围,则都应在本申请所附权利要求的保护范围内。
Claims (12)
- 一种图片合成方法,其特征在于,包括:获取至少两张待合成图片;确定每张待合成图片的视觉中心;按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片;合成裁剪后的每张待合成图片,得到合成图片。
- 如权利要求1所述的方法,其特征在于,确定每张待合成图片的视觉中心,具体包括:针对每张待合成图片,执行:将当前待合成图片分割成大小为第二设定规格的子图片;采用设定目标识别算法计算每张子图片的设定目标识别值;根据每张子图片的设定目标识别值和聚类算法对每张子图片进行聚类运算,得到所述当前待合成图片的视觉中心。
- 如权利要求1所述的方法,其特征在于,还包括:将裁剪后的每张待合成图片保存在图片银行中;为裁剪后的每张待合成图片分配统一资源定位符URL;将裁剪后的每张待合成图片的URL保存在分布式数据库中。
- 如权利要求3所述的方法,其特征在于,合成裁剪后的每张待合成图片,得到合成图片,具体包括:从所述分布式数据库中获取裁剪后的每张待合成图片的URL;根据裁剪后的每张待合成图片的URL从所述图片银行中获取对应的裁剪后的待合成图片;合成获取的裁剪后的每张待合成图片,得到合成图片。
- 如权利要求1-4任一所述的方法,其特征在于,还包括:对得到所述合成图片后的存在时长进行计时;检测所述存在时长是否超过设定时长;若检测到所述存在时长超过所述设定时长,则销毁所述合成图片。
- 一种图片合成装置,其特征在于,包括:获取单元,用于获取至少两张待合成图片;确定单元,用于确定每张待合成图片的视觉中心;裁剪单元,用于按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片;合成单元,用于合成裁剪后的每张待合成图片,得到合成图片。
- 如权利要求6所述的装置,其特征在于,所述确定单元,用于确定每张待合成图片的视觉中心,具体用于:针对每张待合成图片,执行:将当前待合成图片分割成大小为第二设定规格的子图片;采用设定目标识别算法计算每张子图片的设定目标识别值;根据每张子图片的设定目标识别值和聚类算法对每张子图片进行聚类运算,得到所述当前待合成图片的视觉中心。
- 如权利要求6所述的装置,其特征在于,还包括:第一保存单元,用于将裁剪后的每张待合成图片保存在图片银行中;分配单元,用于为裁剪后的每张待合成图片分配统一资源定位符URL;第二保存单元,用于将裁剪后的每张待合成图片的URL保存在分布式数据库中。
- 如权利要求8所述的装置,其特征在于,所述合成单元,用于合成裁剪后的每张待合成图片,得到合成图片,具体用于:从所述分布式数据库中获取裁剪后的每张待合成图片的URL;根据裁剪后的每张待合成图片的URL从所述图片银行中获取对应的裁剪后的待合成图片;合成获取的裁剪后的每张待合成图片,得到合成图片。
- 如权利要求6-9任一所述的装置,其特征在于,还包括:计时单元,用于对得到所述合成图片后的存在时长进行计时;检测单元,用于检测所述存在时长是否超过设定时长;销毁单元,用于若所述检测单元检测到所述存在时长超过所述设定时长,则销毁所述合成图片。
- 一种即时通信方法,其特征在于,包括:分别接收相互进行即时通信的至少两个客户端发送的待合成图片;确定每张待合成图片的视觉中心;按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片;合成裁剪后的每张待合成图片,得到合成图片;将所述合成图片分别发送给所述至少两个客户端,以使所述至少两个客户端展示所述合成图片。
- 一种图片合成服务器,至少两个客户端通过所述图片合成服务器进行即时通信,其特征在于,所述图片合成服务器包括:接收单元,用于分别接收所述至少两个客户端发送的待合成图片;确定单元,用于确定每张待合成图片的视觉中心;裁剪单元,用于按照每张待合成图片的视觉中心和第一设定规格裁剪对应的待合成图片;合成单元,用于合成裁剪后的每张待合成图片,得到合成图片;发送单元,用于将所述合成图片分别发送给所述至少两个客户端,以使所述至少两个客户端展示所述合成图片。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017551682A JP6681917B2 (ja) | 2015-04-03 | 2016-03-18 | 画像合成の方法及び装置、インスタント通信方法、ならびに画像合成サーバ |
| US15/721,405 US10388051B2 (en) | 2015-04-03 | 2017-09-29 | Picture synthesis method and apparatus, instant communication method, and picture synthesis server |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510159422.8 | 2015-04-03 | ||
| CN201510159422.8A CN106157235A (zh) | 2015-04-03 | 2015-04-03 | 图片合成方法、装置及即时通信方法、图片合成服务器 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US15/721,405 Continuation US10388051B2 (en) | 2015-04-03 | 2017-09-29 | Picture synthesis method and apparatus, instant communication method, and picture synthesis server |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016155515A1 true WO2016155515A1 (zh) | 2016-10-06 |
Family
ID=57003874
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/076695 Ceased WO2016155515A1 (zh) | 2015-04-03 | 2016-03-18 | 图片合成方法、装置及即时通信方法、图片合成服务器 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US10388051B2 (zh) |
| JP (1) | JP6681917B2 (zh) |
| CN (1) | CN106157235A (zh) |
| WO (1) | WO2016155515A1 (zh) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106157235A (zh) * | 2015-04-03 | 2016-11-23 | 阿里巴巴集团控股有限公司 | 图片合成方法、装置及即时通信方法、图片合成服务器 |
| CN109639883B (zh) * | 2018-11-20 | 2021-01-22 | 维沃移动通信有限公司 | 一种主题的推荐方法和移动终端 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4305991B2 (ja) * | 1999-02-15 | 2009-07-29 | 株式会社日立メディコ | 画像表示装置 |
| CN102881032A (zh) * | 2012-09-14 | 2013-01-16 | 北京理工大学 | 一种基于改进算法的图片拼接方法 |
| CN103198073A (zh) * | 2012-01-06 | 2013-07-10 | 腾讯科技(深圳)有限公司 | 图片处理方法及系统 |
Family Cites Families (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| FI97665C (fi) * | 1995-11-21 | 1997-01-27 | Planmed Oy | Menetelmät ja laitteet kohteen kuvantamisessa |
| JP4305591B2 (ja) | 2000-05-19 | 2009-07-29 | ネッツエスアイ東洋株式会社 | Atmネットワークのセルシェーピング装置 |
| JP2005006133A (ja) * | 2003-06-13 | 2005-01-06 | Fuji Photo Film Co Ltd | 画像処理装置、画像処理方法、及び画像処理プログラム |
| EP1648181A1 (en) * | 2004-10-12 | 2006-04-19 | Dialog Semiconductor GmbH | A multiple frame grabber |
| JP2006146775A (ja) * | 2004-11-24 | 2006-06-08 | Fuji Photo Film Co Ltd | 画像データのクラスタリング装置および方法,ならびに画像データのクラスタリング・プログラム |
| CN100514365C (zh) * | 2007-01-15 | 2009-07-15 | 浙江大学 | 多张人脸照片自动合成方法 |
| KR101603791B1 (ko) * | 2009-03-18 | 2016-03-17 | 삼성전자주식회사 | 파노라마의 생성 방법 |
| CN102075661A (zh) * | 2009-11-23 | 2011-05-25 | 鸿富锦精密工业(深圳)有限公司 | 具有图片合成功能的系统及方法 |
| CN102737243B (zh) * | 2011-03-31 | 2015-06-17 | 富士通株式会社 | 获取多幅图像的描述信息的方法及装置与图像匹配方法 |
| US9491366B2 (en) * | 2013-02-01 | 2016-11-08 | Htc Corporation | Electronic device and image composition method thereof |
| CN103810490B (zh) * | 2014-02-14 | 2017-11-17 | 海信集团有限公司 | 一种确定人脸图像的属性的方法和设备 |
| KR101946019B1 (ko) * | 2014-08-18 | 2019-04-22 | 삼성전자주식회사 | 파노라믹 동영상을 생성하는 동영상 처리 장치 및 그 방법 |
| CN106157235A (zh) * | 2015-04-03 | 2016-11-23 | 阿里巴巴集团控股有限公司 | 图片合成方法、装置及即时通信方法、图片合成服务器 |
| US9870503B2 (en) * | 2015-12-31 | 2018-01-16 | International Business Machines Corporation | Visual object and event detection and prediction system using saccades |
-
2015
- 2015-04-03 CN CN201510159422.8A patent/CN106157235A/zh active Pending
-
2016
- 2016-03-18 WO PCT/CN2016/076695 patent/WO2016155515A1/zh not_active Ceased
- 2016-03-18 JP JP2017551682A patent/JP6681917B2/ja active Active
-
2017
- 2017-09-29 US US15/721,405 patent/US10388051B2/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4305991B2 (ja) * | 1999-02-15 | 2009-07-29 | 株式会社日立メディコ | 画像表示装置 |
| CN103198073A (zh) * | 2012-01-06 | 2013-07-10 | 腾讯科技(深圳)有限公司 | 图片处理方法及系统 |
| CN102881032A (zh) * | 2012-09-14 | 2013-01-16 | 北京理工大学 | 一种基于改进算法的图片拼接方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| US10388051B2 (en) | 2019-08-20 |
| JP6681917B2 (ja) | 2020-04-15 |
| JP2018513631A (ja) | 2018-05-24 |
| CN106157235A (zh) | 2016-11-23 |
| US20180025523A1 (en) | 2018-01-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9055189B2 (en) | Virtual circular conferencing experience using unified communication technology | |
| US12254604B2 (en) | Systems and methods for media privacy | |
| CN104992096B (zh) | 一种数据保护方法及移动终端 | |
| EP3226514B1 (en) | Picture sharing method and apparatus, and terminal device | |
| KR20200042019A (ko) | 실시간 추적 보상 이미지 효과 | |
| US9954909B2 (en) | System and associated methodology for enhancing communication sessions between multiple users | |
| WO2015172359A1 (zh) | 一种对象搜索方法及装置 | |
| US11271940B1 (en) | Expanded mobile device content access | |
| CN104883583A (zh) | 一种获取在线视频截图的方法及装置 | |
| WO2017084325A1 (zh) | 信息共享方法及终端、存储介质 | |
| CN105979363A (zh) | 一种身份识别法和装置 | |
| WO2017071086A1 (zh) | 用于视频播放的方法及装置 | |
| CN108235054A (zh) | 一种直播视频数据的处理方法和装置 | |
| CN107977922A (zh) | 一种图像分析方法、装置及系统 | |
| TW201732733A (zh) | 圖片處理方法和裝置 | |
| WO2018133321A1 (zh) | 一种生成镜头信息的方法和装置 | |
| CN106940880A (zh) | 一种美颜处理方法、装置和终端设备 | |
| CN109389550B (zh) | 数据处理方法、装置和计算设备 | |
| WO2016155515A1 (zh) | 图片合成方法、装置及即时通信方法、图片合成服务器 | |
| CN109963106A (zh) | 一种视频图像处理方法、装置、存储介质及终端 | |
| TWI465912B (zh) | 電子裝置間建立連線之方法 | |
| US10576016B2 (en) | Methods and systems for managing photographic capture | |
| CN112559111B (zh) | 一种共享桌面时的截屏方法和装置 | |
| WO2021076300A1 (en) | Processing interaction requests with user specific data on a shared device | |
| CN106961511B (zh) | 一种图像处理方法及装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16771270 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2017551682 Country of ref document: JP Kind code of ref document: A |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16771270 Country of ref document: EP Kind code of ref document: A1 |