Invention content
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide a kind of methods of prediction flower color
And system, for solving the problems, such as that people can not predict flower color in the prior art.
In order to achieve the above objects and other related objects, the present invention provides a kind of method of prediction flower color, for wrapping
In equipment containing camera unit, including:The image information for including flower that the camera unit is absorbed is obtained, and determines institute
State the flower type of flower in image information;Based on preset each flower type, flower color change and each environmental information three
Between correspondence, predict under the target environment information of setting in described image information flower color;By what is predicted
Flower color is depicted at the flower position of described image information.
Preferably, while obtaining the image information comprising flower that the camera unit is absorbed, the method is also
Including:Obtain the initial environment information when absorbing described image information;It is described based on preset each flower type, flower executing
Correspondence piece between color and each environmental information three, prediction is under the target environment information of setting in described image information
Before the step of color of flower, the method further includes:By the initial environment information superposition to set target environment
In information, to obtain the target environment information of new setting.
Preferably, the environmental information and initial environment information include following at least one:Temporal information, temperature information,
Humidity information, light sensation information.
Preferably, the corresponding pass based between preset each flower type, flower color and each environmental information three
System, the mode of the color of flower includes in described image information under the target environment information of setting for prediction:It obtains in advance same
Flower type multiple flower colors corresponding under the numerical value of preset varying environment information;Based on preset same flower class
The weight of various environmental informations corresponding to type and acquired flower color, estimate the flower face corresponding to each environmental information
Color;Correspondence based on estimated flower type, environmental information and flower color predicts the target environment information in setting
The color of flower in lower described image information.
Preferably, the mode packet flower color predicted being depicted at the flower position of described image information
It includes:The lighting angle of described image information is determined according to the half-tone information in described image information;It, will based on the lighting angle
The flower color predicted is depicted at the flower position of described image information and is rendered.
Based on above-mentioned purpose, the present invention also provides a kind of systems of prediction flower color, to contain setting for camera unit
In standby, including:Pretreatment unit, the image information for including flower absorbed for obtaining the camera unit, and determine
The flower type of flower in described image information;Predicting unit, for based on preset each flower type, flower color change with
Correspondence between each environmental information three predicts the face of the flower in described image information under the target environment information of setting
Color;Display unit, the flower color for will be predicted are depicted at the flower position of described image information.
Preferably, the pretreatment unit is additionally operable to obtain the initial environment information when absorbing described image information;Institute
It states predicting unit to be additionally operable in the initial environment information superposition to set target environment information, to obtain new setting
Target environment information.
Preferably, the environmental information and initial environment information include following at least one:Temporal information, temperature information,
Humidity information, light sensation information.
Preferably, the predicting unit includes:First prediction module, for obtaining same flower type in advance preset
Corresponding multiple flower colors under the numerical value of varying environment information;Second prediction module, for being based on preset same flower
The weight of various environmental informations corresponding to type and acquired flower color, estimate the flower face corresponding to each environmental information
Color;Third prediction module, is used for the correspondence based on estimated flower type, environmental information and flower color, and prediction exists
Under the target environment information of setting in described image information flower color.
Preferably, the display unit is used to determine described image information according to the half-tone information in described image information
Lighting angle;Based on the lighting angle, the flower color predicted is depicted at the flower position of described image information simultaneously
It is rendered.
As described above, the method and system of the prediction flower color of the present invention, have the advantages that:Using preset
Correspondence between each flower type, flower color change and each environmental information three predicts that the target environment in setting is believed
The color of flower in the lower described image information of breath, and include the flower position in image information by the flower color predicted
Place, can solve the problems, such as that people can not predict flower color;In addition, by different rings in the same flower type pre-entered
Different flower colors corresponding to the information of border can be convenient for establishing in flower Life cycle between each color and environmental information
Correspondence is so convenient for predicting flower color;In addition, determining illumination angle according to the half-tone information in image information
Degree, the flower image predicted that can be more natural.
Specific implementation mode
Illustrate that embodiments of the present invention, those skilled in the art can be by this specification below by way of specific specific example
Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from
Various modifications or alterations are carried out under the spirit of the present invention.
As shown in Figure 1, the present invention provides a kind of method of prediction flower color.The method can be used for including camera unit
Equipment.The wherein described camera unit includes the camera lens being arranged in equipment front and/or backboard, and connect with the camera lens
Analog-to-digital conversion module, the camera unit export the digitized image information absorbed.The equipment includes but not limited to:Hand
Machine, laptop, tablet computer, wearable electronic equipment etc..It may also include in the equipment:It is temperature induction unit, wet
Sensing unit etc. is spent, or even can also include photoinduction unit.
In step sl, the equipment obtains the image information for including flower that the camera unit is absorbed, and really
Determine the flower type of flower in described image information.
Specifically, the equipment described first is selected a flower by user in the options interface comprising preset multiple flower types
The operation of piece type determines the flower type for the flower to be absorbed.User is obtained again presses intake unit when shooting button
The image information absorbed, and execute step S2.
Alternatively, the equipment analyzed in real time under the intake pre- shooting state of unit in absorbed image information whether
Include the characteristic information of flower, if so, further by the feature in the characteristic information analyzed and preset each flower type
Information is matched, and to determine the flower type of included flower, and executes step S2.Conversely, then continuing to obtain new figure
As information.
Here, the equipment can in advance have the characteristic information of all flower types locally, analyzed in real time with matching
The characteristic information arrived.Alternatively, the characteristic information of each flower type is stored in server-side, the equipment is by obtaining real-time analysis
Characteristic information be sent to the server-side, to drive the server-side to be matched, then obtain of server-side feedback
Whether the flower in image information of the mode with result to determine real time shooting belongs to preset a certain flower type.
Preferably, the equipment also obtains at least one initial environment information while obtaining image information.Wherein,
The environmental information and initial environment information include but not limited to following at least one:Temporal information, temperature information, humidity letter
Breath, light sensation information.
Here, described in the equipment can respectively be obtained by temperature induction unit, humidity inductive unit and photoinduction unit
Temperature information, humidity information and light sensation information.Wherein, the equipment can pass through the average value institute of gray value in analysis image information
The light intensity section corresponding to preset a certain gray scale interval and the gray scale interval is fallen into, to determine the light sensation information.Wherein,
Each light intensity section can be corresponding light sensation information.
In step s 2, the equipment is based between preset each flower type, flower color and each environmental information three
Correspondence, predict under the target environment information of setting in described image information flower color.
Specifically, it is preset in the equipment corresponding between each flower type, flower color and each environmental information three
Relationship.The correspondence can be multiple queries table.When user needs to predict under target environment information in described image information
When the color of flower, point opens the adjustment interface for adjusting each environmental information, and adjusts at least one target environment letter therein manually
Breath.Then face of the equipment based on each inquiry table prediction flower in described image information under the target environment information of setting
Color.Here, the target environment information can be the equipment from each environmental information of the obtained correspondence of the adjustment interface
Numerical value.Can also be that operation of the equipment based on initial environment information and the obtained each environmental information of the adjustment interface obtains
The numerical value arrived.
Preferably, the equipment from the adjustment interface after getting target environment information, first by the initial environment
In information superposition to the target environment information, to obtain the target environment information of new setting;It is based on preset each flower again
Correspondence between type, flower color and each environmental information three, prediction figure under the target environment information of setting
As the color of flower in information.
For example, the initial environment information accessed by the equipment includes:Temperature information T1 is obtained from the temperature of adjustment interface
Degree information is T2, then the equipment determines that set target environment information includes:(T2-T1) temperature difference.The equipment is logical
It crosses and inquires the table of preset each temperature difference and each color to determine the color of the flower corresponding to the temperature difference of (T2-T1), and hold
Row step S3.
It is further preferable that the step S2 includes step S21, S22 and S23.As shown in Figure 2.
In the step s 21, the equipment obtains same flower type under the numerical value of preset varying environment information in advance
Corresponding multiple flower colors.
Here, the equipment is directed to set flower type in advance, obtain corresponding under the numerical value of varying environment information
Different flower colors.For example, the equipment is obtained for set A flower types for temporal information, temperature in the morning, afternoon and evening
The respective corresponding flower color of information, light sensation information.And execute step S22.
In step S22, weight of the equipment based on the various environmental informations corresponding to preset same flower type
With acquired flower color, the flower color in preset each environmental information is estimated.
Here, the equipment for A flower type preset time information weight be a1, the weight of temperature information be a2,
The weight of light sensation information is a3, wherein a1>a3>a2.When the equipment gets the flower corresponding to each environmental information in the morning, afternoon and evening
When color, using each weight as linear coefficient and according to preset precision, acquired congener morning and noon environment are determined
Each environmental information between each environmental information and noon and evening environmental information between information.Thus various types of ring is constituted
Inquiry table between border information and flower color.
In step S23, corresponding pass of the equipment based on estimated flower type, environmental information and flower color
System predicts the color of the flower in described image information under the target environment information of setting.
Specifically, the equipment inquires the target ring from the adjustment interface according to the inquiry table estimated by step S22
Flower color corresponding to the information of border.Then, the equipment executes step S3.
In step s3, the flower color predicted is depicted at the flower position of described image information by the equipment.
Here, the equipment can determine the position of flower and wheel in image information according to the contour feature information of flower
It is wide.Then, the equipment by the flower color full-filling predicted in the profile, thus come show flower setting target
Flower color under environmental information.
Preferably, in order to which the effect after flower changes colour is presented in more natural, the step S3 includes step S31 and S32.
In step S31, the equipment determines the light of described image information according to the half-tone information in described image information
Irradiation angle.
For example, the equipment can first determine that half-tone information is less than the area or low in each region of preset value in image information
In the band of position (top left region of such as image information, the right regions of image information, image letter that each region of preset value is concentrated
The lower left region of breath, lower right area of image information etc.);The band of position that is corresponding area is maximum or most concentrating is being schemed again
As being determined as the lighting angle along drift angle horizontally and vertically in information.
Then, in step s 32, the equipment is based on the lighting angle, and the flower color predicted is depicted in institute
It states at the flower position of image information and is rendered.
Specifically, the equipment determines the flower profile in described image information according to the contour feature information of flower, then
Using existing Rendering, the flower color in the flower profile is rendered according to the lighting angle.
As shown in figure 3, the present invention provides a kind of system of prediction flower color.The system can be mounted on single comprising camera shooting
The equipment of member.The wherein described camera unit includes the camera lens being arranged in equipment front and/or backboard, and is connect with the camera lens
Analog-to-digital conversion module, the camera unit exports the digitized image information absorbed.The equipment includes but not limited to:
Mobile phone, laptop, tablet computer, wearable electronic equipment etc..It may also include in the equipment:Temperature induction unit,
Humidity inductive unit etc., or even can also include photoinduction unit.
The system 1 includes:Pretreatment unit 11, pretreatment unit 12, display unit 13.
The pretreatment unit 11 is used to obtain the image information for including flower that the camera unit is absorbed, and really
Determine the flower type of flower in described image information.
Specifically, the pretreatment unit 11 is selected by user in the options interface comprising preset multiple flower types
The operation of one flower type determines the flower type for the flower to be absorbed.User is obtained again presses intake when shooting button
The image information that unit is absorbed, and execute pretreatment unit 12.
Alternatively, the pretreatment unit 11 analyzes absorbed image letter in real time under the intake pre- shooting state of unit
Whether the characteristic information of flower is included in breath, if so, further by the characteristic information analyzed and preset each flower type
In characteristic information matched, to determine the flower type of included flower, and execute pretreatment unit 12.Conversely, then
Continue to obtain new image information.
Here, the pretreatment unit 11 can in advance have the characteristic information of all flower types locally, to match reality
When the characteristic information analyzed.Alternatively, the characteristic information of each flower type is stored in server-side, the pretreatment unit 11 is logical
Obtained characteristic information will be analyzed in real time by, which crossing, is sent to the server-side, to drive the server-side to be matched, then obtains institute
State the flower in image information of the mode to determine real time shooting of the matching result of server-side feedback whether belong to it is preset certain
One flower type.
Preferably, the pretreatment unit 11 also obtains at least one initial environment letter while obtaining image information
Breath.Wherein, the environmental information and initial environment information include but not limited to following at least one:Temporal information, temperature information,
Humidity information, light sensation information.
Here, the pretreatment unit 11 can be distinguished by temperature induction unit, humidity inductive unit and photoinduction unit
Obtain the temperature information, humidity information and light sensation information.Wherein, the pretreatment unit 11 can be by analyzing in image information
The average value of gray value falls into the light intensity section corresponding to preset a certain gray scale interval and the gray scale interval, to determine
State light sensation information.Wherein, each light intensity section can be corresponding light sensation information.
The pretreatment unit 12 is used for based between preset each flower type, flower color and each environmental information three
Correspondence, predict under the target environment information of setting in described image information flower color.
Specifically, be preset in the pretreatment unit 12 each flower type, flower color and each environmental information three it
Between correspondence.The correspondence can be multiple queries table.When user needs to predict described image under target environment information
When the color of the flower in information, point opens the adjustment interface for adjusting each environmental information, and adjusts at least one mesh therein manually
Mark environmental information.Then the pretreatment unit 12 is based on each inquiry table prediction figure under the target environment information of setting
As the color of flower in information.Here, the target environment information can be the pretreatment unit 12 from the adjustment interface
The numerical value of obtained each environmental information of correspondence.Can also be that the pretreatment unit 12 is based on initial environment information and the tune
The numerical value that the operation of the section obtained each environmental information in interface obtains.
Preferably, the pretreatment unit 12, first will be described after getting target environment information from the adjustment interface
In initial environment information superposition to the target environment information, to obtain the target environment information of new setting;It is based on again default
Each flower type, the correspondence between flower color and each environmental information three, predict the target environment information in setting
The color of flower in lower described image information.
For example, the initial environment information accessed by the pretreatment unit 12 includes:Temperature information T1 obtains self-regulation
The temperature information at interface is T2, then the pretreatment unit 12 determines that set target environment information includes:(T2-T1) temperature
Degree is poor.The pretreatment unit 12 determines the temperature difference of (T2-T1) by inquiring the table of preset each temperature difference and each color
The color of corresponding flower, and execute display unit 13.
It is further preferable that the pretreatment unit 12 includes:First prediction module 121, the second prediction module 122, third
Prediction module 123.As shown in Figure 4.
First prediction module 121 be used for obtain in advance same flower type preset varying environment information numerical value
Lower corresponding multiple flower colors.
Here, first prediction module 121 is directed to set flower type in advance, the number of varying environment information is obtained
The lower corresponding different flower colors of value.For example, first prediction module 121 obtains needle for set A flower types
To the respective corresponding flower color of temporal information in the morning, afternoon and evening, temperature information, light sensation information.And execute the second prediction module 122.
Second prediction module 122 is used for the power based on the various environmental informations corresponding to preset same flower type
Weight and acquired flower color, estimate the flower color in preset each environmental information.
Here, second prediction module 122 is a1, temperature information for the weight of A flower type preset time information
Weight be a2, the weight of light sensation information is a3, wherein a1>a3>a2.When second prediction module 122 is got in the morning, afternoon and evening
When flower color corresponding to each environmental information, using each weight as linear coefficient and according to preset precision, determine acquired
Each environment between each environmental information and noon and evening environmental information between congener morning and noon environmental information
Information.Thus the inquiry table between various types of environmental information and flower color is constituted.
The third prediction module 123 is used for based on estimated flower type, the correspondence of environmental information and flower color
Relationship predicts the color of the flower in described image information under the target environment information of setting.
Specifically, estimated inquiry table is inquired the target from the adjustment interface by second prediction module 122
Flower color corresponding to environmental information then executes the third prediction module 123.
The display unit 13 is for the flower color predicted to be depicted at the flower position of described image information.
Here, the display unit 13 can determine the position of flower in image information according to the contour feature information of flower
And profile.Then, thus the display unit 13 shows that flower exists by the flower color full-filling predicted in the profile
Flower color under the target environment information of setting.
Preferably, in order to which the effect after flower changes colour is presented in more natural, the display unit 13 is used for according to the figure
As the half-tone information in information determines the lighting angle of described image information;Based on the lighting angle, the flower that will be predicted
Color is depicted at the flower position of described image information and is rendered.
For example, the display unit 13 can first determine that half-tone information is less than the face in each region of preset value in image information
Product or the band of position (top left region of such as image information, the upper right area of image information concentrated less than each region of preset value
Domain, the lower left region of image information, image information lower right area etc.);Position that is again that corresponding area is maximum or most concentrating
Region is determined as the lighting angle in image information along drift angle horizontally and vertically.The display unit 13 is according to flower
Contour feature information determines the flower profile in described image information, recycles existing Rendering, according to the illumination angle
Degree renders the flower color in the flower profile.
In conclusion the present invention utilizes between preset each flower type, flower color change and each environmental information three
Correspondence, predict the color of the flower in described image information under the target environment information of setting, and the flower that will be predicted
Piece color is shown at the flower position in image information, can solve the problems, such as that people can not predict flower color;In addition, borrowing
The different flower colors corresponding to varying environment information in the same flower type pre-entered are helped, it can be complete convenient for establishing flower
Correspondence in life cycle between each color and environmental information is so convenient for predicting flower color;In addition, according to
Half-tone information in image information determines lighting angle, the flower image predicted that can be more natural.So the present invention has
Effect overcomes various shortcoming in the prior art and has high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology can all carry out modifications and changes to above-described embodiment without violating the spirit and scope of the present invention.Cause
This, institute is complete without departing from the spirit and technical ideas disclosed in the present invention by those of ordinary skill in the art such as
At all equivalent modifications or change, should by the present invention claim be covered.