MATLAB: Is there a rgb2gray conversion block in Simulink

Computer Vision Toolboximageimage conversionimage enhancementimage processingsimulink

I have a RGB video and I would like to find out optical flow and optical flow block accepts only 2-d image only…So I want to convert this RGB into Gray and then give Grayscale output to Optical Flow block…But I didn't find a default Grayscale block in Simulink…It would be gr eat if anyone could help me with this…

Best Answer

The Color Space Conversion block in Conversions library of the Video and Image Processing blockset can convert RGB video to intensity. The viptrafficof demo shows an example of using this block to perform optical flow analysis on an RGB video.