Summary of the invention
Based on such realistic problem, the present invention aims to provide the method and system that a kind of smart filter is recommended, filter information is split as multiple filter mirror properties (in fact each filter is described by one group of filter mirror properties) by basic thought, (original image information is comprised with the picture adding filter in a large number, namely without picture or the photo of later image process, and user's filter information of adding for it) go to train multiple pattern recognition model (each pattern recognition model is for identifying a filter mirror properties) as training sample, each model is made to possess the ability of the value being applicable to the filter mirror properties of this picture according to picture feature identification.The value of the filter mirror properties finally exported by each model carries out integrating the filter information obtaining recommending.
Substantially realize based on foregoing invention, the concrete technological means that the present invention adopts comprises:
Step 1: the samples pictures obtaining some, extracts the original image information and filter information of often opening in samples pictures; Described filter information comprises some filter mirror properties;
Step 2: the proper vector of often opening samples pictures according to the original image information extraction of often opening in samples pictures;
Step 3: select pattern recognition model to be trained; The quantity of described pattern recognition model is identical with the sub-number of attributes of filter of described filter information, and the corresponding filter mirror properties of each pattern recognition model;
Step 4: train each pattern recognition model in accordance with the following methods: successively often to open the input of proper vector for pattern recognition model of samples pictures, the value of the filter mirror properties that model of cognition is corresponding in mode in this samples pictures filter information is that this pattern recognition model is trained in the output of described pattern recognition model;
Step 5: the target original image obtaining filter information to be recommended;
Step 6: the proper vector extracting target original image;
Step 7: the proper vector of target original image is inputted successively the pattern recognition model after each training, the pattern recognition model after each training exports the value of the filter mirror properties of its correspondence; The value of the filter mirror properties exported by each pattern recognition model carries out integrating the filter information obtaining recommending.
Preferably, described proper vector comprises color space eigenwert, textural characteristics value and Structural Eigenvalue.
Preferably, the sub-attribute of described filter comprises texture, aperture, special efficacy, colour temperature, tone, exposure, contrast, vividness and Gao Guang.
Preferably, described pattern recognition model comprises classification mode model of cognition and Regression Model model of cognition; The pattern recognition model of corresponding texture, aperture and special efficacy three filter mirror properties is classification mode model of cognition; The pattern recognition model of corresponding colour temperature, tone, exposure, contrast, vividness and high light six filter mirror properties is Regression Model model of cognition.
Present invention also offers a kind of picture filter information recommendation system, comprising:
Target original image acquiring unit, for obtaining the target original image of filter information to be recommended;
Target original image characteristic vector pickup unit, for extracting the proper vector of target original image;
The sub-Attribute Recognition unit of filter, for the proper vector of target original image is inputted each pattern recognition model successively, obtains the value of the filter mirror properties that each pattern recognition model exports; Wherein, the corresponding filter mirror properties of each pattern recognition model, for calculating the value of the filter mirror properties of its correspondence according to the proper vector of target original image;
Filter information integration unit, the value for the filter mirror properties exported by each pattern recognition model carries out integrating the filter information obtaining recommending.
Further, each pattern recognition model described obtains in such a way:
Step 1: the samples pictures obtaining some, extracts the original image information and filter information of often opening in samples pictures; Described filter information comprises some filter mirror properties;
Step 2: the proper vector of often opening samples pictures according to the original image information extraction of often opening in samples pictures;
Step 3: select pattern recognition model to be trained; The quantity of described pattern recognition model is identical with the sub-number of attributes of filter of described filter information, and the corresponding filter mirror properties of each pattern recognition model;
Step 4: train each pattern recognition model in accordance with the following methods: successively often to open the input of proper vector for pattern recognition model of samples pictures, the value of the filter mirror properties that model of cognition is corresponding in mode in this samples pictures filter information is that this pattern recognition model is trained in the output of described pattern recognition model.
Further, also comprise:
Samples pictures information extraction unit, for obtaining the samples pictures of some, extracts the original image information and filter information of often opening in samples pictures; Described filter information comprises some filter mirror properties;
Samples pictures characteristic vector pickup unit, for often opening the proper vector of samples pictures according to the every original image information extraction of opening in samples pictures;
Pattern recognition model determining unit, for selecting pattern recognition model to be trained; The quantity of described pattern recognition model is identical with the sub-number of attributes of filter of described filter information, and the corresponding filter mirror properties of each pattern recognition model;
Pattern recognition model training unit, for training each pattern recognition model in accordance with the following methods: successively often to open the input of proper vector for pattern recognition model of samples pictures, the value of the filter mirror properties that model of cognition is corresponding in mode in this samples pictures filter information is that this pattern recognition model is trained in the output of described pattern recognition model.
Owing to have employed above-mentioned technological means, the present invention has following beneficial effect:
1. filter information decomposition is the some filter mirror properties describing it by the present invention, for each filter mirror properties trains a pattern recognition model, for often opening new original image, pattern recognition model in the present invention is calculated as it according to its proper vector and recommends a filter mirror properties, again each filter mirror properties is integrated into filter information, filter information like this for picture recommendation is more accurate, proper, and user experience is good.
2. in the present invention, the proper vector of picture comprises color space eigenwert, textural characteristics value and Structural Eigenvalue, more comprehensively describe the feature of original image, ensure that the accuracy of proposed algorithm, these three kinds of eigenwert calculated amount are less simultaneously, decrease resource cost, make the present invention can be applicable to computing machine and can be applicable to again all kinds of intelligent movable equipment.
3. the numeric form (discrete or continuous) that the present invention is directed to filter mirror properties has selected different pattern recognition types, ensure that the recognition accuracy of filter mirror properties.
Embodiment
All features disclosed in this instructions, or the step in disclosed all methods or process, except mutually exclusive feature and/or step, all can combine by any way.
Arbitrary feature disclosed in this instructions, unless specifically stated otherwise, all can be replaced by other equivalences or the alternative features with similar object.That is, unless specifically stated otherwise, each feature is an example in a series of equivalence or similar characteristics.
As Fig. 1, a specific embodiment of the present invention comprises the foundation of the sub-attribute Recognition Model of filter and is target original image recommendation filter two stages of information.
The process wherein setting up the sub-attribute Recognition Model of filter comprises:
Step 1: the samples pictures obtaining some, and extract the original image information and filter information of often opening in samples pictures.
Here required samples pictures refers to that user thinks that it increased the picture of filtering effects, comprises original image information and filter information in its descriptor.Wherein, original image information refers to the information of the picture without the process of successive image treatment technology, such as, comprise the information such as R, G, B value of each pixel of original image, and filter packets of information contains the filter mirror properties describing it.The different APP that takes pictures is that the editable filter mirror properties that user opens is different, the sub-attribute of such as filter includes but not limited to texture (Lighting), aperture (TiltShift), special efficacy (filter), level (EnhanceHdr), skin makeup (EnhanceSkin), sharpness (sharpness), colour temperature (Temperature), tone (Hue), exposure (Exposure), contrast (Contrast), vividness (Vibrance), saturation degree (Saturation), Gao Guang (HighLight), shade (Shadow), dark angle (VignetteStrong), center brightness (CenterStrong).
Some described here can be that hundreds of is opened, and also can be a upper thousand sheets.The quantity of samples pictures is larger, originates abundanter, uses these samples pictures to train the pattern recognition model obtained more accurate.
Step 2: the proper vector of often opening samples pictures according to the original image information extraction of often opening in samples pictures.
The extraction of picture feature is a more complicated field, but the real-time of considering and calculated amount, and seletion calculation amount of the present invention is relatively little, but has the feature with distinction, comprises color space feature, textural characteristics and architectural feature three major types feature.The extraction of this three major types feature all adopts prior art, below 2 say the method that the present embodiment adopts, but the present embodiment should not selected excellent method as picture feature in the present invention to quantitative limitation.
Color space feature
The present embodiment have selected RGB, the interval histogram of HSV, LAB tri-color spaces, and average and variance.Also add simultaneously gray-scale map interval histogram.These values are formed a subvector, such color space has just had 1586 eigenwert: gray_hist (32)+RGB_hist (512)+HSV_hist (512)+LAB_hist (512)+RGB_mean_std (6)+HSV_mean_std (6)+LAB_mean_std (6), and wherein the interval histogram gray_hist of gray-scale map has 32 eigenwerts; The interval histogram LAB_hist of the interval histogram RGB_hist of RGB color space, interval histogram HSV_hist, LAB color space in hsv color space all has 512 eigenwerts; The average of RGB color space, variance RGB_mean_std, the average in hsv color space, variance HSV_mean_std, the average of LAB color space, variance LAB_mean_std all have 6 eigenwerts.
In other embodiments, the eigenwert of color space can only include a part for above-mentioned several eigenwert, also can increase the interval histogram of other color spaces, average and/or variance etc. on the basis of above-mentioned several eigenwert.
Textural characteristics
The present embodiment adopts gabor kernel method to carry out process to picture and obtains 32 features.Concrete kernel method first generates 16 cores, uses each core and picture to ask convolution, calculating overall average and the variance of convolution results, thus obtaining 32 eigenwerts.
In other embodiments, 8 gabor cores can be used to extract the textural characteristics value of picture.
Architectural feature
The present embodiment uses HOG algorithm (histograms of oriented gradients, Histogram of Oriented Gradient), is extracted 128 features of a pictures.The concrete practice have selected 8 directions, as upper and lower, left and right, direction, 45 °, the upper left corner, direction, 45 °, the lower left corner, direction, 45 °, the upper right corner and direction, 45 °, the lower right corner.Picture is divided into several cell, each cell comprises 32 × 32 pixels; Each block comprises 1 × 1 cell.
In other embodiments, in HOG algorithm, only 4 directions can be selected.
Step 3: select pattern recognition model to be trained; The quantity of described pattern recognition model is identical with the sub-number of attributes of filter of described filter information, and the corresponding filter mirror properties of each pattern recognition model.
Pattern recognition model has a lot of type, and comprising for output valve is the pattern recognition model that can be used for classifying of discrete value, as SVM(supporting vector machine model) and output valve be the Regression Model model of cognition of successive value, as multiple linear regression model.
The present embodiment according to the characteristics taking value of filter mirror properties, the different pattern recognition model for the sub-Attributions selection of different filters.If Lighting, TiltShift and ilter tri-filter mirror properties value is discrete value, for this reason the present embodiment select output valve be discrete value can be used for classify pattern recognition model, it is successive value that Temperature, Hue, Exposure, Contrast, Vibrance and Highlight etc. filter the value of mirror properties, and the present embodiment selects output valve to be the Regression Model model of cognition of successive value for this reason.
Step 4: train each pattern recognition model in accordance with the following methods: successively often to open the input of proper vector for pattern recognition model of samples pictures, the value of the filter mirror properties that model of cognition is corresponding in mode in this samples pictures filter information is that this pattern recognition model is trained in the output of described pattern recognition model.When samples pictures quantity is more, training Model Identification accuracy rate is out higher.
Step 5: by taking pictures, the mode such as sectional drawing obtains the target original image of filter information to be recommended.
Step 6: the proper vector extracting target original image according to the method that step 2 is same.
Step 7: the proper vector of target original image is inputted successively the pattern recognition model after each training, the pattern recognition model after each training automatically can calculate and export the value of the filter mirror properties of its correspondence; The value of the filter mirror properties exported by each pattern recognition model carries out integrating the filter information obtaining recommending.
Present invention also offers a kind of picture filter information recommendation system, this system can directly be installed on intelligent movable equipment, comprising:
Target original image acquiring unit, for obtaining the target original image of filter information to be recommended.
Target original image characteristic vector pickup unit, for extracting the proper vector of target original image.
The sub-Attribute Recognition unit of filter, for the proper vector of target original image is inputted each pattern recognition model successively, obtains the value of the filter mirror properties that each pattern recognition model exports; Wherein, each pattern recognition model training in advance is ripe, and the corresponding filter mirror properties of each pattern recognition model, for calculating the value of the filter mirror properties of its correspondence according to the proper vector of target original image.
Filter information integration unit, the value for the filter mirror properties exported by each pattern recognition model carries out integrating the filter information obtaining recommending.
Wherein, each pattern recognition model described obtains in such a way:
Step 1: the samples pictures obtaining some, extracts the original image information and filter information of often opening in samples pictures; Described filter information comprises some filter mirror properties;
Step 2: the proper vector of often opening samples pictures according to the original image information extraction of often opening in samples pictures;
Step 3: select pattern recognition model to be trained; The quantity of described pattern recognition model is identical with the sub-number of attributes of filter of described filter information, and the corresponding filter mirror properties of each pattern recognition model;
Step 4: train each pattern recognition model in accordance with the following methods: successively often to open the input of proper vector for pattern recognition model of samples pictures, the value of the filter mirror properties that model of cognition is corresponding in mode in this samples pictures filter information is that this pattern recognition model is trained in the output of described pattern recognition model.
The present invention is not limited to aforesaid embodiment.The present invention expands to any new feature of disclosing in this manual or any combination newly, and the step of the arbitrary new method disclosed or process or any combination newly.