mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
moved some sample image path to test/helper.rb
This commit is contained in:
parent
d9b9a7629f
commit
ca24f705ac
2 changed files with 4 additions and 3 deletions
|
@ -6,7 +6,10 @@ require 'opencv'
|
|||
include OpenCV
|
||||
|
||||
class OpenCVTestCase < Test::Unit::TestCase
|
||||
FILENAME_CAT = File.expand_path(File.dirname(__FILE__)) + '/samples/cat.jpg'
|
||||
SAMPLE_DIR = File.expand_path(File.dirname(__FILE__)) + '/samples/'
|
||||
FILENAME_CAT = SAMPLE_DIR + 'cat.jpg'
|
||||
FILENAME_LENA256x256 = SAMPLE_DIR + 'lena-256x256.jpg'
|
||||
HAARCASCADE_FRONTALFACE_ALT = SAMPLE_DIR + 'haarcascade_frontalface_alt.xml.gz'
|
||||
|
||||
CvMat.class_eval do
|
||||
# Range check for debug
|
||||
|
|
|
@ -8,8 +8,6 @@ include OpenCV
|
|||
|
||||
# Tests for OpenCV::CvHaarClassifierCascade
|
||||
class TestCvHaarClassifierCascade < OpenCVTestCase
|
||||
FILENAME_LENA256x256 = File.expand_path(File.dirname(__FILE__)) + '/samples/lena-256x256.jpg'
|
||||
HAARCASCADE_FRONTALFACE_ALT = File.expand_path(File.dirname(__FILE__)) + '/samples/haarcascade_frontalface_alt.xml.gz'
|
||||
def setup
|
||||
@cascade = CvHaarClassifierCascade.load(HAARCASCADE_FRONTALFACE_ALT)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue