ropencv 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +21 -0
- data/ext/opencv.txt +1 -0
- data/ext/src/CMakeLists.txt +1 -2
- data/manifest.xml +1 -1
- data/ropencv.gemspec +3 -2
- data/test/suite.rb +9 -6
- data/test/test_helper.rb +11 -0
- data/test/test_mat.rb +1 -5
- data/test/test_opencv.rb +1 -5
- data/test/test_recognizer.rb +39 -0
- data/test/test_scalar.rb +1 -5
- data/test/test_triangulate_points.rb +1 -6
- data/test/test_vec.rb +1 -6
- data/test/test_vector.rb +1 -5
- metadata +21 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: ddadd3f34d029333f0b75d6daf43c9530d9eb3ce
         | 
| 4 | 
            +
              data.tar.gz: 64055d27486efc056af1a403885ab76985351df1
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 3f9bd2767f57f0181b02b361ebf134efdb3bddc641f8bfacdcd83c9fc93a7f3d199cda1a4ef8f419e1d370145834b541957e2a91860fb2445635c23ef2190232
         | 
| 7 | 
            +
              data.tar.gz: b07b8f0000084df1c053521ec527c4992419f4cb04011d197cf6062cf21aca22427cf7c50230f73a0774ffbc0031afe3928d20c4aba8c178d5dfa3945c5d2e9b
         | 
    
        data/Gemfile
    ADDED
    
    
    
        data/Gemfile.lock
    ADDED
    
    | @@ -0,0 +1,21 @@ | |
| 1 | 
            +
            PATH
         | 
| 2 | 
            +
              remote: .
         | 
| 3 | 
            +
              specs:
         | 
| 4 | 
            +
                ropencv (0.0.20)
         | 
| 5 | 
            +
                  ffi (~> 1.9.0)
         | 
| 6 | 
            +
                  rbind (>= 0.0.27)
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            GEM
         | 
| 9 | 
            +
              remote: https://rubygems.org/
         | 
| 10 | 
            +
              specs:
         | 
| 11 | 
            +
                ffi (1.9.8)
         | 
| 12 | 
            +
                minitest (5.5.1)
         | 
| 13 | 
            +
                rbind (0.0.27)
         | 
| 14 | 
            +
                  ffi (>= 1.9.0)
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            PLATFORMS
         | 
| 17 | 
            +
              ruby
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            DEPENDENCIES
         | 
| 20 | 
            +
              minitest (~> 5.5)
         | 
| 21 | 
            +
              ropencv!
         | 
    
        data/ext/opencv.txt
    CHANGED
    
    
    
        data/ext/src/CMakeLists.txt
    CHANGED
    
    | @@ -8,7 +8,6 @@ add_definitions(${OPENCV_CFLAGS}) | |
| 8 8 | 
             
            include_directories(${OPENCV_INCLUDE_DIRS})
         | 
| 9 9 | 
             
            link_directories(${OPENCV_LIBRARY_DIRS})
         | 
| 10 10 |  | 
| 11 | 
            -
             | 
