TransformToGrayscaleOp

パブリック クラスTransformToGrayscaleOp

画像処理単位として画像を GrayScale に変換します。

サポートされている色空間:

変換は OpenCV RGB から GRAY への変換に基づいています https://docs.opencv.org/master/de/d25/imgproc_color_conversions.html#color_convert_rgb_gray

パブリックコンストラクター

TransformToGrayscaleOp ()
TransformToGrayscaleOp を作成します。

パブリックメソッド

テンソル画像
適用( TensorImageイメージ)
変換をグレースケールに適用し、 TensorImageを返します。
整数
getOutputImageHeight (int inputImageHeight, int inputImageWidth)
入力画像サイズが指定された場合に、予想される出力画像の高さを計算します。
整数
getOutputImageWidth (int inputImageHeight, int inputImageWidth)
入力画像サイズが指定された場合に、予想される出力画像の幅を計算します。
ポイントF
inverseTransform (PointF ポイント、int inputImageHeight、int inputImageWidth)
結果イメージの座標系から入力イメージの座標系に点を変換します。

継承されたメソッド

パブリックコンストラクター

パブリックTransformToGrayscaleOp ()

TransformToGrayscaleOp を作成します。

パブリックメソッド

public TensorImage apply ( TensorImageイメージ)

変換をグレースケールに適用し、 TensorImageを返します。

入力イメージがすでにColorSpaceType.GRAYSCALEである場合、この操作は何も行われません。

パラメーター
画像
投げる
IllegalArgumentException imageColorSpaceType.RGBまたはColorSpaceType.GRAYSCALEではない場合。

public int getOutputImageHeight (int inputImageHeight, int inputImageWidth)

入力画像サイズが指定された場合に、予想される出力画像の高さを計算します。

パラメーター
入力画像の高さ
入力画像幅

public int getOutputImageWidth (int inputImageHeight, int inputImageWidth)

入力画像サイズが指定された場合に、予想される出力画像の幅を計算します。

パラメーター
入力画像の高さ
入力画像幅

public PointF inverseTransform (PointF point, int inputImageHeight, int inputImageWidth)

結果イメージの座標系から入力イメージの座標系に点を変換します。

パラメーター
ポイント結果座標系からの点。
入力画像の高さ入力画像の高さ。
入力画像幅入力画像の幅。
戻り値
  • 入力画像の座標系からの座標を持つ点。