Connect me - https://www.linkedin.com/in/piyushdwivedi-/
Email Address- [email protected]
2023-03-30.19-22-44.mp4
Image/video I/O, processing, display (core, imgproc, highgui)
Object/feature detection (objdetect, features2d, nonfree)
Geometry-based monocular or stereo computer vision (calib3d, stitching, videostab)
An array object of arbitrary homogeneous items
Fast mathematical operations over arrays
Linear Algebra, Fourier Transforms, Random Number Generation
Plotting library
data visualization and graphical plotting library for Python
its numerical extension NumPy
Image processing
Histogram of Oriented Gradients
In this Porject i make a plot of the Histogram of Oriented Gradients (HOG) feature descriptor with visualization of the HOG feature vector, also i make a plot of the HOG feature vector for a given image.
- hog() : This function is used to compute the Histogram of Oriented Gradients (HOG) feature descriptor with visualization of the HOG feature vector.
- imread() : This function is used to read an image from the specified file.
- imshow() : This function is used to display an image in a window.
- waitKey() : This function is used to wait for a key event infinitely or for delay milliseconds, when it is positive.
- cvtColor() : This function is used to convert an image from one color space to another.
- resize() : This function is used to resize an image.
- cv2.imwrite() : This function is used to save an image to a specified file.
- cv2.destroyAllWindows() : This function is used to destroy all of the HighGUI windows.
- First we import the required libraries.
- Then we read the image using imread() function.
- Then we convert the image into gray scale using cvtColor() function.
- Then we resize the image using resize() function.
- Then we compute the Histogram of Oriented Gradients (HOG) feature descriptor with visualization of the HOG feature vector using hog() function.
- Then we display the image using imshow() function.
- Then we save the image using imwrite() function.
- Then we destroy all the windows using destroyAllWindows() function.
- Original Image
- HOG feature vector
- HOG feature vector with visualization
- Resized Image
- Resized HOG feature vector
- Resized HOG feature vector with visualization
- Gray Scale of Image
- Masking of Image
- Bit_Masking of Image
- Bit_Masking of Image with visualization
- Image Scaling
- Image Scaling with visualization
- Image Rotation
- Image Rotation with visualization
- Image blurring
- Image blurring with visualization
- Image sharpening
- Image sharpening with visualization
- Image Edge Detection
- Image Edge Detection with visualization
Definition-Edge detection is a fundamental tool in image processing and computer vision, used for a wide variety of applications, such as image segmentation and object detection.
Definition-Canny edge detection is a multi-stage algorithm that uses a filter based on the derivative of a Gaussian in order to compute the intensity of the gradients. The Gaussian reduces the effect of noise present in the image. Then, potential edges are thinned down to 1-pixel curves by removing non-maximum pixels of the gradient magnitude. Finally, edge pixels are kept or removed using hysteresis thresholding on the gradient magnitude.
Definition-Sobel edge detection is a gradient-based edge detection operator that uses a multi-stage algorithm to detect a wide range of edges in images. It calculates an approximation of the gradient of the image intensity function. The Sobel operator uses a 3ร3 kernel that is convolved with the original image to calculate approximations of the derivatives. The Sobel operator is based on convolving the image with a small, separable, and integer-valued filter in the horizontal and vertical directions to compute first-order derivatives. The magnitude of the gradient is then computed as the vector norm of the two derivatives. The gradient direction is then approximated by computing the arctangent of the quotient of the two derivatives.