mirror of https://github.com/davisking/dlib.git
Return shortcut in disturb_colors (#2909)
* Return shortcut in disturb_colors No need to do anything if both gamma and color magnitudes are set to 0. * Fix typo This happens for being lazy and making the change directly from GitHub...
This commit is contained in:
parent
b0f6be8058
commit
85aa29a4e8
|
@ -75,6 +75,9 @@ namespace dlib
|
|||
const double color_magnitude = 0.2
|
||||
)
|
||||
{
|
||||
if (gamma_magnitude == 0 && color_magnitude == 0)
|
||||
return;
|
||||
|
||||
image_view<image_type> img(img_);
|
||||
random_color_transform tform(rnd, gamma_magnitude, color_magnitude);
|
||||
for (long r = 0; r < img.nr(); ++r)
|
||||
|
|
Loading…
Reference in New Issue