#include <govideocapture.h>
#include <gosignal3d.h>
#include <gosubsignal3d.h>
#include <gosignalhelper.h>
#include <gofileio.h>
#include <stdio.h>
int main()
{
{
printf ("Opened the device /dev/video1\n");
sig.
setDataType (GO_UINT8);
sleep(5);
for (goIndex_t j = 0; j < 50; ++j)
{
#if 0
{
temp.
setDataType(sig.
getDataType().
getID());
temp.make(sig.
getSize(),sig.
getBlockSize(),sig.
getBorderSize(),1);
sub0.setChannel(2);
}
#endif
sprintf(num.
getPtr(),
"%3d",j);
name += num;
name += fileext;
}
}
else
{
printf ("Could not open device /dev/video0\n");
}
}
void getSettings()
Get settings from device and store them internally. It is a good idea to call this after opening a de...
Definition: govideocapture.cpp:516
bool setCaptureSize(goSize_t width, goSize_t height)
Set capture frame size.
Definition: govideocapture.cpp:177
void setChannel(goSize_t c)
Definition: gosignal3dbase.cpp:2122
static bool writeImage(const char *filename, const goSignal3DBase< void > *signal)
Write an image file from a goSignal3DBase<void> object.
Definition: gofileio.cc:741
bool make(const goSize3D &size, const goSize3D &blockSize, const goSize3D &borderSize, goSize_t channelCount)
Allocate memory.
Definition: gosignal3d.cc:329
bool grab(goSignal3DBase< void > &signal, const int *rgb_channels)
Grab a frame from the open device.
Definition: govideocapture.cpp:353
goSize_t getSizeY() const
Definition: gosignal3dbase.cpp:2032
size_t goSize_t
Definition: gotypes.h:96
bool goCopySignalChannel(const goSignal3DBase< void > *sig, goSignal3DBase< void > *targetSig)
Copies a channel from a signal to another signal.
Definition: gosignalhelper.cpp:457
goSize_t getSizeZ() const
Definition: gosignal3dbase.cpp:2039
goSize_t getSizeX() const
Definition: gosignal3dbase.cpp:2025
void close()
Close the open device.
Definition: govideocapture.cpp:249
bool setSettings()
Store settings from this object to the open device.
Definition: govideocapture.cpp:460
goTypeEnum getID() const
Get enumerator for the type set in this object.
Definition: gotype.cpp:662
bool open()
Open the device.
Definition: govideocapture.cpp:235
bool setDevice(const char *name)
Set device file name.
Definition: govideocapture.cpp:137
Video capture class.
Definition: govideocapture.h:41
String class.
Definition: gostring.h:28