code: 
  
  
  
  
  
  '''simple docstring'''
  
  
  
  
  
  
  
  from cva import destroyAllWindows, imread, imshow, waitKey
  
  
  
  
  
  def      _lowerCAmelCase		(		lowercase      ,			lowercase			)      ->      int:
  			__lowerCAmelCase		, __lowerCAmelCase      		=       img.shape[0], img.shape[1]
  
  			def to_grayscale(lowercase      ,			lowercase      ,			lowercase			):
  						return 0.21_26 * red + 0.5_87 * green + 0.1_14 * blue
  
  			def normalize(lowercase			):
  						return min(lowercase      ,			255			)
  
  			for i in range(lowercase			):
  						for j in range(lowercase			):
  									__lowerCAmelCase      		=       int(to_grayscale(*img[i][j]			)			)
  									__lowerCAmelCase      		=       [
  									    normalize(lowercase			),
  									    normalize(greyscale + factor			),
  									    normalize(greyscale + 2 * factor			),
  									]
  
  			return img
  
  
  if __name__ == "__main__":
  	# read original image
  	_a      :				Any											=					{
  	    percentage: imread("""image_data/lena.jpg""", 1) for percentage in (1_0, 2_0, 3_0, 4_0)
  	}
  
  	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()
  
  
style_context: 
  
  
  
  
  
  '''simple docstring'''
  
  
  
  
  
  
  
  from cva import destroyAllWindows, imread, imshow, waitKey
  
  
  
  
  
  def      _lowerCAmelCase		(		lowercase      ,			lowercase			)      ->      int:
  			__lowerCAmelCase		, __lowerCAmelCase      		=       img.shape[0], img.shape[1]
  
  			def to_grayscale(lowercase      ,			lowercase      ,			lowercase			):
  						return 0.21_26 * red + 0.5_87 * green + 0.1_14 * blue
  
  			def normalize(lowercase			):
  						return min(lowercase      ,			255			)
  
  			for i in range(lowercase			):
  						for j in range(lowercase			):
  									__lowerCAmelCase      		=       int(to_grayscale(*img[i][j]			)			)
  									__lowerCAmelCase      		=       [
  									    normalize(lowercase			),
  									    normalize(greyscale + factor			),
  									    normalize(greyscale + 2 * factor			),
  									]
  
  			return img
  
  
  if __name__ == "__main__":
  	# read original image
  	_a      :				Any											=					{
  	    percentage: imread("""image_data/lena.jpg""", 1) for percentage in (1_0, 2_0, 3_0, 4_0)
  	}
  
  	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()
  
  