






'''simple docstring'''
from cva import COLOR_BGR2GRAY, cvtColor, imread, imshow, waitKey
from numpy import divide, inta, multiply, ravel, sort, zeros_like

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase=3 )				->				Optional[Any]:






					"""simple docstring"""







					a_									=   int(mask / 2 )
					# copy image size
					a_									=   zeros_like(_UpperCAmelCase )
					for i in range(_UpperCAmelCase					,  gray_img.shape[0] - bd ):
										for j in range(_UpperCAmelCase					,  gray_img.shape[1] - bd ):
															# get mask according with mask
															a_									=   ravel(gray_img[i - bd : i + bd + 1, j - bd : j + bd + 1] )
															# calculate mask median
															a_									=   sort(_UpperCAmelCase )[inta(divide((multiply(_UpperCAmelCase					,  _UpperCAmelCase ))					,  2 ) + 1 )]
															a_									=   median
					return median_img


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

						# get values with two different mask size
						__lowerCAmelCase							=median_filter(gray, 3)
						__lowerCAmelCase							=median_filter(gray, 5)

						# show result images
						imshow("median filter with 3x3 mask", medianaxa)
						imshow("median filter with 5x5 mask", medianaxa)
						waitKey(0)









'''simple docstring'''
def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round((float(_UpperCAmelCase ) * 9 / 5) + 3_2					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round(float(_UpperCAmelCase ) + 2_7_3.1_5					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round((float(_UpperCAmelCase ) * 9 / 5) + 4_9_1.6_7					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round((float(_UpperCAmelCase ) - 3_2) * 5 / 9					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round(((float(_UpperCAmelCase ) - 3_2) * 5 / 9) + 2_7_3.1_5					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round(float(_UpperCAmelCase ) + 4_5_9.6_7					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round(float(_UpperCAmelCase ) - 2_7_3.1_5					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round(((float(_UpperCAmelCase ) - 2_7_3.1_5) * 9 / 5) + 3_2					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round((float(_UpperCAmelCase ) * 9 / 5)					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round((float(_UpperCAmelCase ) - 4_9_1.6_7) * 5 / 9					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round(float(_UpperCAmelCase ) - 4_5_9.6_7					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round((float(_UpperCAmelCase ) * 5 / 9)					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round((float(_UpperCAmelCase ) * 1.2_5 + 2_7_3.1_5)					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round((float(_UpperCAmelCase ) * 2.2_5 + 3_2)					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round((float(_UpperCAmelCase ) * 1.2_5)					,  _UpperCAmelCase )

def 							a	(   _UpperCAmelCase					,  _UpperCAmelCase = 2 )				->				float:






					"""simple docstring"""







					return round((float(_UpperCAmelCase ) * 2.2_5 + 3_2 + 4_5_9.6_7)					,  _UpperCAmelCase )


if __name__ == "__main__":
						import doctest

						doctest.testmod()

