Lulumoy Studio

Math guide

Crop

Keeps a rectangle of the image.

I′(x,y)=I(x+x0,y+y0),0≤x<w,0≤y<h
If width or height is 0, or the rectangle goes past the image, it is cut at the edge: w = W − x0, h = H − y0.

Parameters

ParameterMeaning
Left (px)x0: column of the left edge.
Top (px)y0: row of the top edge.
Width (px, 0 = up to the edge)w in pixels.
Height (px, 0 = up to the edge)h in pixels.

References

  1. R. C. Gonzalez, R. E. Woods. Digital Image Processing, 4th ed. Pearson, 2018.