move sample data
|
@ -6,8 +6,8 @@
|
|||
require 'opencv'
|
||||
include OpenCV
|
||||
|
||||
img1 = IplImage.load('lenna.jpg', CV_LOAD_IMAGE_ANYCOLOR | CV_LOAD_IMAGE_ANYDEPTH)
|
||||
img2 = IplImage.load('tiffany.jpg', CV_LOAD_IMAGE_ANYCOLOR | CV_LOAD_IMAGE_ANYDEPTH)
|
||||
img1 = IplImage.load('images/lenna.jpg', CV_LOAD_IMAGE_ANYCOLOR | CV_LOAD_IMAGE_ANYDEPTH)
|
||||
img2 = IplImage.load('images/tiffany.jpg', CV_LOAD_IMAGE_ANYCOLOR | CV_LOAD_IMAGE_ANYDEPTH)
|
||||
|
||||
window = GUI::Window.new('Alpha blend')
|
||||
max = 100.0
|
||||
|
|
|
@ -100,8 +100,8 @@ puts 'Usage:'
|
|||
puts "ruby #{__FILE__} <object_filename> <scene_filename>, default is box.png and box_in_scene.png"
|
||||
puts
|
||||
|
||||
object_filename = (ARGV.size == 2) ? ARGV[0] : 'box.png'
|
||||
scene_filename = (ARGV.size == 2) ? ARGV[1] : 'box_in_scene.png'
|
||||
object_filename = (ARGV.size == 2) ? ARGV[0] : 'images/box.png'
|
||||
scene_filename = (ARGV.size == 2) ? ARGV[1] : 'images/box_in_scene.png'
|
||||
|
||||
object, image = nil, nil
|
||||
begin
|
||||
|
|
|
@ -7,7 +7,7 @@ include OpenCV
|
|||
original_window = GUI::Window.new "original"
|
||||
hough_window = GUI::Window.new "hough circles"
|
||||
|
||||
image = IplImage::load "stuff.jpg"
|
||||
image = IplImage::load "images/stuff.jpg"
|
||||
gray = image.BGR2GRAY
|
||||
|
||||
result = image.clone
|
||||
|
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
BIN
examples/images/lena-256x256.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
examples/images/lena-eyes.jpg
Normal file
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
@ -20,7 +20,7 @@ owindow = GUI::Window.new('original')
|
|||
mwindow = GUI::Window.new('mask')
|
||||
iwindow = GUI::Window.new('inpaint')
|
||||
|
||||
image = IplImage::load('inpaint.png')
|
||||
image = IplImage::load('images/inpaint.png')
|
||||
noimage = image.zero
|
||||
b, g, r = image.split
|
||||
original_mask = r.threshold(0x00, 0xFF, CV_THRESH_BINARY_INV) & b.threshold(0x00, 0xFF, CV_THRESH_BINARY_INV)
|
||||
|
|
|
@ -11,8 +11,8 @@ USE_EXTENDED_DESCRIPTOR = true
|
|||
THRESHOLD = 1500
|
||||
DESCRIPTOR_SIZE = USE_EXTENDED_DESCRIPTOR ? 128 : 64
|
||||
|
||||
img1 = CvMat.load('lenna.jpg', CV_LOAD_IMAGE_GRAYSCALE)
|
||||
img2 = CvMat.load('lenna-rotated.jpg', CV_LOAD_IMAGE_GRAYSCALE)
|
||||
img1 = CvMat.load('images/lenna.jpg', CV_LOAD_IMAGE_GRAYSCALE)
|
||||
img2 = CvMat.load('images/lenna-rotated.jpg', CV_LOAD_IMAGE_GRAYSCALE)
|
||||
|
||||
puts 'Extracting features from img1 using SURF...'
|
||||
param = CvSURFParams.new(THRESHOLD, USE_EXTENDED_DESCRIPTOR)
|
||||
|
|
|
@ -10,8 +10,8 @@ puts 'Usage:'
|
|||
puts "ruby #{__FILE__} <template_filename> <match_filename>"
|
||||
puts
|
||||
|
||||
template_filename = (ARGV.size == 2) ? ARGV[0] : File.expand_path(File.dirname(__FILE__) + '/../test/samples/lena-eyes.jpg')
|
||||
match_image_filename = (ARGV.size == 2) ? ARGV[1] : File.expand_path(File.dirname(__FILE__) + '/../test/samples/lena-inpaint.jpg')
|
||||
template_filename = (ARGV.size == 2) ? ARGV[0] : File.expand_path(File.dirname(__FILE__) + '/images/lena-eyes.jpg')
|
||||
match_image_filename = (ARGV.size == 2) ? ARGV[1] : File.expand_path(File.dirname(__FILE__) + '/images/lena-256x256.jpg')
|
||||
|
||||
template = CvMat.load(template_filename)
|
||||
match_image = CvMat.load(match_image_filename)
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'opencv'
|
|||
require 'benchmark'
|
||||
include OpenCV
|
||||
|
||||
data = File.join(File.dirname(__FILE__), 'matching_to_many_images')
|
||||
data = File.dirname(__FILE__)
|
||||
|
||||
query = IplImage.load File.join(data, 'query.png'), CV_LOAD_IMAGE_GRAYSCALE
|
||||
image_files = ['1.png', '2.png', '3.png'].map{|f| File.join(data, 'train', f)}
|
|
@ -1,13 +1,13 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
# stub: ruby-opencv 0.0.10.20131020232231 ruby lib
|
||||
# stub: ruby-opencv 0.0.10.20131031042012 ruby lib
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "ruby-opencv"
|
||||
s.version = "0.0.10.20131020232231"
|
||||
s.version = "0.0.10.20131031042012"
|
||||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["lsxi", "ser1zw", "pcting"]
|
||||
s.date = "2013-10-20"
|
||||
s.date = "2013-10-30"
|
||||
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."
|
||||
s.email = ["masakazu.yonekura@gmail.com", "azariahsawtikes@gmail.com", "pcting@gmail.com"]
|
||||
s.extensions = ["ext/opencv/extconf.rb"]
|
||||
|
@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|||
s.rdoc_options = ["--main", "README.md"]
|
||||
s.require_paths = ["lib"]
|
||||
s.rubyforge_project = "ruby-opencv"
|
||||
s.rubygems_version = "2.1.9"
|
||||
s.rubygems_version = "2.1.10"
|
||||
s.summary = "OpenCV wrapper for Ruby"
|
||||
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_cvmat_matching.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"]
|
||||
|
||||
|
|