Skip to content

Instantly share code, notes, and snippets.

@iwazer
Created August 11, 2013 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iwazer/6203878 to your computer and use it in GitHub Desktop.
Save iwazer/6203878 to your computer and use it in GitHub Desktop.
class GreyScaleViewController < UIViewController
:
def viewDidLoad
super
srcMat = MotionCV.MotionMatFromUIImage(UIImage.imageNamed("sato.jpg"))
greyMat = MotionMat.new
MotionCV.cvtColorInput(srcMat, output:greyMat, code:CV_BGR2GRAY)
@imageView.image = MotionCV.UIImageFromMotionMat(greyMat)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment