I am doing a mini-project at present in the DSP field.
It is about interpolation of signals in 1-D & 2-D forms.
My task has been accomplished by writing Matlab code & C Code for 1-D & 2-D (binary images).
Now i want it for Black & White, Gray Scale image.
Please tell me how to read a gray scale image using Matlab, i.e., i need the image to be read as a matrix(in matrix form).
Firstly u must look matlab's help tool. u will see that imread function. U can use this function to read an image as matrix form. A = imread('cameraman.tif');
Firstly u must look matlab's help tool. u will see that imread function. U can use this function to read an image as matrix form. A = imread('cameraman.tif');
We were able to interpolate the binary image [manipulate the image matrix for binary image], but weren't able to interpolate color image [RBG]. This is because interpolation of a color image is resulting in a black & white output.
Actually you get the image colored. As you know an image matrix have a three part. An exampe ; I(,,1) = Red part , I(,,2) Green part, and I(,,3) blue part of image. If you use an assignmetn in your code maybe you forget the this parts.
try this way;
firstyl read the imae
I = imread('image')
K(;,;,1) = interpolate(I(;,;,1))
then interpolate the three part of image
K(;,;,2) = interpolate(I(;,;,2))
K(;,;,3) = interpolate(I(;,;,3))
imshow(K)