opencv-ffi-fast 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +7 -0
- data/README.md +75 -0
- data/Rakefile +22 -0
- data/ext/Rakefile +13 -0
- data/ext/fast/.gitignore +4 -0
- data/ext/fast/LICENSE +30 -0
- data/ext/fast/README +43 -0
- data/ext/fast/fast.c +71 -0
- data/ext/fast/fast.h +31 -0
- data/ext/fast/fast_10.c +4666 -0
- data/ext/fast/fast_11.c +3910 -0
- data/ext/fast/fast_12.c +3134 -0
- data/ext/fast/fast_9.c +5910 -0
- data/ext/fast/mkrf_conf.rb +6 -0
- data/ext/fast/nonmax.c +117 -0
- data/ext/mkrf-monkey.rb +85 -0
- data/ext/mkrf-rakehelper-monkey.rb +52 -0
- data/ext/mkrf_conf.rb +3 -0
- data/lib/opencv-ffi-fast.rb +1 -0
- data/lib/opencv-ffi-fast/fast.rb +113 -0
- data/lib/opencv-ffi-fast/version.rb +5 -0
- data/opencv-ffi-fast.gemspec +25 -0
- data/test/test_ext.rb +50 -0
- data/test/test_wrapper.rb +35 -0
- metadata +112 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
require 'test/setup'
|
3
|
+
require 'opencv-ffi-wrappers/fast'
|
4
|
+
require 'opencv-ffi-wrappers/core/iplimage'
|
5
|
+
|
6
|
+
class TestSURF < Test::Unit::TestCase
|
7
|
+
|
8
|
+
def setup
|
9
|
+
@img = CVFFI::cvLoadImage( TEST_IMAGE_FILE, CVFFI::CV_LOAD_IMAGE_COLOR )
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_cvFASTDetector
|
13
|
+
# greyImg = CVFFI::cvCreateImage( CVFFI::CvSize.new( { :height => @img.height,
|
14
|
+
# :width => @img.width }),
|
15
|
+
# :IPL_DEPTH_8U, 1 )
|
16
|
+
# CVFFI::cvCvtColor( @img, greyImg, :CV_RGB2GRAY )
|
17
|
+
|
18
|
+
greyImg = @img.ensure_greyscale
|
19
|
+
|
20
|
+
smallGreyImg = CVFFI::cvCreateImage( CVFFI::CvSize.new( { :height => greyImg.height/2,
|
21
|
+
:width => greyImg.width/2 } ),
|
22
|
+
:IPL_DEPTH_8U, 1 )
|
23
|
+
CVFFI::cvResize( greyImg, smallGreyImg, :CV_INTER_LINEAR )
|
24
|
+
|
25
|
+
results = CVFFI::FAST::FAST9Detect( smallGreyImg, 50 )
|
26
|
+
|
27
|
+
results.each { |pt|
|
28
|
+
CVFFI::cvCircle( smallGreyImg, CVFFI::CvPoint.new( :x => pt.x.to_i, :y => pt.y.to_i ), 5,
|
29
|
+
CVFFI::CvScalar.new( :w=>255, :x=>255, :y=>255, :z=>0 ), -1, 8, 0 )
|
30
|
+
}
|
31
|
+
CVFFI::cvSaveImage( TestSetup::output_filename("greyImageFASTWrapperPts.jpg"), smallGreyImg )
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: opencv-ffi-fast
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Aaron Marburg
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-11-24 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: nice-ffi
|
16
|
+
requirement: &8320300 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *8320300
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: mkrf
|
27
|
+
requirement: &8318280 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *8318280
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: opencv-ffi
|
38
|
+
requirement: &8316620 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *8316620
|
47
|
+
description: Edward Rosten's FAST keypoint detector algorithm, as a plug-in for OpenCV-FFI.
|
48
|
+
email:
|
49
|
+
- aaron.marburg@pg.canterbury.ac.nz
|
50
|
+
executables: []
|
51
|
+
extensions:
|
52
|
+
- ext/mkrf_conf.rb
|
53
|
+
extra_rdoc_files: []
|
54
|
+
files:
|
55
|
+
- .gitignore
|
56
|
+
- Gemfile
|
57
|
+
- README.md
|
58
|
+
- Rakefile
|
59
|
+
- ext/Rakefile
|
60
|
+
- ext/fast/.gitignore
|
61
|
+
- ext/fast/LICENSE
|
62
|
+
- ext/fast/README
|
63
|
+
- ext/fast/fast.c
|
64
|
+
- ext/fast/fast.h
|
65
|
+
- ext/fast/fast_10.c
|
66
|
+
- ext/fast/fast_11.c
|
67
|
+
- ext/fast/fast_12.c
|
68
|
+
- ext/fast/fast_9.c
|
69
|
+
- ext/fast/mkrf_conf.rb
|
70
|
+
- ext/fast/nonmax.c
|
71
|
+
- ext/mkrf-monkey.rb
|
72
|
+
- ext/mkrf-rakehelper-monkey.rb
|
73
|
+
- ext/mkrf_conf.rb
|
74
|
+
- lib/opencv-ffi-fast.rb
|
75
|
+
- lib/opencv-ffi-fast/fast.rb
|
76
|
+
- lib/opencv-ffi-fast/version.rb
|
77
|
+
- opencv-ffi-fast.gemspec
|
78
|
+
- test/test_ext.rb
|
79
|
+
- test/test_wrapper.rb
|
80
|
+
homepage: http://github.com/amarburg/opencv-ffi-fast
|
81
|
+
licenses: []
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options: []
|
84
|
+
require_paths:
|
85
|
+
- lib
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
segments:
|
93
|
+
- 0
|
94
|
+
hash: -1077395542660260823
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ! '>='
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
hash: -1077395542660260823
|
104
|
+
requirements: []
|
105
|
+
rubyforge_project: opencv-ffi-fast
|
106
|
+
rubygems_version: 1.8.10
|
107
|
+
signing_key:
|
108
|
+
specification_version: 3
|
109
|
+
summary: Edward Rosten's FAST keypoint detector algorithm, as a plug-in for OpenCV-FFI.
|
110
|
+
test_files:
|
111
|
+
- test/test_ext.rb
|
112
|
+
- test/test_wrapper.rb
|