Is there a rgb2gray conversion block in Simulink ?

3 ビュー (過去 30 日間)
Harsha Vardhan Rao  Avunoori
Harsha Vardhan Rao Avunoori 2011 年 3 月 13 日
コメント済み: Mahadev 2025 年 2 月 18 日
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...

採用された回答

Doug Eastman
Doug Eastman 2011 年 3 月 13 日
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.
  2 件のコメント
Harsha Vardhan Rao  Avunoori
Harsha Vardhan Rao Avunoori 2011 年 3 月 15 日
Another problem!!! Is there a way to convert back to RGB from Intensity ??? I have to store the output into an Avi file using the To Multimedia File Sink block....but since my output is only 2-D it is showing me an error...How can I convert my output to m-n-3 ???
pieter sibma
pieter sibma 2021 年 4 月 19 日
not straightforward to create 3 color values from 1 intensity value. you will need to demosaic for that.

サインインしてコメントする。

その他の回答 (1 件)

Messlaha Hamza
Messlaha Hamza 2014 年 2 月 24 日
i still have the same problem, i don't know how to convert my output to m-n-3 matrix
  1 件のコメント
Mahadev
Mahadev 2025 年 2 月 18 日
add a matrix concatenate block. double click the matrix concatenate block and change the dimensions to 3

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeColor Space Formatting and Conversions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by