- 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
Shahid Akhtar Khan has Published 216 Articles
Shahid Akhtar Khan
2K+ Views
Using the Sobel operator, we can compute image gradients in horizontal as well as vertical direction. The gradients are computed for a grayscale image. The Laplacian operator computes the gradients using the second-order derivatives. Syntax The following syntaxes are used to compute the image gradients using Sobel and Laplacian derivatives ... Read More
Shahid Akhtar Khan
619 Views
The morphological gradient is computed as the difference between the dilation and erosion of an image. We use cv2.morphologyEx() method to compute the morphological gradients. Morphological gradient is used in segmentation, edge detection and to find the outline of an object. Syntax Here is the syntax used for this method ... Read More
Shahid Akhtar Khan
2K+ Views
In this tutorial, we will see how to apply two different low-pass filters to smooth (remove noise from) the image. The two filters are filter2D and boxFilter. These filters are 2D filters in space. Applying 2D filters to images is also known as the "2D Convolution operation". These filters are ... Read More
Shahid Akhtar Khan
5K+ Views
In Perspective Transformation, the straight lines remain straight even after the transformation. To apply a perspective transformation, we need a 3×3 perspective transformation matrix. We need four points on the input image and corresponding four points on the output image. We apply the cv2.getPerspectiveTransform() method to find the transformation matrix. ... Read More
Shahid Akhtar Khan
3K+ Views
A color (RGB) image has three channels, Red, Blue and Green. A colored image in OpenCV has a shape in [H, W, C] format, where H, W, and C are image height, width and number of channels. All three channels have a value range between 0 and 255. An HLS ... Read More
Shahid Akhtar Khan
2K+ Views
OpenCV provides the function cv2.arrowedLine() to draw an arrowed line on an image. This function takes different arguments to draw the line. See the syntax below. cv2.arrowedLine(img, start, end, color, thickness, line_type, shift, tip_length) img − The input image on which the line is to be drawn. Start ... Read More
Shahid Akhtar Khan
3K+ Views
In Affine Transformation, all parallel lines in the original image will still be parallel in the output image. To apply affine transformation on an image, we need three points on the input image and corresponding point on the output image. So first, we define these points and pass to the ... Read More
Shahid Akhtar Khan
2K+ Views
A very important application of bitwise AND operation in computer vision or image processing is for creating masks of the image. We can also use the operator to add watermarks to an image. The pixel values of an image are represented as a numpy ndarray. The pixel values are stored ... Read More
Shahid Akhtar Khan
934 Views
To compute the histogram in OpenCV, we use the cv2.calcHist() function. In this tutorial, we will show how to compute the histogram for different colors (Blue, Green, and Red) of the input image. To compute and plot the histograms of different colors of an image, one could follow the steps ... Read More
Shahid Akhtar Khan
2K+ Views
To perform image rotation by an angle, we first need to get the rotation matrix. To find the rotation matrix, we apply cv2.getRotationMatrix2D() function. The syntax for this function is − M = cv2.getRotationMatrix2D(cr, degree, scale) Where cr is the center of rotation, degree is the angle by which ... Read More
To Continue Learning Please Login
Login with Google