- 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
Shifting the image location in a particular direction is referred to as Image Translation. To perform image translation, we should first understand what is a translation matrix and how to define it using OpenCV and NumPy. If we want to make a translation in (x, y) direction, let it be ... Read More
Shahid Akhtar Khan
3K+ Views
Otsu’s thresholding is a kind of thresholding technique. There are other types of thresholding techniques such as simple thresholding and adaptive thresholding. The simple thresholding technique uses a global threshold value while the adaptive thresholding technique uses different threshold values for different regions. Otsu’s thresholding technique uses a global threshold ... Read More
Shahid Akhtar Khan
1K+ Views
Adaptive thresholding is a kind of thresholding technique. There are other types of thresholding techniques such as simple thresholding that uses a global threshold value. But using a global threshold value is not a good idea for an image having different lighting conditions in different areas. Adaptive thresholding calculates the ... Read More
Shahid Akhtar Khan
698 Views
In simple thresholding, we define a threshold value and if a pixel value is greater than a threshold value, it is assigned a value (say 255), else it is assigned another value (say 0). A simple thresholding can be applied using the function cv2.threshold(). It accepts four arguments− the source ... Read More
Shahid Akhtar Khan
3K+ Views
An image in OpenCV is a NumPy array. We can access the image properties using the attributes of the numpy array. We access the following image properties for the input image img − Image Type − data structure of the mage. Image in OpenCV is numpy.ndarray. We can access ... Read More
Shahid Akhtar Khan
11K+ Views
To find the HSV values of a color, we can use color space conversion from BGR to HSV. First we define the color value in BGR format as numpy.ndarray and then convert it to HSV space. We can also find the lower and upper limits of HSV value as [H-10, ... Read More
Shahid Akhtar Khan
1K+ Views
To create trackbars as the HSV (Hue, Saturation and Value) color palette in OpenCV, we apply two different functions. These functions are cv2.reateTrackbar() and cv2.getTrackbarPos() The cv2.reateTrackbar() function is used to create a trackbar, while cv2.getTrackbarPos() function is used to access the value of the selected trackbar position. Using ... Read More
Shahid Akhtar Khan
1K+ Views
In OpenCV, a trackbar can be created using cv2.reateTrackbar() function. To access the value of the selected trackbar position, we use cv2.getTrackbarPos() function. Using these two functions, we create a window that contains the trackbars for R, G, B colors and a color window to display the selected color. By ... Read More
Shahid Akhtar Khan
18K+ Views
An RGB (colored) 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. The HSV ... Read More
Shahid Akhtar Khan
17K+ Views
To create a black image, we could use the np.zeros() method. It creates a numpy n-dimensional array of given size with all elements as 0. As all elements are zero, when we display it using cv2.imshow() or plt.imshow() functions, it displays a balck image. To create a white image, we ... Read More
To Continue Learning Please Login
Login with Google