Improving rgb2hsv Performance for video
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Green en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!