Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-02

Photo Capture on Windows

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Paul Michell

Hello All,

Has anyone had any experience of photo capture in an LCL app on Windows? I am working on a field data recording program for a tablet PC with an embedded camera. I would like to be able to capture a high res. photograph with this and so far I have tried VFW, TWAIN, WIA and DirectShow with the following results:

VFW
This worked well, but the resolution seems to be fixed at WebCam type levels and access to the frame-buffer is non-trivial.

TWAIN
This works, but it is slow and always throws up the default dialog box and I can't find a way to switch this off.

WIA
This works but is unusably slow! From pressing the camera button to generating the memory bitmap takes over 10 seconds.

DirectShow
I have seen some good Delphi samples that produce high res. images with sub- second response times, but I can't get them to work with FPC.

Any hints or suggestions would be greatly appreciated.

Thanks,

Paul Michell

Reply by email

Marco van de Voort
to Paul Michell
Paul Michell wrote 23 lines
Has anyone had any experience of photo capture in an LCL app on Windows? I am working on a field data recording program for a tablet PC with an embedded camera. I would like to be able to capture a high res. photograph with this and so far I have tried VFW, TWAIN, WIA and DirectShow with the following results: VFW This worked well, but the resolution seems to be fixed at WebCam type levels and access to the frame-buffer is non-trivial. TWAIN This works, but it is slow and always throws up the default dialog box and I can't find a way to switch this off. WIA This works but is unusably slow! From pressing the camera button to generating the memory bitmap takes over 10 seconds. DirectShow I have seen some good Delphi samples that produce high res. images with sub- second response times, but I can't get them to work with FPC. Any hints or suggestions would be greatly appreciated.

If open, I would like to see your sources. I have something that we use on fairs for lazarus demonstration purposes, but it is VFW only, and geared towards playstation 2 eyetoy cameras.

Reply by email

Felipe Monteiro de Carvalho
to Paul Michell: Has anyone had any experience of photo capture in an LCL app on Windows? I am working on…
Paul Michell wrote
DirectShow I have seen some good Delphi samples that produce high res. images ?with sub- second response times, but I can't get them to work with FPC.

I suggest that you debug step-by-step the app with Delphi and with FPC to check which routine call has a different result which makes the app work only in Delphi.

DirectDraw and Direct3D work well with FPC so DirectShow should also work.

Felipe Monteiro de Carvalho

Reply by email

Paul Michell
to Marco van de Voort: If open, I would like to see your sources. I have something that we use on fairs for…
If open, I would like to see your sources. I have something that we use on fairs for lazarus demonstration purposes, but it is VFW only, and geared towards playstation 2 eyetoy cameras.

Most of the actual library code is taken from various open source Delphi samples. The WIA type library was generated from TurboDelphi, although I had to tweak it to get it to work. I am no COM expert and that is probably why I can't get the DirectShow stuff to work.

The sources are currently embeded in my app at the moment which is my client's IP. However, I will try to create a simple demo with then in that I can post here. I should be able to do that this weekend.

Paul Michell

Reply by email