CN110198437A - Processing method, device, storage medium and the electronic device of image - Google Patents

Processing method, device, storage medium and the electronic device of image Download PDF

Info

Publication number
CN110198437A
CN110198437A CN201810164716.3A CN201810164716A CN110198437A CN 110198437 A CN110198437 A CN 110198437A CN 201810164716 A CN201810164716 A CN 201810164716A CN 110198437 A CN110198437 A CN 110198437A
Authority
CN
China
Prior art keywords
color
attribute
image
information
colors
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.)
Granted
Application number
CN201810164716.3A
Other languages
Chinese (zh)
Other versions
CN110198437B (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810164716.3A priority Critical patent/CN110198437B/en
Publication of CN110198437A publication Critical patent/CN110198437A/en
Application granted granted Critical
Publication of CN110198437B publication Critical patent/CN110198437B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals

Abstract

The invention discloses a kind of processing method of image, device, storage medium and electronic devices.Wherein, this method comprises: response is instructed by the object run that object run generates, display color matching information, wherein color matching information, which is used to indicate, matches colors to first object image according to color corresponding with color matching information;First object color matching information is selected from color matching information;It matches colors to first object image according to first object color corresponding with first object color matching information, the first object image after being matched colors.The present invention solves the technical issues of low efficiency matched colors in the related technology to image.

Description

Processing method, device, storage medium and the electronic device of image
Technical field
The present invention relates to field of image processings, in particular to a kind of processing method of image, device, storage medium And electronic device.
Background technique
Currently, in static images material creative making tool of marketing in the market, when being optimized to picture, mostly with filter Mirror mode is realized, is carried out the numerical value such as global unified color, lightness, saturation degree, contrast to whole picture in this way and is adjusted It is whole, to realize optimization of the picture in visual effect, it usually needs manually match colors, not yet occur according to householder to picture The function that body image effect is intelligently matched colors.
The above method lacks the ability to marketing intention picture visual effect Intelligent treatment, also lacks the office of vision optimization Portion, details optimization ability, and Man-made Color Matching time-consuming and color matching effect are uncertain, there is the low efficiency matched colors to image Problem.
Aiming at the problem that the above-mentioned low efficiency matched colors to image, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of processing method of image, device, storage medium and electronic devices, at least to solve The technical issues of low efficiency certainly matched colors in the related technology to image.
According to an aspect of an embodiment of the present invention, a kind of processing method of image is provided.This method comprises: response by Object run generate object run instruction, display color matching information, wherein color matching information be used to indicate to first object image by It matches colors according to color corresponding with color matching information;First object color matching information is selected from color matching information;To first object Image is matched colors according to first object color corresponding with first object color matching information, the first object figure after being matched colors Picture.
According to another aspect of an embodiment of the present invention, a kind of processing unit of image is additionally provided.The processing of the image fills Setting includes: display unit, for responding the object run instruction generated by object run, display color matching information, wherein color matching letter Breath, which is used to indicate, matches colors to first object image according to color corresponding with color matching information;Selecting unit is used for from color matching First object color matching information is selected in information;With color element, for being believed according to matching colors with first object first object image It ceases corresponding first object color to match colors, the first object image after being matched colors.
According to another aspect of an embodiment of the present invention, a kind of storage medium is additionally provided.Meter is stored in the storage medium Calculation machine program, wherein computer program is arranged to execute the processing method of the image of the embodiment of the present invention when operation.
According to another aspect of an embodiment of the present invention, a kind of electronic device is additionally provided.The electronic device includes memory And processor, which is characterized in that computer program is stored in memory, processor is arranged to execute by computer program The processing method of the image of the embodiment of the present invention.
In embodiments of the present invention, it responds and is instructed by the object run that object run generates, display color matching information, wherein Color matching information, which is used to indicate, matches colors to first object image according to color corresponding with color matching information;It is selected from color matching information Select out first object color matching information;To first object image according to the first object corresponding first object color of color matching information into Row color matching, the first object image after being matched colors.By selecting first object color matching information from the color matching information of display, It is intelligently matched colors to first object image by first object color matching one key of information realization, avoids through Man-made Color Matching, lack The weary function of intelligently matching colors causes to carry out image color matching time-consuming and color matching effect is uncertain, carries out to improve to image The efficiency of color matching realizes the technical effect for improving the efficiency matched colors to image, and then solves in the related technology to figure The technical issues of low efficiency that picture is matched colors.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of schematic diagram of the hardware environment of the processing method of image according to an embodiment of the present invention;
Fig. 2 is a kind of flow chart of the processing method of image according to an embodiment of the present invention;
Fig. 3 is the flow chart of another image procossing according to an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of mass-tone identification according to an embodiment of the present invention;
Fig. 5 is a kind of schematic diagram of K-means algorithm according to an embodiment of the present invention;
Fig. 6 is the homochromy schematic diagram for taking color algorithm of one kind according to an embodiment of the present invention;
Fig. 7 is the schematic diagram that a kind of primary layer element according to an embodiment of the present invention takes color;
Fig. 8 is the schematic diagram that a kind of extension layer element according to an embodiment of the present invention takes color;
Fig. 9 is a kind of schematic diagram of same each mass-tone scene adaptation effect of colour system color operation according to an embodiment of the present invention;
Figure 10 is the schematic diagram that a kind of advancing colour according to an embodiment of the present invention takes color;
Figure 11 is the schematic diagram that another primary layer element according to an embodiment of the present invention takes color;
Figure 12 is the schematic diagram that another extension layer element according to an embodiment of the present invention takes color;
Figure 13 is another signal with each mass-tone scene adaptation effect of colour system color operation according to an embodiment of the present invention Figure;
Figure 14 is the schematic diagram that another advancing colour according to an embodiment of the present invention takes color algorithm;
Figure 15 is the schematic diagram that another primary layer element according to an embodiment of the present invention takes color;
Figure 16 is the schematic diagram that another extension layer element according to an embodiment of the present invention takes color;
Figure 17 is another signal with each mass-tone scene adaptation effect of colour system color operation according to an embodiment of the present invention Figure;
Figure 18 is the schematic diagram that a kind of three primary colors according to an embodiment of the present invention take color algorithm;
Figure 19 is the schematic diagram that another primary layer element according to an embodiment of the present invention takes color;
Figure 20 is the schematic diagram that another extension layer element according to an embodiment of the present invention takes color;
Figure 21 is another signal with each mass-tone scene adaptation effect of colour system color operation according to an embodiment of the present invention Figure;
Figure 22 is the schematic diagram that another three primary colors according to an embodiment of the present invention take color algorithm;
Figure 23 is the schematic diagram that another primary layer element according to an embodiment of the present invention takes color;
Figure 24 is the schematic diagram that another extension layer element according to an embodiment of the present invention takes color;
Figure 25 is another signal with each mass-tone scene adaptation effect of colour system color operation according to an embodiment of the present invention Figure;
Figure 26 is a kind of schematic diagram of core logic in products application level according to an embodiment of the present invention;
Figure 27 is the schematic diagram that a kind of effective painting canvas according to an embodiment of the present invention is constituted;
Figure 28 is that a kind of user according to an embodiment of the present invention initially markets the schematic diagram of creative design effect;
Figure 29 is a kind of schematic diagram that intention master map changes according to an embodiment of the present invention;
Figure 30 is a kind of schematic diagram of intelligent color matching functions according to an embodiment of the present invention;
Figure 31 is a kind of effect diagram to come into force of intelligently matching colors according to an embodiment of the present invention;
Figure 32 is the schematic diagram that a kind of user according to an embodiment of the present invention replaces marketing creative design effect;
Figure 33 is a kind of schematic diagram of the processing unit of image according to an embodiment of the present invention;And
Figure 34 is a kind of structural block diagram of electronic device according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product Or other step or units that equipment is intrinsic.
According to an aspect of an embodiment of the present invention, a kind of embodiment of the processing method of image is provided.
Optionally, in the present embodiment, the processing method of above-mentioned image can be applied to as shown in Figure 1 by server 102 and the hardware environment that is constituted of terminal 104 in.Fig. 1 is a kind of the hard of the processing method of image according to an embodiment of the present invention The schematic diagram of part environment.As shown in Figure 1, server 102 is attached by network with terminal 104, above-mentioned network includes but not Be limited to: wide area network, Metropolitan Area Network (MAN) or local area network, terminal 104 are not limited to PC, mobile phone, tablet computer etc..The embodiment of the present invention The processing method of image can be executed by server 102, can also be executed, be can also be by server 102 by terminal 104 It is executed jointly with terminal 104.Wherein, the processing method that terminal 104 executes the image of the embodiment of the present invention is also possible to by installing Client on it executes.
Fig. 2 is a kind of flow chart of the processing method of image according to an embodiment of the present invention.As shown in Fig. 2, this method can With the following steps are included:
Step S202, response are instructed by the object run that object run generates, display color matching information.
In the technical solution that the application above-mentioned steps S202 is provided, response is referred to by the object run that object run generates Enable, display color matching information, wherein color matching information be used to indicate to first object image according to the corresponding color of color matching information into Row color matching.
The embodiment can respond the mesh generated by object run in the creative making tool for making picture material Operational order, display color matching information are marked, which can be intelligent color tools, and object run can exist for user Preset time institute is stopped to the single-click operation of objective function button progress, double click operation, in target area in creative making tool The operation etc. of triggering, no limitations are hereby intended, objective function button can for creative making tool operation interface on show The function button intelligently matched colors.The object run of the embodiment can generate object run instruction, and object run instruction is used for Triggering display color matching information, which, which is used to indicate, carries out first object image according to color corresponding with color matching information Color matching can be a variety of different color matching information, be used to indicate intelligence color matching tendency, which can be with The form of list is shown in the operation interface of creative making tool, and first object image can be the target figure uploaded in advance Piece, can be advertisement static images, be shown in the currently valid canvas area of creative making tool, can be to first object figure As according to a certain kind color matching style match colors, for example, match colors according to same colour system, advancing colour color matching, three primary colors color matching etc..
Step S204 selects first object color matching information from color matching information.
In the technical solution that the application above-mentioned steps S204 is provided, color matching information includes first object color matching information.? Response is instructed by the object run that object run generates, and after display color matching information, selects first object from color matching information Color matching information, user can carry out selection operation to color matching information, to produce according to oneself color matching demand to first object image The raw operational order that first object color matching information is selected from color matching information, selects first object color matching from color matching information Information, which matches colors the corresponding color of information can be to the harmonious color matching of first object image progress.Optionally, from matching When selecting first object color matching information in color information, in region displaying target mark associated with first object color matching information Know, it is selected which is used to indicate first object color matching information, for example, for hook " √ ", circle with the center of circle etc., this Do not do any restrictions in place.
Step S206 matches first object image according to first object color corresponding with first object color matching information Color, the first object image after being matched colors.
The application above-mentioned steps S206 provide technical solution in, color matching information to be applied to first object image into The color of object of row color matching.From color matching information in select first object color matching information after, to first object image according to First object color corresponding with first object color matching information is matched colors, for example, matching to first object image according to same colour system The corresponding first object color of color is matched colors, to first object image according to advancing colour match colors corresponding first object color into Row color matching matches colors etc. to first object image according to the corresponding first object color of three primary colors color matching, to be matched colors First object image afterwards.First object image after the color matching namely the target figure after being matched colors by intelligent color matching functions Picture meets user to first object image the needs of matching colors, to avoid manually match colors to first object image leading The time-consuming and the color matching uncertain problem of effect of cause, realize that a key is intelligently matched colors, so that the realization of first object image more preferably regards Feel effect, improves the efficiency matched colors to image.
S202 to step S206 through the above steps, response are instructed by the object run that object run generates, display color matching Information, wherein color matching information, which is used to indicate, matches colors to first object image according to color corresponding with color matching information;From matching First object color matching information is selected in color information;To first object image according to first object match colors information corresponding first Color of object is matched colors, the first object image after being matched colors.By selecting the first mesh from the color matching information of display Standard configuration color information intelligently matches colors to first object image by first object color matching one key of information realization, avoids and pass through Man-made Color Matching, the function of lack of wisdom color matching cause to carry out image color matching time-consuming and color matching effect are uncertain, to improve To the efficiency that image is matched colors, the technical effect for improving the efficiency matched colors to image is realized, and then solve correlation The technical issues of low efficiency matched colors in technology to image.
As an alternative embodiment, color matching information includes at least one of: homochromy Adapted information, wherein same Color Adapted information, which is used to indicate, matches colors to first object image according to the color of same colour system;Advancing colour Adapted information, In, advancing colour Adapted information, which is used to indicate, matches colors to first object image according to color of the color value in targets threshold; Three primary colors Adapted information, wherein three primary colors Adapted information, which is used to indicate, matches colors to first object image according to three primary colors.
In this embodiment, color matching information includes a variety of different color matching information, may include homochromy Adapted information, approximation Color Adapted information, three primary colors Adapted information etc..Wherein, homochromy Adapted information is used to indicate to first object image according to of the same colour The color of system is matched colors, for example, matching colors to first object image according to warm colour or cool colour is matched colors etc.; Advancing colour Adapted information, which is used to indicate, matches colors to first object image according to color of the color value in targets threshold, the mesh Mark threshold value is for measuring whether color is close, that is, the color in the targets threshold can be considered as similar color;Three is former Color Adapted information, which is used to indicate, matches colors to first object image according to three primary colors, which is red, yellow, Lan Sanse, by Three primary colors can proportionally blend all colors.
It should be noted that the color matching information of the embodiment includes homochromy Adapted information, advancing colour Adapted information, three primary colors Adapted information is only the preferred embodiment of the embodiment of the present invention, and the color matching information for not representing the embodiment of the present invention is only above-mentioned Homochromy Adapted information, advancing colour Adapted information, three primary colors Adapted information, it is any to can be used for matching colors to first object image Color matching information all within the scope of the embodiment of the present invention, no longer illustrate one by one herein.
As an alternative embodiment, selecting first object color matching information from color matching information in step S204 Later, this method further include: the first prompt information of display, wherein whether the first prompt information determines for prompting to the first mesh Logo image is matched colors according to first object color corresponding with first object color matching information;To first object image according to The corresponding first object color of one target color matching information is matched colors, and the first object image after being matched colors includes: to obtain In the case where determining information, first object image is carried out according to first object color corresponding with first object color matching information Color matching, the first object image after match colors, wherein determine that information is used to indicate determination to first object image according to the The corresponding first object color of one target color matching information is matched colors.
It in this embodiment, can be with display reminding information in the operation interface of creative making tool.From color matching information In select first object color matching information after, show the first prompt information, first prompt information for prompt whether determine It matches colors to first object image according to first object color corresponding with first object color matching information, to give user's abundance The considerations of the time, avoid having selected first object to match colors information due to user misoperation.Optionally, the first prompt of the embodiment Information can be prompt information, the prompt information of form of icons, the prompt information of speech form etc. of written form, not do herein Any restrictions.
After showing the first prompt information, in the case where getting determining information, to first object image according to The corresponding first object color of first object color matching information is matched colors, which, which is used to indicate, determines to first object figure As matching colors according to the corresponding first object color of first object color matching information, for example, user in operation interface to showing " determination " function button operated, then get determining information, that is, first object color matching information be not user by In the color matching information that maloperation selects, thus to first object image according to the first mesh corresponding with first object color matching information Mark color is matched colors, the first object image after being matched colors.
As an alternative embodiment, after showing the first prompt information, this method further include: taken getting In the case where the information that disappears, cancels and first object image is carried out according to first object color corresponding with first object color matching information Color matching, wherein cancel information be used to indicate cancellation to first object image according to first object match colors information corresponding first Color of object is matched colors.
In this embodiment, after showing the first prompt information, can cancel to first object image according to first The corresponding first object color of target color matching information is matched colors.The embodiment can obtain after showing the first prompt information Cancellation information, the cancellation information are used to indicate cancellation to first object image according to corresponding with first object color matching information the One color of object is matched colors, for example, user operates " cancellation " function button shown in operation interface, is then got Cancel information, that is, first object color matching information and non-user want selection for matching colors to first object image Color matching information is then cancelled and being matched to first object image according to first object color corresponding with first object color matching information Color.
As an alternative embodiment, being believed according to matching colors with first object in step S206 first object image Corresponding first object color is ceased to match colors, after the first object image after being matched colors, this method further include: obtain the Two target images;Response is instructed by the object run that object run generates, display color matching information;The is selected from color matching information Two targets color matching information;Second target image is matched according to the second color of object corresponding with the second target color matching information Color, the second target image after being matched colors.
In this embodiment, to first object image according to the corresponding first object color of first object color matching information It matches colors, after the first object image after being matched colors, can also continue to match colors to the second target image, this second Target image can be different from first object image, can proceed to respond to the object run instruction generated by object run, generate A variety of different color matching information, for example, generating homochromy Adapted information, advancing colour Adapted information, three primary colors Adapted information etc..Aobvious After showing color matching information, the second target color matching information is selected from color matching information, which matches colors information as user's root According to the demand matched colors to the second target image, selected color matching information can be different from first object color matching information, The information that can match colors with first object is identical.From color matching information in select the second target color matching information after, to the second mesh Logo image is matched colors according to the second color of object corresponding with the second target color matching information, thus the second mesh after being matched colors Logo image.
As an alternative embodiment, selecting first object color matching information from color matching information in step S204 It is matching colors later and to first object image according to first object color corresponding with first object color matching information, is obtaining Before first object image after color matching, this method further include: displaying target text or Target Photo, wherein target text The first object image after instruction color matching is used to Target Photo.
In this embodiment it is possible to which the color matching effect to the first object image after color matching carries out preview.Believe from color matching Selected in breath first object color matching information after and to first object image according to first object color matching information it is corresponding First object color is matched colors, can be in operation circle of creative making tool before the first object image after being matched colors Displaying target text or Target Photo on face, the target text may include impression type words of description, after describing color matching First object image, the Target Photo can serve to indicate that color matching after first object image color effect preview, thus More intuitively understanding of the guidance user to the effect of the first object image after color matching, optimization user's operation experience, improves The efficiency matched colors to image.
As an alternative embodiment, step S206, match colors information to first object image according to first object Corresponding first object color is matched colors, and the first object image after being matched colors includes: the master for obtaining first object image The color attribute of the color value of body picture layer, the figure layer element of first object image and figure layer element, wherein figure layer element includes Multiple picture layers, multiple picture layers include main body picture layer, first object match colors information and main body picture layer color value, first The figure layer element of target image and the color attribute of figure layer element are associated, and color attribute includes the form and aspect category of first object image Property, saturation attributes and brightness attribute;It determines and the color value of main body picture layer, figure layer element and color attribute corresponding first Color of object;It matches colors to first object image according to first object color, the first object image after being matched colors.
In this embodiment, first object image includes figure layer element, and figure layer element includes multiple picture layers, the picture layer Including main body picture layer, the color value of the main body picture layer of first object image, operation circle of available current tool are obtained In face, the mass-tone of the main body picture layer of first object image, obtains the HSB value of the color, wherein H in effective canvas area (Hues) for indicating form and aspect, S (Saturation) is for indicating saturation degree, and B (Brightness) is for indicating brightness, with reality The acquisition of the mass-tone of the current effective canvas area interior main body picture layer in family.The embodiment can also obtain the figure of first object image Layer element carries out figure layer dismantling to first object image, obtains figure layer element, can be in the operation interface of creative making tool In, identify the figure layer element of creative making in effective painting canvas, which includes multiple picture layers, for example, include background layer, It matches colors included in body layer, decorative layer, text layers, alternation of bed and different types of layer to first object image When design element.The embodiment can also obtain the color attribute of the figure layer element of first object image, which can Think the attribute color value parameter item of the design element of figure layer element, can layer properties to the operating space of creative making tool with And intelligent call by value parameter is defined, and is carried out including form and aspect attribute, saturation attributes and the brightness attribute to first object image Definition can specify parameter to calculate according to the HSB color and the color application scenarios in marketing intention picture of figure layer element Rule.
In the color value of main body picture layer, the figure layer element of first object image and the figure layer member for obtaining first object image After the color attribute of element, first object face corresponding with the color value of main body picture layer, figure layer element and color attribute is determined Color, first object color corresponding with the color value of main body picture layer, figure layer element color attribute can be embodied to the first mesh The style tendency that logo image is intelligently matched colors, user can be random or be freely selected to first object image progress intelligence The style of color matching is inclined to, and the different corresponding HSB layers of design elements of style tendency association takes color rule and algorithm.
After determining first object color, match colors to first object image according to first object color, it can be with By the color value assignment of the color attribute after being calculated by HSB parameter to attribute corresponding to every layer of figure layer element, intelligence, which generates, to be schemed Piece effect is realized and completes the intelligence color matching purpose to first object image, so that the first object image after being matched colors, keeps away Time-consuming and the color matching effect for having exempted from Man-made Color Matching are uncertain, and a key intelligently realizes the color matching of the figure layer element of first object image, To realize first object image more preferably visual effect.
As an alternative embodiment, figure layer element further includes at least one of: Background lamella, decorative picture Layer, text diagram lamella, interaction figure lamella.
In this embodiment, first object image carries out figure layer dismantling, obtains figure layer element, which is intention system Make the layer element of creative making in effective painting canvas in the operation interface of tool, which includes multiple picture layers, in addition to packet It includes except drawing lamella, can also include Background lamella, decorative picture layer, text diagram lamella, interaction figure lamella etc., it can be with Including design element included in different types of layer, and then different designs attribute of an element color value parameter item is defined, with reality Intelligent color matching now is carried out to first object image, improves the efficiency matched colors to image.
As an alternative embodiment, the color value for obtaining the main body picture layer of first object image includes: to obtain Image of the first object image under the first color mode, wherein it is logical that the first color mode passes through red channel, green respectively Road, blue channel color value indicate color;The figure under the second color mode is converted by the image of the first color mode Picture, wherein the second color mode indicates color by form and aspect attribute, saturation attributes, brightness attribute respectively;Color is obtained respectively The weighted value of phase attribute, the weighted value of saturation attributes, brightness attribute weighted value, wherein the weighted value of form and aspect attribute is used for Indicate specific gravity shared by influence of the form and aspect attribute to the visual color of first object image, the weighted value of saturation attributes is for referring to Show that specific gravity shared by influence of the saturation attributes to visual color, the weighted value of brightness attribute are used to indicate brightness attribute to vision Specific gravity shared by the influence of color;Pass through the weight of the weighted value of form and aspect attribute, the weighted value of saturation attributes, brightness attribute Value carries out clustering processing according to image of the randomly selected multiple cluster centres to the second color mode respectively, obtains multiple poly- Class result, wherein multiple cluster centres and multiple cluster results correspond;By minimum poly- of distinctiveness ratio in multiple cluster results Class result is determined as target cluster result;By the average color of the largest number of colour types of pixel in target cluster result It is worth, the color value of picture layer based on determination.
In this embodiment, when obtaining the color value of main body picture layer of first object image, available first mesh Image of the logo image under the first color mode, first color mode pass through red channel, green channel, blue channel respectively Color value indicate color, which can be rgb color mode.Image under usual rgb color mode There are larger differences for color value and human vision observed value, that is, close rgb value represents two class colors, human vision sees it The impression examined often differs larger.The embodiment converts the image of the first color mode in the figure under the second color mode Picture, which indicates color by form and aspect attribute, saturation attributes, brightness attribute respectively, that is, form and aspect category Property, saturation attributes, brightness attribute be color attribute, wherein form and aspect attribute be used for describe first object image color base This attribute, value 0-360, saturation attributes are used to control the color purity of first object image, and saturation degree is higher, and color is purer, Saturation degree is low, shoals, value 0-100%, brightness attribute namely lightness, bright for controlling the chroma-luminance of first object image Degree more it is high then tendency brilliant white, lightness is low, is inclined to low key tone, value 0-100%.Second color mode can be HSB color Mode, the image under HSB color mode more meets Human Visual System, that is, HSB color system is compared to RGB color system Description closer to people to color, the embodiment can be using the HSB color conducts close to people to the vision description of color Cluster color vector obtains more preferably visual color effect with this.
In this embodiment, the form and aspect attribute of the second color mode, saturation attributes, brightness category are for visual experience of accepting Play the role of being different, thus calculate color space distance by the way of a kind of weighting, form and aspect category can be obtained respectively The weighted value of property, the weighted value of saturation attributes, brightness attribute weighted value.The visual color of the embodiment can regard for the mankind Feel the color visually perceived to first object image, the weighted value of form and aspect attribute is used to indicate form and aspect attribute to first Specific gravity shared by the influence of the visual color of target image, the weighted value of saturation attributes are used to indicate saturation attributes to vision Specific gravity shared by the influence of color, the weighted value of brightness attribute are used to indicate ratio shared by influence of the brightness attribute to visual color Weight.
The embodiment can obtain the color value of main body picture layer using K-means algorithm, which is one kind Clustering algorithm, main thought is data set to be divided into different classifications by iterative process, so that the standard of evaluation clustering performance Then function is optimal, to make compact in each cluster generated, independence between class.K seed point can be randomly selected as K The initial mass center of a cluster, calculate separately remaining element to K cluster initial mass center distinctiveness ratio, and these elements are incorporated into respectively The cluster minimum to distinctiveness ratio, according to cluster result, the average value by seeking the respective latitude of all elements in cluster recalculates K A respective center of cluster clusters again according still further to new center, repeats according to cluster result, by seeking owning in cluster The average value of the respective latitude of element recalculates the respective center of K cluster, according still further to new center, the step of cluster again, Until cluster result no longer changes.
In this embodiment, the selection of the cluster centre of K-means algorithm being affected to the result of cluster, in order to anti- Only influence of the selection of the cluster centre of K-means algorithm for cluster result is randomly choosed in cluster using multiple cluster The heart, the cluster centre are the seed point of clustering algorithm, initial point.In the weight for the form and aspect attribute for obtaining first object image respectively Value, the weighted value of saturation attributes, brightness attribute weighted value after, pass through the weighted value of form and aspect attribute, saturation attributes The weighted value of weighted value, brightness attribute, respectively according to randomly selected multiple cluster centres to the image of the second color mode into Row clustering processing obtains multiple cluster results, for example, by 15 cluster centres randomly selected to the second color mode Image carries out cluster operation.In primal algorithm, the formula for calculating distinctiveness ratio between sample point generally uses Euclidean distance formula, Influence of each component to color difference in this method default color vector is consistent, that is, hue value changes 1 He of unit It is identical that saturation degree, which changes influence of the unit 1 to visual color,.However, influence of the form and aspect component to visual color is often big In influence of the saturation degree to visual color, thus, the embodiment using a kind of distinctiveness ratio of weighting calculation formula, that is,Wherein, dijFor indicating distinctiveness ratio, wk=(wkh,wks,wkb), be respectively used to indicate form and aspect, The weight of each component in saturation degree, lightness, k is for indicating that k-th of cluster centre, n are used to indicate the number of cluster centre.
Clustering processing is being carried out according to image of the randomly selected multiple cluster centres to the second color mode respectively, is being obtained After multiple cluster results, the minimum cluster result of distinctiveness ratio in multiple cluster results is determined as target cluster result, that is, The minimum result of distinctiveness ratio will be totally weighted in multiple cluster results as final target cluster result, is eliminated in cluster with this The influence of the heart, and then by the average color of the largest number of colour types of pixel in target cluster result, determine based on The color value of picture layer.Optionally, which can specify that mesh for the color progress reasonable analysis to first object image The cluster classification for marking cluster result is 10, that is, finally obtaining 10 kinds of colour types, K value is equal to 10, and to target cluster result Pixels statistics and mean value calculation are carried out, counts the pixel number and average color of each colour type respectively, is selected The largest number of colour types of capture vegetarian refreshments can carry out inverted order row according to the size of pixel number in each colour type Column, the average value for the corresponding classification that makes number one is the color value required by us, and average color is the master of the embodiment Domain color required by body picture layer.
As an alternative embodiment, obtaining the weighted value, bright of the weighted value of form and aspect attribute, saturation attributes respectively The weighted value for spending attribute includes: to determine form and aspect attribute by object module, form and aspect attribute, saturation attributes and brightness attribute Weighted value, the weighted values of saturation attributes, brightness attribute weighted value, wherein object module is by target sample to pre- Cover half type is trained, target sample include the form and aspect attribute of the multiple images got in advance, multiple images it is full With degree attribute, the brightness attribute of multiple images, the weighted value of the form and aspect attribute of multiple images, multiple images saturation attributes Weighted value, multiple images brightness attribute weighted value.
In this embodiment, the weighted value of form and aspect attribute, the weighted value of saturation attributes, brightness attribute are being obtained respectively , can be by a large amount of sample view, training, debugging when weighted value, the final weighted value for determining form and aspect attribute, saturation attributes Weighted value, brightness attribute weighted value size.By object module, form and aspect attribute, saturation attributes and brightness attribute, really The weighted value of the weighted value of form and aspect attribute, the weighted value of saturation attributes, brightness attribute is made, which is to pass through target Sample is trained pre-determined model, which includes the form and aspect attribute, more of the multiple images got in advance The saturation attributes of a image, the brightness attribute of multiple images, the weighted value of the form and aspect attribute of multiple images, multiple images it is full With the weighted value for spending the weighted value of attribute, the brightness attribute of multiple images, pre-determined model can be the detection model initially set up, It can be initial neural network model, which described based on the mathematical model of neuron, And the neuron is by the form and aspect attribute of multiple images that acquires at the beginning, the saturation attributes of multiple images, multiple images Brightness attribute, the weighted values of form and aspect attribute of multiple images, the weighted values of the saturation attributes of multiple images, multiple images What the weighted value of brightness attribute was set up.
Optionally, which is parsed when being trained to obtain object module to pre-determined model by machine learning The form and aspect attribute of multiple images, the saturation attributes of multiple images, the brightness attribute of multiple images, multiple images form and aspect attribute Weighted value, the weighted values of saturation attributes of multiple images, multiple images brightness attribute weighted value.Wherein it is possible to right The form and aspect attribute of multiple images, the saturation attributes of multiple images, the brightness attribute of multiple images, multiple images form and aspect attribute Weighted value, the weighted values of saturation attributes of multiple images, multiple images brightness attribute weighted value it is consistent according to distribution Property algorithm, denoising, sampling scheduling algorithm pre-processed, then from pretreated data carry out feature extraction, eigentransformation, spy Sign normalizing, feature combination etc. obtain the feature for training pre-determined model, further pass through optimization algorithm, hypothesis function, loss Function, decision boundary, convergence rate, iterative strategy etc. handle feature, obtain object module.It finally can also be to target Model carries out the evaluations such as cross validation, assessment target, over-fitting, poor fitting, so that it is determined that trained object module out, in turn By object module, form and aspect attribute, saturation attributes and brightness attribute, weighted value, the saturation attributes of form and aspect attribute are determined Weighted value, brightness attribute weighted value, pass through the weighted value of form and aspect attribute, the weighted values of saturation attributes, brightness attribute Weighted value carries out clustering processing according to image of the randomly selected multiple cluster centres to the second color mode respectively, obtains more The minimum cluster result of distinctiveness ratio in multiple cluster results is determined as target cluster result, thus by target by a cluster result The average color of the largest number of colour types of pixel in cluster result, determine based on picture layer color value.
As an alternative embodiment, the color attribute for obtaining figure layer element includes: to be obtained by least one of Take the color attribute of figure layer element: the color attribute of shape in figure layer element, wherein the color attribute of shape includes the color of shape Phase attribute, saturation attributes, brightness attribute and transparency property;The color attribute of text in figure layer element, wherein the face of text Color attribute includes form and aspect attribute, saturation attributes, brightness attribute and the transparency property of text;Mass-tone in figure layer element, In, mass-tone includes form and aspect attribute, saturation attributes, brightness attribute and transparency property.
In this embodiment, when obtaining the color attribute of figure layer element, the color of shape in available figure layer element Attribute Sharp (s) can be used for describing the color value of shape in figure layer element, and the color attribute of shape includes in the figure layer element Form and aspect attribute h (s), saturation attributes s (s), brightness attribute b (s) and the transparency property a (s) of shape, multiple shapes are with h (s1), s (s1), b (s1), a (s1), h (s2), s (s2), b (s2), a (s2) ... are successively described.
The color attribute of the acquisition figure layer element of the embodiment can also obtain the color attribute of text in figure layer element Text (t) can be used for describing the color value of font in figure layer element.The color attribute of text includes text in the figure layer element Form and aspect attribute h (t), saturation attributes s (t), brightness attribute b (t) and transparency property a (t).
The color attribute of the acquisition figure layer element of the embodiment can be with the mass-tone (Primary) in figure layer element, can be with Mass-tone value is obtained by the picture recognition module of effective canvas area, which includes form and aspect attribute h (p), saturation attributes s (p), brightness attribute b (p) and transparency property a (p), can state are as follows: h (p), s (p), b (p).
Optionally, embodiment progress is homochromy takes color, and primary layer element takes color, for example, sharp1 (s1)-sharp (s3), Text (t) is remained unchanged with mass-tone h (p) as main rule;A layer element can also be extended and take color, with mass-tone h (p)+30 Degree, 330 degree are main rule;It can also carry out advancing colour and take color algorithm, be based on mass-tone h (p), forward direction takes 30 degree of color ,+30 degree; It can also carry out primary layer element and take color, for example, sharp1 (s1)-sharp (s3), text (t), is with the degree of mass-tone h (p)+30 Main rule;A layer element can also be extended and take color, be main rule with the degree of mass-tone h (p)+20 ,+10 degree;Can also carry out Advancing colour takes color algorithm, is based on mass-tone h (p), and negative sense takes 30 degree of color, and -30;It can also carry out primary layer element and take color, for example, Sharp1 (s1)-sharp (s3), text (t) is main rule with the degree of mass-tone h (p) -30;A layer element can also be extended to take Color is main rule with the degree of mass-tone h (p) -20, -10 degree;It can also carry out three-primary colours and take color algorithm, be based on mass-tone h (p), it is positive Take 120 degree of color ,+120, approximate diffusion ± 30 degree are carried out based on the color value;It can also carry out primary layer element and take color, for example, Sharp1 (s1)-sharp (s3), text (t) is main rule with the degree of mass-tone h (p)+120;A layer element can also be extended Color is taken, is main rule with the degree of mass-tone h (p)+90 ,+150 degree;It can also carry out three-primary colours and take color algorithm, be based on mass-tone h (p), Forward direction takes 240 degree of color, and+240, approximate diffusion ± 30 degree are carried out based on the color value;It can also carry out primary layer element and take color, than Such as, sharp1 (s1)-sharp (s3), text (t) is main rule with the degree of mass-tone h (p)+240;Layer member can also be extended Element takes color, is main rule etc. with the degree of mass-tone h (p)+210 ,+270 degree.
As an alternative embodiment, the color attribute for obtaining figure layer element includes: respectively according to figure layer element packet The priority of the multiple picture layers included obtains the color attribute of each picture layer.
In this embodiment, in the Intelligent treatment effect of the color of first object image, it is excellent that layer element can also be added The mark of first grade is used to indicate the priority of multiple picture layers, the multiple picture layers for including according to figure layer element respectively it is preferential Grade, obtains the color attribute of each picture layer, to distinguish processing in the color attribute for obtaining figure layer element.
The embodiment can carry out layered shaping to the image of marketing creative making tool, identified, led to according to image mass-tone The color value rule for crossing color H SB carries out automatic assignment to different types of layer properties, and intelligence generates high-quality marketing intention figure Piece.
The key technology that the embodiment is related to is to identify to present image mass-tone, figure layer dismantling and its attribute definition, HSB's takes color method and corresponding parameter computation rule and layer properties assignment and intelligence to generate.
The embodiment can merge tools production user painting canvas effective coverage picture material by image mass-tone identification module, The color for identifying main body picture layer, obtains its HSB color value, by figure layer dismantling and attribute definition module to the figure in tool operation area Layer attribute and intelligent call by value parameter definition take color calculation method of parameters according to HSB color and in marketing intention picture by HSB Color application scenarios specify parameter computation rule, by layer properties assignment module will by HSB parameter calculate after attribute Color value assignment corresponds to attribute to figure layer, and intelligence generates picture effect, so that image mass-tone identification technology and color H SB color value be advised It then combines, generates high quality intention picture for the intelligence of user's automation, and then solve amateur designer and matching colors manually Shi Wufa selects harmonious color matching, the problem for causing the visual effect of marketing intention picture bad.
Technical solution of the present invention is illustrated below with reference to preferred embodiment.
The embodiment takes color rule in the application of figure layer parameter intelligent assignment by image recognition, HSB, current for user The visual environment of marketing intention picture, intelligence generates matched layer element scheme of colour, thus significant increase intention system Make efficiency and effect.
The technology implementation process of the embodiment of the present invention is introduced below.
Fig. 3 is the flow chart of another image procossing according to an embodiment of the present invention.As shown in figure 3, this method include with Lower step:
Step S31 makes intention picture.
Step S32 intelligently matches colors to intention picture.
Wherein, it includes step S321 and step S322 that this, which is intelligently matched colors,.Wherein, step S321 includes that step S3211 is extremely walked Rapid S3215:
Step S3211 obtains original RGB image by mass-tone identification module.
Original RGB image is converted to HSB image by step S3212.
Step S3213 randomly selects the initial point of cluster operation.
Step S3214 calculates weighting distinctiveness ratio.
The embodiment can repeat 10 step S3213 and step S3214.
Step S3215 chooses optimum cluster result.
Step S3216, statistical pixel point calculate average value.
Step S3217, sequence export domain color value.
Step S322 includes step S3221 to step S3223:
Step S3221, intelligence color matching application module describe the various elements on painting canvas by JSON associated metadata elements.
Step S3222, HSB color value calculates.
Step S3223, element property values replacement and effect application.
The mass-tone identification of the embodiment of the present invention is introduced below.
Fig. 4 is a kind of schematic diagram of mass-tone identification according to an embodiment of the present invention.As shown in figure 4, the domain color of image is known Improved clustering algorithm K-means can not be used, since there are larger differences for traditional RGB color value and human vision observed value It is different, that is, the two class colors that close rgb value represents, visual experience often differ larger.Therefore, which was clustering Cheng Zhong, carrying out color space conversion to RGB image first is the HSB image for more meeting Human Visual System, due to HSB image Three basic colors attributes play the role of being different for visual experience, which can be by the way of a kind of weighting Color space distance is calculated, the size that visual color influences is distributed according to the three of HSB image basic colors attributes different Weight, by a large amount of sample training, the final size for determining weight.
Optionally, influence of the selection of embodiment K-means algorithm seed point in order to prevent for cluster result uses Repeatedly cluster, randomly selects the mode of seed point.In the ten kinds of colour types finally obtained, each colour type is counted respectively Pixel number and average color, the largest number of colour types of selected pixels point, average color is this programme Required domain color.
In this embodiment, K-means algorithm is a kind of clustering algorithm, is to be divided into data set not by iterative process With classification so that evaluation clustering performance criterion function be optimal, thus make generate each cluster in it is compact, between class solely It is vertical.
Fig. 5 is a kind of schematic diagram of K-means algorithm according to an embodiment of the present invention.As shown in figure 5, can randomly select Initial mass center of the K point as K cluster calculates separately remaining element to the different of K cluster center for example, choosing A, B, C, D, E It spends, for example, calculating arrow instruction in such as figure calculates the distinctiveness ratio for being left element to A, B, C, D, E, and these elements is drawn respectively It is grouped into the minimum cluster of distinctiveness ratio, further according to cluster result, by seeking the average value of the respective latitude of all elements in cluster come again The respective center of K cluster is calculated to cluster again according to new center.It repeats according to cluster result, by seeking all members in cluster The average value of plain respectively latitude clusters again to recalculate the respective center of K cluster according to new center, until cluster knot Fruit no longer changes.
In this embodiment it is possible to use more close to people to the HSB color of the vision of color description as clustering face Color vector obtains more preferably visual color effect with this.In primal algorithm, the formula one of distinctiveness ratio between sample point is calculated As use Euclidean distance formula, that is,Each component in this method default color vector is to face The different influence of color difference is consistent, that is, the influence of hue value change unit 1 and saturation degree change unit 1 to visual color is It is identical.However, in practice, influence of the form and aspect component to visual color will be commonly greater than saturation degree to the shadow of visual color It rings.Therefore, which uses a kind of calculation formula of the distinctiveness ratio of weighting, that is,Wherein, dij For indicating distinctiveness ratio, wk=(wkh,wks,wkb), it is respectively used to indicate the power of each component in form and aspect, saturation degree, lightness Value, occurrence can be by observing a large amount of sample, being trained, debug and can obtain, and k is for indicating k-th of cluster centre, n For indicating the number of cluster centre.
In this embodiment, it is affected, can pass through to the result of cluster since the initial point of K-means algorithm is selected 15 initial points randomly selected carry out cluster operation respectively, and minimum distinctiveness ratio is totally weighted in acquisition cluster result As a result it is used as final result, the influence of initial value is eliminated with this.
In order to carry out reasonable analysis to color of image, which can specify that cluster classification is 10, that is, K value is equal to 10, and determine that cluster result carries out pixels statistics and mean value calculation to final, it may finally be according to pixel in each classification The size of point number carries out inverted order arrangement, and the average value for the corresponding classification that makes number one is the color value required by us, similarly Analogize.
Color algorithm is taken to be introduced the embodiment of the present invention below.
Description of the HSB color system compared to RGB color system closer to people to color, wherein form and aspect (Hue) are used In the essential attribute of description color, value 0-360;Saturation degree (Saturation), for controlling color purity, higher color is more It is pure, it is low, it shoals, value 0-100%;Lightness (Brightness), for controlling chroma-luminance, more it is high then tendency brilliant white, it is low Then it is inclined to low key tone, value 0-100%.The color algorithm that takes of the embodiment is to carry out taking color rule using HSB colour system Operation.
The corresponding relationship between the color of the embodiment of the present invention and figure layer element is introduced below.
Primary obtains mass-tone value by effective canvas area picture recognition module, can state are as follows: h for main color value (p),s(p),b(p);Alpha (a) is transparency parameter item;Sharp (s), for the color value of shape in describing layer element, one A color value can be stated are as follows: h (s), s (s), b (s), transparency are expressed as a (s);Multiple shapes with for (s1), (s2), (s3) ... it successively describes;Text (t), for the color value of font in describing layer element, a color value can be stated are as follows: h (t), s (t), b (t), transparency are expressed as a (t).
Fig. 6 is the homochromy schematic diagram for taking color algorithm of one kind according to an embodiment of the present invention.As shown in fig. 6, in text (text) in, h (t)=0, s (t)=100, b (t)=40, a (t)=100%;In shape 1 (sharp1), h (s1)=0, s (s1)=10, b (s1)=100, a (s1)=95%;In shape 2 (sharp2), h (s2)=0, s (s2)=50, b (s2)= 100, a (s2)=60%;In shape 3 (sharp3), h (s3)=0, s (s3)=30, b (s3)=100, a (s3)=95%; In shape 4 (sharp4), h (s4)=0, s (s4)=100, b (s4)=100, a (s4)=60%;At mass-tone (primary) In, h (p)=0, s (p)=100, b (p)=100, a (s4)=100%.Same colour system can be in+30 degree, -30 degree of mass-tone Between be changed.
Fig. 7 is the schematic diagram that a kind of primary layer element according to an embodiment of the present invention takes color.As shown in fig. 7, primary layer is first Element takes color, that is, sharp1 (s1)-sharp (s3), text (t), is remained unchanged with mass-tone h (p) as main rule.Wherein, main Color is h (p), s (p), b (p), a (p);Shape 1 be h (s1)=h (p), s (s1)=s (p) * 0.1, b (s1)=100, a (s1)= 95%;Shape 2 is h (s2)=h (p), s (s2)=s (p) * 0.5, b (s2)=100, a (s2)=60%;Text is h (t)=h (p), s (t)=s (p), b (t)=b (p) * 0.4, a (t)=100%;Shape 3 be h (s3)=h (p), s (s3)=s (p) * 0.3, B (s3)=100, a (s3)=95%;Shape 4 is h (s4)=h (p), s (s4)=s (p), b (s4)=100, a (s4)=60%.
Fig. 8 is the schematic diagram that a kind of extension layer element according to an embodiment of the present invention takes color.As shown in figure 8, being expanded It is main rule with the degree of mass-tone h (p)+30 ,+330 when exhibition layer element takes color.Wherein, shape 5 is h (s5)=h (p)+30, s (s5)=s (p) * 0.2, b (s5)=100, a (s5)=95%;Shape 6 is h (s6)=h (p)+30, s (s6)=s (p) * 0.5, b (s6)=100, a (s6)=60%;Shape 7 is h (s7)=h (p)+30, s (s7)=s (p) * 0.4, b (s7)=100, a (s7) =95%;Shape 8 is h (s8)=h (p)+330, s (s8)=s (p) * 0.2, b (s8)=100, a (s8)=95%;Shape 9 is h (s9)=h (p)+330, s (s9)=s (p) * 0.5, b (s9)=100, a (s9)=60%;Shape 10 be h (s10)=h (p)+ 330, s (s10)=s (p) * 0.4, b (s10)=100, a (s10)=95%.
Fig. 9 is a kind of schematic diagram of same each mass-tone scene adaptation effect of colour system color operation according to an embodiment of the present invention. As shown in figure 9, image shown in figure is same colour system, the adaptation effect of each mass-tone scene of same colour system color operation can be indicated Fruit.
Figure 10 is the schematic diagram that a kind of advancing colour according to an embodiment of the present invention takes color.As shown in Figure 10, approximation is being carried out When color takes color algorithm, it is based on mass-tone h (p), forward direction takes 30 degree of color, and+30.Wherein, in text (text), h (t)=60, s (t) =100, b (t)=40, a (t)=100%;In shape 1 (sharp1), h (s1)=90, s (s1)=20, b (s1)=100, a (s1)=95%;In shape 2 (sharp2), h (s2)=90, s (s2)=50, b (s2)=100, a (s2)=60%;In shape In shape 3 (sharp3), h (s3)=90, s (s3)=40, b (s3)=100, a (s3)=95%;In shape 4 (sharp4), h (s4)=90, s (s4)=100, b (s4)=100, a (s4)=60%;In mass-tone (primary), h (p)=60, s (p)= 100, b (p)=100, a (p)=100%.
Figure 11 is the schematic diagram that another primary layer element according to an embodiment of the present invention takes color.As shown in figure 11, into It is main rule with mass-tone h (p)+30 with sharp1 (s1)-sharp (s3), text (t) when row primary layer element takes color.Its In, mass-tone is h (p), s (p), b (p), a (p);Shape 1 be h (s1)=h (p)+30, s (s1)=s (p) * 0.2, b (s1)= 100, a (s1)=95%;Shape 2 is h (s2)=h (p)+30, s (s2)=s (p) * 0.5, b (s2)=100, a (s2)=60%; Text is h (t)=h (p), s (t)=s (p), b (t)=b (p) * 0.4, a (t)=100%;Shape 3 is h (s3)=h (p)+30, S (s3)=s (p) * 0.4, b (s3)=100, a (s3)=95%;Shape 4 is h (s4)=h (p)+30, s (s4)=s (p), b (s4)=100, a (s4)=60%.
Figure 12 is the schematic diagram that another extension layer element according to an embodiment of the present invention takes color.As shown in figure 12, into It is main rule with mass-tone h (p)+20 ,+10 when row extension layer element takes color.Wherein, shape 5 is h (s5)=h (p)+20, s (s5)=s (p) * 0.2, b (s5)=100, a (s5)=95%;Shape 6 is h (s6)=h (p)+20, s (s6)=s (p) * 0.5, b (s6)=100, a (s6)=60%;Shape 7 be h (s7)=h (p)+20, s (s7)=s (p) * 04, b (s7)=100, a (s7)= 95%;Shape 8 is h (s8)=h (p)+10, s (s8)=s (p) * 0.2, b (s8)=100, a (s8)=95%;Shape 9 is h (s9)=h (p)+10, s (s9)=s (p) * 0.5, b (s9)=100, a (s9)=60%;Shape 10 is h (s10)=h (p)+10, S (s10)=s (p) * 0.4, b (s10)=100, a (s10)=95%.
Figure 13 is another signal with each mass-tone scene adaptation effect of colour system color operation according to an embodiment of the present invention Figure.As shown in figure 13, image shown in figure is same colour system, can indicate the adaptation of each mass-tone scene of same colour system color operation Effect.
Figure 14 is the schematic diagram that another advancing colour according to an embodiment of the present invention takes color algorithm.As shown in figure 14, into When row advancing colour takes color, it is based on mass-tone h (p), negative sense takes 30 degree of color, -30 degree.Wherein, in text (text), h (t)=60, s (t)=100, b (t)=40, a (t)=100%;In shape 1 (sharp1), h (s1)=30, s (s1)=20, b (s1)= 100, a (s1)=95%;In shape 2 (sharp2), h (s2)=30, s (s2)=50, b (s2)=100, a (s2)=60%; In shape 3 (sharp3), h (s3)=30, s (s3)=40, b (s3)=100, a (s3)=95%;At shape 4 (sharp4) In, h (s4)=30, s (s4)=100, b (s4)=100, a (s4)=60%;In mass-tone (primary), h (p)=60, s (p)=100, b (p)=100, a (p)=100%.
Figure 15 is the schematic diagram that another primary layer element according to an embodiment of the present invention takes color.As shown in figure 15, into When row primary layer element takes color, sharp1 (s1)-sharp (s3), text (t) is main rule with the degree of mass-tone h (p) -30.Its In, mass-tone is h (p), s (p), b (p), a (p);Shape 1 be h (s1)=h (p) -30, s (s1)=s (p) * 0.2, b (s1)= 100, a (s1)=95%;Shape 2 is h (s2)=h (p) -30, s (s2)=s (p) * 0.5, b (s2)=100, a (s2)=60%; Text is h (t)=h (p), s (t)=s (p), b (t)=b (p) * 0.4, a (t)=100%;Shape 3 is h (s3)=h (p) -30, S (s3)=s (p) * 0.4, b (s3)=100, a (s3)=95%;Shape 4 is h (s4)=h (p) -30, s (s4)=s (p), b (s4)=100, a (s4)=60%.
Figure 16 is the schematic diagram that another extension layer element according to an embodiment of the present invention takes color.As shown in figure 16, into It is main rule with the degree of mass-tone h (p) -20, -10 degree when row extension layer element takes color.Wherein, shape 5 is h (s5)=h (p)- 20, s (s5)=s (p) * 0.2, b (s5)=100, a (s5)=95%;Shape 6 is h (s6)=h (p) -20, s (s6)=s (p) * 0.5, b (s6)=100, a (s6)=60%;Shape 7 is h (s7)=h (p) -20, s (s7)=s (p) * 04, b (s7)=100, a (s7)=95%;Shape 8 is h (s8)=h (p) -10, s (s8)=s (p) * 0.2, b (s8)=100, a (s8)=95%;Shape 9 For h (s9)=h (p) -10, s (s9)=s (p) * 0.5, b (s9)=100, a (s9)=60%;Shape 10 is h (s10)=h (p)- 10, s (s10)=s (p) * 0.4, b (s10)=100, a (s10)=95%.
Figure 17 is another signal with each mass-tone scene adaptation effect of colour system color operation according to an embodiment of the present invention Figure.As shown in figure 17, image shown in figure is same colour system, can indicate the adaptation of each mass-tone scene of same colour system color operation Effect.
Figure 18 is the schematic diagram that a kind of three primary colors according to an embodiment of the present invention take color algorithm.As shown in figure 18, based on master Color h (p), forward direction take 120 degree of color, and+120 degree carry out approximate diffusion ± 30 degree based on the color value.Wherein, in text (text), H (t)=210, s (t)=100, b (t)=40, a (t)=100%;In shape 1 (sharp1), h (s1)=210, s (s1)= 20, b (s1)=100, a (s1)=95%;In shape 2 (sharp2), h (s2)=210, s (s2)=50, b (s2)=100, a (s2)=60%;In shape 3 (sharp3), h (s3)=210, s (s3)=40, b (s3)=100, a (s3)=95%;In shape In shape 4 (sharp4), h (s4)=90, s (s4)=100, b (s4)=100, a (s4)=60%;In mass-tone (primary), h (p)=90, s (p)=100, b (p)=100, a (p)=100%.
Figure 19 is the schematic diagram that another primary layer element according to an embodiment of the present invention takes color.As shown in figure 19, Sharp1 (s1)-sharp (s3), text (t) is main rule with the degree of mass-tone h (p)+120.Wherein, mass-tone be h (p), s (p), B (p), a (p);Shape 1 is h (s1)=h (p)+120, s (s1)=s (p) * 0.2, b (s1)=100, a (s1)=95%;Shape 2 For h (s2)=h (p)+120, s (s2)=s (p) * 0.5, b (s2)=100, a (s2)=60%;Text be h (t)=h (p)+ 120, s (t)=s (p), b (t)=b (p) * 0.4, a (t)=100%;Shape 3 is h (s3)=h (p)+120, s (s3)=s (p) * 0.4, b (s3)=100, a (s3)=95%;Shape 4 is h (s4)=h (p)+120, s (s4)=s (p), b (s4)=100, a (s4)=60%.
Figure 20 is the schematic diagram that another extension layer element according to an embodiment of the present invention takes color.As shown in figure 20, into It when row extension layer element takes color, can be spent with mass-tone h (p)+90 ,+150 degree are main rule.Wherein, shape 5 is h (s5)=h (p)+90, s (s5)=s (p) * 0.2, b (s5)=100, a (s5)=95%;Shape 6 is h (s6)=h (p)+90, s (s6)=s (p) * 0.5, b (s6)=100, a (s6)=60%;Shape 7 be h (s7)=h (p)+90, s (s7)=s (p) * 04, b (s7)= 100, a (s7)=95%;Shape 8 be h (s8)=h (p)+150, s (s8)=s (p) * 0.2, b (s8)=100, a (s8)= 95%;Shape 9 is h (s9)=h (p)+150, s (s9)=s (p) * 0.5, b (s9)=100, a (s9)=60%;Shape 10 is h (s10)=h (p)+150, s (s10)=s (p) * 0.4, b (s10)=100, a (s10)=95%.
Figure 21 is another signal with each mass-tone scene adaptation effect of colour system color operation according to an embodiment of the present invention Figure.As shown in figure 21, image shown in figure is same colour system, can indicate the adaptation of each mass-tone scene of same colour system color operation Effect.
Figure 22 is the schematic diagram that another three primary colors according to an embodiment of the present invention take color algorithm.As shown in figure 22, it is based on Mass-tone h (p), forward direction take 240 degree of color, and+240 degree carry out approximate diffusion ± 30 degree based on the color value.Wherein, at text (text) In, h (t)=330, s (t)=100, b (t)=40, a (t)=100%;In shape 1 (sharp1), h (s1)=330, s (s1)=20, b (s1)=100, a (s1)=95%;In shape 2 (sharp2), h (s2)=330, s (s2)=50, b (s2) =100, a (s2)=60%;In shape 3 (sharp3), h (s3)=330, s (s3)=40, b (s3)=100, a (s3)= 95%;In shape 4 (sharp4), h (s4)=330, s (s4)=100, b (s4)=100, a (s4)=60%;In mass-tone (primary) in, h (p)=90, s (p)=100, b (p)=100, a (p)=100%.
Figure 23 is the schematic diagram that another primary layer element according to an embodiment of the present invention takes color.As shown in figure 23, Sharp1 (s1)-sharp (s3), text (t) is main rule with the degree of mass-tone h (p)+240.Wherein, mass-tone be h (p), s (p), B (p), a (p);Shape 1 is h (s1)=h (p)+240, s (s1)=s (p) * 0.2, b (s1)=100, a (s1)=95%;Shape 2 For h (s2)=h (p)+240, s (s2)=s (p) * 0.5, b (s2)=100, a (s2)=60%;Text be h (t)=h (p)+ 240, s (t)=s (p), b (t)=b (p) * 0.4, a (t)=100%;Shape 3 is h (s3)=h (p)+240, s (s3)=s (p) * 0.4, b (s3)=100, a (s3)=95%;Shape 4 is h (s4)=h (p)+240, s (s4)=s (p), b (s4)=100, a (s4)=60%.
Figure 24 is the schematic diagram that another extension layer element according to an embodiment of the present invention takes color.As shown in figure 24, into It when row extension layer element takes color, can be spent with mass-tone h (p)+210 ,+270 degree are main rule.Wherein, shape 5 is h (s5)=h (p)+210, s (s5)=s (p) * 0.2, b (s5)=100, a (s5)=95%;Shape 6 be h (s6)=h (p)+210, s (s6)= S (p) * 0.5, b (s6)=100, a (s6)=60%;Shape 7 is h (s7)=h (p)+210, s (s7)=s (p) * 0.4, b (s7) =100, a (s7)=95%;Shape 8 be h (s8)=h (p)+270, s (s8)=s (p) * 0.2, b (s8)=100, a (s8)= 95%;Shape 9 is h (s9)=h (p)+270, s (s9)=s (p) * 0.5, b (s9)=100, a (s9)=60%;Shape 10 is h (s10)=h (p)+270, s (s10)=s (p) * 0.4, b (s10)=100, a (s10)=95%.
Figure 25 is another signal with each mass-tone scene adaptation effect of colour system color operation according to an embodiment of the present invention Figure.As shown in figure 25, image shown in figure is same colour system, can indicate the adaptation of each mass-tone scene of same colour system color operation Effect.
The embodiment can describe the element on painting canvas, for example, using customized in intelligently color matching by metadata JSON metadata describes the various elements on painting canvas, can be defined as follows:
The application environment of the embodiment of the present invention can be, but not limited to referring to the application environment in above-described embodiment, the present embodiment In this is repeated no more.A kind of the embodiment of the invention provides the processing method for implementing above-mentioned image optionally specifically answers With.
The Product Logic to the embodiment of the present invention in application level is introduced below.
Figure 26 is a kind of schematic diagram of core logic in products application level according to an embodiment of the present invention.Such as Figure 26 It is shown, it obtains in current tool operation interface, the mass-tone of user agent picture floor, obtains the HSB of the color in effective painting canvas area Value;In the layer dismantling that intention is constituted with definition destructing user instrument operation interface, the layer of creative making in effective painting canvas is identified Element defines different designs attribute of an element color value parameter item;User can the style intelligently matched colors of random/unrestricted choice incline To for example, same colour system, advancing colour, three primary colors etc., different styles is associated with corresponding HSB layers of design element and takes color rule and calculate Method;The HSB color value operation result assignment application for the design element for including by the layer obtained out by algorithm, to realize and complete Intelligent scheme of colour.
Figure 27 is the schematic diagram that a kind of effective painting canvas according to an embodiment of the present invention is constituted.As shown in figure 27, figure is carried out Layer dismantling and definition, identify the layer element of creative making in effective painting canvas, may include alternation of bed, text layers, decorative layer, main body Design element included in layer, background layer and different types of layer.
The application practice of the embodiment of the present invention in the product is introduced below.
The method of the embodiment can be adapted for user using tool platform prepare advertising static images material when, base In the currently active canvas area picture material, time-consuming and the color matching effect for getting rid of Man-made Color Matching are uncertain, and a key intelligently realizes layer Element color matching, realizes more preferably visual effect.
It can be creative making tools production in products application practice.
The first step, user initially market creative design effect.
Figure 28 is that a kind of user according to an embodiment of the present invention initially markets the schematic diagram of creative design effect.Such as Figure 28 institute Show, user markets creative design initially as jointly serial shoes.
Second step, when intention master map changes.
Figure 29 is a kind of schematic diagram that intention master map changes according to an embodiment of the present invention.As shown in figure 29, intention Master map is the fashion dress ornament of prime quality.
Third step clicks intelligent color matching functions.
Figure 30 is a kind of schematic diagram of intelligent color matching functions according to an embodiment of the present invention.As shown in figure 30, clicking operation " intelligence color matching " button on interface, pop-up include the panel of intelligence color matching option, which includes same colour system adaptation, advancing colour The information of adaptation, three primary colors adaptation, to select it, and is determined, and triggers intelligence color matching.
4th step, intelligence color matching come into force.
Figure 31 is a kind of effect diagram to come into force of intelligently matching colors according to an embodiment of the present invention.As shown in figure 31, it is selecting In the case where selecting advancing colour adaptation, image shown in Figure 31 is that the effect after carrying out advancing colour adaptation to image (is used oblique in Figure 31 Line indicates).
Figure 32 is the schematic diagram that a kind of user according to an embodiment of the present invention replaces marketing creative design effect.Such as Figure 32 institute Show, in the operation interface, marketing intention can be replaced, the target image of display is carried out according to operation shown in Figure 30 and Figure 31 Again it matches colors.
The embodiment can be dissipated by the mass-tone to picture, with vision color matching method and color evaluation phase In conjunction with mode, by perception Vision Design be converted into can by machine language express automatic processing method, solve user exist Visual effect can not be rapidly completed in material creative making preferably to match colors problem, market intention material system to improve user The efficiency and effect of work.
A layer mark for element priority can also be added in the Intelligent treatment effect to color in the embodiment, carry out area Divide processing;It, can also be pre- by some impression type words of description, color effect for user in intelligent color tools with upper The mode look at carries out selection guidance, to promote more intuitive understanding of the user to color intelligence operation rule, to optimize use Family operating experience.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing The part that technology contributes can be embodied in the form of software products, which is stored in a storage In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
According to another aspect of an embodiment of the present invention, it additionally provides a kind of for implementing the figure of the processing method of above-mentioned image The processing unit of picture.Figure 33 is a kind of schematic diagram of the processing unit of image according to an embodiment of the present invention.As shown in figure 33, should Device 330 may include: display unit 10, selecting unit 20 and with color element 30.
Display unit 10, for responding the object run instruction generated by object run, display color matching information, wherein match Color information, which is used to indicate, matches colors to first object image according to color corresponding with color matching information.
Selecting unit 20, for selecting first object color matching information from color matching information.
With color element 30, it is used for first object image according to first object color corresponding with first object color matching information It matches colors, the first object image after being matched colors.
It should be noted that the display unit 10 in the embodiment can be used for executing the step in the embodiment of the present application 1 S202, the selecting unit 20 in the embodiment can be used for executing the step S204 in the embodiment of the present application 1, in the embodiment It can be used for executing the step S206 in the embodiment of the present application 1 with color element 30.
Herein it should be noted that said units are identical as example and application scenarios that corresponding step is realized, but not It is limited to 1 disclosure of that of above-described embodiment.It should be noted that said units as a part of device may operate in as In hardware environment shown in FIG. 1, hardware realization can also be passed through by software realization, wherein hardware environment includes network Environment.
Another aspect according to an embodiment of the present invention additionally provides a kind of for implementing the electricity of the processing method of above-mentioned image Sub-device.
Figure 34 is a kind of structural block diagram of electronic device according to an embodiment of the present invention.As shown in figure 34, as shown in figure 34, This electronic device may include: to be stored with computer program in the memory 341 including memory 341 and processor 343, The processor 343 is arranged to execute the step in any of the above-described embodiment of the method by computer program.Optionally, as schemed Shown in 34, which can also include transmitting device 345 and input-output equipment 347.
Optionally, in the present embodiment, above-mentioned electronic device can be located in multiple network equipments of computer network At least one network equipment.
Optionally, in the present embodiment, above-mentioned processor 343 can be set to execute following step by computer program It is rapid:
The object run that response is generated by object run instructs, display color matching information, wherein information of matching colors is used to indicate pair First object image is matched colors according to color corresponding with color matching information;
First object color matching information is selected from color matching information;
It matches colors, is matched according to first object color corresponding with first object color matching information to first object image First object image after color.
Processor 343 is also used to execute following step: from color matching information in select first object color matching information after, Show the first prompt information, wherein the first prompt information for prompt whether determine to first object image according to the first mesh The corresponding first object color of standard configuration color information is matched colors;To first object image according to corresponding with first object color matching information First object color match colors, the first object image after being matched colors include: in the case where getting determining information, It matches colors to first object image according to the corresponding first object color of first object color matching information, the after being matched colors One target image, wherein determine that information is used to indicate and determine to first object image according to corresponding with first object color matching information First object color match colors.
Processor 343 is also used to execute following step: after showing the first prompt information, cancelling information getting In the case of, cancel and matching colors to first object image according to first object color corresponding with first object color matching information, In, cancel information and is used to indicate cancellation to first object image according to first object color corresponding with first object color matching information It matches colors.
Processor 343 is also used to execute following step: to first object image according to first object match colors information pair The first object color answered is matched colors, and after the first object image after being matched colors, obtains the second target image;Response by The object run instruction that object run generates, display color matching information;The second target color matching information is selected from color matching information;It is right Second target image is matched colors according to the second color of object corresponding with the second target color matching information, second after being matched colors Target image.
Processor 343 is also used to execute following step: from color matching information in select first object color matching information after, And matching colors to first object image according to first object color corresponding with first object color matching information, after obtaining color matching First object image before, displaying target text or Target Photo, wherein target text and Target Photo are used to indicate First object image after color matching.
Processor 343 is also used to execute following step: the color value of the main body picture layer of acquisition first object image, first The figure layer element of target image and the color attribute of figure layer element, wherein figure layer element includes multiple picture layers, multiple picture layers Including main body picture layer, first object match colors the color value of information and main body picture layer, the figure layer element of first object image and The color attribute of figure layer element is associated, and color attribute includes form and aspect attribute, saturation attributes and the brightness of first object image Attribute;Determine first object color corresponding with the color value of main body picture layer, figure layer element and color attribute;To first object Image is matched colors according to first object color, the first object image after being matched colors.
Processor 343 is also used to execute following step: image of the first object image under the first color mode is obtained, In, the first color mode indicates color by the color value of red channel, green channel, blue channel respectively;By the first color The image of color mode is converted into the image under the second color mode, wherein the second color mode passes through form and aspect attribute respectively, satisfies Color is indicated with degree attribute, brightness attribute;The weighted value of form and aspect attribute, the weighted value of saturation attributes, brightness are obtained respectively The weighted value of attribute, wherein the weighted value of form and aspect attribute is used to indicate form and aspect attribute to the visual color of first object image Shared specific gravity is influenced, the weighted value of saturation attributes is used to indicate ratio shared by influence of the saturation attributes to visual color Weight, the weighted value of brightness attribute are used to indicate specific gravity shared by influence of the brightness attribute to visual color;Pass through form and aspect attribute Weighted value, the weighted value of saturation attributes, brightness attribute weighted value, respectively according to randomly selected multiple cluster centres to The image of two color modes carries out clustering processing, obtains multiple cluster results, wherein multiple cluster centres and multiple cluster results It corresponds;The minimum cluster result of distinctiveness ratio in multiple cluster results is determined as target cluster result;Target is clustered and is tied The average color of the largest number of colour types of pixel in fruit, determine based on picture layer color value.
Processor 343 is also used to execute following step: passing through object module, form and aspect attribute, saturation attributes and brightness category Property, determines the weighted value of the weighted value of form and aspect attribute, the weighted value of saturation attributes, brightness attribute, wherein object module is Pre-determined model is trained by target sample, target sample includes the form and aspect category of the multiple images got in advance Weighted value, the Duo Getu of the form and aspect attribute of property, the brightness attribute of the saturation attributes of multiple images, multiple images, multiple images The weighted value of the weighted values of the saturation attributes of picture, the brightness attribute of multiple images.
Processor 343 is also used to obtain the color attribute of figure layer element: shape in figure layer element by least one of Color attribute, wherein the color attribute of shape includes form and aspect attribute, saturation attributes, brightness attribute and the transparency of shape Attribute;The color attribute of text in figure layer element, wherein the color attribute of text includes the form and aspect attribute of text, saturation degree category Property, brightness attribute and transparency property;Mass-tone in figure layer element, wherein mass-tone includes form and aspect attribute, saturation attributes, bright Spend attribute and transparency property.
Processor 343 is also used to execute following step: the priority for the multiple picture layers for including according to figure layer element respectively, Obtain the color attribute of each picture layer.
Optionally, it will appreciated by the skilled person that structure shown in Figure 34 is only to illustrate, electronic device can also To be smart phone (such as AndroID mobile phone, iOS mobile phone), tablet computer, palm PC and mobile internet device The terminal devices such as (Mobile Internet Devices, MID), PAD.Figure 34 it does not make to the structure of above-mentioned electronic device At restriction.For example, electronic device may also include more or less component (such as network interface, display dress than shown in Figure 34 Set), or with the configuration different from shown in Figure 34.
Wherein, memory 341 can be used for storing software program and module, such as the processing of the image in the embodiment of the present invention Corresponding program instruction/the module of method and apparatus, processor 343 by the software program that is stored in memory 341 of operation with And module realizes the processing method of above-mentioned image thereby executing various function application and data processing.Memory 341 It may include high speed random access memory, can also include nonvolatile memory, such as one or more magnetic storage device dodges It deposits or other non-volatile solid state memories.In some instances, memory 341 can further comprise relative to processor 343 remotely located memories, these remote memories can pass through network connection to terminal.The example of above-mentioned network include but It is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Above-mentioned transmitting device 345 is used to that data to be received or sent via a network.Above-mentioned network specific example It may include cable network and wireless network.In an example, transmitting device 345 includes a network adapter (Network Interface Controller, NIC), can be connected by cable with other network equipments with router so as to interconnection Net or local area network are communicated.In an example, transmitting device 345 is radio frequency (Radio Frequency, RF) module, For wirelessly being communicated with internet.
Wherein, specifically, memory 341 is for storing application program.
Using the embodiment of the present invention, a kind of scheme of the processing of image is provided.Respond the target generated by object run Operational order, display color matching information, wherein color matching information is used to indicate to first object image according to corresponding with color matching information Color is matched colors;First object color matching information is selected from color matching information;To first object image according to first object The corresponding first object color of color matching information is matched colors, the first object image after being matched colors.Pass through the color matching from display Selected in information first object color matching information, by first object match colors one key of information realization intelligence to first object image into Row color matching is avoided through Man-made Color Matching, the function of lack of wisdom color matching, causes to carry out image color matching time-consuming and color matching effect It is uncertain, to improve the efficiency matched colors to image, realize the technology effect for improving the efficiency matched colors to image Fruit, and then solve the technical issues of low efficiency matched colors in the related technology to image.
The embodiments of the present invention also provide a kind of storage medium, computer program is stored in the storage medium, wherein The computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
Optionally, in the present embodiment, above-mentioned storage medium can be set to store by executing based on following steps Calculation machine program:
The object run that response is generated by object run instructs, display color matching information, wherein information of matching colors is used to indicate pair First object image is matched colors according to color corresponding with color matching information;
First object color matching information is selected from color matching information;
It matches colors, is matched according to first object color corresponding with first object color matching information to first object image First object image after color.
Optionally, storage medium is also configured to store the program code for executing following steps: from color matching information In select first object color matching information after, show the first prompt information, wherein the first prompt information for prompt it is whether true It is fixed to match colors to first object image according to first object color corresponding with first object color matching information;To first object figure As matching colors according to first object color corresponding with first object color matching information, the first object image packet after being matched colors It includes: in the case where getting determining information, to first object image according to the first mesh corresponding with first object color matching information Mark color is matched colors, the first object image after being matched colors, wherein is determined that information is used to indicate and is determined to first object figure As matching colors according to first object color corresponding with first object color matching information.
Optionally, storage medium is also configured to store the program code for executing following steps: mentioning in display first After showing information, get cancel information in the case where, cancel to first object image according to first object match colors information Corresponding first object color is matched colors, wherein is cancelled information and is used to indicate cancellation to first object image according to first The corresponding first object color of target color matching information is matched colors.
Optionally, storage medium is also configured to store the program code for executing following steps: to first object Image is matched colors according to first object color corresponding with first object color matching information, the first object image after being matched colors Later, the second target image is obtained;Response is instructed by the object run that object run generates, display color matching information;Believe from color matching The second target color matching information is selected in breath;To the second target image according to the second target corresponding with the second target color matching information Color is matched colors, the second target image after being matched colors.
Optionally, storage medium is also configured to store the program code for executing following steps: from color matching information In select after first object color matching information and to first object image according to corresponding with first object color matching information the One color of object is matched colors, before the first object image after being matched colors, displaying target text or Target Photo, In, target text and Target Photo are used to the first object image after instruction color matching.
Optionally, storage medium is also configured to store the program code for executing following steps: obtaining first object The color attribute of the color value of main body picture layer of image, the figure layer element of first object image and figure layer element, wherein figure layer Element includes multiple picture layers, and multiple picture layers include main body picture layer, the face of first object color matching information and main body picture layer The color attribute of color value, the figure layer element of first object image and figure layer element is associated, and color attribute includes first object figure Form and aspect attribute, saturation attributes and the brightness attribute of picture;Determining color value, figure layer element and color attribute with main body picture layer Corresponding first object color;It matches colors to first object image according to first object color, the first mesh after being matched colors Logo image.
Optionally, storage medium is also configured to store the program code for executing following steps: obtaining first object Image of the image under the first color mode, wherein it is logical that the first color mode passes through red channel, green channel, blue respectively The color value in road indicates color;The image under the second color mode is converted by the image of the first color mode, wherein the Two color modes indicate color by form and aspect attribute, saturation attributes, brightness attribute respectively;The power of form and aspect attribute is obtained respectively Weight values, the weighted value of saturation attributes, brightness attribute weighted value, wherein the weighted value of form and aspect attribute is used to indicate form and aspect category Specific gravity shared by influence of the property to the visual color of first object image, the weighted value of saturation attributes are used to indicate saturation degree category Specific gravity shared by influence of the property to visual color, the weighted value of brightness attribute are used to indicate influence of the brightness attribute to visual color Shared specific gravity;By the weighted value of form and aspect attribute, the weighted value of saturation attributes, brightness attribute weighted value, respectively according to Randomly selected multiple cluster centres carry out clustering processing to the image of the second color mode, obtain multiple cluster results, wherein Multiple cluster centres and multiple cluster results correspond;The minimum cluster result of distinctiveness ratio in multiple cluster results is determined as Target cluster result;By the average color of the largest number of colour types of pixel in target cluster result, determine based on The color value of picture layer.
Optionally, storage medium is also configured to store the program code for executing following steps: by object module, Form and aspect attribute, saturation attributes and brightness attribute determine the weighted value of form and aspect attribute, the weighted value of saturation attributes, brightness The weighted value of attribute, wherein object module is to be trained by target sample to pre-determined model, and target sample includes Brightness attribute, the Duo Getu of the form and aspect attribute of the multiple images got in advance, the saturation attributes of multiple images, multiple images The weighted value of the form and aspect attribute of picture, the weighted value of the saturation attributes of multiple images, multiple images brightness attribute weighted value.
Optionally, storage medium is also configured to store the program code for executing following steps: shape in figure layer element The color attribute of shape, wherein the color attribute of shape includes the form and aspect attribute of shape, saturation attributes, brightness attribute and transparent Spend attribute;The color attribute of text in figure layer element, wherein the color attribute of text includes the form and aspect attribute of text, saturation degree Attribute, brightness attribute and transparency property;Mass-tone in figure layer element, wherein mass-tone include form and aspect attribute, saturation attributes, Brightness attribute and transparency property.
Optionally, storage medium is also configured to store the program code for executing following steps: respectively according to figure layer The priority for multiple picture layers that element includes, obtains the color attribute of each picture layer.
Optionally, storage medium is also configured to store for executing step included in the method in above-described embodiment Computer program, this is repeated no more in the present embodiment.
Optionally, in the present embodiment, those of ordinary skill in the art will appreciate that in the various methods of above-described embodiment All or part of the steps be that the relevant hardware of terminal device can be instructed to complete by program, the program can store in In one computer readable storage medium, storage medium may include: flash disk, read-only memory (Read-Only Memory, ROM), random access device (Random Access Memory, RAM), disk or CD etc..
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
If the integrated unit in above-described embodiment is realized in the form of SFU software functional unit and as independent product When selling or using, it can store in above-mentioned computer-readable storage medium.Based on this understanding, skill of the invention Substantially all or part of the part that contributes to existing technology or the technical solution can be with soft in other words for art scheme The form of part product embodies, which is stored in a storage medium, including some instructions are used so that one Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) execute each embodiment institute of the present invention State all or part of the steps of method.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed client, it can be by others side Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, and only one Kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or It is desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed it is mutual it Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered It is considered as protection scope of the present invention.

