Found 10784 Articles for Python

Histogram in pygal

Priya Mishra
Updated on 31-May-2023 15:33:05

145 Views

 Pygal is a Python library that is used for creating interactive charts and graphs, one of the charts that Pygal supports is the histogram. Histogram is basically a graphical representation of the distribution of numerical data which helps us to quickly identify patterns, outliers, and trends in a dataset provided. In this article, we will be discussing the basics of histograms and how to create a histogram in Pygal, including the customization of charts and adding data to them. What is a Histogram? A histogram is a graphical representation of the distribution of the dataset. It mainly displays the frequency ... Read More

Appending a dictionary to a list in Python

Priya Mishra
Updated on 31-May-2023 15:27:56

3K+ Views

Dictionaries allows us to store key-value pairs, while lists allow you to store multiple values in a single variable and one common task is to append a dictionary to a list, which can be useful for storing multiple dictionaries in a single list. In this article, we will explore how to append a dictionary to a list in Python using different methods. We will provide examples and step-by-step instructions on how to do this. Introduction Python provides a wide variety of built-in data structures, which makes programming simple and effective. In contrast to other data structures, each of these Python ... Read More

Animated Floating Action Button in kivy

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

341 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

433 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

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

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

575 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

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 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

682 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

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

Advertisements