potu1304
potu1304

Reputation: 109

Image Enhancement by adding 2 images in Octave

enter image description here

Hello!

I would like to process an image like all steps in this picture in Octave. I wonder how I can add to images together to get a picture like (c) of (f)? My code so far is:

I = imread('343a.tif');
subplot(2,2,1);imshow(I);title('Original Image'); 
I = im2double (I);
H = fspecial('log', 11,1.5);
Laplacian = imfilter(I,H,'replicate');
subplot(2,2,2);imshow(Laplacian, []);title('Laplacian Image');
H = fspecial('sobel');
Edge = imfilter(I,H,'replicate');
subplot(2,2,4);imshow(Edge);title('Sobel Image');

Would be very thankful for help or suggestions! :)

Best regards!

Upvotes: 0

Views: 452

Answers (1)

Cris Luengo
Cris Luengo

Reputation: 60444

You add images using the + operator and multiply them using the .* operator:

c = a + b;
f = c .* e;

Yes, it's really that simple! :)

Upvotes: 1

Related Questions