
"""simple docstring"""
from cva import destroyAllWindows, imread, imshow, waitKey




def     __lowerCamelCase  (		UpperCamelCase__				,     UpperCamelCase__      ):


	"""simple docstring"""






	_UpperCAmelCase =						img.shape[0], img.shape[1]

	def to_grayscale(UpperCamelCase__				,     UpperCamelCase__				,     UpperCamelCase__      ):
		return 0.2126 * red + 0.587 * green + 0.114 * blue

	def normalize(UpperCamelCase__      ):
		return min(__lowerCAmelCase				,     255      )

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

	return img


if __name__ == "__main__":
			# read original image
			__magic_name__		       =				{
			    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"""
def     __lowerCamelCase  (		UpperCamelCase__      ):


	"""simple docstring"""






	if not isinstance(UpperCamelCase__				,     UpperCamelCase__      ):
		raise TypeError("recursive_lucas_number accepts only integer arguments."      )
	if n_th_number == 0:
		return 2
	if n_th_number == 1:
		return 1

	return recursive_lucas_number(n_th_number - 1      ) + recursive_lucas_number(
	    n_th_number - 2      )




def     __lowerCamelCase  (		UpperCamelCase__      ):


	"""simple docstring"""






	if not isinstance(UpperCamelCase__				,     UpperCamelCase__      ):
		raise TypeError("dynamic_lucas_number accepts only integer arguments."      )
	_UpperCAmelCase ,      _UpperCAmelCase =						2, 1
	for _ in range(UpperCamelCase__      ):
		_UpperCAmelCase ,      _UpperCAmelCase =						b, a + b
	return a


if __name__ == "__main__":
			from doctest import testmod

			testmod()
			__magic_name__		       =				int(input('''Enter the number of terms in lucas series:\n''').strip())
			print('''Using recursive function to calculate lucas series:''')
			print(''' '''.join(str(recursive_lucas_number(i)) for i in range(n)))
			print('''\nUsing dynamic function to calculate lucas series:''')
			print(''' '''.join(str(dynamic_lucas_number(i)) for i in range(n)))




