crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1crop_rectangle1crop_rectangle1
Short description
crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1crop_rectangle1crop_rectangle1 — Cut out one or more rectangular image areas.
Signature
crop_rectangle1( image Image, out image ImagePart, rectangle.origin.y Row1, rectangle.origin.x Column1, rectangle.corner.y Row2, rectangle.corner.x Column2 )crop_rectangle1( Image : ImagePart : Row1, Column1, Row2, Column2 : )void CropRectangle1( const HObject& Image, HObject* ImagePart, const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2 )static void HOperatorSet.CropRectangle1( HObject image, out HObject imagePart, HTuple row1, HTuple column1, HTuple row2, HTuple column2 )def crop_rectangle1( image: HObject, row_1: MaybeSequence[int], column_1: MaybeSequence[int], row_2: MaybeSequence[int], column_2: MaybeSequence[int] ) -> HObject
Herror crop_rectangle1( const Hobject Image, Hobject* ImagePart, const Hlong Row1, const Hlong Column1, const Hlong Row2, const Hlong Column2 )
Herror T_crop_rectangle1( const Hobject Image, Hobject* ImagePart, const Htuple Row1, const Htuple Column1, const Htuple Row2, const Htuple Column2 )
HImage HImage::CropRectangle1( const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2 ) const
HImage HImage::CropRectangle1( Hlong Row1, Hlong Column1, Hlong Row2, Hlong Column2 ) const
HImage HImage.CropRectangle1( HTuple row1, HTuple column1, HTuple row2, HTuple column2 )
HImage HImage.CropRectangle1( int row1, int column1, int row2, int column2 )
Description
The operator crop_rectangle1CropRectangle1 cuts one or more rectangular areas
from each of the input images. The areas are indicated by rectangles,
which are defined by the coordinates of their upper left and their lower
right corners. The upper left corners must be within the image. At the right
side and at the bottom, the rectangles may exceed the image, but the domain
of the output images is set so that only the part that can be derived from
the input image is contained. If the rectangular areas fall within the image,
then each of the resulting images has the size of its corresponding
rectangle.
Execution information
-
Supports OpenCL compute devices.
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Automatically parallelized on tuple level.
Parameters
Imageimageimage (input_object) (multichannel-)image(-array) → object (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*)object (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*)HObject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*)HImage (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*)HObject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*)Hobject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*) *allowed for compute devices
Input image.
ImagePartimagePartimage_part (output_object) (multichannel-)image(-array) → object (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*)object (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*)HObject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*)HImage (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*)HObject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*)Hobject * (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*) *allowed for compute devices
Image area.
Row1row1row_1 (input_control) rectangle.origin.y(-array) → (integer)(integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)
Line index of upper left corner of image area.
Default: 100100
Suggested values: 10, 20, 50, 100, 200, 300, 50010, 20, 50, 100, 200, 300, 500
Value range: 0 ≤ Row1 ≤ 1024
Column1column1column_1 (input_control) rectangle.origin.x(-array) → (integer)(integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)
Column index of upper left corner of image area.
Default: 100100
Suggested values: 10, 20, 50, 100, 200, 300, 50010, 20, 50, 100, 200, 300, 500
Value range: 0 ≤ Column1 ≤ 1024
Row2row2row_2 (input_control) rectangle.corner.y(-array) → (integer)(integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)
Line index of lower right corner of image area.
Default: 200200
Suggested values: 10, 20, 50, 100, 200, 300, 50010, 20, 50, 100, 200, 300, 500
Value range: 0 ≤ Row2 ≤ 1024
Column2column2column_2 (input_control) rectangle.corner.x(-array) → (integer)(integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)
Column index of lower right corner of image area.
Default: 200200
Suggested values: 10, 20, 50, 100, 200, 300, 50010, 20, 50, 100, 200, 300, 500
Value range: 0 ≤ Column2 ≤ 1024
Combinations with other operators
Combinations
Possible successors
disp_imageDispImage
Alternatives
crop_partCropPart, crop_domainCropDomain, change_formatChangeFormat, reduce_domainReduceDomain
See also
zoom_image_sizeZoomImageSize, zoom_image_factorZoomImageFactor
Module
Foundation