0% found this document useful (0 votes)
13 views10 pages

Computer Vision Lab 3 Manual

The Computer Vision Lab 3 Manual provides an overview of image processing tasks using the OpenCV library, including basic operations, advanced tasks, and cloud operations. It outlines specific lab tasks such as capturing video, cropping images, and implementing gamma correction, as well as a home task on image blending. The manual concludes by summarizing the skills learned, which serve as a foundation for advanced projects in image processing and computer vision.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views10 pages

Computer Vision Lab 3 Manual

The Computer Vision Lab 3 Manual provides an overview of image processing tasks using the OpenCV library, including basic operations, advanced tasks, and cloud operations. It outlines specific lab tasks such as capturing video, cropping images, and implementing gamma correction, as well as a home task on image blending. The manual concludes by summarizing the skills learned, which serve as a foundation for advanced projects in image processing and computer vision.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Computer Vision Lab 3 Manual

Image Processing

Objectives
In this lab, you will learn how to perform a variety of image processing and
computer vision tasks using the OpenCV library. These tasks include:
 Basic Image Operations: Displaying, cropping, flipping, and rotating
images.
 Advanced Tasks: Image segmentation, classification, restoration,
recognition, and generation.
 Cloud Operations: Storing, transmitting, and gathering images from the
internet.
Python is an excellent choice for these tasks because it offers many image
processing, computer vision, and artificial intelligence libraries. Additionally,
Python’s ecosystem includes robust libraries for handling files in the cloud.
A digital image is simply a file on your computer. In this lab, you will gain an
understanding of these files and learn how to manipulate them with popular
libraries.
Topics Covered:
 OpenCV: Basic functions, crop & resize, shape & text.
 Blending and overlaying images using arithmetic operations.
Lab Tasks:

1. Apply Webcam Code on Your Laptop:


o Capture a live video stream using OpenCV.
o Display the video feed in a window.
2. Cut the Image in Half by using slicing:
o Capture an image using the webcam or load an image from your
computer.
o Split the image into two halves (left and right or top and bottom).
o Display the cropped half.
3. Crop Image Based on Drawn Rectangle:
o Allow the user to draw a rectangle on the image using the mouse.
o Crop the image to keep only the part inside the rectangle.
o Display the cropped region separately.
4. What is Gamma Correction?
o Briefly explain gamma correction and its importance in image
processing.
o Implement gamma correction using OpenCV.
5. Effect of Changing Alpha & Beta:
o Modify the brightness and contrast of an image by adjusting alpha
(contrast) and beta (brightness) values.
o Use different values like (0.5, 0.5) and observe the results.
6. Extract and Display Each Color Channel Separately:
o Convert an image into its three color channels: Red, Green, and
Blue.
o Display each channel separately as a grayscale image.

Home Task:

🔹 Can we blend three images? If yes, how?

 Research and explain the concept of image blending.


 Try implementing a method to blend three images using OpenCV.
 Experiment with different weight values for blending.

Additional Resources
For further reading and help with these tasks, consider exploring these links:
1. OpenCV: Apply Mask to a Color Image
2. Overlay a Smaller Image on a Larger Image in OpenCV
3. OpenCV Tutorial on Image Arithmetics
Notebook References
1. Resizing and Shapes Notebook
2. Blending and Pasting Images Notebook
Conclusion
In this lab, you explored a variety of essential computer vision tasks using the
OpenCV library. You learned how to:
 Download and display images.
 Capture video from a webcam.
 Apply basic image processing functions such as grayscale conversion,
Gaussian blur, and edge detection.
 Crop, resize, and manipulate images by adding shapes and text.
 Blend and overlay images using both arithmetic operations and masking
techniques.
These skills form the foundation for more advanced image processing and computer
vision projects. Happy coding!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy