0% found this document useful (0 votes)
9 views

Computer Vision Lab 1

The document outlines a Python Basic Assignment for a Computer Vision lab, which includes tasks such as displaying a greeting, checking even or odd numbers, printing a range of numbers, defining a sum function, and manipulating arrays. Additionally, it includes OpenCV tasks like reading, displaying, resizing, and modifying images, as well as combining two images side by side. These exercises aim to enhance programming skills in Python and image processing using OpenCV.

Uploaded by

mouryapsv
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Computer Vision Lab 1

The document outlines a Python Basic Assignment for a Computer Vision lab, which includes tasks such as displaying a greeting, checking even or odd numbers, printing a range of numbers, defining a sum function, and manipulating arrays. Additionally, it includes OpenCV tasks like reading, displaying, resizing, and modifying images, as well as combining two images side by side. These exercises aim to enhance programming skills in Python and image processing using OpenCV.

Uploaded by

mouryapsv
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Computer Vision lab 1

Python Basic Assignment


1. Write a Python program to display "Hello, World!" on the screen.
2. Create a Python script that takes a user input and prints "Even" if the input is an even
number, and "Odd" if it's an odd number.
3. Write a Python program using a for loop to print the numbers from 1 to 10.
4. Define a function in Python that takes two parameters (a and b) and returns the sum of
them.
5. Create a Python script that initializes an array with 5 elements and then prints each element
on a new line.

1. Write a Python program using OpenCV to read an image from a file, display it, and then
save it with a different filename. Also resize the image to half of its original dimensions
before saving.
2. Write a Python code that changes the colour value of the first 100X100 pixels of an
image to black (0,0,0).
3. Write a program to combine two images side by side and display them using OpenCV.

You might also like