POSMicro B16 Manual de Instruções Página 98

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 109
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 97
Chapter 6. Samples
6.1. Programming example
This small programming example shows how to use the basic API functions to setup the grabber
hardware for getting a snap shot from the camera into memory.
The import library eleye716.lib (compiler dependent) has to be specified in your development tool.
#include "elpceye7.h"
#define IMAGE_WIDTH 560
#define IMAGE_HEIGHT 480
int main(int argc, char* argv[])
{
long Err, nRet = 0;
long wBoardID;
long wBufID;
void ** ppVideoMemory;
// open the grabber
wBoardID = el_OpenHW(0, 1);
if( wBoardID < 0)
{
printf( "Errorcode:%d\n", el_GetErrorCode() );
return false;
}
// initialize with default values
nRet = el_InitContext(wBoardID, NULL);
if( nRet != 0)
{
printf( "Errorcode:%d\n", el_GetErrorCode() );
return false;
}
wBufID = 0;
// initialize HW and allocate memory for the image
ppVideoMemory = el_InitHW(wBoardID, NULL, IMAGE_WIDTH, IMAGE_HEIGHT, 1, 0,
&wBufID);
if ( !ppVideoMemory )
{
printf( "Errorcode:%d\n", el_GetErrorCode() );
return false;
}
.
.
. setup the display
.
.
// aquire one snap shot
nRet = el_Acquire(wBoardID, EL_SNAP);
if( nRet != 0)
{
printf( "Errorcode:%d\n", el_GetErrorCode() );
return false;
88
Vista de página 97
1 2 ... 93 94 95 96 97 98 99 100 101 102 103 ... 108 109

Comentários a estes Manuais

Sem comentários