AlexeyAB
2017-08-17 4d2fefd75a57dfd6e60680eaf7408c82e15a025d
src/image.c
@@ -1153,7 +1153,7 @@
void random_distort_image(image im, float hue, float saturation, float exposure)
{
    float dhue = rand_uniform(-hue, hue);
    float dhue = rand_uniform_strong(-hue, hue);
    float dsat = rand_scale(saturation);
    float dexp = rand_scale(exposure);
    distort_image(im, dhue, dsat, dexp);
@@ -1305,9 +1305,15 @@
image load_image(char *filename, int w, int h, int c)
{
#ifdef OPENCV
    image out = load_image_cv(filename, c);
#ifndef CV_VERSION_EPOCH
   image out = load_image_stb(filename, c);  // OpenCV 3.x
#else
    image out = load_image_stb(filename, c);
   image out = load_image_cv(filename, c);      // OpenCV 2.4.x
#endif
#else
    image out = load_image_stb(filename, c); // without OpenCV
#endif
    if((h && w) && (h != out.h || w != out.w)){