Video lecture series on Digital Image Processing, Lecture: 32,
Color models in Digital Image Processing & its implementation in MATLAB || RGB, CMY/CMYK, HSI Models
What are color models? What is its importance?
What is RGB color Model?
What is CMY/ CMYK color model?
What is HSI Color model?
How to do conversion between different color models?
How to implement color models in MATLAB?
Link to download ppts/lecture notes:
https://drive.google.com/drive/folder...
MATLAB code used in the video is given at the end in the description box.
#DIP
#DIPwithMATLAB
#DigitalImageProcessingUsingMATLAB
#DigitalImageProcessing
#StudywithDrDafda
MATLAB code used in the video:
% Program for COLOR MODELS in image processing
% To display RGB,HSI,CMY,HSV,YCbCr components of color image
clc;
clear all;
close all;
warning off;
A=imread('peppers.png');
% A=imread('Maulik.png');
subplot(4,3,1);
imshow(A);
title('original image');
B=rgb2gray(A);
subplot(4,3,2);
imshow(B);
title('gray conversion');
rgb=im2double(A);
r=rgb(:,:,1);
g=rgb(:,:,2);
b=rgb(:,:,3);
subplot(4,3,3);
imshow(r);
title('red component');
subplot(4,3,4);
imshow(g);
title('green component');
subplot(4,3,5);
imshow(b);
title('blue component');
ycbcr_img=rgb2ycbcr(A);
subplot(4,3,6);
imshow(ycbcr_img);
title('ycbcr colour space conversion');
hsv_img=rgb2hsv(A);
subplot(4,3,7);
imshow(hsv_img);
title('hsv colour space conversion');
cmy_img=imcomplement(A);
subplot(4,3,8);
imshow(cmy_img);
title('cmy colour space conversion');
num=.5*((r-g)+(r-b));
den=sqrt(r-g).^2+(r-g).*(g-b);
theta=acos(num./den);
H=theta;
H(b{greater than}g)=2*pi-H(b{greater than}g);
H=H/(2*pi);
num1=min(min(r,g),b);
den1=r+g+b;
den(den==0)=eps;
S=1-3.*num1./den1;
H(S==0)=0;
I=(r+g+b)/3;
hsi=cat(3,H,S,I);
subplot(4,3,9);
imshow(hsi);
title('HSI');
subplot(4,3,10);
imshow(H);
title('hue component');
subplot(4,3,11);
imshow(S);
title('saturation component');
subplot(4,3,12);
imshow(I);
title('brightness component');
Информация по комментариям в разработке