Gauss x-gradient

This is an example on how to compute the Gaussian x-gradient.

#!/usr/bin/env ruby
require 'hornetseye'
raise "Syntax: gaussgradientx.rb <input file> <output file> <sigma>" if ARGV.size != 3
sigma = ARGV[2].to_f
Hornetseye::MultiArray.load_ubyte( ARGV[0] ).gauss_gradient( sigma, 0 ).
  normalise.save_ubyte ARGV[1]
Close