In order to load the image into octave, use ‘imread’ function. For example-
>> I = imread('Desktop/a.jpg'); >> imshow(I);
imshow(I) will display the image. You can also use image() instead of imshow().
>> I // To display image matrix >> whos I; // To display basic information about image
It will display the following-
Variable in the current scope:-
Attr Name Size Bytes Class
I 604x604x3 1094448 uint8
Total is 1094448 elements using 1094448 bytes.
New octave is similar to MATLAB. It provides GUI and in workspace you can see the properties of image, you just added.
You can also pass address of the image as an argument to imread function.
>> filename = ('path'); >> A = imread(filename); >> image(A);
In order to read the meta data of an image, use function imfinfo().
>> info = imfinfo(filename);
This will display the complete data about the image as given below:
scalar structure containing the fields:-
filename = a
File Size =
In order to get pixel’s intensity value at any particular point of u and v coordinate, use the following:
>> A(131,154); ans = 4