Go to Post Someone once told me, "A smart man learns from his own mistakes, but a wise man learns from the smart man's mistakes." . - Pavan Dave [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-01-2010, 10:06
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
jpeg conversion for dashboard software

For those of you who don't know, displaying camera images on a laptop dashboard works by sending packets over a TCP connection which includes the latest image encoded as a jpeg.

I'm making a custom dashboard program, and I'm going to implement a video feed. I have the networking figured out, but the problem is the jpeg format of the incoming images. The rendering library I'm using for drawing the dashboard can display images based off of a jpeg file, but it would be a horrendous waste of resources to continually save the jpeg data from the packets to a file and read it back in. Alternatively, it can draw images straight from a memory buffer, but the image must be in a standard bitmap format (16-bit A1R5G5B5 or R5G6B5, 24-bit R8G8B8, etc.). I need a C or C++ library of some sort that can convert a jpeg data stored in a memory buffer to a bitmap format (I’d assume R8G8B8 would be the most common).

Does anybody have such a library? I’d really prefer not to create my own jpeg decoder, as I don’t really have the time to dedicate that much time to coding just a single aspect of our robot system.
__________________

Last edited by slavik262 : 10-01-2010 at 10:11.
  #2   Spotlight this post!  
Unread 10-01-2010, 10:12
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: jpeg conversion for dashboard software

I'm not sure what language or platform you are using, but two approaches you might try.

Try to use NIIMAQ.dll. This is how the LabVIEW, Java, and C/C++ code is doing it on the robot, and how LV is doing it on the dashboard. I can't be certain, but I believe that the Windows host library probably has the entrypoint for decoding to a buffer that is easily called using C parameter conventions.

Second approach would be to download the JPEG consortium code. This is where most of the JPEG decoders come from anyway, and internally, it is definitely stream based and you can point the stream to a buffer rather than a file.

Greg McKaskle
  #3   Spotlight this post!  
Unread 10-01-2010, 10:31
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: jpeg conversion for dashboard software

Thanks. I'll investigate those right away!

If you're curious, I'm using Irrlicht, a graphics engine for C++. It's multi-platform, but I'm doing the networking in Winsock, so I'm developing for Windows.
__________________
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
JPEG Images for Inventor Bus1012 Inventor 10 29-01-2009 22:15
pic: ParagonUTCteam.jpeg Steve Howland Extra Discussion 1 13-03-2006 21:58
Dashboard software something Control System 1 13-01-2006 20:52
Palm Dashboard Software Neal Probert General Forum 4 06-05-2002 14:16


All times are GMT -5. The time now is 20:50.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi