





"""simple docstring"""





from cva import destroyAllWindows, imread, imshow, waitKey
def 					__A  (_SCREAMING_SNAKE_CASE     )   ->int:





  """simple docstring"""


  lowerCAmelCase__				,							lowerCAmelCase__     :Optional[Any]											=				img.shape[0], img.shape[1]

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

  return img


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

  # convert to its negative
  __A											=						convert_to_negative(img)

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



'''simple docstring'''



from dataclasses import dataclass
from typing import List, Optional, Union

import numpy as np
import torch

from ...utils import BaseOutput, OptionalDependencyNotAvailable, is_torch_available, is_transformers_available



@dataclass
class 				_snake_case					(   a_			):
  SCREAMING_SNAKE_CASE			:       Union[List[np.ndarray], torch.FloatTensor]


try:
     if not (is_transformers_available() and is_torch_available()):
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
     from .pipeline_text_to_video_synth import TextToVideoSDPipeline
     from .pipeline_text_to_video_synth_imgaimg import VideoToVideoSDPipeline  # noqa: F401
     from .pipeline_text_to_video_zero import TextToVideoZeroPipeline





