libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libcvd-members] Copying images from a Windows DirectShow buffer int


From: E. Rosten
Subject: Re: [libcvd-members] Copying images from a Windows DirectShow buffer into a LibCVD Image object
Date: Thu, 26 Feb 2009 22:15:05 +0000 (GMT)

On Wed, 25 Feb 2009, Tom Drummond wrote:

Probably BGR should exist as a colour type in libcvd - then copying from the
webcam could be using memcpy - or in fact the webcam buffer could be used
directly in the returned video frame (no copying).  glDrawPixels also
supports GL_BGR as a native type - so GL based display should be fast
(provided the hardware supports this format directly without resorting to a
software fallback).

There is a bit of work to do to incorportate it however, there are colour
conversion functions that need to be written to handle it.

That's only needed if you want to be able to load, save or use image_convert. It's not needed to grab and process video.

This probably means that libcvd is not that well laid out as several files
have to be touched to support this - namely

rgb.h (to include the additional definition) - or a new bgr.h
glhelpers.h (to provide a new glDrawPixels overload)
and any files involved in the rather messy colour space conversion code

That doesn't seem so bad, you need a definition, and need to touch every separate subsystem wishing to use it: you only need to touch the colourspace code if you want to be able to do colourspace conversions.

What seems more tricky is that relavent code (eg image or video reading) should be able to do the conversion in-place, at the point where it goes from raw bytes to some strongly typed image.

-Ed

--
(You can't go wrong with psycho-rats.)(http://mi.eng.cam.ac.uk/~er258)

/d{def}def/f{/Times s selectfont}d/s{11}d/r{roll}d f 2/m{moveto}d -1
r 230 350 m 0 1 179{ 1 index show 88 rotate 4 mul 0 rmoveto}for/s 12
    d f pop 235 420 translate 0 0 moveto 1 2 scale show showpage




reply via email to

[Prev in Thread] Current Thread [Next in Thread]