


'''simple docstring'''



from cva import destroyAllWindows, imread, imshow, waitKey






def   lowerCamelCase							(_SCREAMING_SNAKE_CASE      :   Tuple   ):
					# getting number of pixels in the image
					__a			:       Any					    =  img.shape[0], img.shape[1]

					# converting each pixel's color to its negative
					for i in range(__lowerCAmelCase   ):
										for j in range(__lowerCAmelCase   ):
															__a			:       List[Any]					    =  [255, 255, 255] - img[i][j]

					return img


if __name__ == "__main__":
	# read original image
	__lowercase	:						str       =	imread('image_data/lena.jpg', 1)

	# convert to its negative
	__lowercase	:						Union[str, Any]       =	convert_to_negative(img)

	# show result image
	imshow('negative of original image', img)
	waitKey(0)
	destroyAllWindows()











lowerCamelCase	:							List[Any]				=[
    (1000, '''M'''),
    (900, '''CM'''),
    (500, '''D'''),
    (400, '''CD'''),
    (100, '''C'''),
    (90, '''XC'''),
    (50, '''L'''),
    (40, '''XL'''),
    (10, '''X'''),
    (9, '''IX'''),
    (5, '''V'''),
    (4, '''IV'''),
    (1, '''I'''),
]







def 		SCREAMING_SNAKE_CASE							(					__lowerCAmelCase			) ->	int:
     UpperCamelCase__			:   Optional[int]       				=  {"I": 1, "V": 5, "X": 10, "L": 50, "C": 100, "D": 500, "M": 1000}
     UpperCamelCase__			:   Any       				=  0
     UpperCamelCase__			:   Any       				=  0
     while place < len(__lowerCAmelCase			):
          if (place + 1 < len(__lowerCAmelCase			)) and (vals[roman[place]] < vals[roman[place + 1]]):
               total += vals[roman[place + 1]] - vals[roman[place]]
               place += 2
          else:
               total += vals[roman[place]]
               place += 1
     return total







def 		SCREAMING_SNAKE_CASE							(					__lowerCAmelCase			) ->	str:
     UpperCamelCase__			:   Optional[int]       				=  []
     for arabic, roman in ROMAN:
          ((UpperCamelCase__)				,     (UpperCamelCase__))			:   Optional[int]       				=  divmod(__lowerCAmelCase					,    __lowerCAmelCase			)
          result.append(roman * factor			)
          if number == 0:
               break
     return "".join(__lowerCAmelCase			)


if __name__ == "__main__":
 import doctest

 doctest.testmod()