* x,y - starting position of zoom * width, height - dimensions of the rectangle to where we have to zoom in * */
| 54 | * width, height - dimensions of the rectangle to where we have to zoom in |
| 55 | * */ |
| 56 | array digZoom(const array &in, int x, int y, int width, int height) { |
| 57 | array cropped = in(seq(x, width - 1), seq(y, height - 1), span); |
| 58 | return resize(cropped, (unsigned)in.dims(0), (unsigned)in.dims(1)); |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * a - foregound image |