CN107248181A - Image generating method and device, electronic equipment - Google Patents

Image generating method and device, electronic equipment Download PDF

Info

Publication number
CN107248181A
CN107248181A CN201710458630.7A CN201710458630A CN107248181A CN 107248181 A CN107248181 A CN 107248181A CN 201710458630 A CN201710458630 A CN 201710458630A CN 107248181 A CN107248181 A CN 107248181A
Authority
CN
China
Prior art keywords
image
color
pixel
tone
mass
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
CN201710458630.7A
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 Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online 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 Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201710458630.7A priority Critical patent/CN107248181A/en
Publication of CN107248181A publication Critical patent/CN107248181A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)

Abstract

The application provides a kind of image generating method and device, electronic equipment, and image generating method includes:Determine the image mass-tone of original image;The matching degree of described image mass-tone and each color in predicted elemental set is calculated, the predicted elemental set is used to record each color and the pictorial element with each color-match;Based on the matching degree, the pictorial element corresponding with the original image is determined from the predicted elemental set;Based on the original image pictorial element corresponding with the original image, output image is generated.The technical scheme of the application can be the suitable pictorial element of original image automatic collocation, reduce the operation complexity of generation output image, improve the efficiency of generation output image.

Description

Image generating method and device, electronic equipment
Technical field
The application is related to Internet technical field, more particularly to a kind of image generating method and device, electronic equipment.
Background technology
In the prior art, can be the original image setting matching of each input by the mode of the manual dynamic configuration of user Pictorial element and then generation output image, wherein, pictorial element can include the background colour, character script, font of output image Size etc..The pictorial element of user's manual configuration may be mismatched with original image, can cause generated output image User's clicking rate is low, in addition, user is big for the workload of the manual dynamic configuration pictorial element of each original image, generation output The efficiency of image is low, and can not meet the intellectuality of pictorial element matching.
The content of the invention
In view of this, the application provides a kind of new technical scheme, can be the suitable image of original image automatic collocation Element, improves the efficiency and user's clicking rate for generating output image.
To achieve the above object, the application offer technical scheme is as follows:
According to the first aspect of the application, it is proposed that a kind of image generating method, including:
Determine the image mass-tone of original image;
The matching degree of described image mass-tone and each color in predicted elemental set is calculated, the predicted elemental collection is shared In recording each color and pictorial element with each color-match;
Based on the matching degree, the image primitive corresponding with the original image is determined from the predicted elemental set Element;
Based on the original image pictorial element corresponding with the original image, output image is generated.
According to the second aspect of the application, it is proposed that a kind of generating means of pictorial element image, including:
Mass-tone determining module, the image mass-tone for determining original image;
Computing module, the matching degree for calculating described image mass-tone and each color in predicted elemental set is described Predicted elemental set is used to record each color and the pictorial element with each color-match;
Element determining module, for based on the matching degree, being determined and the original graph from the predicted elemental set As corresponding pictorial element;
Image generation module, for based on the original image pictorial element corresponding with the original image, generation Output image.
According to the third aspect of the application, it is proposed that a kind of computer-readable recording medium, the storage medium is stored with Computer program, for performing the image generating method described in above-mentioned first aspect.
According to the fourth aspect of the application, it is proposed that a kind of electronic equipment, including memory, processor and it is stored in On reservoir and the computer program that can run on a processor, processing is realized as described in above-mentioned first aspect when performing described program Image generating method.
From above technical scheme, image mass-tone of the application based on original image can be with one group of correspondence of Auto-matching Pictorial element, due to the image Dominant Colors Matching of pictorial element and original image, therefore the clicking rate of the output image generated Can be higher, and automatically generating for output image improves image formation efficiency, reduces the workload of user.
Brief description of the drawings
Figure 1A is the flow chart according to exemplary embodiment image generating method of the invention;
Figure 1B shows the schematic diagram that output image is generated based on original image according to Figure 1A illustrated embodiments;
Fig. 2 is the flow chart according to another exemplary embodiment image generating method of the present invention;
Fig. 3 is the determination method flow diagram one of the image mass-tone according to another exemplary embodiment original image of the invention;
Fig. 4 is the determination method flow diagram two of the image mass-tone according to further example embodiment original image of the present invention;
Fig. 5 is the structure chart according to exemplary embodiment video generation device of the invention;
Fig. 6 is the structure chart according to another exemplary embodiment video generation device of the present invention;
Fig. 7 shows the structure chart of the electronic equipment according to one example embodiment of the present invention.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the application.
It is the purpose only merely for description specific embodiment in term used in this application, and is not intended to be limiting the application. " one kind ", " described " and "the" of singulative used in the application and appended claims are also intended to including majority Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wrapped It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, not departing from In the case of the application scope, the first information can also be referred to as the second information, similarly, and the second information can also be referred to as One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determining ".
In the application, what original image can provide for client is used for generating the image of output image, and original image is general It is the master map part of output image, output image is the image for showing user to see on an electronic device.
In order the application to be further described, there is provided the following example:
Figure 1A is the flow chart according to exemplary embodiment image generating method of the invention;Figure 1B is shown according to Figure 1A The schematic diagram that output image is generated based on original image of illustrated embodiment;The image generating method can be applicable to electronic equipment On, as shown in Figure 1A, comprise the following steps:
Step 101, the image mass-tone of original image is determined.
In one embodiment, original image can be understood as the master map part of output image, for example, can be advertisement Party A Logo, trade mark of offer etc., for example, as shown in Figure 1B, the picture for the disk cray that original image is indicated by label 11, mark Number 11 pictures indicated are the shop logo in a lobster dining room.
In one embodiment, image mass-tone can be understood as frequency of occurrences highest color in image, that is, right in image The most color of the pixel answered is image mass-tone, for example, the image mass-tone of original image is red in the advertisement shown in Figure 1B.
In one embodiment, the method for the image mass-tone of original image is determined reference can be made to Fig. 3 and embodiment illustrated in fig. 4, this In first be not described in detail.
Step 102, the matching degree of image mass-tone and each color in predicted elemental set is calculated.
In one embodiment, predicted elemental set is used to record each color and the pictorial element with each color-match, in advance If in element set color can be recorded by color value.Wherein, pictorial element can include background colour, the text of output image Word font, word font size etc..
In one embodiment, the pictorial element of each output image of periodic collection, the figure of corresponding original image are passed through As mass-tone, history access times and exposure frequency, predicted elemental set is obtained using machine learning algorithm training.In an embodiment In, the pictorial element in predicted elemental set embodies the user of the vast access electronic equipment to original image and pictorial element The preference of collocation.In one embodiment, behavioral data that can be according to mass users in current electronic device sets up machine learning Model, predicted elemental set is obtained by machine learning model, for example, can be according to the complete of the output image on the electronic equipment The behavioral datas such as history access times and exposure frequency in portion's history access times and exposure frequency or nearest setting time Set up machine learning model, so as to obtain the conversion ratio ranking of the output image on the electronic equipment, for example, output image A, B, The image mass tone of original image corresponding to C is same, is all color 1, and 50 are exposed in the nearest setting time sections of output image A It is secondary, it is accessed 48 times, corresponding conversion ratio is 48/50=0.96, and is exposed 50 in the nearest setting time sections of output image B It is secondary, it is accessed 40 times, corresponding conversion ratio is 40/50=0.8, and is exposed 50 times in the nearest setting time sections of output image C, Accessed 49 times, corresponding conversion ratio is 49/50=0.98, then the conversion ratio of output image is obtained by the machine learning model Ranking is that C is better than B, and B is better than A, then can record original corresponding to conversion ratio highest output image in predicted elemental set The image mass-tone of image, pictorial element, namely record output image C image mass-tone " color 1 " and output image C image Element.
In one embodiment, it is subsequently received need generate output image original image when, can be by original image Image mass-tone and predicted elemental set in each color calculate matching degree, that is, can be by the image master of original image The color value of color and the color value of each color in predicted elemental set carry out mathematic interpolation, and it is poor to obtain colour, based on color Value difference determines matching degree, and wherein colour difference is bigger, and corresponding matching degree is smaller.For example, the color of the image mass-tone of original image It is worth for (200,200,200), record has the color value 1 (197,197,197) of color 1, the color of color 2 in predicted elemental set Value 2 (201,201,201) etc., then the image mass-tone of original image and the colour difference of the color value 1 in predicted elemental set be | (200-197) |+| (200-197) |+| (200-197) |=9, image mass-tone and the face in predicted elemental set of original image The colour difference of colour 2 is | (200-201) |+| (200-201) |+| (200-201) |=3, then illustrate image mass-tone and color 1 Matching degree is less than the matching degree with color 2.
Step 103, based on matching degree, the pictorial element corresponding with original image is determined from predicted elemental set.
In one embodiment, it can be determined based on maximum matching degree from predicted elemental set corresponding with original image Pictorial element, for details, reference can be made to embodiment illustrated in fig. 2, here first be not described in detail.
Step 104, based on the original image pictorial element corresponding with original image, output image is generated.
In one embodiment, output figure can be generated by the way that original image and corresponding pictorial element are carried out into matched combined Picture.
Seen from the above description, image mass-tone of the application based on original image, can be with one group of corresponding figure of Auto-matching Pixel element, because the clicking rate of the image Dominant Colors Matching of pictorial element and original image, therefore the output image generated can compare It is higher, and automatically generating for output image improves image formation efficiency, reduces the workload of user.
Fig. 2 is the flow chart according to another exemplary embodiment image generating method of the present invention;The present embodiment utilizes this Shen Please the above method that provides of embodiment, the progress exemplified by how determining the pictorial element corresponding with original image based on matching degree Exemplary illustration, as shown in Fig. 2 comprising the following steps:
Step 201, the image mass-tone of original image is determined.
In one embodiment, the method for the image mass-tone of original image is determined reference can be made to Fig. 3 and embodiment illustrated in fig. 4, this In first be not described in detail.
Step 202, the matching degree of image mass-tone and each color in predicted elemental set is calculated.
In one embodiment, predicted elemental set is used to record color value and the pictorial element matched with color value.
In one embodiment, the description of step 202 may refer to the description of above-mentioned steps 102, will not be described in detail herein.
Step 203, the maximum of image mass-tone and the matching degree of each color in predicted elemental set is determined, step is performed Rapid 204 or step 205.
In one embodiment, can be with by calculating the matching degree of each color in image mass-tone and predicted elemental set Corresponding multiple matching degrees are obtained, each matching degree be able to can also be differed with identical, for example, the image mass-tone of original image Color value be (200,200,200), record has color value 1 (197,197,197), the color 2 of color 1 in predicted elemental set Color value 2 (201,201,201), the color value 3 (203,203,203) of color 3, color 4 color value 4 (225,226, 203), the color value 5 (188,203,203) of color 5, then in the colour of the image mass-tone of original image and predicted elemental set The colour difference of color value 1 is | (200-197) |+| (200-197) |+| (200-197) |=9, the image mass-tone of original image Colour and the colour difference of the color value 2 in predicted elemental set be | (200-201) |+| (200-201) |+| (200-201) |= 3, the colour of the image mass-tone of original image and the colour difference of the color value 3 in predicted elemental set be | (200-203) |+| (200-203) |+| (200-203) |=9, colour and the color value 4 in predicted elemental set of the image mass-tone of original image Colour difference is | (200-225) |+| (200-226) |+| (200-203) |=54, the image mass-tone and predicted elemental of original image The colour difference of color value 5 in set is | (200-188) |+| (200-203) |+| (200-203) |=18, then image mass-tone The minimum value of the colour of color value and the colour difference of each color value in predicted elemental set is 3, because colour difference is smaller, is said Bright two colors are more matched, therefore the color corresponding to the maximum minimum value for colour difference of matching degree here.
Step 204, when the color only one of which corresponding to the maximum of matching degree, by corresponding to matching degree maximum The pictorial element that color is recorded in predicted elemental set is defined as the pictorial element corresponding with original image.
In one embodiment, referring to the citing of step 203, the minimum value of colour difference is 3, and corresponding color is color 2, Other colour differences are all much larger than minimum value, therefore the color of matching degree maximum is color 2, can be by face in predicted elemental set Pictorial element corresponding to color 2 is defined as original image as corresponding pictorial element.
Step 205, when the color corresponding to the maximum of matching degree has two or more, in more than two colors, institute is right One group of pictorial element is selected in the pictorial element answered as the pictorial element corresponding with original image.
In one embodiment, can be with by calculating the matching degree of each color in image mass-tone and predicted elemental set Obtain corresponding multiple matching degrees, each matching degree be able to can also be differed with identical, when the maximum of matching degree have two with When upper, it may indicate that with the immediate color of image mass-tone more than one, therefore can be in the figure corresponding to more than two colors One group of pictorial element is selected as the pictorial element corresponding with original image in pixel element.For example, the image master of original image The color value of color be (200,200,200), in predicted elemental set record have the corresponding color value 1 of color 1 (197,197, 197), the corresponding color value 2 (207,206,202) of color 2, the corresponding color value 3 (200,200,209) of color 3,4 pairs of color The color value 4 (225,226,203) answered, the corresponding color value 5 (200,203,206) of color 5, then the image mass-tone of original image Colour difference with the color value 1 of color 1 in predicted elemental set is 9, in the image mass-tone of original image and predicted elemental set The colour difference of the color value 2 of color 2 is 15, the image mass-tone of original image and the color value 3 of color 3 in predicted elemental set Colour difference is 9, and the image mass-tone of original image and the colour difference of the color value 4 of color 4 in predicted elemental set are 54, original graph The image mass-tone of picture and the colour difference of the color value 5 of color 5 in predicted elemental set are 9, then the color value of image mass-tone with it is pre- If the minimum value of the colour difference of the color value of each in element set is 9, and minimum value three colors of correspondence, respectively color 1st, color 3, color 5, can now randomly choose one group of pictorial element as original image in the corresponding pictorial element of 3 colors Pictorial element.
In one embodiment, can be corresponding to more than two colors when the maximum of matching degree has two or more One group of pictorial element is randomly choosed in pictorial element as the pictorial element corresponding with original image.
The present embodiment is on the basis of the advantageous effects with above-mentioned Figure 1A illustrated embodiments, based on matching degree most Big value, it is determined that the pictorial element matched with original image, can be according to face in the correspondence predicted elemental set of the maximum of matching degree The quantity of color, determines suitable pictorial element, improves the intellectuality of pictorial element matching.
In one embodiment, the colouring information determination that the image mass-tone of original image can be based on image mass-tone, color letter Breath can be color value, and the color value based on image mass-tone determines the flow of image mass-tone reference can be made to embodiment illustrated in fig. 3, color Information can also be color gamut, and the color gamut based on image mass-tone determines that the flow of image mass-tone may refer to shown in Fig. 4 Embodiment.
Fig. 3 is the determination method flow of the color of the image mass-tone according to another exemplary embodiment original image of the invention Figure one;The present embodiment utilizes the above method that the embodiment of the present application is provided, with the face for the image mass-tone for how determining original image It is illustrative exemplified by colour, as shown in figure 3, comprising the following steps:
Step 301, original image is divided into N number of block according to default dividing mode.
In one embodiment, N can be the random natural number more than 1.
In one embodiment, it is all the pixels of 32 pixel * 24 that original image can be divided into equal in magnitude and size The uncertain block of number, for example, size is divided into 400 blocks for the image of the pixels of 640 pixel * 480, be by size The image of the pixels of 1280 pixel * 480 is divided into 800 blocks;In one embodiment, original image can also be divided into size It is equal, but the block of the uncertain fixed number of block size, for example, size is drawn for the image of the pixels of 640 pixel * 480 It is divided into 400 blocks that block size is the pixels of 32 pixel * 24, size is divided into area for the image of the pixels of 1280 pixel * 480 Block size is 400 blocks of the pixels of 64 pixel * 24.
Step 302, M pixel is obtained according to default acquisition mode in each block.
In one embodiment, M can be the random natural number more than 1, and M values are bigger, and the image mass-tone determined is more accurate Really.
In one embodiment, M pixel can be obtained in the predeterminated position in each block, for example, at each Four corner locations of block and centre position respectively take the pixel of correspondence number, for the pixel acquired in each block Sum be M pixel, in one embodiment, pixel number acquired in each position can be with identical, can also not It is identical;In one embodiment, M pixel can also be obtained at random in each block.
Step 303, the color of each pixel in N*M pixel being obtained in original image is determined.
Step 304, the number of the corresponding pixel of color value of each pixel in N*M pixel is counted.
Step 305, the color most color value of the number of pixel indicated is defined as image mass-tone.
The present embodiment is on the basis of the advantageous effects with above-mentioned Figure 1A illustrated embodiments, by by original image It is divided into the block of area equation, and obtains in each block the color value of M pixel, and then counts appearance frequently Rate highest color value, the color that the color value is indicated is defined as image mass-tone, can be improved and obtained by statistical method Take the efficiency and accuracy of image mass-tone.
Fig. 4 is the determination method flow diagram two of the image mass-tone according to another exemplary embodiment original image of the invention; The present embodiment utilize the embodiment of the present application provide the above method, using how to determine original image image mass-tone color value as Example is illustrative, as shown in figure 4, comprising the following steps:
Step 401, original image is divided into N number of block according to default dividing mode.
Step 402, M pixel is obtained according to default acquisition mode in each block.
Step 403, the color value of each pixel in N*M pixel being obtained in original image is determined.
In one embodiment, the description of step 401- steps 403 can be found in the step 301- steps of embodiment illustrated in fig. 3 303 description, I will not elaborate.
Step 404, the number of the corresponding pixel of each color gamut in N*M pixel is counted.
Step 405, the most color gamut of the number of pixel is defined as to the color gamut of image mass-tone.
Step 406, the color gamut based on described image mass-tone, determines described image mass-tone.
In one embodiment, in step 404 to step 406, each color gamut is used to represent same colour system Scope belonging to multiple colors, can pre-set color gamut, for example, the color gamut of lightpink is (255,182,193) ~(255,192,203), navy blue color gamut is (0,0,255)~(0,0,127), etc., by for N*M pixel Corresponding color value is referred to corresponding color gamut, you can count each color gamut in N*M pixel corresponding The number of pixel, for example, in N*M pixel, the color value for having 5 pixels is (0,0,225), there is 5 pixels Color value is (0,0,129), and the color value for having 15 pixels is (0,0,250), have the color values of 20 pixels for (0,0, 190), then 45 pixels can belong to navy blue color gamut in N*M pixel.
In one embodiment, by counting the pixel number in each color gamut, it may be determined that for going out pixel The most color gamuts of number, the color gamut that the number of such as pixel is most is navy blue color gamut, then image mass-tone Color gamut is navy blue color gamut.In one embodiment, can by calculating the colour average of navy blue color gamut, Obtain the color value of image mass-tone in the color value of image mass-tone, the navy blue color gamut of example as shown above for (0, 0, (255+127)/2), also it is (0,0,191).
In one embodiment, can be by calculating image mass-tone when the color gamut based on image mass-tone determines image mass-tone Color gamut in obtain all pixels point color value average value, and using obtained average value as image mass-tone face The color value of image mass-tone in colour, the navy blue color gamut of example as shown above is (0,0, (225 × 5+129 × 5+ 250 × 15+190 × 20)/45), namely about (0,0,207).
It will be appreciated by persons skilled in the art that the application only with calculate the color in color gamut color value it is flat The mode of average illustrates how that the color gamut based on image mass-tone determines image mass-tone, in addition, can also be by image mass-tone Color gamut in the color value of color calculate the mode of intermediate value and obtain the color value of image mass-tone.
The present embodiment is on the basis of the advantageous effects with above-mentioned Figure 1A illustrated embodiments, by by original image It is divided into the block of area equation, and obtains in each block the color value of M pixel, and then counts appearance frequently Rate highest color gamut, the color gamut is defined as the color gamut of image mass-tone, and then based on the color of image mass-tone Scope determines image mass-tone, and it is relatively more to solve Similar color number in original image, and then leads to not to determine original The problem of image mass-tone of image.
Fig. 5 is the structure chart according to exemplary embodiment video generation device of the invention;As shown in figure 5, image is generated Device includes:
Mass-tone determining module 510, the image mass-tone for determining original image;
Computing module 520, the matching degree for calculating image mass-tone and each color in predicted elemental set, presets member Element is gathered for recording each color and pictorial element with each color-match;
Element determining module 530, for based on matching degree, being determined from predicted elemental set corresponding with original image Pictorial element;
Image generation module 540, for based on the original image pictorial element corresponding with original image, generation output figure Picture.
Fig. 6 is the structure chart according to another exemplary embodiment video generation device of the present invention, as shown in fig. 6, in Fig. 5 institutes On the basis of showing device, in one embodiment, device also includes:
Historical information statistical module 540, history access times and exposure frequency for counting each output image;
Gather generation module 550, for counting each obtained output image based on historical information statistical module 540 History access times and exposure frequency, predicted elemental set is generated using machine learning algorithm.
In one embodiment, element determining module 530 includes:
First determining unit 531, for determining image mass-tone and the matching degree of each color in predicted elemental set Maximum;
Second determining unit 532, for the color corresponding to the maximum that determines the first determining unit 531 in default member The pictorial element recorded in element set is defined as the pictorial element corresponding with original image.
In one embodiment, element determining module 530 also includes the 3rd determining unit 533;Wherein,
First determining unit 531, for determining image mass-tone and the matching degree of each color in predicted elemental set Maximum;
3rd determining unit 533, for when the first determining unit 531 determine maximum corresponding to color have two with When upper, one group of pictorial element was selected in the pictorial element corresponding to more than two colors as corresponding with original image Pictorial element.
In one embodiment, mass-tone determining module 510 includes:
Division unit 511, for original image to be divided into N number of block according to default dividing mode;
Collecting unit 512, for obtaining M according to default acquisition mode in each block that division unit 511 is divided Individual pixel;
Colour determining unit 513, the face for each pixel in N*M pixel determining to obtain in original image Color information;
4th determining unit 514, for each pixel in N*M pixel being determined based on colour determining unit 513 The colouring information of point, determines image mass-tone.
In one embodiment, collecting unit 512 includes:
First obtains subelement 5121, and M pixel is obtained for the predeterminated position in each block;Or,
Second obtains subelement 5122, for obtaining M pixel at random in each block.
In one embodiment, the 4th determining unit 514 includes:
First statistics subelement 5141, the corresponding picture of color value for counting each pixel in N*M pixel The number of vegetarian refreshments;
First determination subelement 5142, the color that the color value most for the number by pixel is indicated is defined as figure As mass-tone.
In one embodiment, the 4th determining unit 514 includes:
Second statistics subelement 5143, for counting the corresponding pixel of each color gamut in N*M pixel Number;
Second determination subelement 5144, the color gamut most for the number by pixel is defined as the face of image mass-tone Color range;
3rd determination subelement 5145, for the color gamut based on image mass-tone, determines image mass-tone.
Present invention also provides a kind of computer-readable recording medium, storage medium is stored with computer program, computer Program is used to perform the image generating method that above-mentioned Figure 1A-Fig. 4 any embodiments are provided.
Fig. 7 shows the structure chart of the electronic equipment according to one example embodiment of the present invention, as shown in fig. 7, hard Part aspect, the server includes processor, internal bus, network interface, internal memory and nonvolatile memory, is also possible to certainly Including the hardware required for other business.Processor reads corresponding computer program into internal memory from nonvolatile memory Then run, the video generation device that above-mentioned Fig. 5 and embodiment illustrated in fig. 6 are provided is formed on logic level.Certainly, except soft Outside part implementation, the application is not precluded from other implementations, such as the mode of logical device or software and hardware combining etc. Deng, that is to say, that the executive agent of above handling process is not limited to each logic unit or hardware or logic device Part.
Those skilled in the art will readily occur to its of the application after considering specification and putting into practice invention disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the application, these modifications, purposes or Person's adaptations follow the general principle of the application and including the undocumented common knowledge in the art of the application Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the application and spirit are by following Claim is pointed out.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability Comprising so that process, method, commodity or equipment including a series of key elements are not only including those key elements, but also wrap Include other key elements being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including key element Also there is other identical element in process, method, commodity or equipment.
These are only the preferred embodiment of the application, not to limit the application, it is all in spirit herein and Within principle, any modification, equivalent substitution and improvements done etc. should be included within the scope of the application protection.