Claims (15)

1. a kind of processing method of image characterized by comprising
The object run that response is generated by object run instructs, and display is matched colors information, wherein the color matching information is used to indicate pair First object image is matched colors according to color corresponding with the color matching information;
First object color matching information is selected from the color matching information;
It matches colors, obtains according to first object color corresponding with first object color matching information to the first object image The first object image after to color matching.
2. the method according to claim 1, wherein the color matching information includes at least one of:
Homochromy Adapted information, wherein the homochromy Adapted information is used to indicate to the first object image according to same colour system Color match colors;
Advancing colour Adapted information, wherein the advancing colour Adapted information is used to indicate to the first object image according to color Color of the value in targets threshold is matched colors;
Three primary colors Adapted information, wherein the three primary colors Adapted information is used to indicate to the first object image according to three originals Color is matched colors.
3. the method according to claim 1, wherein
After selecting first object color matching information in the color matching information, the method also includes: display first Prompt information, wherein whether first prompt information is for prompting to determine to the first object image according to described the The corresponding first object color of one target color matching information is matched colors;
The first object image is matched according to the first object color corresponding with first object color matching information Color, the first object image after being matched colors include: in the case where getting determining information, to the first object figure As matching colors according to the corresponding first object color of first object color matching information, after being matched colors described the One target image, wherein the determining information be used to indicate determine to the first object image according to the first object The corresponding first object color of color matching information is matched colors.
4. according to the method described in claim 3, it is characterized in that, after showing first prompt information, the method Further include:
Get cancel information in the case where, cancel to the first object image according to the first object match colors information The corresponding first object color is matched colors, wherein the cancellation information is used to indicate cancellation to the first object figure As matching colors according to the first object color corresponding with first object color matching information.
5. the method according to claim 1, wherein to the first object image according to first mesh The corresponding first object color of standard configuration color information is matched colors, after the first object image after being matched colors, the side Method further include:
Obtain the second target image;
Response is instructed by the object run that the object run generates, and shows the color matching information;
The second target color matching information is selected from the color matching information;
It matches colors, obtains according to the second color of object corresponding with second target color matching information to second target image Second target image after to color matching.
6. method as claimed in any of claims 1 to 5, which is characterized in that selected from the color matching information Out first object color matching information after and to the first object image according to the first object color matching information it is corresponding First object color is matched colors, before the first object image after obtaining the color matching, the method also includes:
Displaying target text or Target Photo, wherein the target text and the Target Photo are used to match described in instruction The first object image after color.
7. the method according to claim 1, wherein to the first object image according to the first object The corresponding first object color of color matching information is matched colors, and the first object image after being matched colors includes:
Obtain the color value of the main body picture layer of the first object image, the figure layer element of the first object image and described The color attribute of figure layer element, wherein the figure layer element includes multiple picture layers, and the multiple picture layer includes the main body The color value of picture layer, the first object color matching information and the main body picture layer, the figure layer of the first object image are first The color attribute of the plain and described figure layer element is associated, the color attribute include the first object image form and aspect attribute, Saturation attributes and brightness attribute;
It determines and the color value of the main body picture layer, the figure layer element and the color attribute corresponding described first Color of object;
It matches colors to the first object image according to the first object color, the first object figure after being matched colors Picture.
8. the method according to the description of claim 7 is characterized in that the figure layer element further includes at least one of: background Picture layer, decorative picture layer, text diagram lamella, interaction figure lamella.
9. the method according to the description of claim 7 is characterized in that obtaining the face of the main body picture layer of the first object image Color value includes:
Obtain image of the first object image under the first color mode, wherein first color mode passes through respectively Red channel, green channel, blue channel color value indicate color;
Convert the image of first color mode to the image under the second color mode, wherein the second color mould Formula indicates color by form and aspect attribute, saturation attributes, brightness attribute respectively;
The weighted value of the weighted value of the form and aspect attribute, the weighted value of saturation attributes, brightness attribute is obtained respectively, wherein institute The weighted value for stating form and aspect attribute is used to indicate shared by influence of the form and aspect attribute to the visual color of the first object image Specific gravity, the weighted value of the saturation attributes is used to indicate shared by influence of the saturation attributes to the visual color Specific gravity, the weighted value of the brightness attribute are used to indicate specific gravity shared by influence of the brightness attribute to the visual color;
By the weighted value of the form and aspect attribute, the weighted value of saturation attributes, brightness attribute weighted value, respectively according to random Multiple cluster centres of selection carry out clustering processing to the image of second color mode, obtain multiple cluster results, wherein The multiple cluster centre and the multiple cluster result correspond;
The minimum cluster result of distinctiveness ratio in the multiple cluster result is determined as target cluster result;
By the average color of the largest number of colour types of pixel in the target cluster result, it is determined as the main body figure The color value of lamella.
10. according to the method described in claim 9, it is characterized in that, obtaining the weighted value of the form and aspect attribute, described full respectively Include: with the weighted value of degree attribute, the weighted value of the brightness attribute
By object module, the form and aspect attribute, the saturation attributes and the brightness attribute, the form and aspect attribute is determined Weighted value, the weighted values of the saturation attributes, the brightness attribute weighted value, wherein the object module is to pass through Target sample is trained pre-determined model, and the target sample includes the form and aspect category of the multiple images got in advance The power of the form and aspect attribute of property, the brightness attribute of the saturation attributes of described multiple images, described multiple images, described multiple images Weight values, the weighted value of the saturation attributes of described multiple images, described multiple images brightness attribute weighted value.
11. the method according to the description of claim 7 is characterized in that the color attribute for obtaining the figure layer element includes: to pass through At least one of obtains the color attribute of the figure layer element:
The color attribute of shape in the figure layer element, wherein the color attribute of the shape includes the form and aspect category of the shape Property, saturation attributes, brightness attribute and transparency property;
The color attribute of text in the figure layer element, wherein the color attribute of the text includes the form and aspect category of the text Property, saturation attributes, brightness attribute and transparency property;
Mass-tone in the figure layer element, wherein the mass-tone includes form and aspect attribute, saturation attributes, brightness attribute and transparent Spend attribute.
12. the method according to any one of claim 7 to 11, which is characterized in that obtain the institute of the figure layer element Stating color attribute includes:
The priority for the multiple picture layer for including according to the figure layer element respectively, obtains the color of each picture layer Attribute.
13. a kind of processing unit of image characterized by comprising
Display unit, for responding the object run instruction generated by object run, display color matching information, wherein the color matching Information, which is used to indicate, matches colors to first object image according to color corresponding with the color matching information;
Selecting unit, for selecting first object color matching information from the color matching information;
With color element, it is used for the first object image according to first object face corresponding with first object color matching information Color is matched colors, the first object image after being matched colors.
14. a kind of storage medium, which is characterized in that be stored with computer program in the storage medium, wherein the computer Program is arranged to execute the processing method of image described in any one of claim 1 to 12 when operation.
15. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory Sequence, the processor are arranged to execute figure described in any one of claim 1 to 12 by the computer program The processing method of picture.
CN201810164716.3A 2018-02-27 2018-02-27 Image processing method and device, storage medium and electronic device Active CN110198437B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810164716.3A CN110198437B (en) 2018-02-27 2018-02-27 Image processing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810164716.3A CN110198437B (en) 2018-02-27 2018-02-27 Image processing method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN110198437A true CN110198437A (en) 2019-09-03
CN110198437B CN110198437B (en) 2021-11-05

Family

ID=67751368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810164716.3A Active CN110198437B (en) 2018-02-27 2018-02-27 Image processing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN110198437B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110969170A (en) * 2019-12-03 2020-04-07 北京奇艺世纪科技有限公司 Image theme color extraction method and device and electronic equipment
CN111091607A (en) * 2019-12-24 2020-05-01 厦门美图之家科技有限公司 Color matching method and device, electronic equipment and storage medium
CN111191424A (en) * 2019-12-31 2020-05-22 北京华为数字技术有限公司 Page color matching method and device, storage medium and chip
CN111563937A (en) * 2020-07-14 2020-08-21 成都四方伟业软件股份有限公司 Picture color extraction method and device
CN111737800A (en) * 2020-06-23 2020-10-02 广联达科技股份有限公司 Primitive selection method and device and electronic equipment
CN111984164A (en) * 2020-08-31 2020-11-24 Oppo广东移动通信有限公司 Wallpaper generation method, device, terminal and storage medium
CN112035210A (en) * 2020-09-30 2020-12-04 北京百度网讯科技有限公司 Method, apparatus, device and medium for outputting color information
CN112598761A (en) * 2020-12-30 2021-04-02 东华大学 Textile and garment color collocation collaborative design and intelligent recommendation method
WO2021169945A1 (en) * 2020-02-24 2021-09-02 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and device for picture generation, electronic device, and storage medium
CN113658287A (en) * 2021-07-14 2021-11-16 支付宝(杭州)信息技术有限公司 User interface color matching processing method, device and equipment
CN115024561A (en) * 2022-05-30 2022-09-09 广东时谛智能科技有限公司 Automatic adjustment method and device for associated color matching in shoe body design process
CN117528045A (en) * 2024-01-04 2024-02-06 深圳市云影天光科技有限公司 Video image processing method and system based on video fog-penetrating anti-reflection technology

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0974934A2 (en) * 1998-07-24 2000-01-26 Canon Kabushiki Kaisha Image processing apparatus and method
CN103123581A (en) * 2011-11-21 2013-05-29 腾讯科技(深圳)有限公司 Changing method and device of application interface of mobile terminal and mobile terminal
CN105549928A (en) * 2015-12-02 2016-05-04 广州阿里巴巴文学信息技术有限公司 Color matching method and device of display content

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0974934A2 (en) * 1998-07-24 2000-01-26 Canon Kabushiki Kaisha Image processing apparatus and method
CN103123581A (en) * 2011-11-21 2013-05-29 腾讯科技(深圳)有限公司 Changing method and device of application interface of mobile terminal and mobile terminal
CN105549928A (en) * 2015-12-02 2016-05-04 广州阿里巴巴文学信息技术有限公司 Color matching method and device of display content

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110969170B (en) * 2019-12-03 2024-03-08 北京奇艺世纪科技有限公司 Image theme color extraction method and device and electronic equipment
CN110969170A (en) * 2019-12-03 2020-04-07 北京奇艺世纪科技有限公司 Image theme color extraction method and device and electronic equipment
CN111091607A (en) * 2019-12-24 2020-05-01 厦门美图之家科技有限公司 Color matching method and device, electronic equipment and storage medium
CN111091607B (en) * 2019-12-24 2023-08-29 厦门美图之家科技有限公司 Color matching method and device, electronic equipment and storage medium
CN111191424A (en) * 2019-12-31 2020-05-22 北京华为数字技术有限公司 Page color matching method and device, storage medium and chip
CN111191424B (en) * 2019-12-31 2023-03-03 北京华为数字技术有限公司 Page color matching method and device, storage medium and chip
WO2021169945A1 (en) * 2020-02-24 2021-09-02 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and device for picture generation, electronic device, and storage medium
CN111737800A (en) * 2020-06-23 2020-10-02 广联达科技股份有限公司 Primitive selection method and device and electronic equipment
CN111737800B (en) * 2020-06-23 2024-01-12 广联达科技股份有限公司 Primitive selection method and device and electronic equipment
CN111563937A (en) * 2020-07-14 2020-08-21 成都四方伟业软件股份有限公司 Picture color extraction method and device
CN111984164A (en) * 2020-08-31 2020-11-24 Oppo广东移动通信有限公司 Wallpaper generation method, device, terminal and storage medium
CN112035210A (en) * 2020-09-30 2020-12-04 北京百度网讯科技有限公司 Method, apparatus, device and medium for outputting color information
CN112035210B (en) * 2020-09-30 2024-05-07 北京百度网讯科技有限公司 Method, apparatus, device and medium for outputting color information
CN112598761A (en) * 2020-12-30 2021-04-02 东华大学 Textile and garment color collocation collaborative design and intelligent recommendation method
CN112598761B (en) * 2020-12-30 2023-06-16 东华大学 Collaborative design and intelligent recommendation method for color matching of textile and clothing
CN113658287A (en) * 2021-07-14 2021-11-16 支付宝(杭州)信息技术有限公司 User interface color matching processing method, device and equipment
CN113658287B (en) * 2021-07-14 2024-05-03 支付宝(杭州)信息技术有限公司 User interface color matching processing method, device and equipment
CN115024561A (en) * 2022-05-30 2022-09-09 广东时谛智能科技有限公司 Automatic adjustment method and device for associated color matching in shoe body design process
CN117528045B (en) * 2024-01-04 2024-03-22 深圳市云影天光科技有限公司 Video image processing method and system based on video fog-penetrating anti-reflection technology
CN117528045A (en) * 2024-01-04 2024-02-06 深圳市云影天光科技有限公司 Video image processing method and system based on video fog-penetrating anti-reflection technology

Also Published As

Publication number Publication date
CN110198437B (en) 2021-11-05

Similar Documents

Publication Publication Date Title
CN110198437A (en) Processing method, device, storage medium and the electronic device of image
CN110263681A (en) The recognition methods of facial expression and device, storage medium, electronic device
CN107993131B (en) Putting-through recommendation method, device, server and storage medium
CN107945175A (en) Evaluation method, device, server and the storage medium of image
US20180082178A1 (en) Information processing device
CN109784281A (en) Products Show method, apparatus and computer equipment based on face characteristic
Phan et al. Color orchestra: Ordering color palettes for interpolation and prediction
Ribeiro et al. Recoloring algorithms for colorblind people: A survey
US10915744B2 (en) Method for evaluating fashion style using deep learning technology and system therefor
Hassan et al. Color image segmentation using automated K-means clustering with RGB and HSV color spaces
CN108052765A (en) Scheme of colour automatic generation method and device based on personality impression
CN106504264B (en) Video foreground image extraction method and device
CN105761283A (en) Picture dominant color extraction method and device
CN101529495A (en) Image mask generation
CN109711345A (en) A kind of flame image recognition methods, device and its storage medium
CN109345494A (en) Image interfusion method and device based on potential low-rank representation and structure tensor
CN110120028A (en) A kind of bionical rattle snake is infrared and twilight image Color Fusion and device
CN108280426A (en) Half-light source expression recognition method based on transfer learning and device
CN107169508A (en) A kind of cheongsam Image emotional semantic method for recognizing semantics based on fusion feature
WO2022221371A1 (en) Digital imaging and learning systems and methods for analyzing pixel data of a scalp region of a user's scalp to generate one or more user-specific scalp classifications
Tang et al. Graph transformer gans for graph-constrained house generation
KR20230028481A (en) High Resolution Controllable Face Aging Using Spatial Aware Conditional GANs
CN108805095A (en) image processing method, device, mobile terminal and computer readable storage medium
CN108737851A (en) Method, system and medium for the palette extraction for video content item
CN112836706A (en) Processing method, device and equipment for clothes color identification 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
GR01 Patent grant
GR01 Patent grant