LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 08-10-2010, 09:23 AM   #1
najafa
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Rep: Reputation: 0
Smile uncompressing video from JPEG to RGB


Hello,

I need help on writing in c a function to convert video data from JPEG to RGB in order display on an LCD.

Any useful leads is most welcomed.

Thanks.

Last edited by najafa; 08-10-2010 at 09:25 AM.
 
Old 08-10-2010, 12:09 PM   #2
John VV
Guru
 
Registered: Aug 2005
Posts: 12,065

Rep: Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573
we will not do homework for you
Please post what you have so far , where you are stuck and at what point in the code you are stuck at .
 
Old 08-10-2010, 01:11 PM   #3
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,238

Rep: Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299
In the absence of any further information, these are the best leads I can give you:

http://mjpeg.sourceforge.net/
http://wiki.videolan.org/MJPEG

The second link shows you how VLC does it.

Last edited by dugan; 08-10-2010 at 01:25 PM.
 
Old 08-10-2010, 11:27 PM   #4
najafa
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
@ John VV: What I have now can directly get the video data from the camera to the LCD. The camera has been set to RGB in order to display to the LCD. Now I have to put a network in between the camera and the LCD so that a client can log on to the network and get the video data displayed on the LCD. This is where my current challenge is because the network format is JPEG and in order to display on the LCD, I have to convert from JPEG to RGB for the LCD.

@ dugan: Thanks for the help. Will check it out.

@ All: Any more suggestions are most welcomed.
 
Old 08-11-2010, 08:16 AM   #5
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,238

Rep: Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299
There's no such thing as JPEG video. You probably meant MJPEG. Nor is there such a thing as a network that requires video to be in JPEG or MJPEG format. You might have switched from uncompressed to MJPEG to save bandwidth, but that's not the same as the "network format" being MJPEG.

It sounds like you're streaming MJPEG video over the network, and you need help playing the video client-side.

Just look up the Motion JPEG Wikipedia article. It covers streaming MJPEG video over HTTP, and also links to existing implementations.

Last edited by dugan; 08-11-2010 at 10:26 AM.
 
Old 08-11-2010, 12:42 PM   #6
John VV
Guru
 
Registered: Aug 2005
Posts: 12,065

Rep: Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573
i still can not figure out what the OP is doing
Quote:

It sounds like you're streaming MJPEG video over the network, and you need help playing the video client-side.
it dose but what is this bit about needing to convert to rgb cololspace to display on a lcd ????????????????????????????????????????????????????????????????????

so i giving up on this one untill THE code is shown and a real question is asked
 
Old 08-11-2010, 12:55 PM   #7
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,238

Rep: Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299Reputation: 1299
Quote:
Originally Posted by John VV View Post
it dose but what is this bit about needing to convert to rgb cololspace to display on a lcd
He doesn't need to convert the colorspace. I'm surprised that he jumped to that conclusion.

It seriously sounds like all the OP has to do is use VLC to load the stream from the camera, have VLC serve the stream over the network, and have the client use VLC to play the stream.

He can play with this if he wants, but it sounds like VLC is all he needs:
http://sourceforge.net/projects/mjpg-streamer/

If these don't work for him, then he'll need to give us a better picture of what the setup is.

To the OP: I don't want to hear that you "will check it out." I want to know what the results were when you did check it out.

Last edited by dugan; 08-11-2010 at 01:39 PM.
 
Old 09-27-2010, 03:43 AM   #8
najafa
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Hi Everybody,

I used the servfox program as my server and the spcaview client as my client since I read from elsewhere that sdl could help me and spcaview uses sdl and jpeg.It works well on the computer with the display very clear; but when I tried it on the FriendlyArm LCD; the video display is not good; it moves very fast. Any help or suggestions?
The source code for spcaview and servfox can be got here http://www.linuxpackages.net/pkg_details.php?id=13274.

Thanks
 
Old 09-27-2010, 03:55 AM   #9
John VV
Guru
 
Registered: Aug 2005
Posts: 12,065

Rep: Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573
so you are running a embedded Slackware 13.1 on a ARM arch ?
 
Old 09-27-2010, 07:10 AM   #10
najafa
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
@John VV: No please, am not running an embedded Slackware on ARM. I got to know about it now because you mentioned it.
 
Old 09-27-2010, 02:41 PM   #11
John VV
Guru
 
Registered: Aug 2005
Posts: 12,065

Rep: Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573Reputation: 1573
as to the software and hardware .
I do not think any one here has a clue as to what it is you are trying to do , with some odd software

please explain
if
the use of this software is a 100% MUST and it MUST be this software that is use -- like the boss DICTATED it's use
then the hardware and exactly what it is you are doing

if
the software IS NOT A 100% MUST USE

then explain the hardware and what it is you need to do
THEN we can recommend software that can do it
like VLC and "Cheese"
 
Old 09-27-2010, 11:11 PM   #12
najafa
LQ Newbie
 
Registered: Jun 2010
Posts: 8

Original Poster
Rep: Reputation: 0
@John VV: Please I used the spcaview source code because after searching on the internet for sometime I got to know SDL (Simple DirectMedia Layer) could help me stream video over the network to an LCD display and its a cross platform API. The spcaview source code uses SDL. It works perfectly on the computer but does not display well on the FriendlyARM LCD screen.

No, the use of the spcaview is not a 100% must but since it came so close to what I want to do; I felt I needed some help to get me there.

The hardware am displaying on is the FriendlyARM9's LCD screen and am streaming the video from a webcam.

Thanks
 
  


Reply

Tags
conversion, jpeg, video


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a video with 1 jpeg plus audio with mencoder slothpuck Linux - Software 1 08-01-2013 11:57 AM
Faster way of checking if a JPEG is RGB or CMYK? Guttorm Programming 2 02-15-2007 11:25 AM
Linux RAW Video (YUV/RGB) Reading & Transformation amatiman Linux - Software 2 02-03-2006 03:55 AM
converting JPEG images to MPEG-2 video using <convert>? BeetleBailey Programming 3 06-11-2004 09:07 AM
Uncompressing LeeRobson Linux - Software 3 10-11-2003 07:49 PM


All times are GMT -5. The time now is 07:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration