# How to Generate the Following Image Effect (Modulation)?

I was given the original image and I need to produce Image 1. Does anybody know how I would go about this? I am on MATLAB, but I am more interested in the theory behind this.

Original Image

**Processed Image **

NOTE How would you achieve this through convolution of the ffts of the image and a sine wave along the vertical axis?

• Your image is already on the Internet. Too late Nov 29 '15 at 20:09

The image seems to be modulated, namely multiplied by Harmonic Signal along its columns.

This is the MATLAB Code:

mInputImage = im2double(imread('2vE0G.png'));
numRows = size(mInputImage, 1);
numCols = size(mInputImage, 2);

signalFreq = floor(numRows / 1.25);

vModulationSignal = 1 + (0.5 * cos(2 * pi * (signalFreq / numRows) * [0:(numRows - 1)].'));

mOutputImage = bsxfun(@times, mInputImage, vModulationSignal);

figure();
imshow(mOutputImage);


This is the result:

You can play with the parameters.

Enjoy...

• What value was modulated? was it the magnitude?
– SDG
Nov 28 '15 at 18:10
• The values of the pixels. I will try to create a MATLAB Example.
– Royi
Nov 28 '15 at 22:46
• Should I be expecting this example soon?
– SDG
Nov 29 '15 at 6:14
• I added MATLAB Code + Result. Enjoy...
– Royi
Nov 29 '15 at 19:36
• would this also be possible by let's say by creating the 2D Discrete Space Time Fourier Transformation of the sin wave along just the vertical axis and then multiplying this with the 2D Discrete Space Time Fourier Transformation of the Image itself and using Inverse fft, getting back the resultant image?
– SDG
Nov 29 '15 at 21:04