CN110115839A - Method and apparatus for generating picture - Google Patents

Method and apparatus for generating picture Download PDF

Info

Publication number
CN110115839A
CN110115839A CN201910398724.9A CN201910398724A CN110115839A CN 110115839 A CN110115839 A CN 110115839A CN 201910398724 A CN201910398724 A CN 201910398724A CN 110115839 A CN110115839 A CN 110115839A
Authority
CN
China
Prior art keywords
picture
block
image block
target photo
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910398724.9A
Other languages
Chinese (zh)
Inventor
陈日伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910398724.9A priority Critical patent/CN110115839A/en
Publication of CN110115839A publication Critical patent/CN110115839A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/63Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by the player, e.g. authoring using a level editor

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

Embodiment of the disclosure discloses the method and apparatus for generating picture.One specific embodiment of this method includes: to obtain the Target Photo for being divided into multiple images block;For each image block in multiple image block, selection and the matched picture of the image block from specified picture set, and the picture selected is attached to the image block the location of in Target Photo;Target Photo after textures is generated into new picture.The embodiment realizes stable picture pixels and spells map generalization, can make the overall effect of new picture generated close to corresponding to Target Photo without the original image of piecemeal.

Description

Method and apparatus for generating picture
Technical field
Embodiment of the disclosure is related to field of computer technology, and in particular to the method and apparatus for generating picture.
Background technique
Currently, the application of picture mosaic class, which can be used, in user carries out picture mosaic.Existing picture mosaic class application generally has fragment picture mosaic Function.For example, the application of picture mosaic class can show multiple fragments (alternatively referred to as image block) of a picture to user, user can be with Picture mosaic is completed by the way that each fragment in multiple fragment is put into suitable position.
Summary of the invention
Embodiment of the disclosure proposes the method and apparatus for generating picture.
In a first aspect, embodiment of the disclosure provides a kind of method for generating picture, comprising: acquisition is divided into The Target Photo of multiple images block;For each image block in multiple image block, chosen from specified picture set with The matched picture of the image block, and the picture selected is attached to the image block the location of in Target Photo;It will be through pasting Target Photo after figure generates new picture.
In some embodiments, Target Photo corresponds to original image;And obtain the target for being divided into multiple images block Picture, comprising: be based on target block number, piecemeal carried out to original image, using the original image after piecemeal as Target Photo.
In some embodiments, target block number is any one of following: preset block number is based on preset image block ruler The block number that very little and original image size determines.
In some embodiments, it for each image block in multiple image block, is selected from specified picture set Take with the matched picture of the image block, and the picture selected is attached to image block location in Target Photo Before, the above method further include: determine the average value of the pixel in the picture in picture set;And from specified picture set It chooses and the matched picture of the image block, comprising: the average value for determining the pixel in the image block is selected from picture set The average value of the included pixel picture same or similar with the average value of pixel included by the image block.
In some embodiments, the picture selected is attached to the image block the location of in Target Photo, comprising: By the size for being resized to the image block of the picture selected, picture of the size after adjusted is attached to the image block in mesh The location of mark on a map in piece.
Second aspect, embodiment of the disclosure provide it is a kind of for generating the device of picture, the device include: obtain it is single Member is configured to obtain the Target Photo for being divided into multiple images block;Textures unit is configured to for multiple image block In each image block, from specified picture set choose with the matched picture of the image block, and by the picture selected paste To the image block the location of in Target Photo;Generation unit is configured to generate through the Target Photo after textures new Picture.
In some embodiments, Target Photo corresponds to original image;And acquiring unit is further configured to: being based on mesh Block number is marked, piecemeal is carried out to original image, using the original image after piecemeal as Target Photo.
In some embodiments, target block number is any one of following: preset block number is based on preset image block ruler The block number that very little and original image size determines.
In some embodiments, textures unit is further configured to: determining the pixel in the picture in picture set Average value;For each image block in above-mentioned multiple images block, the average value of the pixel in the image block is determined, from pictures The average value of the included pixel picture same or similar with the average value of pixel included by the image block is selected in conjunction.
In some embodiments, textures unit is further configured to: for each image in above-mentioned multiple images block Block, by the size for being resized to the image block of the picture selected for the image block, by picture of the size after adjusted The image block is attached to the location of in Target Photo.
The third aspect, embodiment of the disclosure provide a kind of electronic equipment, which includes: one or more places Manage device;Storage device is stored thereon with one or more programs;When the one or more program is by the one or more processors It executes, so that the one or more processors realize the method as described in implementation any in first aspect.
Fourth aspect, embodiment of the disclosure provide a kind of computer-readable medium, are stored thereon with computer program, The method as described in implementation any in first aspect is realized when the program is executed by processor.
The method and apparatus provided by the above embodiment for generating picture of the disclosure are divided into multiple by acquisition The Target Photo of image block, then for each image block in multiple image block, chosen from specified picture set with The matched picture of the image block, and the picture selected is attached to the image block the location of in Target Photo, then will Target Photo after textures generates new picture, realizes stable picture pixels and spells map generalization, can make generated The overall effect of new picture close to corresponding to Target Photo without the original image of piecemeal.In addition, the above-mentioned implementation of the disclosure The scheme that example provides can enrich the jigsaw puzzle function of picture mosaic class application.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the disclosure is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that some embodiments of the present disclosure can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for generating picture of the disclosure;
Fig. 3 is the schematic diagram according to an application scenarios of the method for generating picture of the disclosure;
Fig. 4 is the flow chart according to another embodiment of the method for generating picture of the disclosure;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for generating picture of the disclosure;
Fig. 6 is adapted for the structural representation for the computer system for realizing the electronic equipment of some embodiments of the present disclosure Figure.
Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining that correlation is open, rather than the restriction to the disclosure.It also should be noted that in order to Convenient for description, is illustrated only in attached drawing and disclose relevant part to related.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the disclosure can phase Mutually combination.The disclosure is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the method for generating picture of the disclosure or the implementation of the device for generating picture The exemplary system architecture 100 of example.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications can be installed, such as web browser is answered on terminal device 101,102,103 With, picture mosaic class application etc..
Terminal device 101,102,103 can be hardware, be also possible to software.When terminal device 101,102,103 is hard When part, it can be various electronic equipments, including but not limited to smart phone, tablet computer, pocket computer on knee, desk-top meter Calculation machine etc..When terminal device 101,102,103 is software, may be mounted in above-mentioned cited electronic equipment.It can To be implemented as multiple softwares or software module (such as providing Distributed Services), single software or software also may be implemented into Module.It is not specifically limited herein.
Server 105 can be to provide the server of various services, such as to installing on terminal device 101,102,103 The application of picture mosaic class provides the background server supported, which for example can be in response to terminal device 101,102,103 The picture mosaic of transmission is requested, and carries out corresponding information processing based on picture mosaic request.
It should be noted that the method for generating picture that some embodiments of the present disclosure provide can be by terminal device 101, it 102,103 executes, can also be executed by server 105.Correspondingly, it can be set for generating the device of picture in terminal In equipment 101,102,103, also it can be set in server 105.
It should be pointed out that server can be hardware, it is also possible to software.When server is hardware, may be implemented At the distributed server cluster that multiple servers form, individual server also may be implemented into.It, can when server is software To be implemented as multiple softwares or software module (such as providing Distributed Services), single software or software also may be implemented into Module.It is not specifically limited herein.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, it illustrates the processes according to one embodiment of the method for generating picture of the disclosure 200.This is used to generate the process 200 of the method for picture, comprising the following steps:
Step 201, the Target Photo for being divided into multiple images block is obtained.
In the present embodiment, for generating the executing subject of the method for picture, to can be terminal device (such as shown in FIG. 1 Terminal device 101,102,103), be also possible to server (such as server 105 shown in FIG. 1).It can pacify on terminal device The picture mosaic class application supported equipped with server.It should be understood that picture mosaic class application refers to the application with jigsaw puzzle function, picture mosaic class is answered With the other function that can have in addition to picture mosaic, in some embodiments, the major function of picture mosaic class application is non-picture mosaic function Energy.
It should be noted that Target Photo can correspond to original image.The original image is the picture without piecemeal.When upper State executing subject be terminal device when, above-mentioned executing subject can be grasped in response to the picture mosaic related with the original image of user Make, piecemeal is carried out to the original image, and using the original image after piecemeal as Target Photo.
When above-mentioned executing subject be server when, above-mentioned executing subject can in response to terminal device send with above-mentioned original The related picture mosaic request of beginning picture, is requested based on the picture mosaic, obtains the Target Photo for being divided into multiple images block.For example, if Picture mosaic request includes Target Photo, and above-mentioned executing subject can obtain Target Photo from picture mosaic request.If the picture mosaic is asked It asks including above-mentioned original image, above-mentioned executing subject can carry out piecemeal to above-mentioned original image, and will be above-mentioned after piecemeal Original image is as Target Photo.
Step 202, it for each image block in multiple images block, is chosen and the image block from specified picture set Matched picture, and the picture selected is attached to the image block the location of in Target Photo.
In the present embodiment, above-mentioned executing subject is after getting and being divided into the Target Photo of multiple images block, for Each image block in multiple image block, above-mentioned executing subject can be chosen and the image block from specified picture set The picture matched, and the picture selected is attached to the image block the location of in Target Photo.Here, above-mentioned executing subject Such as corresponding zoom operations can be carried out to the picture, by the size for being resized to the image block of the picture, then Picture of the size after adjusted is attached to the image block the location of in Target Photo.
It should be noted that specified picture set, which can be user, is executing the picture set selected when picture mosaic operation, It is also possible to preset picture set, is not specifically limited herein.
In the present embodiment, for each image block in above-mentioned multiple images block, above-mentioned executing subject can use various Matching process is determined and the matched picture of the image block in above-mentioned picture set.For example, above-mentioned executing subject can use Perceptual hash algorithm (Perceptual HashAlgorithm, PHA), for every figure in the image block and above-mentioned picture set Piece generates corresponding fingerprint respectively, then carries out fingerprint comparison, then by finger corresponding to corresponding fingerprint and the image block The most like picture of line is determined as and the matched picture of the image block.Here, since perceptual hash algorithm is research extensively at present With the well-known technique of application, details are not described herein.
Step 203, the Target Photo after textures is generated into new picture.
In the present embodiment, the corresponding picture of above-mentioned multiple images block is being attached to Target Photo by above-mentioned executing subject On corresponding position after, the Target Photo after textures can be generated into new picture.The new picture is the picture being finally combined into, should The overall effect of new picture relatively above-mentioned original image.
With continued reference to the signal that Fig. 3, Fig. 3 are according to the application scenarios of the method for generating picture of the present embodiment Figure.Picture mosaic class application can be installed in the application scenarios of Fig. 3, on the smart phone of user A.User A can be in picture mosaic class It is selected as the photo B of the object of reference of the picture mosaic and collection of photographs C for carrying out picture mosaic in, then executes corresponding touching Hair operation is to send picture mosaic request to smart phone.Wherein, picture mosaic request may include photo B and collection of photographs C right respectively The mark answered.Smart phone can be requested in response to the picture mosaic, to photo B carry out piecemeal, and using the photo B after piecemeal as Target picture, as shown in label 301.Then, as shown in label 302, for each image block in target picture, smart phone Can be selected from collection of photographs C with the matched photo of the image block, and the photo is attached to the image block in target picture It is the location of middle.Then, as shown in label 303, the target picture after textures can be generated new photo D by smart phone. Hereafter, smart phone can for example show the new photo D of overall effect relatively photo B to user.
The method provided by the above embodiment of the disclosure is divided into the Target Photo of multiple images block by obtaining, and Afterwards for each image block in multiple image block, selection and the matched picture of the image block from specified picture set, And the picture selected is attached to the image block the location of in Target Photo, it is then that the Target Photo after textures is raw It at new picture, realizes stable picture pixels and spells map generalization, the overall effect of new picture generated can be made close Without the original image of piecemeal corresponding to Target Photo.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment of the method for generating picture.The use In the process 400 for the method for generating picture, comprising the following steps:
Step 401, it is based on target block number, piecemeal is carried out to original image, using the original image after piecemeal as target Picture.
In the present embodiment, for generating the executing subject of the method for picture, to can be terminal device (such as shown in FIG. 1 Terminal device 101,102,103), be also possible to server (such as server 105 shown in FIG. 1).It can pacify on terminal device The picture mosaic class application supported equipped with server.It should be understood that picture mosaic class application refers to the application with jigsaw puzzle function, picture mosaic class is answered With the other function that can have in addition to picture mosaic, in some embodiments, the major function of picture mosaic class application is non-picture mosaic function Energy.
It should be noted that for example to can be user selected as picture mosaic when executing picture mosaic operation for original image The picture of object of reference.When above-mentioned executing subject is terminal device, above-mentioned executing subject can be in response to the original with this of user Picture related picture mosaic operation, is based on target block number, carries out piecemeal to the original image, and by the original image after piecemeal As Target Photo.When above-mentioned executing subject be server when, above-mentioned executing subject can in response to terminal device send with The original image related picture mosaic request, is based on target block number, carries out piecemeal to the original image, and by the original after piecemeal Beginning, picture was as Target Photo.Here, picture mosaic request may include the original image.
In practice, target block number can be any one of following: preset block number, based on preset image block size with And the block number that the size of above-mentioned original image determines.When target block number is based on preset image block size and above-mentioned original graph When the block number that the size of piece determines, above-mentioned executing subject can first be based on preset image block size before executing step 401 And the size of above-mentioned original image calculates target block number.
Step 402, the average value of the pixel in the picture in specified picture set is determined.
In the present embodiment, for every picture in specified picture set, above-mentioned executing subject can determine the figure The average value of pixel in piece.Here, if the average value has precomputed, above-mentioned executing subject for example can be from local acquisition The average value precomputed.If the average value does not precompute, above-mentioned executing subject can calculate the average value.
It should be noted that specified picture set, which can be user, is executing the pictures selected when above-mentioned picture mosaic operation It closes, is also possible to preset picture set, is not specifically limited herein.
Step 403, for each image block in Target Photo, the average value of the pixel in the image block is determined, from figure The average value that included pixel is selected in piece set is same or similar with the average value of pixel included by the image block Picture, and the picture selected is attached to the image block the location of in Target Photo.
In the present embodiment, for each image block in Target Photo, above-mentioned executing subject can calculate the image The average value of pixel in block then selects average value and the image block institute of included pixel from above-mentioned picture set Including pixel the same or similar picture of average value, and the picture is attached to image block position locating in Target Photo It sets.Here, above-mentioned executing subject for example can carry out corresponding zoom operations to the picture, by being resized to for the picture Picture of the size after adjusted is then attached to the image block the location of in Target Photo by the size of the image block.
It should be noted that if there are included by the average value of included pixel and the image block in above-mentioned picture set Pixel the identical picture of average value, above-mentioned executing subject can select the picture.If being not present in above-mentioned picture set The picture, above-mentioned executing subject can select average value and the image block institute of included pixel from above-mentioned picture set Including pixel the immediate picture of average value.
Step 404, the Target Photo after textures is generated into new picture.
In the present embodiment, above-mentioned executing subject is attached to by the corresponding picture of each image block in Target Photo Behind corresponding position on Target Photo, the Target Photo after textures can be generated into new picture.
Figure 4, it is seen that the method for generating picture compared with the corresponding embodiment of Fig. 2, in the present embodiment Process 400 highlight to the acquisition methods of Target Photo and be extended with the choosing method of the matched picture of image block Step.The diversity of information processing may be implemented in the scheme of the present embodiment description as a result, and can make new figure generated The closer original image without piecemeal of the overall effect of piece.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, present disclose provides one kind for generating figure One embodiment of the device of piece, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically answer For in various electronic equipments.
As shown in figure 5, the present embodiment may include: that acquiring unit 501 is configured to for generating the device 500 of picture Obtain the Target Photo for being divided into multiple images block;Textures unit 502 is configured to for each of multiple image block Image block, selection and the matched picture of the image block from specified picture set, and the picture selected is attached to the image Block is the location of in Target Photo;Generation unit 503 is configured to that new picture will be generated through the Target Photo after textures.
In the present embodiment, in the device 500 for generating picture: acquiring unit 501, textures unit 502 and generation are single The specific processing of member 503 and its brought technical effect can be respectively with reference to step 201, the steps in embodiment shown in Fig. 2 202 and step 203 related description, details are not described herein.
In some optional implementations of the present embodiment, Target Photo can correspond to original image;And it obtains single Member 501 can be further configured to: based on target block number, piecemeal be carried out to original image, by the original image after piecemeal As Target Photo.
In some optional implementations of the present embodiment, target block number can be any one of following: preset Block number, the block number determined based on the size of preset image block size and original image.
In some optional implementations of the present embodiment, textures unit 502 can be further configured to: determine figure The average value of the pixel in picture in piece set;For each image block in above-mentioned multiple images block, the image block is determined In pixel average value, pixel included by the average value and the image block of included pixel is selected from picture set The same or similar picture of average value.
In some optional implementations of the present embodiment, textures unit 502 can be further configured to: for upper Each image block in multiple images block is stated, by the ruler for being resized to the image block of the picture selected for the image block It is very little, picture of the size after adjusted is attached to the image block the location of in Target Photo.
The device provided by the above embodiment of the disclosure is divided into the Target Photo of multiple images block by obtaining, and Afterwards for each image block in multiple image block, selection and the matched picture of the image block from specified picture set, And the picture selected is attached to the image block the location of in Target Photo, it is then that the Target Photo after textures is raw It at new picture, realizes stable picture pixels and spells map generalization, the overall effect of new picture generated can be made close Without the original image of piecemeal corresponding to Target Photo.
Below with reference to Fig. 6, it illustrates the electronic equipment that is suitable for being used to realize embodiment of the disclosure, (example is as shown in figure 1 Terminal device 101,102,103, server 105) 600 structural schematic diagram.Terminal device in embodiment of the disclosure can be with Including but not limited to such as mobile phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (plate Computer), PMP (portable media player), the mobile terminal of car-mounted terminal (such as vehicle mounted guidance terminal) etc. and all The fixed terminal of such as digital TV, desktop computer.Electronic equipment shown in Fig. 6 is only an example, should not be to this public affairs The function and use scope for the embodiment opened bring any restrictions.
As shown in fig. 6, electronic equipment 600 may include processing unit (such as central processing unit, graphics processor etc.) 601, random access can be loaded into according to the program being stored in read-only memory (ROM) 602 or from storage device 608 Program in memory (RAM) 603 and execute various movements appropriate and processing.In RAM 603, it is also stored with electronic equipment Various programs and data needed for 600 operations.Processing unit 601, ROM 602 and RAM603 are connected with each other by bus 604. Input/output (I/O) interface 605 is also connected to bus 604.
In general, following device can connect to I/O interface 605: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 606 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 607 of dynamic device etc.;Storage device 608 including such as hard disk etc.;And communication device 609.Communication device 609 can To allow electronic equipment 600 wirelessly or non-wirelessly to be communicated with other equipment to exchange data.Although Fig. 6 is shown with various The electronic equipment 600 of device, it should be understood that being not required for implementing or having all devices shown.It can be alternatively Implement or have more or fewer devices.Each box shown in Fig. 6 can represent a device, also can according to need Represent multiple devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communication device 609, or from storage device 608 It is mounted, or is mounted from ROM 602.When the computer program is executed by processing unit 601, the implementation of the disclosure is executed The above-mentioned function of being limited in the method for example.
It is situated between it should be noted that computer-readable medium described in embodiment of the disclosure can be computer-readable signal Matter or computer readable storage medium either the two any combination.Computer readable storage medium for example can be with System, device or the device of --- but being not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or it is any more than Combination.The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires Electrical connection, portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type are programmable Read-only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic are deposited Memory device or above-mentioned any appropriate combination.In embodiment of the disclosure, computer readable storage medium, which can be, appoints What include or the tangible medium of storage program that the program can be commanded execution system, device or device use or and its It is used in combination.And in embodiment of the disclosure, computer-readable signal media may include in a base band or as carrier wave The data-signal that a part is propagated, wherein carrying computer-readable program code.The data-signal of this propagation can be adopted With diversified forms, including but not limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal is situated between Matter can also be any computer-readable medium other than computer readable storage medium, which can be with It sends, propagate or transmits for by the use of instruction execution system, device or device or program in connection.Meter The program code for including on calculation machine readable medium can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. or above-mentioned any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.Above-mentioned computer-readable medium carries one or more program, when said one or more When a program is executed by the electronic equipment, so that the electronic equipment: obtaining the Target Photo for being divided into multiple images block;For Each image block in multiple image block, selection and the matched picture of the image block from specified picture set, and will choosing The picture of taking-up is attached to the image block the location of in Target Photo;Target Photo after textures is generated into new picture.
The behaviour for executing embodiment of the disclosure can be write with one or more programming languages or combinations thereof The computer program code of work, described program design language include object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the disclosure, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present disclosure can be realized by way of software, can also be by hard The mode of part is realized.Wherein, the title of unit does not constitute the restriction to the unit itself under certain conditions, for example, obtaining Unit is taken to be also described as " unit that acquisition is divided into the Target Photo of multiple images block ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that the open scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from design disclosed above, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (12)

