Skip to content

How can I centercrop an image with a given center? #7516

Answered by KumoLiu
vectorzwt asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @vectorzwt,
The transform CenterSpatialCrop does indeed include a roi_size parameter as documentated here.
If you are aiming to crop around a specific center point, you might want to consider the SpatialCrop transform, as it provides greater flexibility in specifying the center point for cropping. You can find its documentation here.

Hope it helps, thanks.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vectorzwt
Comment options

Answer selected by vectorzwt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants