






"""simple docstring"""





import numpy as np







def      lowerCamelCase__       (							_lowerCamelCase       :		Any		,				_lowerCamelCase       :		List[str]		,				_lowerCamelCase       :		Optional[int]		,				_lowerCamelCase       :		Optional[int]		,				_lowerCamelCase       :		Tuple )      ->				List[str]:
  lowerCamelCase_         =						int(np.ceil((x_end - xa) / h ) )
  lowerCamelCase_         =						np.zeros((n + 1,) )
  lowerCamelCase_         =						ya
  lowerCamelCase_         =						xa

  for k in range(_lowerCamelCase ):
    lowerCamelCase_         =						f(_lowerCamelCase		,				y[k] )
    lowerCamelCase_         =						f(x + 0.5 * h		,				y[k] + 0.5 * h * ka )
    lowerCamelCase_         =						f(x + 0.5 * h		,				y[k] + 0.5 * h * ka )
    lowerCamelCase_         =						f(x + h		,				y[k] + h * ka )
    lowerCamelCase_         =						y[k] + (1 / 6) * h * (ka + 2 * ka + 2 * ka + ka)
    x += h

  return y


if __name__ == "__main__":
  import doctest

  doctest.testmod()












"""simple docstring"""





from cva import destroyAllWindows, imread, imshow, waitKey







def      lowerCamelCase__       (							_lowerCamelCase       :		Tuple )      ->				Dict:
  # getting number of pixels in the image
  lowerCamelCase_     ,	lowerCamelCase_         =						img.shape[0], img.shape[1]

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

  return img


if __name__ == "__main__":
  # read original image
  _SCREAMING_SNAKE_CASE					:				List[Any]					    =						imread('''image_data/lena.jpg''', 1)

  # convert to its negative
  _SCREAMING_SNAKE_CASE					:				List[Any]					    =						convert_to_negative(img)

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




