Improving rgb2hsv Performance for video
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Green in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!