Sha256: cb2ed8a71614ec78458b39972b3a7093039e52eb6aec019400a0b3fd731e1a8b

Contents?: true

Size: 1.53 KB

Versions: 6

Compression:

Stored size: 1.53 KB

Contents

#include "color_space.h"

VALUE ColorSpaceModule;

namespace Spyglass {
  namespace ColorSpace {
    void define_ruby_module() {
      ColorSpaceModule = rb_define_module_under(Spyglass::get_ruby_module(), "ColorSpace");

      // BGR
      rb_define_const(ColorSpaceModule, "BGR_TO_GRAY",  INT2FIX(CV_BGR2GRAY));
      rb_define_const(ColorSpaceModule, "BGR_TO_HLS",   INT2FIX(CV_BGR2HLS));
      rb_define_const(ColorSpaceModule, "BGR_TO_HSV",   INT2FIX(CV_BGR2HSV));
      rb_define_const(ColorSpaceModule, "BGR_TO_YCRCB", INT2FIX(CV_BGR2YCrCb));

      // Gray
      rb_define_const(ColorSpaceModule, "GRAY_TO_BGR", INT2FIX(CV_GRAY2BGR));
      rb_define_const(ColorSpaceModule, "GRAY_TO_RGB", INT2FIX(CV_GRAY2RGB));

      // HLS
      rb_define_const(ColorSpaceModule, "HLS_TO_BGR", INT2FIX(CV_HLS2BGR));
      rb_define_const(ColorSpaceModule, "HLS_TO_RGB", INT2FIX(CV_HLS2RGB));

      // HSV
      rb_define_const(ColorSpaceModule, "HSV_TO_BGR", INT2FIX(CV_HSV2BGR));
      rb_define_const(ColorSpaceModule, "HSV_TO_RGB", INT2FIX(CV_HSV2RGB));

      // RGB
      rb_define_const(ColorSpaceModule, "RGB_TO_GRAY",  INT2FIX(CV_RGB2GRAY));
      rb_define_const(ColorSpaceModule, "RGB_TO_HLS",   INT2FIX(CV_RGB2HLS));
      rb_define_const(ColorSpaceModule, "RGB_TO_HSV",   INT2FIX(CV_RGB2HSV));
      rb_define_const(ColorSpaceModule, "RGB_TO_YCRCB", INT2FIX(CV_RGB2YCrCb));

      // YCrCb
      rb_define_const(ColorSpaceModule, "YCRCB_TO_BGR", INT2FIX(CV_YCrCb2BGR));
      rb_define_const(ColorSpaceModule, "YCRCB_TO_RGB", INT2FIX(CV_YCrCb2RGB));
    }
  }
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spyglass-0.0.5.1 ext/spyglass/color_space.cc
spyglass-0.0.5 ext/spyglass/color_space.cc
spyglass-0.0.4.1 ext/spyglass/color_space.cc
spyglass-0.0.4 ext/spyglass/color_space.cc
spyglass-0.0.3 ext/spyglass/color_space.cc
spyglass-0.0.2 ext/spyglass/color_space.cc