mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
removed some unnecessary comments
This commit is contained in:
parent
d49d62c7f8
commit
23a35e8cc4
1 changed files with 0 additions and 31 deletions
|
@ -17,36 +17,6 @@ class OpenCVTestCase < Test::Unit::TestCase
|
||||||
|
|
||||||
DUMMY_OBJ = Digest::MD5.new # dummy object for argument type check test
|
DUMMY_OBJ = Digest::MD5.new # dummy object for argument type check test
|
||||||
|
|
||||||
CvMat.class_eval do
|
|
||||||
# Range check for debug
|
|
||||||
# alias original_aref []
|
|
||||||
# alias original_aset []=;
|
|
||||||
|
|
||||||
# def [](*idx)
|
|
||||||
# if idx.size == 1 and idx[0].is_a? Numeric
|
|
||||||
# n = idx[0]
|
|
||||||
# throw ArgumentError.new("index #{n} is out of range") if n >= rows * cols
|
|
||||||
# elsif idx.all? { |elem| elem.is_a? Numeric }
|
|
||||||
# j, i = *(idx.map { |x| x.to_i })
|
|
||||||
# throw ArgumentError.new("index for row #{j} is out of range") if j >= rows
|
|
||||||
# throw ArgumentError.new("index for column #{i} is out of range") if i >= cols
|
|
||||||
# end
|
|
||||||
# original_aref(*idx)
|
|
||||||
# end
|
|
||||||
|
|
||||||
# def []=(*args)
|
|
||||||
# if args.size == 2 and args[0].is_a? Numeric
|
|
||||||
# n = args[0] # index
|
|
||||||
# throw ArgumentError.new("index #{n} is out of range") if n >= rows * cols
|
|
||||||
# elsif args[0..1].all? { |elem| elem.is_a? Numeric }
|
|
||||||
# j, i = *args
|
|
||||||
# throw ArgumentError.new("index for row #{j} is out of range") if j.to_i >= rows
|
|
||||||
# throw ArgumentError.new("index for column #{i} is out of range") if i.to_i >= cols
|
|
||||||
# end
|
|
||||||
# original_aset(*args)
|
|
||||||
# end
|
|
||||||
end
|
|
||||||
|
|
||||||
def snap(*images)
|
def snap(*images)
|
||||||
n = -1
|
n = -1
|
||||||
images.map! { |val|
|
images.map! { |val|
|
||||||
|
@ -151,7 +121,6 @@ class OpenCVTestCase < Test::Unit::TestCase
|
||||||
mat.height.times { |j|
|
mat.height.times { |j|
|
||||||
a = []
|
a = []
|
||||||
mat.width.times { |i|
|
mat.width.times { |i|
|
||||||
# tmp = mat[j, i].to_ary.map {|m| m.to_i }.join(',')
|
|
||||||
tmp = mat[j, i].to_ary.map {|m| m.to_f.round(2) }.join(',')
|
tmp = mat[j, i].to_ary.map {|m| m.to_f.round(2) }.join(',')
|
||||||
a << "[#{tmp}]"
|
a << "[#{tmp}]"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue