View previous topic :: View next topic |
Author |
Message |
UH
Joined: 01 May 2009 Posts: 5
|
Posted: Mon May 04, 2009 11:12 pm Post subject: Camra problem |
|
|
Is there any one how nows have to convert jpg buffter to pixel rbg buffer.
in other words get the date compilede over to raw data so that it can be show on the screne by runing the buffer...
ps i need to work with the data to be able to use it, so i need it to be blocks of [R][G][B] for itch pixel f.eks in one buffer eller 3buffer
Hope somone can help thanks |
|
Back to top |
|
|
LionX
Joined: 27 Dec 2004 Posts: 61
|
|
Back to top |
|
|
UH
Joined: 01 May 2009 Posts: 5
|
Posted: Tue May 05, 2009 11:12 pm Post subject: |
|
|
hey
thanks i have been looking at the libjpg, but i can not convert the jpg_buffer to the jpgData buffter that the libjpg are using.
the eksample only show have to send the data to the pc, as a jpeg, but i can not use the jpg data i need the raw data so that i can show it on the screen and there by usign the pixle value to make som image processing,.
when i am trying to convert the buffer the system of the playstation shutdown.
Hope you can help me a littel more thanks
ps. have got the test0 to work and it is nice work |
|
Back to top |
|
|
LionX
Joined: 27 Dec 2004 Posts: 61
|
Posted: Wed May 06, 2009 5:33 am Post subject: |
|
|
ok, after you compile libjpg and include it to you project, this is how you convert the jpeg image to rgb buffer:
the data in jpg_buffer is 100% a jpeg file.
to convet it to rgb:
after you extract the frame with:
ret = PS2CamExtractFrame(devid, jpg_buffer, 500512);
'ret' is the size of the file.
you con open the buffer like this
jpgData *jpg;
jpg = jpgOpenRAW( &jpg_buffer, ret);
then create your rgb buffer like this:
unsigned char my_rgb_buff[640*480*3];
then convert the jpeg to rgb like this:
jpgReadImage(jpg, &my_rgb_buff[0]); |
|
Back to top |
|
|
UH
Joined: 01 May 2009 Posts: 5
|
Posted: Wed May 06, 2009 7:11 pm Post subject: thaky |
|
|
Finaly, the solution thanks.... i have been working in that area but it didden work ontil now
thanky.... |
|
Back to top |
|
|
|