This is the sample code that accompanies the InformIT article, Green-Screen Video Effects for iOS: Video Processing with OpenGL ES. www.informit.com/articles/article.aspx?p=1946398
Wish you could use the green-screen effects from movies and TV shows with your iOS devices? You can! Erik Buck, author of Learning OpenGL ES for iOS: A Hands-on Guide to Modern 3D Graphics Programming, describes how to perform real-time video processing without impacting performance. Green-screen effects are just one of the cool capabilities! Experiment with the provided demo program and learn how to push out your boundaries.
Figure 1 Sample green-screen effect.
Figure 2 Images are composed of pixels with red, green, and blue elements.
Figure 3 There's an elephant outside the window.
Figure 4 The neighbor's lawn is very green.