Rules | Recent posts | topic RSS | Search | Register  | Log in

bmp and jpeg images in matlab

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Elementary Electronic Questions
Author Message
cedance



Joined: 24 Oct 2003
Posts: 704
Helped: 28
Location: Germany


Post30 Sep 2004 19:04   bmp and jpeg images in matlab

hi,

when i try to import a jpeg image using matlab i get the RGB vectors/matrix respectively. but when i did the same for a bmp file i dint get the RGB. i got only a 1 * () matrix. wats the problem? how do i get the RGB components for a bmp file...

if am not clear enough.. pls tell me so that i would explain it further...

regards,
arunmit168.
Back to top
Element_115



Joined: 23 Mar 2002
Posts: 312
Helped: 21


Post30 Sep 2004 23:36   Re: bmp and jpeg images in matlab

Are you just trying to convert the file or alter it?
Back to top
starfish



Joined: 08 Jul 2004
Posts: 73


Post01 Oct 2004 18:26   Re: bmp and jpeg images in matlab

Hi.....

I tried the following code........It gives no problem which u are suggesting.........Here i used imread command to read image......the image name is 'test.jpg' and i saved the same image named 'test.bmp' as a 24 bit bitmap......Then i used the following commands.....I am copy pasting the exact commmands for convenience.........

I used 'size' function to check the dimension of both images the jpg and bmp formats..............both are 3 dimensional.....thus representing R, G , B component value........... SmileSmileSmile.......

If any more help needed plz message me.......

>> a=imread('c:\test.jpg');
>> size(a)

ans =

965 665 3

>> b=imread('c:\test.bmp');
>> size(b)

ans =

965 665 3

>>
Back to top
starfish



Joined: 08 Jul 2004
Posts: 73


Post01 Oct 2004 18:38   Re: bmp and jpeg images in matlab

I can upload the images used in above commands if u want it.....

Just tell me........Bcz bitmap image is 1.83 mb .........so i am not uploading now......but if u need i can upload...............Smile
Back to top
djalli



Joined: 10 Nov 2001
Posts: 887
Helped: 15
Location: 1600 Pennsylvania Avenue, Washington DC 20500


Post02 Oct 2004 8:33   Re: bmp and jpeg images in matlab

starfish wrote:
bitmap image is 1.83 mb .........so i am not uploading now......


Compress it with ZIP. Bitmaps compress a lot. I bet that 1.83Mb would become 100kb zip file.
Back to top
starfish



Joined: 08 Jul 2004
Posts: 73


Post02 Oct 2004 17:35   Re: bmp and jpeg images in matlab

1.94 mb compressed to 1.03 mb using winrar software Smile .......

Here are the images Rolling Eyes



Sorry, but you need login in to view this attachment

Back to top
cedance



Joined: 24 Oct 2003
Posts: 704
Helped: 28
Location: Germany


Post05 Oct 2004 17:42   Re: bmp and jpeg images in matlab

starfish wrote:
Hi.....

I tried the following code........It gives no problem which u are suggesting.........Here i used imread command to read image......the image name is 'test.jpg' and i saved the same image named 'test.bmp' as a 24 bit bitmap......Then i used the following commands.....I am copy pasting the exact commmands for convenience.........

I used 'size' function to check the dimension of both images the jpg and bmp formats..............both are 3 dimensional.....thus representing R, G , B component value........... SmileSmileSmile.......

If any more help needed plz message me.......

>> a=imread('c:\test.jpg');
>> size(a)



ans =

965 665 3

>> b=imread('c:\test.bmp');
>> size(b)

ans =

965 665 3

>>


yeh.. i did a mistake... i directly entered "imread('blue.bmp')" without converting it into a 24 bit file... thanks for ur reply. and what is the difference between the ordinary way of saving a bitmap as 16 color bitmap and as a 24-bit file???

regards,
arunmit168.
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Elementary Electronic Questions
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap