Edge Detection
The process of image detection involves detecting sharp edges in the image. This edge detection is essential in the context of image recognition or object localization/detection. There are several algorithms for detecting edges due to its wide applicability. We’ll be using one such algorithm known as Canny Edge Detection.
Example: Python OpenCV Canny Edge Detection
Python3
import cv2 FILE_NAME = 'geeks.png' # Read image from disk. img = cv2.imread(FILE_NAME) # Canny edge detection. edges = cv2.Canny(img, 100 , 200 ) # Write image back to disk. cv2.imshow( 'Edges' , edges) cv2.waitKey( 0 ) cv2.destroyAllWindows() |
Output:
For more information on Python OpenCV refer to our Python OpenCV Tutorial.
Essential OpenCV Functions to Get Started into Computer Vision
Computer vision is a process by which we can understand the images and videos how they are stored and how we can manipulate and retrieve data from them. Computer Vision is the base or mostly used for Artificial Intelligence. Computer-Vision is playing a major role in self-driving cars, robotics as well as in photo correction apps.
OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems. By using it, one can process images and videos to identify objects, faces, or even handwriting of a human. When it is integrated with various libraries, such as NumPy, python is capable of processing the OpenCV array structure for analysis. To Identify image patterns and their various features we use vector space and perform mathematical operations on these features.
In this article, we will discuss some commonly used functions in OpenCV along with their applications.
Note: The functions used in this article are common for different languages supported by OpenCV.