crop_rectangle2CropRectangle2CropRectangle2crop_rectangle2crop_rectangle2
説明
crop_rectangle2CropRectangle2CropRectangle2crop_rectangle2crop_rectangle2 — ひとつもしくは複数の任意の方向を持つ矩形画像領域を切り抜く。
書式
crop_rectangle2( image Image, out image ImagePart, rectangle2.center.y Row, rectangle2.center.x Column, rectangle2.angle.rad Phi, rectangle2.hwidth Length1, rectangle2.hheight Length2, string AlignToAxis, string Interpolation )void CropRectangle2( const HObject& Image, HObject* ImagePart, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, const HTuple& AlignToAxis, const HTuple& Interpolation )static void HOperatorSet.CropRectangle2( HObject image, out HObject imagePart, HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple length2, HTuple alignToAxis, HTuple interpolation )def crop_rectangle2( image: HObject, row: MaybeSequence[Union[int, float]], column: MaybeSequence[Union[int, float]], phi: MaybeSequence[Union[int, float]], length_1: MaybeSequence[Union[int, float]], length_2: MaybeSequence[Union[int, float]], align_to_axis: str, interpolation: str ) -> HObject
Herror crop_rectangle2( const Hobject Image, Hobject* ImagePart, double Row, double Column, double Phi, double Length1, double Length2, const char* AlignToAxis, const char* Interpolation )
Herror T_crop_rectangle2( const Hobject Image, Hobject* ImagePart, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Length1, const Htuple Length2, const Htuple AlignToAxis, const Htuple Interpolation )
HImage HImage::CropRectangle2( const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, const HString& AlignToAxis, const HString& Interpolation ) const
HImage HImage::CropRectangle2( double Row, double Column, double Phi, double Length1, double Length2, const HString& AlignToAxis, const HString& Interpolation ) const
HImage HImage::CropRectangle2( double Row, double Column, double Phi, double Length1, double Length2, const char* AlignToAxis, const char* Interpolation ) const
HImage HImage::CropRectangle2( double Row, double Column, double Phi, double Length1, double Length2, const wchar_t* AlignToAxis, const wchar_t* Interpolation ) const (Windows only)
HImage HImage.CropRectangle2( HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple length2, string alignToAxis, string interpolation )
HImage HImage.CropRectangle2( double row, double column, double phi, double length1, double length2, string alignToAxis, string interpolation )
説明
オペレータcrop_rectangle2CropRectangle2は、ひとつもしくはそれぞれ任意の方向を持つ
矩形画像領域を切り抜きます。この領域は矩形で示され、中心座標(Rowrowrow, Columncolumncolumn)、
任意の方向Phiphiphi、半分のエッジ長Length1length1length_1とLength2length2length_2で定義されます。
Phiphiphiは弧度で与えられ、水平な軸と長辺のエッジ(Length1length1length_1)の間の角度を示します。(数学的に正)
矩形のパラメータはピクセル中心のサブピクセルの正確な座標を使用します。これに関しては、
Transformations / 2D Transformations
を参照してください。
パラメータAlignToAxisalignToAxisalign_to_axisは、出力画像の配置を決定します。
設定可能な値 :
-
'true'"true":切り抜いた画像は座標軸にそろえられるように回転されます。
このためには、適切な補間を行う必要があります。補間モードに関する詳細な説明は
affine_trans_imageAffineTransImageにあります。
矩形が入力画像からはみ出している場合があります。この場合、入力画像の外側にある
ピクセルのグレイ値は0に設定されます。
-
'false'"false":入力画像の最小矩形の境界で切り抜かれ、ドメインはそれに応じて
設定されます。
矩形が入力画像の境界を超える場合があります。ただし、結果の切り抜かれた画像のサイズは、
入力画像の境界内にある矩形の部分によって決まります。
この方法は、補間が必要ありません。したがって、パラメータInterpolationinterpolationinterpolationは
効果がありません。
実行情報
実行情報
パラメーター
Imageimageimage (input_object) (multichannel-)image(-array) → object (byte / int2 / uint2 / real)HObject (byte / int2 / uint2 / real)HImage (byte / int2 / uint2 / real)HObject (byte / int2 / uint2 / real)Hobject (byte / int2 / uint2 / real)
入力画像
ImagePartimagePartimage_part (output_object) (multichannel-)image(-array) → object (byte / int2 / uint2 / real)HObject (byte / int2 / uint2 / real)HImage (byte / int2 / uint2 / real)HObject (byte / int2 / uint2 / real)Hobject * (byte / int2 / uint2 / real)
切り抜かれた画像
Rowrowrow (input_control) rectangle2.center.y(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)
切り抜く画像領域の中心の行座標
初期値: 300.0300.0
推奨値: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.010.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
値域: Row (lin)
推奨増分: 10.0
Columncolumncolumn (input_control) rectangle2.center.x(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)
切り抜く画像領域の中心の列座標
初期値: 200.0200.0
推奨値: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.010.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
値域: Column (lin)
推奨増分: 10.0
Phiphiphi (input_control) rectangle2.angle.rad(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)
矩形の方向 (弧度).
初期値: 0.00.0
推奨値: -1.178097, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.178097-1.178097, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.178097
値域: -1.178097 ≤ Phi ≤ 1.178097 (lin)
Length1length1length_1 (input_control) rectangle2.hwidth(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)
矩形の長辺の半分の長さ
初期値: 100.0100.0
推奨値: 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0, 300.0, 500.03.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0, 300.0, 500.0
値域: Length1 (lin)
推奨増分: 10.0
Length2length2length_2 (input_control) rectangle2.hheight(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)
矩形の短辺の半分の長さ
初期値: 20.020.0
推奨値: 1.0, 2.0, 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.01.0, 2.0, 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0
値域: Length2 (lin)
推奨増分: 10.0
AlignToAxisalignToAxisalign_to_axis (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)
切り抜いた画像を座標軸に揃えるかどうかを決定する
初期値: 'true'"true"
値のリスト: 'false', 'true'"false", "true"
Interpolationinterpolationinterpolation (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)
補間方法
初期値: 'constant'"constant"
値のリスト: 'bicubic', 'bilinear', 'constant', 'nearest_neighbor', 'weighted'"bicubic", "bilinear", "constant", "nearest_neighbor", "weighted"
他のオペレーターとの組み合わせ
組み合わせ
後処理の候補
disp_imageDispImage
他の選択候補
crop_domainCropDomain, crop_rectangle1CropRectangle1, crop_partCropPart, change_formatChangeFormat, reduce_domainReduceDomain
関連項目
zoom_image_sizeZoomImageSize, zoom_image_factorZoomImageFactor
モジュール
Foundation