The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

JPEG display question

I am playing around with an IP camera and was wondering if any of you could get me started with displaying camera images, jpeg, sequentially at a reasonable frame rate.

I am afraid the only tool I have right now is VB6.

I have tried to use the standard controls, image and picture, but neither give acceptable frame rates.
I have used loadpicture to consecutively load pictures that are stored as jpegs on my hdd, but the best I can get is a framerate of no more than 3 or 4 frames per second at 1600x1200.

I was thinking of reading up on DirectX, but maybe there are better ways to get started.
If you know of one, please help me out. And for this purpose, consider me one of those VB type "developers" that "real developers" like to put down. As far as programming skills go, that is.
Practical Geezer
Tuesday, May 17, 2005
 
 
Load the images to memory first, maybe HD takes too long?
Then try to do it.

However, you can use Microsoft Movie Maker to do this stuff for you, it comes with Windows XP.
Ayende Rahien Send private email
Tuesday, May 17, 2005
 
 
DirectX and an optimized JPEG library is the way to go, especially for these large images. I don't know how easy that will be to do in VB, though. I use C++.
sloop
Tuesday, May 17, 2005
 
 
Aren't there thousands of thumbnailing and slideshow apps?

I think I got one free with my camera.

Google ought to find a thousand!
i like i
Tuesday, May 17, 2005
 
 
Why don't you (1) convert the series of JPEGs to an AVI, then (2) just play that in VB using one of the video/animation controls?

(1) is fairly easy code to yourself, although the conversion might be slow. If you don't fancy that, or only need to do it once for a demo or something, use a freeware app to do it for your demo.

(2), playing an AVI, is trivial in VB isn't it?
S. Tanna
Tuesday, May 17, 2005
 
 
"Why don't you (1) convert the series of JPEGs to an AVI, then (2) just play that in VB using one of the video/animation controls?"

Because the conversion would take too much time and besides, that would move the problem to how can I build some software that does the conversion.

The idea is to have many video images collected by many IP camera's, stored on local servers. These images should be retrievable at any time locally, or remotely.
Creating an AVI just isn't practical. I need to be able to playback the individual camera images on demand and at reasonable speed.
Practical Geezer
Wednesday, May 18, 2005
 
 
IMHO 1600x1200 is too big to have decent framerate using any method, it's just too much texture data to be pumped into graphics card.

I used C++/OpenGL for a similar problem, getting around 30 FPS for 640x480 images. The easiest way to improve a framerate is to decrease resolution - even if you go down just to 1024x768, you should already more than double FPS.

And sure, as Ayende wrote, you have to first load images into memory.
3d
Thursday, May 19, 2005
 
 
Buffering images in memory is only a partial solution, because if they get sequences faster than they can be read, the buffer will be depleted.
Additionaly, an operator might decide to skip ahead or play in reverse at any time, which will invalidate the buffer too.

I guess I'll have to dig into API's to find which is most appropriate for displaying graphics with maximum performance.
Any idea with which technology best to start?
Practical Geezer
Friday, May 20, 2005
 
 
Basically, for "maximum performance" you need 3D acceleration (that's why MS is doing Avalon). Both OpenGL and DirectX are very similar performance-wise, so the choice should be more about ease of integration with the rest of your application. I guess with VB DirectX would be easier.

I don't know much about DirectX, but the principle should be the same on both APIs: you have one polygon with orthographic projection on which you change the texture.

There should be also some DirectShow wrapper hiding underlying 3D (so that you wouldn't need to go to Direct3D). I would check first DirectShow, if there is not some method to handle image sequences.
3d
Friday, May 20, 2005
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz