- 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
3K+ Views
ORB (Oriented FAST and Rotated BRIEF) is a fusion of FAST keypoint detector and BRIEF descriptors with many changes to enhance the performance. To implement ORB feature detector and descriptors, you could follow the steps given below Import the required libraries OpenCV and NumPy. Make sure you have ... Read More
Shahid Akhtar Khan
2K+ Views
FAST (Features from Accelerated Segment Test) is a high speed corner detection algorithm. We use the FAST algorithm to detect features in the image. We first create a FAST object with cv2.FastFeatureDetector_create(). Then detect the feature points using fast.detect() where fast is the created FAST object. To draw featurepoints, we ... Read More
Shahid Akhtar Khan
4K+ Views
SIFT (Scale-Invariant Feature Transform ) is scale invariant feature descriptor. It detects keypoints in the image and computes its descriptors. We first create a SIFT object with cv2.SIFT_create(). Then detect the keypoints using sift.detect() where sift is the created SIFT object. To draw keypoints, we use cv2.drawKeypoints(). Steps To ... Read More
Shahid Akhtar Khan
4K+ Views
The cv2.transform() function performs the matrix transformation of each element of the input array. We could apply this transformation directly on the image as the images are NumPy ndarrays in OpenCV. To use this function, we should first define a transformation matrix m. The number of channels in the output ... Read More
Shahid Akhtar Khan
831 Views
We can blend the images using the Gaussian and Laplacian image pyramids. The Gaussian pyramid is a type of image pyramid. To create a Gaussian pyramid, OpenCV provides us two functions cv2.pyrDown() and cv2.pyrUp(). We can form the Laplacian Pyramids from the Gaussian pyramids. In Laplacian pyramid images look like ... Read More
Shahid Akhtar Khan
2K+ Views
We apply the cv2.grabCut() method to extract the foreground in an image. For detailed approach please follow the steps given below − Import the required libraries OpenCV and NumPy. Make sure you have already installed them Read the input image using cv2.imread() method. Specify the full image path. Define ... Read More
Shahid Akhtar Khan
5K+ Views
We apply cv2.dct() to find the discrete cosine transform of an image. This function transforms the grayscale image of dtype float32. It accepts two types of flag cv2.DCT_INVERSE or cv2.DCT_ROWS. To convert the transformed image to the original image we use cv2.idct(). Steps To find discrete cosine transform of an ... Read More
Shahid Akhtar Khan
752 Views
The Shi-Tomasi Corner Detector is an enhanced algorithm of the Harris Corner Detector. To implement the Shi-Tomasi corner detector, OpenCV provides us with the function, cv2.goodFeaturesToTrack(). It detects N strongest corners in the image. Steps To detect corners in an image using Shi-Tomasi corner detector, you could follow the steps ... Read More
Shahid Akhtar Khan
3K+ Views
In OpenCV, the Harris corner detector is implemented using the function cv2.cornerHarris(). It accepts four arguments: img, blockSize, ksize, and k. Where img is the input image in grayscale and of float32 dtype, blockSize is the size of neighborhood considered for corner detection, ksize is Aperture parameter of Sobel derivative ... Read More
Shahid Akhtar Khan
4K+ Views
The histograms of two images can be compared using cv2.compareHist() function. The cv2.compareHist() function accepts three input arguments- hist1, hist2, and compare_method. The hist1 and hist2 are histograms of the two input images and compare_method is a metric to compute the matching between the histograms. It returns a numerical parameter ... Read More