Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Matlab Code for Reading A Color Image

Status
Not open for further replies.

dainvinciblz

Newbie level 3
Joined
Jan 28, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,308
Hi Frns..!

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).

Please guide me.

Thank You..!
 

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');
 

zula said:
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');

Hye thanx for the reply
The actual trouble is:

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.

How do i get the output in color.

Thanx in advance..!
 

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)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top