-
Notifications
You must be signed in to change notification settings - Fork 1
brigr/linear-blending
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
========================== | ABOUT | ========================== This project is just a hack inspired by reading a page in Richard Szeliski's book on Computer Vision applications, Chap. 3 that I recently acquired from Amazon. I read about a simple binary transform that can take two color images and produce an output blended image based on the two input images. I was just eager about the idea that I instantly sat down and wrote an OpenCV-based implementation just to see how this works in practice, and, voila! Here it is! In this project, I have included some images that I obtained from Google images and other sources. I claim no copyright for them! You can just use them in order to experiment with the linear-blending implementation. =========================== | DEPENDENCIES | =========================== In order to build linear-blending you will need the following ingredients: 1) the Open Computer Vision Framework (or OpenCV, for short) 2) libgdk-dev These dependencies are regularly found on your Linux distribution of preference. I tested the code by linking against OpenCV 2.3.1, but you are free to use any bundle you like. =========================== | HELP INSTRUCTIONS | =========================== With linear-blending, you have the option to apply blurring on the computed image while varying the alpha blending parameter. This was done in hopes that blurring out an image would yield a more pleasant morph for the human eye. However, this should not be regarded as a rule. You would find examples where this would have no realistic effect! In order to force blurring, you will have to pass a "-b" switch on the command line, without passing any other command line argument next to it. In order to specify a source and target image, you will need to specify "-i <input_image>" and "-t <target_image>". Simple! Let's, for example, assume that you have an image jbush1.jpg as your source image, and jbush2.jpg as your target image. Then, if you want to request blurring support, you issue the following command on the command prompt: ./linearblending -b -i images/jbush1.jpg -t images/jbush2.jpg In order to come up with the desired result, you have to vary the alpha parameter from the popped-up highgui window. If you need to produce a series of consecutive image frames produced by varying the alpha parameter in the whole of its range, you must supply a -p switch on the command line. Forward any queries to - Sotiris Karavarsamis (s.karavarsamis@gmail.com)
About
Implementation of the binary linear-blending operator with OpenCV.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published