Improving rgb2hsv Performance for video
Afficher commentaires plus anciens
Hi, I'm working on a video processing tool and have the following code for creating a HSV and greyscale version of a video:
function [hsvVid, greyVid] = convertToHSVAndGrey(vid, numFrames)
tic
for frame = 1 : numFrames
hsvVid(:,:,:,frame) = rgb2hsv(vid(:,:,:,frame));
greyVid(:,:,:,frame) = rgb2gray(vid(:,:,:,frame));
end
toc
end
The rgb2hsv conversion takes roughly 16x longer than then greyscale conversion.
Does anyone a way to speed this up/optimise the conversion to hsv?
Thanks in advance for your help.
Cheers,
Gareth
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Green dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!