Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Arithmetic Processing | Fundamentals of Image Manipulation with Python
Fundamentals of Image Manipulation with Python
course content

Зміст курсу

Fundamentals of Image Manipulation with Python

bookArithmetic Processing

In OpenCV, arithmetical functions are a set of operations that can be performed on images, such as addition, subtraction, multiplication, and division. These functions are used to manipulate the pixel values of an image and can be used for image processing tasks such as image enhancement and thresholding.

Some examples of arithmetical functions in OpenCV include:

  • cv2.add(): Adds two images together element-wise.
  • cv2.subtract(): Subtracts one image from another element-wise.
  • cv2.multiply(): Multiplies two images together element-wise.
  • cv2.divide(): Divides one image by another element-wise.
  • cv2.addWeighted(): Performs a weighted sum of two images.
  • cv2.absdiff(): Computes the absolute difference between two images element-wise.

Note

Each of these functions perform element-wise operations.

Завдання
test

Swipe to show code editor

  1. Read two images: Store "image1.jpg" in the variable image1 and "image2.jpg" in the variable image2.
  2. Perform a weighted sum of these two images, with image1 as the first input.
  3. Display the resulting image.

Mark tasks as Completed
Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

In OpenCV, arithmetical functions are a set of operations that can be performed on images, such as addition, subtraction, multiplication, and division. These functions are used to manipulate the pixel values of an image and can be used for image processing tasks such as image enhancement and thresholding.

Some examples of arithmetical functions in OpenCV include:

  • cv2.add(): Adds two images together element-wise.
  • cv2.subtract(): Subtracts one image from another element-wise.
  • cv2.multiply(): Multiplies two images together element-wise.
  • cv2.divide(): Divides one image by another element-wise.
  • cv2.addWeighted(): Performs a weighted sum of two images.
  • cv2.absdiff(): Computes the absolute difference between two images element-wise.

Note

Each of these functions perform element-wise operations.

Завдання
test

Swipe to show code editor

  1. Read two images: Store "image1.jpg" in the variable image1 and "image2.jpg" in the variable image2.
  2. Perform a weighted sum of these two images, with image1 as the first input.
  3. Display the resulting image.

Mark tasks as Completed
Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 1. Розділ 4
AVAILABLE TO ULTIMATE ONLY
We're sorry to hear that something went wrong. What happened?
some-alt