- 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
5K+ Views
There are different types of muse events such as left or right button click, mouse move, left button double click etc. A mouse event returns the coordinates (x, y) of the mouse event. To perform an action when an event happens we define a mouse callback function. We use ... Read More
Shahid Akhtar Khan
15K+ Views
In OpenCV, an image can be flipped using the function cv2.flip(). Using this function we can flip the image across X-axis, Y-axis and across both axes. It accepts a flag flipCode as an argument to flip the image across the axis. If the flipCode is set to 0, the ... Read More
Shahid Akhtar Khan
13K+ Views
To access a single pixel value in an image we can use indexing the same as we do to NumPy array indexing. We can use slicing to access a sequence of pixel values. To modify the pixel values we use the simple Python assignment operator ("="). Steps To access ... Read More
Shahid Akhtar Khan
7K+ Views
A color image consists of three color channels- Red, Green and Blue. These color channels can be split using cv2.split() function. Let's look at the steps to split an image into different color channels- Import the required library. In all the following examples, the required Python library is ... Read More
Shahid Akhtar Khan
241 Views
We can perform SQRBox Filter operation on an image using cv2.sqrBoxFilter(). It calculates the normalized sum of squares of the pixel values overlapping the filter. We use the following syntax for this method − cv2.sqrBoxFilter(img, ddepth, ksize, borderType) where, img is the input image, ddepth is the output image ... Read More
Shahid Akhtar Khan
1K+ Views
OpenCV provides the function cv2.copyMakeBorder() to add borders in images. To add border in an image, you could follow the steps given below − The first step is to import required libraries. In all below Python examples the required Python library is OpenCV. Make sure you have already installed ... Read More
Shahid Akhtar Khan
2K+ Views
To find and draw the extreme points of an object in the input image, we could follow the steps given below − The first step is to import required libraries. In all below Python examples the required Python library is OpenCV. Make sure you have already installed it. ... Read More
Shahid Akhtar Khan
2K+ Views
There are different types of muse events such as left or right button click, mouse move, left button double click etc. OpenCV provides us with different types of mouse events such as cv2.EVENT_LBUTTONDOWN for mouse left button down, cv2.EVENT_RBUTTONDOWN for right button down, cv2.EVENT_LBUTTONDBLCLK for left button double click and ... Read More
Shahid Akhtar Khan
5K+ Views
The function cv2.approxPolyDP() approximates a contour shape to another shape with less number of vertices. It accepts the following arguments − cnt − The array of the contour points. epsilon − Maximum distance from contour to approximated contour. A wise selection of epsilon is needed to get the correct ... Read More
Shahid Akhtar Khan
11K+ Views
The contours of the objects in an image are very helpful to compute the area and perimeter of the image. A contour of an image is a curve joining all the continuous points along the boundary, having the same color or intensity. Contours are used for shape analysis and object ... Read More