1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

Added getLayerNames() to Net and improved blobFromImage();

This commit is contained in:
Francois Deschenes 2018-07-25 23:58:13 -07:00
parent 256df73e7b
commit 46c5a08025
3 changed files with 40 additions and 4 deletions

View file

@ -15,6 +15,10 @@ namespace rubyopencv {
return NIL_P(value) ? (default_value) : NUM2DBL(value);
}
inline double RTEST_DEFAULT(VALUE value, bool default_value) {
return NIL_P(value) ? (default_value) : (RTEST(value) ? true : false);
}
inline VALUE HASH_LOOKUP(VALUE hash, std::string key) {
return rb_hash_lookup(hash, ID2SYM(rb_intern(key.c_str())));
}