dlpy.images.ImageTable.crop¶
-
ImageTable.
crop
(x=0, y=0, width=None, height=None, inplace=True)¶ Crop the images in the ImageTable
Parameters: - x : int, optional
Specify the x location of the top-left corner of the cropped images.
- y : int, optional
Specify the y location of the top-left corner of the cropped images.
- width : int, optional
Specify the width of the cropped images.
- height : int, optional
Specify the height of the cropped images. If not specified, height will be set to be equal to width.
- inplace : bool, optional
Specifies whether to update the original table, or to create a new one.
Returns: - ImageTable
If inplace=False
- None
If inplace=True
Examples
>>> from swat import CAS >>> from dlpy.images import ImageTable >>> s=CAS("cloud.example.com", 5570) >>> img_tbl=ImageTable.load_files(s, "/path/to/images", caslib="CASUSER(user)") >>> cropped = img_tbl.crop(x=250, y=250, height=100, width=200, inplace=False)