Claims (12)

1. a kind of image generating method, it is characterised in that methods described includes:
Determine the image mass-tone of original image;
The matching degree of described image mass-tone and each color in predicted elemental set is calculated, the predicted elemental set is used to remember Record each color and the pictorial element with each color-match;
Based on the matching degree, the pictorial element corresponding with the original image is determined from the predicted elemental set;
Based on the original image pictorial element corresponding with the original image, output image is generated.
2. according to the method described in claim 1, it is characterised in that methods described also includes:
Count the history access times and exposure frequency of each output image;
History access times and exposure frequency based on each output image, are generated described pre- using machine learning algorithm If element set.
3. according to the method described in claim 1, it is characterised in that described to be based on the matching degree, from the predicted elemental collection The pictorial element corresponding with the original image is determined in conjunction, including:
Determine the maximum of described image mass-tone and the matching degree of each color in predicted elemental set;
The pictorial element that color corresponding to the maximum is recorded in the predicted elemental set is defined as and the original The corresponding pictorial element of beginning image.
4. according to the method described in claim 1, it is characterised in that described to be based on the matching degree, from the predicted elemental collection The pictorial element corresponding with the original image is determined in conjunction, including:
Determine the maximum of described image mass-tone and the matching degree of each color in predicted elemental set;
When the color corresponding to the maximum has two or more, the pictorial element corresponding to color more than described two One group of pictorial element of middle selection is used as the pictorial element corresponding with the original image.
5. according to any described methods of claim 1-4, it is characterised in that the image mass-tone of the determination original image, bag Include:
The original image is divided into N number of block according to default dividing mode;
In each block M pixel is obtained according to default acquisition mode;
Determine the colouring information of each pixel in N*M pixel being obtained in the original image;
Based on the colouring information of each pixel in the N*M pixel, image mass-tone is determined.
6. method according to claim 5, it is characterised in that described to be obtained in each block according to default acquisition mode M pixel is taken, including:
Predeterminated position in each block obtains M pixel;Or,
Obtain M pixel at random in each block.
7. method according to claim 5, it is characterised in that described to be based on each pixel in the N*M pixel The colouring information of point, determines image mass-tone, including:
Count the number of the corresponding pixel of color value of each pixel in the N*M pixel;
The color that the most color value of the number of pixel is indicated is defined as described image mass-tone.
8. method according to claim 5, it is characterised in that described to be based on each pixel in the N*M pixel The colouring information of point, determines image mass-tone, including:
Count the number of the corresponding pixel of each color gamut in the N*M pixel;
The most color gamut of the number of pixel is defined as to the color gamut of described image mass-tone;
Based on the color gamut of described image mass-tone, described image mass-tone is determined.
9. a kind of video generation device, it is characterised in that described device includes:
Mass-tone determining module, the image mass-tone for determining original image;
Computing module, the matching degree for calculating described image mass-tone and each color in predicted elemental set is described default Element set is used to record each color and the pictorial element with each color-match;
Element determining module, for based on the matching degree, being determined and the original image phase from the predicted elemental set Corresponding pictorial element;
Image generation module, for based on the original image pictorial element corresponding with the original image, generation output Image.
10. device according to claim 9, it is characterised in that the mass-tone determining module includes:
Division unit, for the original image to be divided into N number of block according to default dividing mode;
Collecting unit, for obtaining M according to default acquisition mode in each block described in division unit division Pixel;
Colour determining unit, the color for each pixel in N*M pixel determining to obtain in the original image Information;
5th determining unit, for each pixel in the N*M pixel that is determined based on the colour determining unit Colouring information, determine image mass-tone.
11. a kind of computer-readable recording medium, it is characterised in that the storage medium is stored with computer program, the meter Calculation machine program is used to perform any described image generating methods of the claims 1-8.
12. a kind of electronic equipment, including memory, processor and storage are on a memory and the meter that can run on a processor Calculation machine program, it is characterised in that the image as described in above-mentioned claim 1-8 is any is realized in processing when performing described program Generation method.
CN201710458630.7A 2017-06-16 2017-06-16 Image generating method and device, electronic equipment Pending CN107248181A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710458630.7A CN107248181A (en) 2017-06-16 2017-06-16 Image generating method and device, electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710458630.7A CN107248181A (en) 2017-06-16 2017-06-16 Image generating method and device, electronic equipment

Publications (1)

Publication Number Publication Date
CN107248181A true CN107248181A (en) 2017-10-13

Family

ID=60018154

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710458630.7A Pending CN107248181A (en) 2017-06-16 2017-06-16 Image generating method and device, electronic equipment

Country Status (1)

Country Link
CN (1) CN107248181A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111784787A (en) * 2019-07-17 2020-10-16 北京沃东天骏信息技术有限公司 Image generation method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577993A (en) * 2012-08-07 2014-02-12 阿里巴巴集团控股有限公司 Color selecting method and device
CN103793888A (en) * 2014-02-18 2014-05-14 厦门美图网科技有限公司 Image enhancing method based on main colors of reference image
US20140149390A1 (en) * 2012-11-28 2014-05-29 International Business Machines Corporation Automatically Providing Relevant Search Results Based on User Behavior
CN103839270A (en) * 2014-03-24 2014-06-04 东方网力科技股份有限公司 Image matching method and device
CN104700442A (en) * 2015-03-30 2015-06-10 厦门美图网科技有限公司 Image processing method and system for automatic filter and character adding

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577993A (en) * 2012-08-07 2014-02-12 阿里巴巴集团控股有限公司 Color selecting method and device
US20140149390A1 (en) * 2012-11-28 2014-05-29 International Business Machines Corporation Automatically Providing Relevant Search Results Based on User Behavior
CN103793888A (en) * 2014-02-18 2014-05-14 厦门美图网科技有限公司 Image enhancing method based on main colors of reference image
CN103839270A (en) * 2014-03-24 2014-06-04 东方网力科技股份有限公司 Image matching method and device
CN104700442A (en) * 2015-03-30 2015-06-10 厦门美图网科技有限公司 Image processing method and system for automatic filter and character adding

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111784787A (en) * 2019-07-17 2020-10-16 北京沃东天骏信息技术有限公司 Image generation method and device
CN111784787B (en) * 2019-07-17 2024-04-09 北京沃东天骏信息技术有限公司 Image generation method and device

Similar Documents

Publication Publication Date Title
Kuhn et al. An efficient naturalness-preserving image-recoloring method for dichromats
CN104244024B (en) Video cover generation method and device and terminal
US6393147B2 (en) Color region based recognition of unidentified objects
CN111275784B (en) Method and device for generating image
CN103428165B (en) Method and device for grouping social network nodes
CN108305256B (en) Video keying processing method, processing unit and computer readable storage medium
CN111950056B (en) BIM display method and related equipment for building informatization model
CN109446095A (en) A kind of test method, device and the electronic equipment of page presentation speed
CN110889379A (en) Expression package generation method and device and terminal equipment
CN108304839A (en) A kind of image processing method and device
CN109388725A (en) The method and device scanned for by video content
CN109543770A (en) Dot character recognition methods and device
CN106960211A (en) Key frame acquisition methods and device
CN110990617B (en) Picture marking method, device, equipment and storage medium
Celebi et al. Colour quantisation using the adaptive distributing units algorithm
CN106569805A (en) Canvas storage/graph drawing method and equipment
CN106503174A (en) A kind of environment Visualization method and system modeled based on Network Three-dimensional
CN107248181A (en) Image generating method and device, electronic equipment
CN112598611A (en) Method and device for synthesizing and identifying embossed bank card number image
Wu et al. A hybrid image retargeting approach via combining seam carving and grid warping
CN110719415B (en) Video image processing method and device, electronic equipment and computer readable medium
CN104270676B (en) A kind of information processing method and electronic equipment
CN103927341B (en) A kind of method and device for obtaining scene information
KR20210028401A (en) Device and method for style translation
CN116206038A (en) Rendering method, rendering device, electronic equipment and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20171013

RJ01 Rejection of invention patent application after publication