Skip to content

Commit

Permalink
Scale shift value to ensure normalized output
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-f-cruz committed Jun 2, 2023
1 parent 404b092 commit 0a80f95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Bonsai.Vision/Normalize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public override IObservable<IplImage> Process(IObservable<IplImage> source)

var range = max - min;
var scale = range > 0 ? 1.0 / range : 0;
var shift = range > 0 ? -min : 0;
var shift = range > 0 ? -min * scale : 0;
CV.ConvertScale(input, output, scale, shift);
return output;
});
Expand Down

0 comments on commit 0a80f95

Please sign in to comment.