'''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 	_UpperCAmelCase       (				_UpperCamelCase       :      Any  )      -> List[Any]:
    A_      =  np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]  )
    A_      =  np.array([[1, 2, 1], [0, 0, 0], [-1, -2, -1]]  )

    A_      =  np.abs(img_convolve(_UpperCamelCase,  _UpperCamelCase  )  )
    A_      =  np.abs(img_convolve(_UpperCamelCase,  _UpperCamelCase  )  )
    # modify the pix within [0, 255]
    A_      =  dst_x * 2_55 / np.max(_UpperCamelCase  )
    A_      =  dst_y * 2_55 / np.max(_UpperCamelCase  )

    A_      =  np.sqrt((np.square(_UpperCamelCase  )) + (np.square(_UpperCamelCase  ))  )
    A_      =  dst_xy * 2_55 / np.max(_UpperCamelCase  )
    A_      =  dst_xy.astype(np.uinta  )

    A_      =  np.arctana(_UpperCamelCase,  _UpperCamelCase  )
    return dst, theta


if __name__ == "__main__":
  # read original image
  __snake_case  : List[Any]		       =    imread('../image_data/lena.jpg')
  # turn image in gray scale value
  __snake_case  : Any		       =    cvtColor(img, COLOR_BGR2GRAY)

  __snake_case       ,       __snake_case  : Any		       =    sobel_filter(gray)

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







'''simple docstring'''




__snake_case  : str		       =    10**8





def 	_UpperCAmelCase       (				_UpperCamelCase       :      int  )      -> bool:
    if n % 10 == 0:
        return False
    A_      =  str(_UpperCamelCase  )
    return s == s[::-1]





def 	_UpperCAmelCase       (				)      -> int:
    A_      =  set()
    A_      =  1
    A_      =  5
    while sum_squares < LIMIT:
        A_      =  first_square + 1
        while sum_squares < LIMIT:
            if is_palindrome(_UpperCamelCase  ):
                answer.add(_UpperCamelCase  )
            last_square += 1
            sum_squares += last_square**2
        first_square += 1
        A_      =  first_square**2 + (first_square + 1) ** 2

    return sum(_UpperCamelCase  )


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






