[Exercises]
[Workspace]
Purpose:
This experiment illustrates the combination of two images
by several ways: pixel averaging, gaussian weighting image and geometric
blending.
Activities:
-
Choose the images to blend
-
Select two images of the same size, for instance
$DIP/data/lenina.kdf and $DIP/data/barcode.kdf and display
them. Use the Data Object Info and File Viewer operators to determine the
size of the input images.
-
Glyphs:Input/Output:Data Files:User defined
-
Glyphs:Visualization:Non-Interactive Display:Display Image
-
Glyphs:Input/Output:Information:Data Object Info
-
Glyphs:Input/Output:Information:File Viewer
-
Blend the images by averaging their pixels
-
Use the Blend Data operator to combine both images.
-
Open the Blend Data operator pane and certify that the blending
constant is 0.5. Connect the two first input to the images you
want to blend.
-
Display the results using the Display Image operator.
-
Blend the images using a gaussian blending image
-
Now, create a gaussian image to be used as the blending factor of
the operator Blend Data. Use the 2D Gaussian operator:
-
Glyphs:Input/Output:Generate Data:2D Gaussian
-
Open the 2D Gaussian glyph and set the parameters:
Width of Output = 256
Height of Output = 256
Peak Location along Width (X) = 128
Peak Location along Height (Y) = 128
Variance along Width = 40 * 40
Variance along Height = 40 * 40
Correlation coefficient = 0
Peak Value = 1.0
-
Duplicate the Blend Data glyph and use the output of the 2D Gaussian
glyph as the third input of the Blend Data operator. Display the result
using the Display Image operator.
-
Blend the images using a binary chessboard blending image
-
Build and display a chessboard pattern image with the same
dimensions as the images selected in Step 1. (Follow the instructions
for Chess Board Generation given in the Patterns lab - Lab 1.)
-
Duplicate the Blend Data glyph and use the chessboard image
as the third input of the Blend Data operator. Display the result
using the Display Image operator.
Exercises
-
Display a zoom of a portion of the resultant image in the average
combination and in the geometric combination to see the difference between
the methods. Use the Display Zoom Image glyph.
-
How can you create an image sequence where the first image is
image A and the last is image B and the frames in between are
interpolated turning image A into image B progressively?
Khoros Workspace
Execute the visual program c3s2combine-image-grid.wk
Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved