You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new method crop to Image that takes four parameters
x - the x coordinate of the top-left corner of the bounding rectangle
y - the y coordinate of the top-left corner of the bounding rectangle
width - the width of the bounding rectangle
height - the height of the bounding rectangle
The method should return the cropped image but leave the original unchanged
As usual in image processing, the origin of the coordinate system should be the top-left corner of the image. The x-axis should increase to the right and the y-axis should go down.
Raise an error, if the bounding rectangle is not contained in the image.
Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
Cropping is a common transformation on images.
Desired solution
crop
toImage
that takes four parametersx
- the x coordinate of the top-left corner of the bounding rectangley
- the y coordinate of the top-left corner of the bounding rectanglewidth
- the width of the bounding rectangleheight
- the height of the bounding rectangleAs usual in image processing, the origin of the coordinate system should be the top-left corner of the image. The x-axis should increase to the right and the y-axis should go down.
Raise an error, if the bounding rectangle is not contained in the image.
Possible alternatives (optional)
No response
Screenshots (optional)
No response
Additional Context (optional)
No response
The text was updated successfully, but these errors were encountered: