For simplicity's sake, prerequisites (OpenCV and ImageMagick) were containerized. The only prerequisite is therefore docker installed.
Example which shows how to apply a sepia effect over an image, and add a author name overlay.
docker run --volume=$(pwd):/app cloudinaryltd/imagemagick_blog ruby sepia_and_overlay.rb <source> <author> <dest>
docker run --volume=$(pwd):/app cloudinaryltd/imagemagick_blog ruby sepia_and_overlay.rb pictures/yellow_tulip.png "John Doe Photography" result.jpg
Example which shows how to apply a texture image over a text.
docker run --volume=$(pwd):/app cloudinaryltd/imagemagick_blog ruby text_textures.rb <text> <source> <dest>
docker run --volume=$(pwd):/app cloudinaryltd/imagemagick_blog ruby text_textures.rb "Flowers" pictures/yellow_tulip.png result.jpg
Example which shows how to leverage OpenCV face detection capabilities with ImageMagick. Specifically it shows how to 'pixelate' faces in a source image.
docker run --volume=$(pwd):/app cloudinaryltd/imagemagick_blog ruby pixelate_faces.rb <source> <dest>
docker run --volume=$(pwd):/app cloudinaryltd/imagemagick_blog ruby pixelate_faces.rb pictures/spain_football_team.jpg result.jpg