MATLAB Answers

Bar Graph attached to Live maping

1 ビュー (過去 30 日間)
Alvin Winter
Alvin Winter 2019 年 10 月 6 日
回答済み: Prabhan Purwar 2019 年 11 月 18 日
CODE:
function [red, green, blue] = colorAnalysis(r)
i=1;
img(i)=r.getImage; %Get image from rasberry pie camera on roomba and store in variable 'img'
red = mean(mean(img(:,:,1))); %average red intensity
green = mean(mean(img(:,:,2))); %average green intensity
blue = mean(mean(img(:,:,3))); %average blue intensity
if r.setDriveVelocity(0)
[red(i), green(i), blue(i)] = colorAnalysis(r);
i=i+1;
bar(red(i), green(i), blue(i))
SendData
end
end
Hi, I was wondering if I could place these images or colors onto a live mapping graph. Basically where the picture is taken, the color analysis onto that point of the graph.

  1 件のコメント

Walter Roberson
Walter Roberson 2019 年 10 月 6 日
The above appears to be infinite recursion on colorAnalysis() ?

サインイン to comment.

回答 (1 件)

Prabhan Purwar
Prabhan Purwar 2019 年 11 月 18 日

  0 件のコメント

サインイン to comment.

サインイン してこの質問に回答します。

製品


リリース

R2019b

Translated by