Here is a small presentation showing histogram-based classification with Ruby. You can download the slides here: http://vision.eng.shu.ac.uk/jan/shef11.pdf
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Computer vision with special reference to Ruby (2011)
1. http://vision.eng.shu.ac.uk/jan/shef11.pdf
Computer vision with special reference to
Ruby
Computer vision with special reference to Ruby
Jan Wedekind
Wed Apr 06 14:00:00 BST 2011
c 2011 Jan Wedekind 1/7
2. http://vision.eng.shu.ac.uk/jan/shef11.pdf
Ruby: Open Classes and Closures
# open classes
class Fixnum
def times three
File.open( ’test.txt’ , ’r’ ) do |f|
3 * self
3.times { puts f.readline }
end
end
end
4.times three
# 12
http://www.ruby-lang.org/
c 2011 Jan Wedekind 2/7
5. http://vision.eng.shu.ac.uk/jan/shef11.pdf
Hue-Saturation
α = 1 (2 R − G − B)
2
histogram
β = sqrt3 (G − B)
2
H ≈ atan2(β, α)
C ≈ α2 + β2
«
«
http://en.wikipedia.org/wiki/HSL_and_HSV
c 2011 Jan Wedekind 5/7