


'''simple docstring'''


import numpy as np
from cva import COLOR_BGR2GRAY, cvtColor, imread, imshow, waitKey

from digital_image_processing.filters.convolve import img_convolve


def 		_lowercase   (SCREAMING_SNAKE_CASE       ):




     '''simple docstring'''





     __A  :					Tuple						     =       np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]       )
     __A  :					List[str]						     =       np.array([[1, 2, 1], [0, 0, 0], [-1, -2, -1]]       )

     __A  :					List[str]						     =       np.abs(img_convolve(SCREAMING_SNAKE_CASE					,				SCREAMING_SNAKE_CASE       )       )
     __A  :					Union[str, Any]						     =       np.abs(img_convolve(SCREAMING_SNAKE_CASE					,				SCREAMING_SNAKE_CASE       )       )
     # modify the pix within [0, 255]
     __A  :					Union[str, Any]						     =       dst_x * 255 / np.max(SCREAMING_SNAKE_CASE       )
     __A  :					Dict						     =       dst_y * 255 / np.max(SCREAMING_SNAKE_CASE       )

     __A  :					Dict						     =       np.sqrt((np.square(SCREAMING_SNAKE_CASE       )) + (np.square(SCREAMING_SNAKE_CASE       ))       )
     __A  :					Dict						     =       dst_xy * 255 / np.max(SCREAMING_SNAKE_CASE       )
     __A  :					Optional[Any]						     =       dst_xy.astype(np.uinta       )

     __A  :					Union[str, Any]						     =       np.arctana(SCREAMING_SNAKE_CASE					,				SCREAMING_SNAKE_CASE       )
     return dst, theta


if __name__ == "__main__":
      # read original image
      _UpperCamelCase          =     imread("""../image_data/lena.jpg""")
      # turn image in gray scale value
      _UpperCamelCase          =     cvtColor(img, COLOR_BGR2GRAY)

      _UpperCamelCase       ,      _UpperCamelCase          =     sobel_filter(gray)

      # show result images
      imshow("""sobel filter""", sobel_grad)
      imshow("""sobel theta""", sobel_theta)
      waitKey(0)





'''simple docstring'''


from collections import defaultdict


def 		_lowercase   (SCREAMING_SNAKE_CASE = 5       ):




     '''simple docstring'''





     __A  :					int						     =       defaultdict(SCREAMING_SNAKE_CASE       )
     __A  :					Optional[Any]						     =       0

     while True:
          __A  :					List[str]						     =       get_digits(SCREAMING_SNAKE_CASE       )
          freqs[digits].append(SCREAMING_SNAKE_CASE       )

          if len(freqs[digits]       ) == max_base:
               __A  :					Optional[int]						     =       freqs[digits][0] ** 3
               return base

          num += 1


def 		_lowercase   (SCREAMING_SNAKE_CASE       ):




     '''simple docstring'''





     return "".join(sorted(str(num**3       )       )       )


if __name__ == "__main__":
      print(F"""{solution() = }""")

