Accepted Answer

Stephan
Stephan on 3 Dec 2019
Edited: Stephan on 3 Dec 2019
I = fliplr(imread('cameraman.tif'));
I1 = triu((I),1);
I2 = tril(imcomplement(I));
I_res = fliplr(I1+I2);
imshow(I_res)
BTW: Did you notice that you can accept and/or vote for useful answers?

1 Comment

Thank you very much, I've been stuck with this problem for weeks

Sign in to comment.

More Answers (1)

Sushmita Dey
Sushmita Dey on 3 Apr 2020

0 votes

I=imread('https://picload.files.wordpress.com/2014/02/blissful-nature-rain-n-flower.jpg');
J=imcomplement(I);
imshow(I,J,'montage')
title('complement of image')

Categories

Find more on Modify Image Colors in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!