etrobocon2018 feat.KatLab  770af34cce41ae9c30c41303275e1add2daae0c3 (with uncommitted changes)
 全て クラス 名前空間 ファイル 関数 変数 列挙型 列挙値 フレンド マクロ定義 ページ
公開メンバ関数 | 公開変数類 | フレンド | 全メンバ一覧
Distinguisher クラス

走行体のカラーセンサを用いて、RGB情報より色を推定するクラス。 [詳解]

#include "Distinguisher.h"

Distinguisher 連携図
Collaboration graph

公開メンバ関数

 Distinguisher (Controller &controller_)
 
Color getColor ()
 

公開変数類

double last_distance = 0.0
 
double threshold_distance = 400
 
Hsv hsv { Color::NONE, 0, 0, 0, 400, 0, 0 }
 

フレンド

class etrobocon2018_test::DistinguisherTest
 

詳解

走行体のカラーセンサを用いて、RGB情報より色を推定するクラス。

Distinguisher.h55 行目に定義があります。

構築子と解体子

Distinguisher::Distinguisher ( Controller controller_)
inlineexplicit

コンストラクタ

引数
controller_ev3apiを持つControllerクラス。

Distinguisher.h61 行目に定義があります。

61 : controller(controller_) {}

関数詳解

Color Distinguisher::getColor ( )

カラーセンサ先の色を取得する。

戻り値

Distinguisher.cpp4 行目に定義があります。

5 {
6  setRawColor2Rgb();
7  convertRgbToHsv(rgb);
8  distingishColor();
9  return color;
10 }

被呼び出し関係図:

フレンドと関連関数の詳解

Distinguisher.h56 行目に定義があります。

メンバ詳解

Hsv Distinguisher::hsv { Color::NONE, 0, 0, 0, 400, 0, 0 }

Distinguisher.h73 行目に定義があります。

double Distinguisher::last_distance = 0.0

最後にgetColorした際の色距離

Distinguisher.h68 行目に定義があります。

double Distinguisher::threshold_distance = 400

getColorする際の最低限必要な色距離

Distinguisher.h71 行目に定義があります。


このクラス詳解は次のファイルから抽出されました: