[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c

Display captured images in realtime

rgagarrett

8/13/2008 8:26:00 AM

Hi,
I hope this is the correct group for my query, please advise if
there's a more relevant place for me!

I'm using a USB camera (Sentech C83) with Linux and I have some C code
for reading data from the driver and writing it to disk. The data are
images in raw format and so I need to convert them to jpeg (or bmp)
before I can view them in a standard image viewer. My problem is that
I'd like to display the raw images that I get from the camera on the
screen in realtime. I believe that it should be possible to write
them directly to the video buffer with minimal pre-processing, but
I've never done that before and frankly I'm not sure where to start!
My searching on google hasn't given any promising leads yet, can
anyone here help?

Thanks in advance,
Rob
7 Answers

Joachim Schmitz

8/13/2008 8:41:00 AM

0

rgagarrett@gmail.com wrote:
> Hi,
> I hope this is the correct group for my query,

No, it is not as your task is impossible with C as defined be the
international standards that are topical here, you'd need to use extensions
provided by your O/S and Compiler

> please advise if
> there's a more relevant place for me!

Some group related to Linux and programing.

> I'm using a USB camera (Sentech C83) with Linux and I have some C code
> for reading data from the driver and writing it to disk. The data are
> images in raw format and so I need to convert them to jpeg (or bmp)
> before I can view them in a standard image viewer. My problem is that
> I'd like to display the raw images that I get from the camera on the
> screen in realtime. I believe that it should be possible to write
> them directly to the video buffer with minimal pre-processing, but
> I've never done that before and frankly I'm not sure where to start!
> My searching on google hasn't given any promising leads yet, can
> anyone here help?
>
> Thanks in advance,
> Rob

Bye, Jojo


gazelle

8/13/2008 1:01:00 PM

0

In article <g7u6ml$hn2$1@online.de>,
Joachim Schmitz <jojo@schmitz-digital.de> wrote nothing of value, ending
with a coy:
....
>Bye, Jojo

IOW, nobody here gives a shit about you or your problems.

You may find some or all of the following links helpful in understanding
why this is so:

http://en.wikipedia.org/wiki...
http://en.wikipedia.org/w...
http://en.wikipedia.org/wiki/C_programmin...

osmium

8/13/2008 2:09:00 PM

0

<rgagarrett@gmail.com> wrote:

> I hope this is the correct group for my query, please advise if
> there's a more relevant place for me!
>
> I'm using a USB camera (Sentech C83) with Linux and I have some C code
> for reading data from the driver and writing it to disk. The data are
> images in raw format and so I need to convert them to jpeg (or bmp)
> before I can view them in a standard image viewer. My problem is that
> I'd like to display the raw images that I get from the camera on the
> screen in realtime. I believe that it should be possible to write
> them directly to the video buffer with minimal pre-processing, but
> I've never done that before and frankly I'm not sure where to start!
> My searching on google hasn't given any promising leads yet, can
> anyone here help?

If you are in the US, I would expect you are trying to display an NTSC image
on Linux.

I would put NTSC (or PAL) as part of the search target on Google to restrict
the number of hits.


Paul

8/13/2008 6:15:00 PM

0

osmium wrote:
> <rgagarrett@gmail.com> wrote:
>
>> I hope this is the correct group for my query, please advise if
>> there's a more relevant place for me!
>>
>> I'm using a USB camera (Sentech C83) with Linux and I have some C code
>> for reading data from the driver and writing it to disk. The data are
>> images in raw format and so I need to convert them to jpeg (or bmp)
>> before I can view them in a standard image viewer. My problem is that
>> I'd like to display the raw images that I get from the camera on the
>> screen in realtime. I believe that it should be possible to write
>> them directly to the video buffer with minimal pre-processing, but
>> I've never done that before and frankly I'm not sure where to start!
>> My searching on google hasn't given any promising leads yet, can
>> anyone here help?
>
> If you are in the US, I would expect you are trying to display an NTSC image
> on Linux.
>
> I would put NTSC (or PAL) as part of the search target on Google to restrict
> the number of hits.
>

http://www.sentechamerica.com/STC-C8...

http://www.theimagingsource.com/products/cameras/sensors/ic...

Paul

John B. Matthews

8/13/2008 6:27:00 PM

0

On 13 Aug 2008 at 8:25, rgagarrett@gmail.com wrote:
> I hope this is the correct group for my query, please advise if
> there's a more relevant place for me!

Your question is perfectly topical here, but be prepared to be showered
with abuse by some of the more cantakerous "regulars" who delight in
showing hostility to new posters.

> I'm using a USB camera (Sentech C83) with Linux and I have some C code
> for reading data from the driver and writing it to disk. The data are
> images in raw format and so I need to convert them to jpeg (or bmp)
> before I can view them in a standard image viewer. My problem is that
> I'd like to display the raw images that I get from the camera on the
> screen in realtime. I believe that it should be possible to write
> them directly to the video buffer with minimal pre-processing, but
> I've never done that before and frankly I'm not sure where to start!

I think that's extremely unlikely.

There are many "raw" image formats, and I can't see any reason why any
of them should correspond in a nice way to a format acceptable to a
video system.

Check out dcraw (http://www.cybercom.net/~dcof...), which is
plain C (so presumably fast) and aims to decode all "raw" formats.

roberson

8/13/2008 7:09:00 PM

0

In article <slrnga69rl.a60.nospam@nospam.invalid>,
Antoninus Twink <nospam@nospam.invalid> wrote:
>On 13 Aug 2008 at 8:25, rgagarrett@gmail.com wrote:
>> I hope this is the correct group for my query, please advise if
>> there's a more relevant place for me!

>Your question is perfectly topical here,

The part about reading a fixed image file format and decoding
it into image pixels can be done in standard C (given sufficient
documentation of the file format), but the part about displaying
images in real time onto a display is not possible in standard C:
it is only possible using device-specific or operating-system
specific extensions that are beyond the scope of C.

Contrary to Mr. Twink's implications, this newsgroup does not exist to
discuss every library or operating system extension that can be called
from some C implementation somewhere: as there is very little
that would be impossible to call from some suitably designed C
implementation, Mr. Twink would effectively wish us to believe
that pretty much *every* programming problem is topical here if it
involves C in any capacity. (Or, as was seen recently, even if it
involves any of the tool-chains commonly used with C, when when the
poster had clearly indicated that the programming language in use
was not C.)
--
"There are some ideas so wrong that only a very intelligent person
could believe in them." -- George Orwell

Malcolm McLean

8/13/2008 8:47:00 PM

0


<rgagarrett@gmail.com> wrote in message
> I'm using a USB camera (Sentech C83) with Linux and I have some C code
> for reading data from the driver and writing it to disk. My problem is
> that
> I'd like to display the raw images that I get from the camera on the
> screen in realtime.
>
You need to look at Xlib.
My BabyX toolkit is designed to make jobs like this very easy, unfortunately
its not ready yet. I wouldn't recommend another toolkit if you've done no X
programming before.

--
Free games and programming goodies.
http://www.personal.leeds.ac....