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.

Help me read an image and separate R, G, B components in Matlab

Status
Not open for further replies.

Dragonfly

Newbie level 4
Joined
Oct 8, 2006
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,322
Help I need to read an image(jpg) using mouse and convert it to
seperate Red,Blue,Green componenets.
Pls rply it urgennt
 

Re: Help in Matlab

It can be done in the following manner

image=input('Enter the file name : ','s');
RGB = imread(image,'jpg');% only Jpeg images

R = RGB:),:,1);
G = RGB:),:,2);
B = RGB:),:,3);
%Sepetares the three components of the image

Regards

Robin
 

    Dragonfly

    Points: 2
    Helpful Answer Positive Rating
Re: Help in Matlab

Regards

Robin
 

    Dragonfly

    Points: 2
    Helpful Answer Positive Rating
Re: Help in Matlab

Pls also tell me how to profom dilation and erosion on image i need it
fr image morpho operations

Pls rply
 

Re: Help in Matlab

I = imread('testimagenamejpg');%reading any image

mask = [ 1 1 1
1 1 1
1 1 1 ];%Choose this mask according to requirements
IM = imerode(I,mask);

mask = [ 1 1 1
1 1 1
1 1 1
];
IM = imdilate(I,mask);


%%%I THINK I AM DOING YOUR HOMEWORK


Regards

Robin
 

    Dragonfly

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top