ruby-opencv 0.0.12 → 0.0.13.pre
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/.yardopts +1 -1
- data/README.md +3 -3
- data/ext/opencv/extconf.rb +27 -33
- data/ext/opencv/opencv.cpp +2 -0
- data/ext/opencv/opencv.h +4 -1
- data/lib/opencv/version.rb +1 -1
- data/ruby-opencv.gemspec +8 -9
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6356de9d069585fc9cbbdb846d7f60321c7edfd
|
4
|
+
data.tar.gz: 43c6895c62e673a8b9ea1f72886119896aa8b799
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26da3603f76500f6ab37380d85e1c69362a117ef49fa9e29083bd3d35617acc45ac6f1bb99229eabb43e0681fbab90a4b70484669c33e2b305b987a80f4bf3e8
|
7
|
+
data.tar.gz: 63d25931d8f3ed404b04014494357e137e187059413c9b9e46e07665ae636bec1b54ae9a0e60c0d92e45d195faa6900a21c07b6fe154c6d74f41df5fc20bc256
|
data/.yardopts
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
An OpenCV wrapper for Ruby.
|
4
4
|
|
5
5
|
* Web site: <https://github.com/ruby-opencv/ruby-opencv>
|
6
|
-
* Ruby 1.9.3, 2.0.0, 2.1.
|
6
|
+
* Ruby 1.9.3, 2.0.0, 2.1.x and OpenCV 2.4.8 are supported.
|
7
7
|
|
8
8
|
## Requirement
|
9
9
|
|
@@ -24,10 +24,10 @@ Note: **/path/to/opencvdir** is the directory where you installed OpenCV.
|
|
24
24
|
|
25
25
|
|
26
26
|
### Windows
|
27
|
-
You can use pre-build binary for Windows (mswin32
|
27
|
+
You can use pre-build binary for Windows (mswin32).
|
28
28
|
|
29
29
|
1. Install [OpenCV](http://sourceforge.net/projects/opencvlibrary/files/opencv-win/)
|
30
|
-
2. Set path to OpenCV libraries. When you installed OpenCV to **C:\opencv**, add **C:\opencv\build\x86\vc10\bin
|
30
|
+
2. Set path to OpenCV libraries. When you installed OpenCV to **C:\opencv**, add **C:\opencv\build\x86\vc10\bin** to the systems path.
|
31
31
|
3. Install ruby-opencv
|
32
32
|
|
33
33
|
```
|
data/ext/opencv/extconf.rb
CHANGED
@@ -1,4 +1,14 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
CC = RbConfig::CONFIG['CC']
|
4
|
+
if CC =~ /clang/
|
5
|
+
RbConfig::MAKEFILE_CONFIG['try_header'] = :try_cpp
|
6
|
+
RbConfig::CONFIG['CPP'] = "#{CC} -E"
|
7
|
+
elsif RbConfig::CONFIG['arch'] =~ /mswin32/
|
8
|
+
RbConfig::MAKEFILE_CONFIG['try_header'] = :try_cpp
|
9
|
+
RbConfig::CONFIG['CPP'] = "#{CC} /P"
|
10
|
+
end
|
11
|
+
|
2
12
|
require "mkmf"
|
3
13
|
|
4
14
|
def cv_version_suffix(incdir)
|
@@ -23,51 +33,35 @@ opencv_headers = ["opencv2/core/core_c.h", "opencv2/core/core.hpp", "opencv2/img
|
|
23
33
|
"opencv2/imgproc/imgproc.hpp", "opencv2/video/tracking.hpp", "opencv2/features2d/features2d.hpp",
|
24
34
|
"opencv2/flann/flann.hpp", "opencv2/calib3d/calib3d.hpp", "opencv2/objdetect/objdetect.hpp",
|
25
35
|
"opencv2/legacy/compat.hpp", "opencv2/legacy/legacy.hpp", "opencv2/highgui/highgui_c.h",
|
26
|
-
"opencv2/highgui/highgui.hpp", "opencv2/photo/photo.hpp"
|
36
|
+
"opencv2/highgui/highgui.hpp", "opencv2/photo/photo.hpp"]
|
37
|
+
opencv_headers_opt = ["opencv2/nonfree/nonfree.hpp"]
|
27
38
|
|
28
39
|
opencv_libraries = ["opencv_calib3d", "opencv_contrib", "opencv_core", "opencv_features2d",
|
29
|
-
"opencv_flann", "
|
30
|
-
"
|
31
|
-
|
32
|
-
|
40
|
+
"opencv_flann", "opencv_highgui", "opencv_imgproc", "opencv_legacy",
|
41
|
+
"opencv_ml", "opencv_objdetect", "opencv_video", "opencv_photo"]
|
42
|
+
opencv_libraries_opt = ["opencv_gpu", "opencv_nonfree"]
|
33
43
|
|
34
44
|
puts ">> Check the required libraries..."
|
35
|
-
|
36
|
-
when /mswin32/
|
37
|
-
suffix = cv_version_suffix(incdir)
|
38
|
-
opencv_libraries.map! {|lib| lib + suffix }
|
39
|
-
have_library("msvcrt")
|
40
|
-
opencv_libraries.each {|lib|
|
41
|
-
raise "#{lib}.lib not found." unless have_library(lib)
|
42
|
-
}
|
43
|
-
$CFLAGS << ' /EHsc'
|
44
|
-
when /mingw32/
|
45
|
+
if $mswin or $mingw
|
45
46
|
suffix = cv_version_suffix(incdir)
|
46
|
-
opencv_libraries.map! {|lib| lib + suffix }
|
47
|
+
opencv_libraries.map! { |lib| lib + suffix }
|
48
|
+
opencv_libraries_opt.map! { |lib| lib + suffix }
|
47
49
|
have_library("msvcrt")
|
48
|
-
|
49
|
-
|
50
|
-
|
50
|
+
if $mswin
|
51
|
+
$CFLAGS << ' /EHsc'
|
52
|
+
CONFIG['CXXFLAGS'] << ' /EHsc'
|
53
|
+
end
|
51
54
|
else
|
52
|
-
opencv_libraries.each {|lib|
|
53
|
-
raise "lib#{lib} not found." unless have_library(lib)
|
54
|
-
}
|
55
55
|
have_library("stdc++")
|
56
56
|
end
|
57
57
|
|
58
|
+
opencv_libraries.each { |lib| raise "#{lib} not found." unless have_library(lib) }
|
59
|
+
opencv_libraries_opt.each { |lib| warn "#{lib} not found." unless have_library(lib) }
|
60
|
+
|
58
61
|
# Check the required headers
|
59
62
|
puts ">> Check the required headers..."
|
60
|
-
opencv_headers.each {|header|
|
61
|
-
|
62
|
-
if CONFIG["arch"] =~ /mswin32/ and File.exists? "#{incdir}/#{header}"
|
63
|
-
# In mswin32, have_header('opencv2/nonfree/nonfree.hpp') fails because of a syntax problem.
|
64
|
-
warn "warning: #{header} found but `have_header` failed."
|
65
|
-
$defs << "-DHAVE_#{header.tr_cpp}"
|
66
|
-
else
|
67
|
-
raise "#{header} not found."
|
68
|
-
end
|
69
|
-
end
|
70
|
-
}
|
63
|
+
opencv_headers.each { |header| raise "#{header} not found." unless have_header(header) }
|
64
|
+
opencv_headers_opt.each { |header| warn "#{header} not found." unless have_header(header) }
|
71
65
|
have_header("stdarg.h")
|
72
66
|
|
73
67
|
if $warnflags
|
data/ext/opencv/opencv.cpp
CHANGED
data/ext/opencv/opencv.h
CHANGED
@@ -62,7 +62,6 @@ extern "C" {
|
|
62
62
|
#include "opencv2/video/tracking.hpp"
|
63
63
|
#include "opencv2/video/background_segm.hpp"
|
64
64
|
#include "opencv2/features2d/features2d.hpp"
|
65
|
-
#include "opencv2/nonfree/nonfree.hpp"
|
66
65
|
#include "opencv2/flann/flann.hpp"
|
67
66
|
#include "opencv2/calib3d/calib3d.hpp"
|
68
67
|
#include "opencv2/objdetect/objdetect.hpp"
|
@@ -79,6 +78,10 @@ extern "C" {
|
|
79
78
|
#include "opencv2/ml/ml.hpp"
|
80
79
|
#endif
|
81
80
|
|
81
|
+
#ifdef HAVE_OPENCV2_NONFREE_NONFREE_HPP
|
82
|
+
#include "opencv2/nonfree/nonfree.hpp"
|
83
|
+
#endif
|
84
|
+
|
82
85
|
// Ruby/OpenCV headers
|
83
86
|
#include "cvutils.h"
|
84
87
|
#include "cverror.h"
|
data/lib/opencv/version.rb
CHANGED
data/ruby-opencv.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: ruby-opencv 0.0.
|
2
|
+
# stub: ruby-opencv 0.0.13.pre.20140330181826 ruby lib
|
3
3
|
# stub: ext/opencv/extconf.rb
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "ruby-opencv"
|
7
|
-
s.version = "0.0.
|
7
|
+
s.version = "0.0.13.pre.20140330181826"
|
8
8
|
|
9
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
9
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
10
10
|
s.require_paths = ["lib"]
|
11
11
|
s.authors = ["lsxi", "ser1zw", "pcting"]
|
12
|
-
s.date = "2014-
|
12
|
+
s.date = "2014-03-30"
|
13
13
|
s.description = "ruby-opencv is a wrapper of OpenCV for Ruby. It helps you to write computer vision programs (e.g. detecting faces from pictures) with Ruby."
|
14
14
|
s.email = ["masakazu.yonekura@gmail.com", "azariahsawtikes@gmail.com", "pcting@gmail.com"]
|
15
15
|
s.extensions = ["ext/opencv/extconf.rb"]
|
@@ -18,8 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.homepage = "https://github.com/ruby-opencv/ruby-opencv/"
|
19
19
|
s.licenses = ["The BSD License"]
|
20
20
|
s.rdoc_options = ["--main", "README.md"]
|
21
|
-
s.
|
22
|
-
s.rubygems_version = "2.2.1"
|
21
|
+
s.rubygems_version = "2.2.2"
|
23
22
|
s.summary = "OpenCV wrapper for Ruby"
|
24
23
|
s.test_files = ["test/test_cvcontour.rb", "test/test_eigenfaces.rb", "test/test_cvmoments.rb", "test/test_cvseq.rb", "test/test_cvcontourtree.rb", "test/test_cvbox2d.rb", "test/test_iplimage.rb", "test/test_cvvideowriter.rb", "test/test_cvline.rb", "test/test_cvhumoments.rb", "test/test_cvfont.rb", "test/test_cvconnectedcomp.rb", "test/test_cvhistogram.rb", "test/test_trackbar.rb", "test/test_cvmat_imageprocessing.rb", "test/test_cvhaarclassifiercascade.rb", "test/test_cvcircle32f.rb", "test/test_cvcapture.rb", "test/test_cvmat_dxt.rb", "test/test_cvrect.rb", "test/test_iplconvkernel.rb", "test/test_cvsurfpoint.rb", "test/test_cvavgcomp.rb", "test/test_cvscalar.rb", "test/test_pointset.rb", "test/test_curve.rb", "test/test_cvtermcriteria.rb", "test/test_cvtwopoints.rb", "test/test_cvsurfparams.rb", "test/test_cvpoint2d32f.rb", "test/test_cvpoint3d32f.rb", "test/test_cvfeaturetree.rb", "test/test_mouseevent.rb", "test/test_cvchain.rb", "test/test_cvmat.rb", "test/test_fisherfaces.rb", "test/test_cverror.rb", "test/test_cvpoint.rb", "test/test_cvsize2d32f.rb", "test/test_preliminary.rb", "test/test_cvmat_drawing.rb", "test/test_lbph.rb", "test/test_cvsize.rb", "test/test_window.rb", "test/test_cvslice.rb", "test/test_opencv.rb"]
|
25
24
|
|
@@ -30,17 +29,17 @@ Gem::Specification.new do |s|
|
|
30
29
|
s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
|
31
30
|
s.add_development_dependency(%q<rake-compiler>, ["~> 0"])
|
32
31
|
s.add_development_dependency(%q<hoe-gemspec>, ["~> 0"])
|
33
|
-
s.add_development_dependency(%q<hoe>, ["~> 3.
|
32
|
+
s.add_development_dependency(%q<hoe>, ["~> 3.10"])
|
34
33
|
else
|
35
34
|
s.add_dependency(%q<rdoc>, ["~> 4.0"])
|
36
35
|
s.add_dependency(%q<rake-compiler>, ["~> 0"])
|
37
36
|
s.add_dependency(%q<hoe-gemspec>, ["~> 0"])
|
38
|
-
s.add_dependency(%q<hoe>, ["~> 3.
|
37
|
+
s.add_dependency(%q<hoe>, ["~> 3.10"])
|
39
38
|
end
|
40
39
|
else
|
41
40
|
s.add_dependency(%q<rdoc>, ["~> 4.0"])
|
42
41
|
s.add_dependency(%q<rake-compiler>, ["~> 0"])
|
43
42
|
s.add_dependency(%q<hoe-gemspec>, ["~> 0"])
|
44
|
-
s.add_dependency(%q<hoe>, ["~> 3.
|
43
|
+
s.add_dependency(%q<hoe>, ["~> 3.10"])
|
45
44
|
end
|
46
45
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-opencv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lsxi
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-03-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rdoc
|
@@ -60,14 +60,14 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: '3.
|
63
|
+
version: '3.10'
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: '3.
|
70
|
+
version: '3.10'
|
71
71
|
description: ruby-opencv is a wrapper of OpenCV for Ruby. It helps you to write computer
|
72
72
|
vision programs (e.g. detecting faces from pictures) with Ruby.
|
73
73
|
email:
|
@@ -341,12 +341,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
341
341
|
version: '0'
|
342
342
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
343
343
|
requirements:
|
344
|
-
- - "
|
344
|
+
- - ">"
|
345
345
|
- !ruby/object:Gem::Version
|
346
|
-
version:
|
346
|
+
version: 1.3.1
|
347
347
|
requirements: []
|
348
|
-
rubyforge_project:
|
349
|
-
rubygems_version: 2.2.
|
348
|
+
rubyforge_project:
|
349
|
+
rubygems_version: 2.2.2
|
350
350
|
signing_key:
|
351
351
|
specification_version: 4
|
352
352
|
summary: OpenCV wrapper for Ruby
|