Image for post
Image for post

Do you know you can also change or get the capturing device (inbuilt camera, video, or webcam feed) properties while using it? Yes, it is as easy as getting shape and resizing the image array.

In this OpenCV python tutorial part, we will explore those methods, and see how we can use them, and debug if we encounter any issues.

Didn’t read the previous parts? Check out those parts so that you can get familiar with and understand every method efficiently.

  1. OpenCV Python Tutorial for Beginners Part 3
  2. OpenCV Python Tutorial for Beginners Part 2
  3. OpenCV Python Tutorial for Beginners…

Image for post
Image for post

Welcome to OpenCV Python Beginners Tutorial Part 3.

In case if you missed reading the Second tutorial of OpenCV python, then it is recommended to read the second part at OpenCV Python Tutorial Part 2.

In our last tutorial, we covered some basics tasks like:

  1. Get Image / Video Frame Size & Shape
  2. Resize the Image
  3. Create Blank Black/White Image using numpy
  4. How to Add Two Images together using the Add function
  5. How to add two together using the cv2.addWeighted method

Now, In this tutorial, we will begin the article from where we left off.

Note: In this tutorial, We…


Image for post
Image for post

Welcome to OpenCV Python Beginners Tutorial Part 2.

In case you have not read the first part of the OpenCV tutorial Series, then click here to visit First Part of OpenCV tutorial Series.

As you know, we covered some basics & 4basics tasks of OpenCV Python in our first tutorial.

Now, In this tutorial, we will begin the article from where we left off.

Let’s get started:

Task 5. Get Image / Video Frame Size & Shape

Code:

image = cv2.imread("victory.png", cv2.IMREAD_COLOR)
print(image.shape) #to print the shape of an image
print(image.size) #to display the size of an image

Let’s understand the code:

image = cv2.imread("victory.png", cv2.IMREAD_COLOR)

In the First Line


Image for post
Image for post

Computer vision is a broad area of study where we program/code computers to do computer vision-related tasks.

In short, we can say that with the help of computer vision, we can teach computers to do visual tasks, like Face recognition, Image blurring, Autonomous driving, Changing a person’s face to another person face (Deep Fake), and a lot’s more.

There are many libraries out therefor computer vision-related tasks, but we mainly focus on the OpenCV (Open Source) library and python programming.

Instead of Math’s behind the functions, this article focuses on the practical approach.

Before deep-diving into the OpenCV tutorial, let’s learn some basic first

  1. Computer vision mainly deals with digital images…

Himanshu kanojiya

Computer Vision Enthusiast/Programmer & BCA Student

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store