Computer Vision
Computer Vision
• Let us take individual patches into account at once and then check the
exact location of those patches.
• For Patch A and B: The patch A and B are flat surfaces in the image and are
spread over a lot of area. They can be present at any location in a given
area in the image.
• For Patch C and D: The patches C and D are simpler as compared to A and
B. They are edges of a building and we can find an approximate location of
these patches but finding the exact location is still difficult. This is because
the pattern is the same everywhere along the edge.
• For Patch E and F: The patches E and F are the easiest to find in the image.
The reason being that E and F are some corners of the building. This is
because at the corners, wherever we move this patch it will look different.
• Conclusion
• In image processing, we can get a lot of features from the image. It can be
either a blob, an edge or a corner. These features help us to perform
various tasks and then get the analysis done on the basis of the application.
Now the question that arises is which of the following are good features to
be used?
• As you saw in the previous activity, the features having the corners are easy
to find as they can be found only at a particular location in the image,
whereas the edges which are spread over a line or an edge look the same
all along. This tells us that the corners are always good features to extract
from an image followed by the edges.
• Let’s look at another example to understand this. Consider the images
given below and apply the concept of good features for the following.
• In the above image how would we determine the exact location of
each patch?
• The blue patch is a flat area and difficult to find and track. Wherever
you move the blue patch it looks the same. The black patch has an
edge. Moved along the edge (parallel to edge), it looks the same. The
red patch is a corner. Wherever you move the patch, it looks different,
therefore it is unique. Hence, corners are considered to be good
features in an image.
Introduction to OpenCV
• Now that we have learnt about image features and its importance in
image processing, we will learn about a tool we can use to extract
these features from our image for further processing.
• OpenCV or Open Source Computer Vision Library is that tool which
helps a computer extract these features from the images. It is used
for all kinds of images and video processing and analysis. It is capable
of processing images and videos to identify objects, faces, or even
handwriting.
• In this chapter we will use OpenCV for basic image processing
operations on images such as resizing, cropping and many more.
• To install OpenCV library, open anaconda prompt and then write the
following command:
• pip install opencv-python
• Now let us take a deep dive on the various functions of OpenCV to
understand the various image processing techniques. Head to Jupyter
Notebook for introduction to OpenCV given on this link:
http://bit.ly/cv_notebook