


'''simple docstring'''
import numpy as np
from cva import COLOR_BGR2GRAY, CV_8UC3, cvtColor, filteraD, imread, imshow, waitKey


def 			a      (			__a ,					__a ,					__a ,					__a ,					__a ,					__a   )  ->	np.ndarray:



					'''simple docstring'''






					if (ksize % 2) == 0:
										UpperCamelCase__   :List[str]												= ksize + 1
					UpperCamelCase__   :List[str]												= np.zeros((ksize, ksize) ,					dtype=np.floataa   )

					# each value
					for y in range(__a   ):
										for x in range(__a   ):
															# distance from center
															UpperCamelCase__   :List[str]												= x - ksize // 2
															UpperCamelCase__   :Union[str, Any]												= y - ksize // 2

															# degree to radiant
															UpperCamelCase__   :Optional[Any]												= theta / 180 * np.pi
															UpperCamelCase__   :int												= np.cos(_theta   )
															UpperCamelCase__   :Optional[int]												= np.sin(_theta   )

															# get kernel x
															UpperCamelCase__   :Optional[int]												= cos_theta * px + sin_theta * py

															# get kernel y
															UpperCamelCase__   :Any												= -sin_theta * px + cos_theta * py

															# fill kernel
															UpperCamelCase__   :Dict												= np.exp(
															    -(_x**2 + gamma**2 * _y**2) / (2 * sigma**2)   ) * np.cos(2 * np.pi * _x / lambd + psi   )

					return gabor


if __name__ == "__main__":
		import doctest

		doctest.testmod()
		# read original image
		__snake_case							      =     imread('''../image_data/lena.jpg''')
		# turn image in gray scale value
		__snake_case							      =     cvtColor(img, COLOR_BGR2GRAY)

		# Apply multiple Kernel to detect edges
		__snake_case							      =     np.zeros(gray.shape[:2])
		for theta in [0, 30, 60, 90, 120, 150]:
				__snake_case							      =     gabor_filter_kernel(10, 8, theta, 10, 0, 0)
				out += filteraD(gray, CV_8UC3, kernel_aa)
		__snake_case							      =     out / out.max() * 255
		__snake_case							      =     out.astype(np.uinta)

		imshow('''Original''', gray)
		imshow('''Gabor filter with 20x20 mask and 6 directions''', out)

		waitKey(0)



'''simple docstring'''
def 			a      (			)  ->	Union[str, Any]:



					'''simple docstring'''






					UpperCamelCase__   :Optional[int]												= []
					UpperCamelCase__   :int												= 1

					while len(__a   ) < 1e6:
										constant.append(str(__a   )   )
										i += 1

					UpperCamelCase__   :Union[str, Any]												= ''''''.join(__a   )

					return (
					    int(constant[0]   )
					    * int(constant[9]   )
					    * int(constant[99]   )
					    * int(constant[999]   )
					    * int(constant[9999]   )
					    * int(constant[99999]   )
					    * int(constant[999999]   )
					)


if __name__ == "__main__":
		print(solution())