Info

This question is closed. Reopen it to edit or answer.

why hsv color video do not show proper or correct individual channels?

1 view (last 30 days)
Hi, i below code, i split rgb channel video in hsv and further h,s,v channels, and show them in subplot. but i observer that channel: h,s,v do not show their correct color scheme, i try allot but do not correct it, please help if some one known.
clc;
close all;
clear;
VidObj = VideoReader('D:\Thesis_Related\sir_attique\72\bg\001-bg-01-072.avi');
numFrames = 0;
iwant =cell([],1);
while hasFrame(VidObj)
F = readFrame(VidObj);
numFrames = numFrames+1;
iwant{numFrames} = F;
subplot(3,3,1);imagesc(F);title('RGB');
drawnow
end
for i =1:numFrames
I = rgb2hsv(iwant{i});
H = I(:,:,1);
S = I(:,:,2);
V = I(:,:,3);
subplot(3,3,2);imagesc(I);title('HSV');
subplot(3,3,3);imagesc(H);title('H');
subplot(3,3,4);imagesc(S);title('s');
subplot(3,3,5);imagesc(V);title('v');
drawnow ;
end

Answers (0)

Community Treasure Hunt

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

Start Hunting!