




'''simple docstring'''







from cva import destroyAllWindows, imread, imshow, waitKey





def 		snake_case_				(_a      :				List[Any]       ,  _a      :				int	):
    UpperCAmelCase			,	UpperCAmelCase     			=						img.shape[0], img.shape[1]

    def to_grayscale(_a      :				Optional[Any]       ,  _a      :				Optional[Any]       ,  _a      :				Tuple	):
        return 0.2126 * red + 0.587 * green + 0.114 * blue

    def normalize(_a      :				str	):
        return min(_a       ,  2_5_5	)

    for i in range(_a	):
        for j in range(_a	):
            UpperCAmelCase     			=						int(to_grayscale(*img[i][j]	)	)
            UpperCAmelCase     			=						[
                normalize(_a	),
                normalize(greyscale + factor	),
                normalize(greyscale + 2 * factor	),
            ]

    return img


if __name__ == "__main__":
   # read original image
   A					       ={
       percentage: imread('image_data/lena.jpg', 1) for percentage in (10, 20, 30, 40)
   }

   for percentage, img in images.items():
      make_sepia(img, percentage)

   for percentage, img in images.items():
      imshow(f"""Original image with sepia (factor: {percentage})""", img)

   waitKey(0)
   destroyAllWindows()










'''simple docstring'''







from ..utils import DummyObject, requires_backends


class      _a    (      metaclass=__a					):
       __a							:	str  							=   ["""torch""", """librosa"""]
       def __init__(      self		:      int  ,							*lowercase		:      Any  ,							**lowercase		:      Optional[int]							):



           '''simple docstring'''

           requires_backends(self  ,							['''torch''', '''librosa''']							)
       @classmethod
       def        A (      cls		:      Optional[int]  ,							*lowercase		:      List[str]  ,							**lowercase		:      str							):



           '''simple docstring'''

           requires_backends(cls  ,							['''torch''', '''librosa''']							)







       @classmethod
       def        A (      cls		:      Dict  ,							*lowercase		:      Optional[int]  ,							**lowercase		:      List[Any]							):



           '''simple docstring'''

           requires_backends(cls  ,							['''torch''', '''librosa''']							)






class      _a    (      metaclass=__a					):
       __a							:	List[Any]  							=   ["""torch""", """librosa"""]
       def __init__(      self		:      int  ,							*lowercase		:      Optional[int]  ,							**lowercase		:      Optional[int]							):



           '''simple docstring'''

           requires_backends(self  ,							['''torch''', '''librosa''']							)
       @classmethod
       def        A (      cls		:      Dict  ,							*lowercase		:      Tuple  ,							**lowercase		:      List[str]							):



           '''simple docstring'''

           requires_backends(cls  ,							['''torch''', '''librosa''']							)







       @classmethod
       def        A (      cls		:      Any  ,							*lowercase		:      Any  ,							**lowercase		:      Tuple							):



           '''simple docstring'''

           requires_backends(cls  ,							['''torch''', '''librosa''']							)