1. a kind of method for generating picture, comprising:
Obtain the Target Photo for being divided into multiple images block;
For each image block in described multiple images block, chosen and the matched figure of the image block from specified picture set Piece, and the picture selected is attached to the image block the location of in the Target Photo;
The Target Photo after textures is generated into new picture.
2. according to the method described in claim 1, wherein, the Target Photo corresponds to original image;And
It is described to obtain the Target Photo for being divided into multiple images block, comprising:
Based on target block number, piecemeal is carried out to the original image, using the original image after piecemeal as the target Picture.
3. according to the method described in claim 2, wherein, the target block number is any one of following: preset block number, base In the block number that the size of preset image block size and the original image determines.
4. method described in one of -3 according to claim 1, wherein in each image in described multiple images block Block, selection and the matched picture of the image block from specified picture set, and the picture selected is attached to the image block and is existed In the Target Photo before location, the method also includes:
Determine the average value of the pixel in the picture in the picture set;And
It is described to be chosen and the matched picture of the image block from specified picture set, comprising:
Determine the average value of the pixel in the image block;
The average value of pixel included by the average value and the image block of included pixel is selected from the picture set Same or similar picture.
5. method described in one of -3 according to claim 1, wherein the picture that will be selected is attached to the image block described The location of in Target Photo, comprising:
By the size for being resized to the image block of the picture selected, picture of the size after adjusted is attached to the image block The location of in the Target Photo.
6. a kind of for generating the device of picture, comprising:
Acquiring unit is configured to obtain the Target Photo for being divided into multiple images block;
Textures unit is configured to choose each image block in described multiple images block from specified picture set With the matched picture of the image block, and the picture selected is attached to the image block the location of in the Target Photo;
Generation unit is configured to the Target Photo after textures generating new picture.
7. device according to claim 6, wherein the Target Photo corresponds to original image;And
The acquiring unit is further configured to:
Based on target block number, piecemeal is carried out to the original image, using the original image after piecemeal as the target Picture.
8. device according to claim 7, wherein the target block number is any one of following: preset block number, base In the block number that the size of preset image block size and the original image determines.
9. the device according to one of claim 6-8, wherein the textures unit is further configured to:
Determine the average value of the pixel in the picture in the picture set;
For each image block in described multiple images block, the average value of the pixel in the image block is determined, from the picture The average value of the included pixel figure same or similar with the average value of pixel included by the image block is selected in set Piece.
10. the device according to one of claim 6-8, wherein the textures unit is further configured to:
For each image block in described multiple images block, the picture selected for the image block is resized to this Picture of the size after adjusted is attached to the image block the location of in the Target Photo by the size of image block.
11. a kind of electronic equipment, comprising:
One or more processors;
Storage device is stored thereon with one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 5.
12. a kind of computer-readable medium, is stored thereon with computer program, wherein real when described program is executed by processor Now such as method as claimed in any one of claims 1 to 5.
CN201910398724.9A 2019-05-14 2019-05-14 Method and apparatus for generating picture Pending CN110115839A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910398724.9A CN110115839A (en) 2019-05-14 2019-05-14 Method and apparatus for generating picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910398724.9A CN110115839A (en) 2019-05-14 2019-05-14 Method and apparatus for generating picture

