The core open cv-ffi library4 represents a “pure” mapping of Open CV functions and primitives into
Ruby through FFI. It does contain some syntactic sugar for cases where the FFI syntax is awkward, e.g., creating and dereferencing pointers-to-pointers. This library allows the creation of Ruby scripts which appears quite similar to the equivalent Open CV C programs. This layer provides the most control over code performance as it retains the strongly typed core Open CV primitives, without transparent translation.