| 12 11 | 
             
            SET(RBIND_SRC
         | 
| 13 12 | 
             
                "${CMAKE_CURRENT_SOURCE_DIR}/types.cc"
         | 
| 14 13 | 
             
                "${CMAKE_CURRENT_SOURCE_DIR}/operations.cc"
         | 
| @@ -18,7 +17,7 @@ add_custom_command(OUTPUT ${RBIND_SRC} | |
| 18 17 | 
             
                   COMMAND ruby "${CMAKE_CURRENT_SOURCE_DIR}/../rbind.rb")
         | 
| 19 18 |  | 
| 20 19 | 
             
            ADD_LIBRARY(rbind_opencv SHARED ${RBIND_SRC})
         | 
| 21 | 
            -
            TARGET_LINK_LIBRARIES(rbind_opencv ${OPENCV_LIBS} ${OPENCV_LDFLAGS_OTHER} )
         | 
| 20 | 
            +
            TARGET_LINK_LIBRARIES(rbind_opencv ${OPENCV_LIBS} ${OPENCV_LDFLAGS_OTHER} ${OPENCV_LIBRARIES})
         | 
| 22 21 |  | 
| 23 22 | 
             
            set(ROOT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/../..)
         | 
| 24 23 | 
             
            install(TARGETS rbind_opencv LIBRARY DESTINATION ${ROOT_FOLDER}/lib/ropencv)
         | 
    
        data/manifest.xml
    CHANGED
    
    
    
        data/ropencv.gemspec
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            Gem::Specification.new do |s|
         | 
| 2 2 | 
             
                s.name              = 'ropencv'
         | 
| 3 | 
            -
                s.version           = '0.0. | 
| 4 | 
            -
                s.date              = '2015- | 
| 3 | 
            +
                s.version           = '0.0.21'
         | 
| 4 | 
            +
                s.date              = '2015-04-14'
         | 
| 5 5 | 
             
                s.platform          = Gem::Platform::RUBY
         | 
| 6 6 | 
             
                s.authors           = ['Alexander Duda']
         | 
| 7 7 | 
             
                s.email             = ['Alexander.Duda@dfki.de']
         | 
| @@ -13,6 +13,7 @@ Gem::Specification.new do |s| | |
| 13 13 | 
             
                s.required_rubygems_version = ">= 1.3.6"
         | 
| 14 14 | 
             
                s.add_runtime_dependency "rbind", ">= 0.0.27"
         | 
| 15 15 | 
             
                s.add_runtime_dependency "ffi", "~> 1.9.0"
         | 
| 16 | 
            +
                s.add_development_dependency 'minitest', '~> 5.5'
         | 
| 16 17 | 
             
                s.extensions = ['ext/extconf.rb']
         | 
| 17 18 | 
             
                s.license = 'BSD'
         | 
| 18 19 | 
             
            end
         | 
    
        data/test/suite.rb
    CHANGED
    
    | @@ -1,6 +1,9 @@ | |
| 1 | 
            -
            require ' | 
| 2 | 
            -
             | 
| 3 | 
            -
            require ' | 
| 4 | 
            -
            require ' | 
| 5 | 
            -
            require ' | 
| 6 | 
            -
            require ' | 
| 1 | 
            +
            require File.expand_path('../test_helper.rb', __FILE__)
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'test_mat'
         | 
| 4 | 
            +
            require 'test_vec'
         | 
| 5 | 
            +
            require 'test_vector'
         | 
| 6 | 
            +
            require 'test_scalar'
         | 
| 7 | 
            +
            require 'test_opencv'
         | 
| 8 | 
            +
            require 'test_triangulate_points'
         | 
| 9 | 
            +
            require 'test_recognizer'
         | 
    
        data/test/test_helper.rb
    ADDED
    
    
    
        data/test/test_mat.rb
    CHANGED
    
    
    
        data/test/test_opencv.rb
    CHANGED
    
    
| @@ -0,0 +1,39 @@ | |
| 1 | 
            +
            require File.expand_path('../test_helper.rb', __FILE__)
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            # opencv FaceRecognizer is optional and part of opencv_contrib
         | 
| 4 | 
            +
            if defined? OpenCV::Cv::FaceRecognizer
         | 
| 5 | 
            +
            describe 'cv::createlbph_face_recognizer' do
         | 
| 6 | 
            +
              describe 'initialization' do
         | 
| 7 | 
            +
                it 'creates a recognizer instance' do
         | 
| 8 | 
            +
                  recognizer = cv::createlbph_face_recognizer
         | 
| 9 | 
            +
                  assert_kind_of OpenCV::Cv::Ptr::Cv_FaceRecognizer, recognizer
         | 
| 10 | 
            +
                end
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
              describe 'prediction' do
         | 
| 14 | 
            +
                before do
         | 
| 15 | 
            +
                  @recognizer  = cv::createlbph_face_recognizer
         | 
| 16 | 
            +
                  @images_path = File.join(GEM_ROOT, 'examples', 'data')
         | 
| 17 | 
            +
                  @images      = Std::Vector.new(cv::Mat)
         | 
| 18 | 
            +
                  @labels      = [0, 1]
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                  [ 'sample.jpg', 'jolie.jpeg' ].each do |filename|
         | 
| 21 | 
            +
                    @images << cv::imread(File.join(@images_path, filename), cv::IMREAD_GRAYSCALE)
         | 
| 22 | 
            +
                  end
         | 
| 23 | 
            +
                end
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                it 'can be trained against given labels and images' do
         | 
| 26 | 
            +
                  @recognizer.train(@images, @labels)
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                  image = cv::imread(File.join(@images_path, 'jolie.jpeg'), cv::IMREAD_GRAYSCALE)
         | 
| 29 | 
            +
                  label = FFI::MemoryPointer.new(:int, 16)
         | 
| 30 | 
            +
                  conf  = FFI::MemoryPointer.new(:float, 32)
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                  @recognizer.predict(image, label, conf)
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                  assert_operator label.read_int, :>=, 0
         | 
| 35 | 
            +
                  refute conf.read_float.nan?
         | 
| 36 | 
            +
                end
         | 
| 37 | 
            +
              end
         | 
| 38 | 
            +
            end
         | 
| 39 | 
            +
            end
         | 
    
        data/test/test_scalar.rb
    CHANGED
    
    
| @@ -1,10 +1,5 @@ | |
| 1 | 
            -
            require ' | 
| 2 | 
            -
            require 'ropencv'
         | 
| 3 | 
            -
            require 'pp'
         | 
| 4 | 
            -
            include OpenCV
         | 
| 1 | 
            +
            require File.expand_path('../test_helper.rb', __FILE__)
         | 
| 5 2 |  | 
| 6 | 
            -
             | 
| 7 | 
            -
            MiniTest::Unit.autorun
         | 
| 8 3 | 
             
            describe Cv do
         | 
| 9 4 | 
             
                describe "triangulate_points" do
         | 
| 10 5 | 
             
                    it "must triangulate the given points" do
         | 
    
        data/test/test_vec.rb
    CHANGED
    
    
    
        data/test/test_vector.rb
    CHANGED
    
    | @@ -1,9 +1,5 @@ | |
| 1 | 
            -
            require ' | 
| 2 | 
            -
            require 'ropencv'
         | 
| 3 | 
            -
            require 'pp'
         | 
| 4 | 
            -
            include OpenCV
         | 
| 1 | 
            +
            require File.expand_path('../test_helper.rb', __FILE__)
         | 
| 5 2 |  | 
| 6 | 
            -
            MiniTest::Unit.autorun
         | 
| 7 3 | 
             
            describe Std::Vector::Cv_Point do
         | 
| 8 4 | 
             
                describe "initialize" do
         | 
| 9 5 | 
             
                    it "can be created without arguments" do
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: ropencv
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.21
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Alexander Duda
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2015- | 
| 11 | 
            +
            date: 2015-04-14 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rbind
         | 
| @@ -38,6 +38,20 @@ dependencies: | |
| 38 38 | 
             
                - - ~>
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 40 | 
             
                    version: 1.9.0
         | 
| 41 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              name: minitest
         | 
| 43 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            +
                requirements:
         | 
| 45 | 
            +
                - - ~>
         | 
| 46 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            +
                    version: '5.5'
         | 
| 48 | 
            +
              type: :development
         | 
| 49 | 
            +
              prerelease: false
         | 
| 50 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - ~>
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: '5.5'
         | 
| 41 55 | 
             
            description: ROpenCV is a ffi ruby binding for the Open Source Computer Vision Library
         | 
| 42 56 | 
             
              OpenCV 2.4.4 and higher
         | 
| 43 57 | 
             
            email:
         | 
| @@ -50,6 +64,8 @@ files: | |
| 50 64 | 
             
            - .gitignore
         | 
| 51 65 | 
             
            - .yardopts
         | 
| 52 66 | 
             
            - CMakeLists.txt
         | 
| 67 | 
            +
            - Gemfile
         | 
| 68 | 
            +
            - Gemfile.lock
         | 
| 53 69 | 
             
            - License.txt
         | 
| 54 70 | 
             
            - README.md
         | 
| 55 71 | 
             
            - examples/data/haarcascade_frontalface_alt.xml.gz
         | 
| @@ -85,8 +101,10 @@ files: | |
| 85 101 | 
             
            - manifest.xml
         | 
| 86 102 | 
             
            - ropencv.gemspec
         | 
| 87 103 | 
             
            - test/suite.rb
         | 
| 104 | 
            +
            - test/test_helper.rb
         | 
| 88 105 | 
             
            - test/test_mat.rb
         | 
| 89 106 | 
             
            - test/test_opencv.rb
         | 
| 107 | 
            +
            - test/test_recognizer.rb
         | 
| 90 108 | 
             
            - test/test_scalar.rb
         | 
| 91 109 | 
             
            - test/test_triangulate_points.rb
         | 
| 92 110 | 
             
            - test/test_vec.rb
         | 
| @@ -117,3 +135,4 @@ signing_key: | |
| 117 135 | 
             
            specification_version: 4
         | 
| 118 136 | 
             
            summary: Ruby bindings for opencv 2.4.4 and higher
         | 
| 119 137 | 
             
            test_files: []
         | 
| 138 | 
            +
            has_rdoc: 
         |