






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

from digital_image_processing.filters.convolve import img_convolve


def __A   (				__lowerCAmelCase     )->  List[str]:





						"""simple docstring"""



						_UpperCAmelCase     =      np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]     )
						_UpperCAmelCase     =      np.array([[1, 2, 1], [0, 0, 0], [-1, -2, -1]]     )

						_UpperCAmelCase     =      np.abs(img_convolve(__lowerCAmelCase			,		__lowerCAmelCase     )     )
						_UpperCAmelCase     =      np.abs(img_convolve(__lowerCAmelCase			,		__lowerCAmelCase     )     )
						# modify the pix within [0, 255]
						_UpperCAmelCase     =      dst_x * 255 / np.max(__lowerCAmelCase     )
						_UpperCAmelCase     =      dst_y * 255 / np.max(__lowerCAmelCase     )

						_UpperCAmelCase     =      np.sqrt((np.square(__lowerCAmelCase     )) + (np.square(__lowerCAmelCase     ))     )
						_UpperCAmelCase     =      dst_xy * 255 / np.max(__lowerCAmelCase     )
						_UpperCAmelCase     =      dst_xy.astype(np.uinta     )

						_UpperCAmelCase     =      np.arctana(__lowerCAmelCase			,		__lowerCAmelCase     )
						return dst, theta


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

		_a     ,							_a				     =  sobel_filter(gray)

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








from ..utils import DummyObject, requires_backends





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )





class __lowerCamelCase			(				metaclass=snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				["tokenizers"]

	def __init__(							self	,   *UpperCAmelCase	,   **UpperCAmelCase   ):
							"""simple docstring"""







							requires_backends(self	,   ['tokenizers']   )
