Referência ao ficheiro src/vapiCameraAcquisition.h

Acquisition tools. Mais...

#include "vapiTypes.h"
#include "vapiImages.h"
#include "vapiCameraSettings.h"

Diagrama de dependências de inclusão para vapiCameraAcquisition.h:

Este grafo mostra quais são os ficheiros que incluem directamente ou indirectamente este ficheiro:

Ir para o código fonte deste ficheiro.

Funções

void vapiCameraAcquisitionLoadingStatus (const char *Message, double steps)
 Informs about the Progress of the image Acquisition.
int vapiGetHowManyCameras ()
 Automatically check how many Cameras are available for the application.
int vapiGetSnapshot (vImages *Images, vCameraSettings *CameraSettings)
 Get Snapshot from the source.

Variáveis

vBoolean HaveAcquisitionLoadingProgress


Descrição detalhada

Acquisition tools.

Definido no ficheiro vapiCameraAcquisition.h.


Documentação das funções

void vapiCameraAcquisitionLoadingStatus ( const char *  Message,
double  steps 
)

Informs about the Progress of the image Acquisition.

Parâmetros:
Message Description of the Action that is ocorring
steps Percentage in relation to all acuisition steps 1/(total of steps)

Definido na linha 204 do ficheiro vapiCameraAcquisition.c.

Referências HaveAcquisitionLoadingProgress, MainLoadDone, vapi_loading_progress_main_steps() e vapi_loading_progress_step().

Referenciado por vapiGetSnapshot(), vapiGetSnapshotLocalCamera() e vapiGetSnapshotLocalFile().

00205 {
00206         extern vBoolean MainLoadDone;
00207         extern vBoolean HaveAcquisitionLoadingProgress;
00208 
00209         if (MainLoadDone && HaveAcquisitionLoadingProgress)
00210         {
00211                 vapi_loading_progress_step (Message, steps);
00212         }
00213 
00214         if (!MainLoadDone)
00215         {
00216 
00217                 vapi_loading_progress_main_steps (Message, steps);
00218         }
00219 }

Grafo de chamadas desta função:

Here is the caller graph for this function:

int vapiGetHowManyCameras (  ) 

Automatically check how many Cameras are available for the application.

Retorna:
the number of available cameras

Definido na linha 167 do ficheiro vapiCameraAcquisition.c.

00168 {
00169 
00170         IplImage *frame;
00171         CvCapture *capture;
00172         int i = 0;
00173 
00174         for (;;)
00175         {
00176 
00177                 //capture init
00178                 capture = cvCaptureFromCAM (i);
00179 
00180 
00181                 if (!cvGrabFrame (capture))
00182                 {
00183                         cvReleaseCapture (&capture);
00184                         return i;
00185                 }
00186 
00187                 //Grab frame
00188                 frame = cvRetrieveFrame (capture);
00189 
00190                 if (!frame)
00191                 {
00192                         cvReleaseCapture (&capture);
00193                         cvReleaseImage (&frame);
00194                         return i;
00195                 }
00196                 cvReleaseCapture (&capture);
00197 
00198                 ++i;
00199         }
00200 }

int vapiGetSnapshot ( vImages Images,
vCameraSettings CameraSettings 
)

Get Snapshot from the source.

Parâmetros:
Images Destination Image Handler
CameraSettings The source Settings
Retorna:
Error code

Definido na linha 119 do ficheiro vapiCameraAcquisition.c.

Referências _vCameraSettings::CameraType, HaveAcquisitionLoadingProgress, MainLoadDone, NUMBER_OF_ACQUISITION_STEPS, _vImages::Original, vapi_loading_progress_reset(), vapiCameraAcquisitionLoadingStatus(), vapiGetSnapshotLocalCamera(), vapiGetSnapshotLocalFile(), vCameraLocal, vCameraLocalFile e vFALSE.

Referenciado por main(), vapiGtkCbLoadStaticImage(), vapiGtkSetOriginWindowTestSaveOrigin(), vapiOriginal() e vapiRefreshImage().

00120 {
00121         int CameraERROR = 1;
00122         extern vBoolean HaveAcquisitionLoadingProgress;
00123         extern double NUMBER_OF_ACQUISITION_STEPS;
00124 
00125         if (MainLoadDone && HaveAcquisitionLoadingProgress)
00126         {
00127                 vapi_loading_progress_reset ();
00128         }
00129 
00130         switch (CameraSettings->CameraType)
00131         {
00132         case vCameraLocal:
00133         {
00134                 NUMBER_OF_ACQUISITION_STEPS = 3;
00135                 CameraERROR =
00136                         vapiGetSnapshotLocalCamera (Images, CameraSettings);
00137                 break;
00138         }
00139         case vCameraLocalFile:
00140         {
00141                 NUMBER_OF_ACQUISITION_STEPS = 2;
00142                 CameraERROR =
00143                         vapiGetSnapshotLocalFile (Images, CameraSettings);
00144 
00145         }
00146         }
00147         if (CameraERROR)
00148         {
00149                 NUMBER_OF_ACQUISITION_STEPS = 2;
00150                 vapiCameraAcquisitionLoadingStatus
00151                         ("Erro a Carregar Imagem", 1.0 /
00152                          NUMBER_OF_ACQUISITION_STEPS);
00153                 Images->Original =
00154                         cvLoadImage ("pixmaps/vapiErroDeCamara.png", 3);
00155         }
00156 
00157         vapiCameraAcquisitionLoadingStatus
00158                 ("Captura Terminada", (1.0 / NUMBER_OF_ACQUISITION_STEPS));
00159 
00160         HaveAcquisitionLoadingProgress = vFALSE;
00161 
00162         return CameraERROR;
00163 }

Grafo de chamadas desta função:

Here is the caller graph for this function:


Documentação das variáveis

vBoolean HaveAcquisitionLoadingProgress

If the Loading progress is verbose or not.

Definido na linha 11 do ficheiro vapiCameraAcquisition.h.

Referenciado por main(), vapiCameraAcquisitionLoadingStatus(), vapiGetSnapshot() e vapiGtkSetOriginWindowTestSaveOrigin().


Gerado em Tue Jul 24 10:37:26 2007 para Vapi por  doxygen 1.5.1