CSC566 Lab1
CSC566 Lab1
Instructions
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
Question 2
Create a vector of negative numbers of -1 to -100.
Source Code
y = [-1:-1:100] % Question 2
Output
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
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