


from cva import destroyAllWindows, imread, imshow, waitKey


def        _UpperCamelCase							(      lowercase__      ):
						# getting number of pixels in the image
						__SCREAMING_SNAKE_CASE			,			__SCREAMING_SNAKE_CASE						:     Dict					=		img.shape[0], img.shape[1]

						# converting each pixel's color to its negative
						for i in range(lowercase__      ):
												for j in range(lowercase__      ):
																		__SCREAMING_SNAKE_CASE						:     int					=		[255, 255, 255] - img[i][j]

						return img


if __name__ == "__main__":
						# read original image
						__lowerCAmelCase	: Optional[Any]  				=imread('image_data/lena.jpg', 1)

						# convert to its negative
						__lowerCAmelCase	: Union[str, Any]  				=convert_to_negative(img)

						# show result image
						imshow('negative of original image', img)
						waitKey(0)
						destroyAllWindows()




"""simple docstring"""




import numpy as np

def        lowercase							(		lowerCAmelCase__ :     np.ndarray    ,					lowerCAmelCase__ :     float			) ->      np.ndarray:
		return np.where(vector > 0    ,					lowerCAmelCase__    ,					(alpha * (np.exp(lowerCAmelCase__			) - 1))			)


if __name__ == "__main__":
				import doctest

				doctest.testmod()






