Lesson 14: Image Complement using Matlab

preview_player
Показать описание
In this tutorial we will learn how to complement an image (inverting the pixel values) using Matlab. It is very easy to do it in Matlab. Using Matlab's imcomplement fucntion, we can complement an image.
Here is the code used in this program:

%Image Complement
gray_image = rgb2gray(original_image);

complemented_image = imcomplement(gray_image);

subplot(2,2,1), imshow(original_image); title('Original Image');
subplot(2,2,2), imshow(gray_image); title('Gray Image');
subplot(2,2,3), imshow(complemented_image); title('Complemented Image');
Рекомендации по теме
join shbcf.ru