Output only some frames

6 ビュー (過去 30 日間)
Lucy Sharpe
Lucy Sharpe 2021 年 2 月 16 日
コメント済み: Walter Roberson 2021 年 2 月 16 日
I'm using a depth camera and am wanting to know if there is a way to only output frames where the object is close enough here is part of the code where the depth is transformed into RGB
% Select depth frame
depth = fs.get_depth_frame();
% Colorize depth frame
color = colorizer.colorize(depth);
% Get actual data and convert into a format imshow can use
% (Color data arrives as [R, G, B, R, G, B, ...] vector)
data = color.get_data();
img = permute(reshape(data',[3,color.get_width(),color.get_height()]),[3 2 1]);
What kind of if function could I input after this where I would only output frames with a certian percentage of blue in the frame (when object is within certian distance)
  1 件のコメント
Walter Roberson
Walter Roberson 2021 年 2 月 16 日
rgb2hsv and select pixels with appropriate range of Hue, in order to categorize as blue? mean() of the logical array would be fraction occupied

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by