Skip to content

crop_partCropPartCropPartcrop_partcrop_part🔗

Short description🔗

crop_partCropPartCropPartcrop_partcrop_part — Cut out one or more rectangular image areas.

Signature🔗

crop_part( image Image, out image ImagePart, rectangle.origin.y Row, rectangle.origin.x Column, rectangle.extent.x Width, rectangle.extent.y Height )void CropPart( const HObject& Image, HObject* ImagePart, const HTuple& Row, const HTuple& Column, const HTuple& Width, const HTuple& Height )static void HOperatorSet.CropPart( HObject image, out HObject imagePart, HTuple row, HTuple column, HTuple width, HTuple height )def crop_part( image: HObject, row: MaybeSequence[int], column: MaybeSequence[int], width: MaybeSequence[int], height: MaybeSequence[int] ) -> HObject

Herror crop_part( const Hobject Image, Hobject* ImagePart, const Hlong Row, const Hlong Column, const Hlong Width, const Hlong Height )

Herror T_crop_part( const Hobject Image, Hobject* ImagePart, const Htuple Row, const Htuple Column, const Htuple Width, const Htuple Height )

HImage HImage::CropPart( const HTuple& Row, const HTuple& Column, const HTuple& Width, const HTuple& Height ) const

HImage HImage::CropPart( Hlong Row, Hlong Column, Hlong Width, Hlong Height ) const

HImage HImage.CropPart( HTuple row, HTuple column, HTuple width, HTuple height )

HImage HImage.CropPart( int row, int column, int width, int height )

Description🔗

The operator crop_partCropPart cuts one or more rectangular area from each of the input images. The areas are indicated by rectangles, which are defined by the coordinates of their upper left corner and by their size. The upper left corners of the rectangles 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 completely within the image, then each of the resulting images has the size of its corresponding rectangle.

Execution information🔗

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*)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*)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.

Rowrowrow (input_control) rectangle.origin.y(-array) → (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 ≤ Row ≤ 1024

Columncolumncolumn (input_control) rectangle.origin.x(-array) → (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 ≤ Column ≤ 1024

Widthwidthwidth (input_control) rectangle.extent.x(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Width of new image.

Default: 128128
Suggested values: 32, 64, 128, 256, 512, 76832, 64, 128, 256, 512, 768
Value range: 0 ≤ Width ≤ 1024

Heightheightheight (input_control) rectangle.extent.y(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

Height of new image.

Default: 128128
Suggested values: 32, 64, 128, 256, 512, 52532, 64, 128, 256, 512, 525
Value range: 0 ≤ Height ≤ 1024

Combinations with other operators🔗

Combinations

Possible successors

disp_imageDispImage

Alternatives

crop_rectangle1CropRectangle1, crop_domainCropDomain, change_formatChangeFormat, reduce_domainReduceDomain

See also

zoom_image_sizeZoomImageSize, zoom_image_factorZoomImageFactor

Module🔗

Foundation