





import numpy as np
from cva import destroyAllWindows, imread, imshow, waitKey






class        _a:







		def __init__(    self ,						__snake_case ,						__snake_case ,						__snake_case				)      ->      Any:


							'''simple docstring'''

							if dst_width < 0 or dst_height < 0:
												raise ValueError("Destination width/height should be > 0"				)

							_snake_case       :					str				       =   img
							_snake_case       :					List[Any]				       =   img.shape[1]
							_snake_case       :					Any				       =   img.shape[0]
							_snake_case       :					Optional[Any]				       =   dst_width
							_snake_case       :					List[str]				       =   dst_height

							_snake_case       :					Tuple				       =   self.src_w / self.dst_w
							_snake_case       :					Optional[int]				       =   self.src_h / self.dst_h

							_snake_case       :					str				       =   (
							    np.ones((self.dst_h, self.dst_w, 3) ,						np.uinta				) * 2_5_5
							)







		def        lowercase       (    self				)      ->      Optional[Any]:


							'''simple docstring'''

							for i in range(self.dst_h				):
												for j in range(self.dst_w				):
																	_snake_case       :					int				       =   self.img[self.get_y(__snake_case				)][self.get_x(__snake_case				)]







		def        lowercase       (    self ,						__snake_case				)      ->      int:


							'''simple docstring'''

							return int(self.ratio_x * x				)







		def        lowercase       (    self ,						__snake_case				)      ->      int:


							'''simple docstring'''

							return int(self.ratio_y * y				)


if __name__ == "__main__":
							__lowerCAmelCase   ,   __lowerCAmelCase :List[Any]     =    8_00, 6_00
							__lowerCAmelCase :List[Any]     =    imread('image_data/lena.jpg', 1)
							__lowerCAmelCase :Optional[Any]     =    NearestNeighbour(im, dst_w, dst_h)
							n.process()

							imshow(
							    F'''Image resized from: {im.shape[1]}x{im.shape[0]} to {dst_w}x{dst_h}''', n.output
							)
							waitKey(0)
							destroyAllWindows()






import warnings

from ...utils import logging
from .image_processing_videomae import VideoMAEImageProcessor


__lowerCAmelCase :str     =    logging.get_logger(__name__)






class        _a(    __A    ):







		def __init__(    self ,						*__snake_case ,						**__snake_case				)      ->      None:


							'''simple docstring'''

							warnings.warn(
							    "The class VideoMAEFeatureExtractor is deprecated and will be removed in version 5 of Transformers."
							    " Please use VideoMAEImageProcessor instead." ,						__snake_case ,						)
							super().__init__(*__snake_case ,						**__snake_case				)