Scale the image to (x, y). :param image: Image to be rescaled. :param x: Output value for ``image``'s x dimension. :param y: Output value for ``image``'s y dimension. :return: Re-scaled image.
(image: np.ndarray, x: int, y: int)
| 45 | |
| 46 | |
| 47 | def subsample(image: np.ndarray, x: int, y: int) -> np.ndarray: |
| 48 | # language=rst |
| 49 | """ |
| 50 | Scale the image to (x, y). |
| 51 | |
| 52 | :param image: Image to be rescaled. |
| 53 | :param x: Output value for ``image``'s x dimension. |
| 54 | :param y: Output value for ``image``'s y dimension. |
| 55 | :return: Re-scaled image. |
| 56 | """ |
| 57 | return cv2.resize(image, (x, y)) |
| 58 | |
| 59 | |
| 60 | """ Below is the implementation of necessary preprocessing for the dataset ALOV300 """ |