Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of method and system predicting flower color, cannot predict the problem of flower color for solving people in prior art.
For achieving the above object and other relevant objects, the invention provides a kind of method predicting flower color, for comprising in the equipment of image unit, comprising: obtain the image information comprising flower that described image unit absorbs, and determine the flower type of flower in described image information; Based on each flower type preset, corresponding relation between the change of flower color with each environmental information three, predict the color of flower in described image information under the targeted environment information of setting; Predicted flower color is depicted in the flower position of described image information.
Preferably, obtain described image unit absorb comprise the image information of flower while, described method also comprises: obtain when picked-up described image information time initial environment information; Performing described each flower type based on presetting, the corresponding relation between flower color and each environmental information three, before predicting the step of the color of flower in described image information under the targeted environment information of setting, described method also comprises: by described initial environment information superposition in set targeted environment information, to obtain the targeted environment information of new setting.
Preferably, described environmental information and initial environment information comprise following at least one: temporal information, temperature information, humidity information, light sensation information.
Preferably, described each flower type based on presetting, the corresponding relation between flower color and each environmental information three, predict that the mode of the color of flower in described image information under the targeted environment information of setting comprises: obtain multiple flower colors that same flower type is corresponding under the numerical value of the varying environment information preset in advance; Based on weight and the flower color obtained of the various environmental informations corresponding to the same flower type preset, estimate the flower color corresponding to each environmental information; Based on the corresponding relation of estimated flower type, environmental information and flower color, predict the color of flower in described image information under the targeted environment information of setting.
Preferably, the described mode predicted flower color being depicted in the flower position of described image information comprises: the lighting angle determining described image information according to the half-tone information in described image information; Based on described lighting angle, predicted flower color is depicted in the flower position of described image information and is played up.
Based on above-mentioned purpose, the present invention also provides a kind of system predicting flower color, for comprising in the equipment of image unit, comprising: pretreatment unit, for obtaining the image information comprising flower that described image unit absorbs, and determine the flower type of flower in described image information; Predicting unit, for based on each flower type preset, corresponding relation between the change of flower color with each environmental information three, predicts the color of flower in described image information under the targeted environment information of setting; Display unit, for being depicted in the flower position of described image information by predicted flower color.
Preferably, described pretreatment unit is also for obtaining the initial environment information when absorbing described image information; Described predicting unit also for by described initial environment information superposition in set targeted environment information, to obtain the targeted environment information of new setting.
Preferably, described environmental information and initial environment information comprise following at least one: temporal information, temperature information, humidity information, light sensation information.
Preferably, described predicting unit comprises: the first prediction module, for obtaining same flower type multiple flower colors corresponding under the numerical value of the varying environment information preset in advance; Second prediction module, for based on the weight of the various environmental informations corresponding to the same flower type preset and the flower color that obtains, estimates the flower color corresponding to each environmental information; 3rd prediction module, for the corresponding relation based on estimated flower type, environmental information and flower color, predicts the color of flower in described image information under the targeted environment information of setting.
Preferably, described display unit is used for the lighting angle determining described image information according to the half-tone information in described image information; Based on described lighting angle, predicted flower color is depicted in the flower position of described image information and is played up.
As mentioned above, the method and system of prediction flower color of the present invention, there is following beneficial effect: utilize the corresponding relation between the change of default each flower type, flower color with each environmental information three, predict the color of flower in described image information under the targeted environment information of setting, and the flower position predicted flower color is presented in image information, the problem that people cannot predict flower color can be solved; In addition, by the different flower colors in the same flower type pre-entered corresponding to varying environment information, can be convenient to set up the corresponding relation in flower Life cycle between each color and environmental information, so be convenient to predict flower color; Further, according to the half-tone information determination lighting angle in image information, the flower image predicted more naturally can be obtained.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this instructions can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this instructions also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.
As shown in Figure 1, the invention provides a kind of method predicting flower color.Described method can be used for the equipment comprising image unit.Wherein said image unit comprises the camera lens being arranged on equipment front and/or backboard, and the analog-to-digital conversion module be connected with described camera lens, and described image unit exports the digitized image information absorbed.Described equipment includes but not limited to: mobile phone, notebook computer, panel computer, wearable electronic equipment etc.Also can comprise in described equipment: temperature induction unit, humidity inductive unit etc., even can also comprise photoinduction unit.
In step sl, described equipment obtains the image information comprising flower that described image unit absorbs, and determines the flower type of flower in described image information.
Particularly, first described equipment selects the operation of a flower type to determine the flower type of the flower that will absorb by user in the options interface comprising default multiple flower types.Obtain the image information that when user presses shooting push button, described picked-up unit absorbs again, and perform step S2.
Or, the characteristic information of flower whether is comprised in the described equipment image information that real-time analysis is absorbed under the pre-shooting state of described picked-up unit, if, then further analyzed characteristic information is mated with the characteristic information in each flower type preset, to determine the flower type of comprised flower, and perform step S2.Otherwise, then continue to obtain new image information.
At this, the characteristic information of all flower types can exist local by described equipment in advance, to mate the characteristic information that real-time analysis obtains.Or, the characteristic information of each flower type is stored in service end, described equipment is sent to described service end by characteristic information real-time analysis obtained, to drive described service end to mate, more whether the mode of the matching result obtaining described service end feedback belongs to default a certain flower type to the flower in the image information determining real time shooting.
Preferably, described equipment, while acquisition image information, also obtains at least one initial environment information.Wherein, described environmental information and initial environment information include but not limited to following at least one: temporal information, temperature information, humidity information, light sensation information.
At this, described equipment obtains described temperature information, humidity information and light sensation information respectively by temperature induction unit, humidity inductive unit and photoinduction unit.Wherein, described equipment to fall between default a certain gray area by the mean value institute analyzing gray-scale value in image information and light intensity interval corresponding between this gray area, determines described light sensation information.Wherein, each light intensity interval can be corresponding light sensation information.
In step s 2, described equipment, based on each flower type preset, corresponding relation between flower color and each environmental information three, predicts the color of flower in described image information under the targeted environment information of setting.
Particularly, each flower type, corresponding relation between flower color and each environmental information three is preset with in described equipment.Described corresponding relation can be multiple queries table.When user needs the color of the flower under target of prediction environmental information in described image information, point opens the adjustment interface regulating each environmental information, and manual adjustments at least one targeted environment information wherein.Then described equipment predicts the color of flower in described image information under the targeted environment information of setting based on each described question blank.At this, described targeted environment information can be the numerical value of each environmental information of correspondence that described equipment obtains from described adjustment interface.Also can be the numerical value that the computing of each environmental information that described equipment obtains based on initial environment information and described adjustment interface obtains.
Preferably, described equipment after getting targeted environment information from described adjustment interface, first by described initial environment information superposition in described targeted environment information, to obtain the targeted environment information of new setting; Again based on each flower type preset, corresponding relation between flower color and each environmental information three, predict the color of flower in described image information under the targeted environment information of setting.
Such as, the initial environment information accessed by described equipment comprises: temperature information T1, and the temperature information being obtained from adjustment interface is T2, then described equipment determines that set targeted environment information comprises: the temperature difference of (T2-T1).Described equipment determines the color of the flower corresponding to the temperature difference of (T2-T1) by the table inquiring about default each temperature difference and each color, and performs step S3.
More preferably, described step S2 comprises step S21, S22 and S23.As shown in Figure 2.
In the step s 21, described equipment obtains same flower type multiple flower colors corresponding under the numerical value of the varying environment information preset in advance.
At this, described equipment in advance for set flower type, different flower colors corresponding under obtaining the numerical value of varying environment information.Such as, described equipment obtains for morning, noon and afternoon temporal information, temperature information, light sensation information flower color corresponding separately for set A flower type.And perform step S22.
In step S22, described equipment, based on the weight of the various environmental informations corresponding to the same flower type preset and the flower color that obtains, estimates the flower color in each environmental information preset.
At this, described equipment for the weight of A flower type Preset Time information be a1, the weight of temperature information is a2, the weight of light sensation information is a3, wherein, a1>a3>a2.When described equipment gets the flower color corresponding to morning, noon and afternoon each environmental information, with each weight for linear coefficient and according to the precision preset, determine each environmental information between each environmental information between obtained congener morning and noon environmental information and noon and evening environmental information.Form the question blank between various types of environmental information and flower color thus.
In step S23, described equipment, based on the corresponding relation of estimated flower type, environmental information and flower color, predicts the color of flower in described image information under the targeted environment information of setting.
Particularly, described equipment is inquired about from the flower color corresponding to the targeted environment information of described adjustment interface according to the question blank estimated by step S22.Then, described equipment performs step S3.
In step s3, predicted flower color is depicted in the flower position of described image information by described equipment.
At this, described equipment can determine position and the profile of flower in image information according to the contour feature information of flower.Then, predicted flower color full-filling in described profile, is shown the flower color of flower under the targeted environment information of setting by described equipment thus.
Preferably, in order to more naturally present the effect after flower variable color, described step S3 comprises step S31 and S32.
In step S31, described equipment determines the lighting angle of described image information according to the half-tone information in described image information.
Such as, described equipment can first determine half-tone information in image information lower than the area in each region of preset value or lower than each region of preset value the band of position (as the top left region of image information, the right regions of image information, the lower left region of image information, the lower right area etc. of image information) of concentrating; Again the band of position maximum or the most concentrated for corresponding area is defined as described lighting angle along the drift angle of transverse axis and the longitudinal axis in image information.
Then, in step s 32, predicted flower color, based on described lighting angle, is depicted in the flower position of described image information and is played up by described equipment.
Particularly, described equipment determines the flower profile in described image information according to the contour feature information of flower, recycle existing Rendering, plays up the flower color in described flower profile according to described lighting angle.
As shown in Figure 3, the invention provides a kind of system predicting flower color.Described system can be arranged on the equipment comprising image unit.Wherein said image unit comprises the camera lens being arranged on equipment front and/or backboard, and the analog-to-digital conversion module be connected with described camera lens, and described image unit exports the digitized image information absorbed.Described equipment includes but not limited to: mobile phone, notebook computer, panel computer, wearable electronic equipment etc.Also can comprise in described equipment: temperature induction unit, humidity inductive unit etc., even can also comprise photoinduction unit.
Described system 1 comprises: pretreatment unit 11, pretreatment unit 12, display unit 13.
The image information comprising flower that described pretreatment unit 11 absorbs for obtaining described image unit, and the flower type determining flower in described image information.
Particularly, described pretreatment unit 11 selects the operation of a flower type to determine the flower type of the flower that will absorb by user in the options interface comprising default multiple flower types.Obtain the image information that when user presses shooting push button, described picked-up unit absorbs again, and perform pretreatment unit 12.
Or, the characteristic information of flower whether is comprised in described pretreatment unit 11 image information that real-time analysis is absorbed under the pre-shooting state of described picked-up unit, if, then further analyzed characteristic information is mated with the characteristic information in each flower type preset, to determine the flower type of comprised flower, and perform pretreatment unit 12.Otherwise, then continue to obtain new image information.
At this, the characteristic information of all flower types can exist local by described pretreatment unit 11 in advance, to mate the characteristic information that real-time analysis obtains.Or, the characteristic information of each flower type is stored in service end, described pretreatment unit 11 is sent to described service end by characteristic information real-time analysis obtained, to drive described service end to mate, more whether the mode of the matching result obtaining described service end feedback belongs to default a certain flower type to the flower in the image information determining real time shooting.
Preferably, described pretreatment unit 11, while acquisition image information, also obtains at least one initial environment information.Wherein, described environmental information and initial environment information include but not limited to following at least one: temporal information, temperature information, humidity information, light sensation information.
At this, described pretreatment unit 11 obtains described temperature information, humidity information and light sensation information respectively by temperature induction unit, humidity inductive unit and photoinduction unit.Wherein, described pretreatment unit 11 to fall between default a certain gray area by the mean value institute analyzing gray-scale value in image information and light intensity interval corresponding between this gray area, determines described light sensation information.Wherein, each light intensity interval can be corresponding light sensation information.
Described pretreatment unit 12, for based on each flower type preset, corresponding relation between flower color and each environmental information three, predicts the color of flower in described image information under the targeted environment information of setting.
Particularly, each flower type, corresponding relation between flower color and each environmental information three is preset with in described pretreatment unit 12.Described corresponding relation can be multiple queries table.When user needs the color of the flower under target of prediction environmental information in described image information, point opens the adjustment interface regulating each environmental information, and manual adjustments at least one targeted environment information wherein.Then described pretreatment unit 12 predicts the color of flower in described image information under the targeted environment information of setting based on each described question blank.At this, described targeted environment information can be the numerical value of each environmental information of correspondence that described pretreatment unit 12 obtains from described adjustment interface.Also can be the numerical value that the computing of each environmental information that described pretreatment unit 12 obtains based on initial environment information and described adjustment interface obtains.
Preferably, described pretreatment unit 12 after getting targeted environment information from described adjustment interface, first by described initial environment information superposition in described targeted environment information, to obtain the targeted environment information of new setting; Again based on each flower type preset, corresponding relation between flower color and each environmental information three, predict the color of flower in described image information under the targeted environment information of setting.
Such as, initial environment information accessed by described pretreatment unit 12 comprises: temperature information T1, the temperature information being obtained from adjustment interface is T2, then described pretreatment unit 12 determines that set targeted environment information comprises: the temperature difference of (T2-T1).Described pretreatment unit 12 determines the color of the flower corresponding to the temperature difference of (T2-T1) by the table inquiring about default each temperature difference and each color, and performs display unit 13.
More preferably, described pretreatment unit 12 comprises: the first prediction module 121, second prediction module 122, the 3rd prediction module 123.As shown in Figure 4.
Described first prediction module 121 is for obtaining same flower type multiple flower colors corresponding under the numerical value of the varying environment information preset in advance.
At this, described first prediction module 121 in advance for set flower type, different flower colors corresponding under obtaining the numerical value of varying environment information.Such as, described first prediction module 121 obtains for morning, noon and afternoon temporal information, temperature information, light sensation information flower color corresponding separately for set A flower type.And perform the second prediction module 122.
Described second prediction module 122, for based on the weight of the various environmental informations corresponding to the same flower type preset and the flower color that obtains, estimates the flower color in each environmental information preset.
At this, described second prediction module 122 for the weight of A flower type Preset Time information be a1, the weight of temperature information is a2, the weight of light sensation information is a3, wherein, a1>a3>a2.When described second prediction module 122 gets the flower color corresponding to morning, noon and afternoon each environmental information, with each weight for linear coefficient and according to the precision preset, determine each environmental information between each environmental information between obtained congener morning and noon environmental information and noon and evening environmental information.Form the question blank between various types of environmental information and flower color thus.
Described 3rd prediction module 123, for the corresponding relation based on estimated flower type, environmental information and flower color, predicts the color of flower in described image information under the targeted environment information of setting.
Particularly, estimated question blank is inquired about from the flower color corresponding to the targeted environment information of described adjustment interface by described second prediction module 122, then performs described 3rd prediction module 123.
Described display unit 13 is for being depicted in the flower position of described image information by predicted flower color.
At this, described display unit 13 can determine position and the profile of flower in image information according to the contour feature information of flower.Then, predicted flower color full-filling in described profile, is shown the flower color of flower under the targeted environment information of setting by described display unit 13 thus.
Preferably, in order to more naturally present the effect after flower variable color, described display unit 13 is for determining the lighting angle of described image information according to the half-tone information in described image information; Based on described lighting angle, predicted flower color is depicted in the flower position of described image information and is played up.
Such as, described display unit 13 can first determine half-tone information in image information lower than the area in each region of preset value or lower than each region of preset value the band of position (as the top left region of image information, the right regions of image information, the lower left region of image information, the lower right area etc. of image information) of concentrating; Again the band of position maximum or the most concentrated for corresponding area is defined as described lighting angle along the drift angle of transverse axis and the longitudinal axis in image information.The flower profile in described image information determined by described display unit 13 according to the contour feature information of flower, recycle existing Rendering, plays up the flower color in described flower profile according to described lighting angle.
In sum, the present invention utilizes the corresponding relation between the change of default each flower type, flower color with each environmental information three, predict the color of flower in described image information under the targeted environment information of setting, and the flower position predicted flower color is presented in image information, the problem that people cannot predict flower color can be solved; In addition, by the different flower colors in the same flower type pre-entered corresponding to varying environment information, can be convenient to set up the corresponding relation in flower Life cycle between each color and environmental information, so be convenient to predict flower color; Further, according to the half-tone information determination lighting angle in image information, the flower image predicted more naturally can be obtained.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.