Publications (1)

Publication Number Publication Date
CN110115839A true CN110115839A (en) 2019-08-13

Family

ID=67522359

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910398724.9A Pending CN110115839A (en) 2019-05-14 2019-05-14 Method and apparatus for generating picture

Country Status (1)

Country Link
CN (1) CN110115839A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111784697A (en) * 2020-06-30 2020-10-16 北京百度网讯科技有限公司 Image processing method, image processing device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010002976A (en) * 1999-06-18 2001-01-15 이상이 Figure puzzle by using dividing pixels and dividing figures
CN102831593A (en) * 2012-07-23 2012-12-19 陈华 Digital picture splicing system and method for carrying out mosaic picture splicing by using system
CN103268405A (en) * 2013-05-06 2013-08-28 北京百度网讯科技有限公司 Method, device and system for acquiring game information
CN105335469A (en) * 2015-09-29 2016-02-17 武汉传神信息技术有限公司 Method and device for image matching and retrieving
CN106156593A (en) * 2015-03-25 2016-11-23 阿里巴巴集团控股有限公司 A kind of sectional drawing is utilized to carry out the method and device verified

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010002976A (en) * 1999-06-18 2001-01-15 이상이 Figure puzzle by using dividing pixels and dividing figures
CN102831593A (en) * 2012-07-23 2012-12-19 陈华 Digital picture splicing system and method for carrying out mosaic picture splicing by using system
CN103268405A (en) * 2013-05-06 2013-08-28 北京百度网讯科技有限公司 Method, device and system for acquiring game information
CN106156593A (en) * 2015-03-25 2016-11-23 阿里巴巴集团控股有限公司 A kind of sectional drawing is utilized to carry out the method and device verified
CN105335469A (en) * 2015-09-29 2016-02-17 武汉传神信息技术有限公司 Method and device for image matching and retrieving

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
匿名: "拼图闯关", 《7K7K》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111784697A (en) * 2020-06-30 2020-10-16 北京百度网讯科技有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN111784697B (en) * 2020-06-30 2024-03-08 北京百度网讯科技有限公司 Image processing method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110162670A (en) Method and apparatus for generating expression packet
CN110110811A (en) Method and apparatus for training pattern, the method and apparatus for predictive information
CN112015314B (en) Information display method and device, electronic equipment and medium
CN108492364A (en) The method and apparatus for generating model for generating image
CN109993150A (en) The method and apparatus at age for identification
CN109769141A (en) A kind of video generation method, device, electronic equipment and storage medium
CN111459364B (en) Icon updating method and device and electronic equipment
CN109684578A (en) Method and apparatus for showing information
CN110213614A (en) The method and apparatus of key frame are extracted from video file
CN109408189A (en) Dynamic adjusting method, device, equipment and the medium of client end interface layout
CN109918530A (en) Method and apparatus for pushing image
CN109815365A (en) Method and apparatus for handling video
CN110032978A (en) Method and apparatus for handling video
CN110516678A (en) Image processing method and device
CN109885314A (en) Small routine autoplacement method and device
CN110059623A (en) Method and apparatus for generating information
CN109669596A (en) Method and apparatus for showing chat message
CN114489896B (en) Content display method and device, storage medium and electronic equipment
CN111652675A (en) Display method and device and electronic equipment
CN110310293A (en) Human body image dividing method and equipment
CN110087122A (en) For handling system, the method and apparatus of information
CN110115839A (en) Method and apparatus for generating picture
CN110223220A (en) A kind of method and apparatus handling image
CN110288523A (en) Image generating method and device
CN110377273A (en) A kind of method, apparatus of data processing, medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination