File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -228,10 +228,11 @@ SmartCrop.prototype = {
228
228
for ( var y = 0 ; y < outputHeightDownSample ; y += downSample ) {
229
229
for ( var x = 0 ; x < outputWidthDownSample ; x += downSample ) {
230
230
var p = ( ~ ~ ( y * invDownSample ) * outputWidth + ~ ~ ( x * invDownSample ) ) * 4 ,
231
- importance = this . importance ( crop , x , y ) ;
232
- score . skin += od [ p ] / 255 * ( od [ p + 1 ] / 255 + options . skinBias ) * importance ;
233
- score . detail += od [ p + 1 ] / 255 * importance ;
234
- score . saturation += od [ p + 2 ] / 255 * ( od [ p + 1 ] / 255 * 1.0 + options . saturationBias ) * importance ;
231
+ importance = this . importance ( crop , x , y ) ,
232
+ detail = od [ p + 1 ] / 255 ;
233
+ score . skin += od [ p ] / 255 * ( detail + options . skinBias ) * importance ;
234
+ score . detail += detail * importance ;
235
+ score . saturation += od [ p + 2 ] / 255 * ( detail + options . saturationBias ) * importance ;
235
236
//if(Number.isNaN(score.detail)) debugger;
236
237
//if(Number.isNaN(score.saturation)) debugger;
237
238
//if(Number.isNaN(score.skin)) debugger;
You can’t perform that action at this time.
0 commit comments