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

CSC566 Lab1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

CSC566 Lab1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

UNIVERSITI TEKNOLOGI MARA

SEMESTER : MARCH 2024 – JULY 2024


COURSE : IMAGE PROCESSING
COURSE CODE : CSC 566
LAB LESSON : LAB 1

Group Name: CS2536B

Name: SITI SARAH NAZIRAH BINTI MAT RAHIM

Student ID: 2021856396

Lecturer Name: DR RASEEDA HAMZAH


SEMESTER MARCH 2024
CSC566: IMAGE PROCESSING

Instructions

1. Please use the project cover sheet as provided.


2. This is an individual lab assignment and exercise.
3. Please submit via group GOOGLE CLASSROOM (LAB)
4. General format:
a. Font: Arial (for Question) and Courier New (for source code)
b. Font size : 12
c. Spacing: 1.15 (for Question) and 1.0 (source code)
d. Output: attach output as an image (ie. .jpg or .png etc)

5. Special remarks:
a. Any copied project (with NO EXCEPTION) will be given 0 (zero) mark.
SEMESTER MARCH 2024
CSC566: IMAGE PROCESSING

Question 1
Create a vector of 5 odd numbers starting from 11.

Source Code
X = [11:2:19] % Question 1

Output

CSC 566/FSKM UiTM 3


SEMESTER MARCH 2024
CSC566: IMAGE PROCESSING

Question 2
Create a vector of negative numbers of -1 to -100.

Source Code
y = [-1:-1:100] % Question 2

Output

CSC 566/FSKM UiTM 4


SEMESTER MARCH 2024
CSC566: IMAGE PROCESSING

Question 3
Read an RGB image and display the file information.

Source Code
% Question 3% Read the RGB image
rgb_image = imread('cutebear.png');
% Get information about the image file
image_info = imfinfo('cutebear.png');
%Display the file information
disp('Image Information:');
disp(image_info);

Output

CSC 566/FSKM UiTM 5


SEMESTER MARCH 2024
CSC566: IMAGE PROCESSING

Question 4
Read an RGB image and display the file information.

Source Code
% Question 4
>> % Convert RGB to grayscale
>> gray_image = rgb2gray(rgb_image);
>> % Save the grayscale image
>> imwrite(gray_image, 'grayscale_cutebear.png');

Output

Before gray scale

After gray scale

CSC 566/FSKM UiTM 6

You might also like