- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10784 Articles for Python
![Gireesha Devara](https://www.tutorialspoint.com/assets/profiles/397483/profile/60_1063327-1637125522.jpg)
696 Views
OpenCV is an Open Source Computer Vision Library in python. It provides numerous functions to perform various Image and video processing operations. The library uses the Numpy module to represent all the video frames and images as a ndarray type. It needs the numpy library, we need to make sure that the numpy module is also installed in our python interpreter. In this article, we will see different ways to draw rectangular shapes and extract the object using python OpenCV. Drawing a Rectangle To draw the rectangular shape on an image, Python OpenCV module provides a method called cv2.rectangle(). This ... Read More
![Gireesha Devara](https://www.tutorialspoint.com/assets/profiles/397483/profile/60_1063327-1637125522.jpg)
904 Views
OpenCV is an Open Source Computer Vision Library in python. It provides numerous functions to perform various Image and video processing operations. The library uses the python Numpy module to represent all the video or image arrays as a ndarray type. It needs the numpy library, we need to make sure that the numpy module is also installed in our python interpreter. Displaying date and time in videos using OpenCV In live streaming/video processing applications sometimes we need to display the date and time on videos. To achieve this, we can use the python datetime module. The python datetime ... Read More
![Gireesha Devara](https://www.tutorialspoint.com/assets/profiles/397483/profile/60_1063327-1637125522.jpg)
286 Views
OpenCV is an Open Source Computer Vision Library in python. It provides numerous functions to perform various Image or video processing operations. The library uses the python Numpy module to represent all the video or image arrays as a ndarray type. In this article, we will see click responses on video output using events in the python OpenCV module. To identify which mouse event occurred on the video output. Here we will use the below mouse event − cv2.EVENT_LBUTTONDOWN: indicates the left button is pressed cv2.EVENT_RBUTTONDOWN: indicates the right button is pressed Also, we will use ... Read More
![Gireesha Devara](https://www.tutorialspoint.com/assets/profiles/397483/profile/60_1063327-1637125522.jpg)
1K+ Views
OpenCV is an Open Source Computer Vision Library in python. It provides numerous functions to perform various Image or video processing operations. The library uses the python Numpy module to represent all the video or image arrays as a ndarray type. OpenCV-python needs the numpy library, we need to make sure that the numpy module is also installed in our python interpreter. In this article, we will see how to check if the camera is opened or not using OpenCV Python. Checking if the camera is opened We may not be sure about the status of the camera ... Read More
![Gireesha Devara](https://www.tutorialspoint.com/assets/profiles/397483/profile/60_1063327-1637125522.jpg)
5K+ Views
The Python OpenCV library enables us to utilize a variety of image-processing tools, like image classification, face/object detection, tracking, and more. In this article, we will use python list slicing or numpy array slicing techniques to divide an image into equal parts, since OpenCV-python uses the Numpy array to store the image data/pixel values. Input Output Scenarios Assuming we have an input image and in the output, we will see the equally divide parts of the given image. Approach We will follow the below steps to divide the images into equal parts. Load the image. Extract ... Read More
![Gireesha Devara](https://www.tutorialspoint.com/assets/profiles/397483/profile/60_1063327-1637125522.jpg)
2K+ Views
OpenCV python is one of the image processing libraries in python and it uses the Numpy array to store the image data so that all the image arrays are represented as a ndarray type. The cv2.findContours() method in the python OpenCV module is used for detecting the objects in a binary image. In the article below, we will use this method to detect the White and Black dots (objects) in an image. Following is the syntax of this method – cv2.findContours(image, mode, method[, contours[, hierarchy[, offset]]]) Where, Image is an 8-bit single-channel image (binary image). Contours is ... Read More
![Gireesha Devara](https://www.tutorialspoint.com/assets/profiles/397483/profile/60_1063327-1637125522.jpg)
1K+ Views
Rotating an image is the most basic operation in image editing. The python OpenCV library provides the methods cv2.getRotationMatrix2D(), cv2.rotate() to do this task very easily. The cv2.rotate() will rotate the image in 0 or 90 or 180 or 270 angles only where as Cv2.getRotationMatrix2D() will rotate the image to any specified angle. In the article below, we will rotate the image without cropping or cutting off sides using OpenCV Python. To rotate an image using the cv2.getRotationMatrix2D() method then we need to follow below three steps − First, we need to get the centre of rotation. Next ... Read More
![Gireesha Devara](https://www.tutorialspoint.com/assets/profiles/397483/profile/60_1063327-1637125522.jpg)
1K+ Views
OpenCV is an Open Source Computer Vision Library in python. It is one of the image processing libraries in python and it uses the python Numpy library so that all the image arrays are represented as a ndarray type. OpenCV-python needs the numpy library, we need to make sure that the numpy is also installed in our python interpreter. In this article, we will see the different ways to check if the given image is empty or not using OpenCV Python. Let’s observe the input-output scenarios to understand how to check if the given image is empty or not ... Read More
![Gireesha Devara](https://www.tutorialspoint.com/assets/profiles/397483/profile/60_1063327-1637125522.jpg)
3K+ Views
A standard digital Color image is represented by pixels and each pixel is a combination of primary colors. And a channel is a grayscale image that is made up of only one of its primary colors of a colored image. For example, an RGB image has three channels: red, green, and blue. Observe the below colored images to see how each channel looks separately: Below grayscale images are the representation of each channel of the RGB image. In this article, we will discuss how to split and merge channels of an image using python openCV library. Splitting channels ... Read More
![Gireesha Devara](https://www.tutorialspoint.com/assets/profiles/397483/profile/60_1063327-1637125522.jpg)
1K+ Views
Top Hat and Black Hat Transforms are the Morphological transformations operations on the binary images. Generally, the morphological operations process the image based on the morphology, structure, or shape. Top-hat transform is an operation that opens an image and then subtracts it from the original image (top hat = image - opening). It is used to extract small elements and details from given images which is nothing but feature extraction, image enhancement, and other operations. Whereas the Black Hat Transform operation is nothing but the difference between an image closing and the input image itself (black hat = closing ... Read More