Logo Lanfrica

kevin-mm16/10983384_LAB_WORKS

Créateur:
kev
Hôte:
Computer Vision Lab Work for DCIT 412 (University of Ghana) # DCIT 412 – Computer Vision Lab Work This repository contains my lab assignments for **DCIT 412 (Computer Vision)** at the University of Ghana. The repository has been created and organized according to the requirements provided in the lab brief. It is named using my student ID (**10983384_LAB_WORKS**), the default branch has been renamed to my surname (**Lamptey**), and the tasks are placed in separate subdirectories (Task1, Task2, Task3) to maintain clarity and structure. The work is divided into three main tasks: The first task covers **image loading and grayscale conversion**. A Python script was written using OpenCV to load an image, convert it into grayscale, display both the original and grayscale versions, and then save the grayscale result as `photo_gray.jpg`. This task introduces the basics of handling images in code and working with pixel intensity transformations. The second task focuses on **color space conversion and histogram analysis**. The same input image is converted into three different formats: Grayscale, HSV (Hue, Saturation, Value), and LAB (Lightness and color channels A and B). Each version is displayed and saved with appropriate filenames. In addition, the histogram of the grayscale image is plotted using Matplotlib to show the distribution of pixel intensity values. This step demonstrates how different color models and histograms are useful for analyzing image contrast, brightness, and color information. The third task is a **binary thresholding exercise**. The question asks what happens when a grayscale pixel with value 180 is compared against a threshold of 150, with the rule that values below the threshold are set to 0 and values above the threshold are set to 255. Since 180 is greater than 150, the resulting pixel value is **255**. This illustrates how thresholding can simplify images by reducing them to two levels, which is often a useful preprocessing technique in computer vision. ### How to Run the Code All scripts were writt …