Found 10476 Articles for Python

Animated Floating Action Button in kivy

Priya Mishra
Updated on 31-May-2023 15:24:19

526 Views

In kivy, one of the most popular UI components in modern mobile is the Floating action button(FAB), which is used to represent the primary action of the applications. Kivy is an open-source Python framework that is used fr creating cross-platform user inerfaces. In this article, we will discuss how to create an animated floating action button in Kivy. What is a floating Action button in Kivy? The floating action button is a circular button that is typically placed in the bottom-right corner of the Kivy screen. It is mainly used to represent the primary action of the application and provides ... Read More

OpenCV Python Program to analyze an image using Histogram

Gireesha Devara
Updated on 31-May-2023 15:18:14

728 Views

A histogram is a graphical representation showing how the pixel intensities (ranging from 0 to 255) are distributed in an image. For a digital image histogram plots a graph between pixel intensity versus the number of pixels. The x-axis has intensity variations, and the y-axis indicates the number of pixels in that particular intensity. We can see the images and its histograms. By simply looking at the histogram of an image, we can get basic idea about contrast, brightness, intensity distribution etc of that image. In this article, we will write a python program using the OpenCV module ... Read More

Negative transformation of an image using Python and OpenCV

Gireesha Devara
Updated on 31-May-2023 15:14:42

3K+ Views

An image with reversed brightness is referred a negative image, in which the light parts of the image appear dark and the darker parts appear lighter. The negative transformation of a colored image (RGB image) will be reversed, with red areas appearing cyan, greens appearing magenta, and blues appearing yellow. In Medical Imaging, Remote Sensing, and some other applications negative transformation is widely used. It also helps to find the details from the darker regions of the image. The negative transformation function is − As we know that an 8-bit image has a max intensity value is 255, therefore ... Read More

Get video duration using OpenCV Python

Gireesha Devara
Updated on 31-May-2023 15:09:07

7K+ 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 get the duration of a video using the python OpenCV module. The OpenCV provides a VideoCapture.get() method to get the specified property of a video by passing one of the ... Read More

Draw a triangle with centroid using OpenCV

Gireesha Devara
Updated on 31-May-2023 14:50:29

1K+ Views

The centroid is also called the geometric center; it is defined as the center point of the object. Whereas the centroid of a triangle is defined as the point of intersection of all three medians of a triangle. Calculating the Centroid of a triangle: Let’s consider an ABC triangle, the three vertices of the triangle are A(x1, y1), B(x2, y2), and C(x3, y3). Then the centroid of a triangle can be calculated by taking the average of the x and y coordinates of all three vertices. centroid of a triangle = ((x1+x2+x3)/3 , (y1+y2+y3)/3 ) In ... Read More

Drawing a cross on an image with OpenCV

Gireesha Devara
Updated on 30-May-2023 17:28:00

3K+ 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 a cross on an image using OpenCV Python. Let’s observe the input-output scenario to understand how to draw a cross on an image. Input Output Scenarios Assuming we have ... Read More

Draw Multiple Rectangles in Image using OpenCV Python

Gireesha Devara
Updated on 30-May-2023 16:31:22

1K+ 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 multiple rectangles in an image using OpenCV Python. To draw the rectangular shape on an image, Python OpenCV module provides a method called cv2.rectangle(). The cv2.rectangle() function The ... Read More

Removing Black Background and Make Transparent using OpenCV Python

Gireesha Devara
Updated on 30-May-2023 16:25:57

3K+ Views

In digital images, Transparency is the functionality that supports transparent areas in an image or image layer. For image processing/image editing, background removing is allowing us to highlight the subject of the photo and create a transparent background to place the subject into various new designs and destinations. Certain image formats do not support transparency, for example, TIFF, PNG, and WebP graphics formats support transparency, whereas JPEGs have none. In this article, we will see how to remove the black background from an image to make it transparent using OpenCV Python. Like RGB channels, the alpha channel is used to ... Read More

Draw a rectangular shape and extract objects using Python's OpenCV

Gireesha Devara
Updated on 30-May-2023 16:21:35

1K+ 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

Display date and time in videos using OpenCV Python

Gireesha Devara
Updated on 30-May-2023 16:10:44

1K+ 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

Advertisements