VCLinux Library Documentation  3.13.0

Camera Base

Camera Base

Example code is provided at briefcodeforimagerecording. More...

+ Collaboration diagram for Camera Base:

Data Structures

struct  VCCamInit
 Camera Settings only configurable during Initialization. More...
 
struct  VCCamDesc
 Camera Description. More...
 
struct  VCCamCfg
 Camera Settings. More...
 

Enumerations

enum  VCCamType {
  CAMTYPE_UNSET = 0, CAMTYPE_NANO_Z_0 = 1, CAMTYPE_NANO_Z_RH_0 = 2, CAMTYPE_PRO_Z_0 = 3,
  CAMTYPE_NANO_3D_Z_0 = 4
}
 Camera Type. More...
 

Functions

I32 vc_cam_deinit (VCCamCfg *cam)
 Deinitializes the Camera. More...
 
I32 vc_cam_init_raw (VCCamCfg *camNew, VCCamInit *camInit)
 Initializes the Camera. More...
 
I32 vc_cam_init (VCCamCfg *camNew, VCCaptCfg *cptNew, VCCamInit *camInit, VCTrgInit *trgInit, VCSenInit *senInit)
 Initializes a Standard Camera Setup. More...
 

Detailed Description


Data Structure Documentation

◆ VCCamInit

struct VCCamInit

This structure keeps camera settings which are only configurable during Initialization.

◆ VCCamDesc

struct VCCamDesc

This structure keeps Camera descripting information. Never change anything in here, also not in substructures!

+ Collaboration diagram for VCCamDesc:
Data Fields
VCCamType camType

Camera Type

I32 fdMem

Camera Access File Handle

U8 * physBase

Initial Address for driver memory access

U32 physBaseBytes

Total Bytes Available through memory driver

VCGpioCfg gpio

For GPIO access

VCCamInit init

Initialization Values

◆ VCCamCfg

struct VCCamCfg

This structure keeps settings for a camera configuration.

+ Collaboration diagram for VCCamCfg:
Data Fields
VCCamDesc d

Read-Only Description

Enumeration Type Documentation

◆ VCCamType

enum VCCamType

This enum identifies the Camera Series by its Type.

Enumerator
CAMTYPE_UNSET 

Unset/Unused

CAMTYPE_NANO_Z_0 

VC Nano Z Series, Revision 0

CAMTYPE_NANO_Z_RH_0 

VC Nano Z RH Series, Revision 0

CAMTYPE_PRO_Z_0 

VC Pro Z Series, Revision 0

CAMTYPE_NANO_3D_Z_0 

VC Nano 3D Z Series, Revision 0

Function Documentation

◆ vc_cam_deinit()

I32 vc_cam_deinit ( VCCamCfg cam)

This function deinitializes the camera wich was formerly initialized by the function vc_cam_init() or vc_cam_init_raw().

See also
vc_cam_init(), vc_cam_init_raw().

◆ vc_cam_init_raw()

I32 vc_cam_init_raw ( VCCamCfg camNew,
VCCamInit camInit 
)

This function initializes the camera.

After calling this function, one can add capture configurations by calling the function vc_cam_init(). Deinitialization is necessary before leaving your program by using the function vc_cam_deinit().

Note
In most cases an alternative is the function named vc_cam_init() which bundles the call of several initialization functions.
rc = vc_cam_init_raw(&cam, &camInit);
if(rc<0){err=-1+10*rc; goto endfunc;}
rc = vc_capt_init_raw(&cpt, &cam, &trgInit);
if(rc<0){err=-2+10*rc; goto endfunc;}
#if INIT_ALL_SENSORS
for(j= 0; j< cpt.d.maxSenCnt; j++)
{
if(1==cpt.d.maxSenCnt) { senInit.sync = SENSYNC_STANDALONE; }
else { senInit.sync = SENSYNC_SYNC; }
rc = vc_capt_init_sen_add(&cpt, j, &senInit, &trgInit);
if(rc<0){err=-3+10*rc; goto endfunc;}
}
#else //Single Sensor
senInit.sync = SENSYNC_STANDALONE;
rc = vc_capt_init_sen_add(&cpt, 0, &senInit, &trgInit);
if(rc<0){err=-3+10*rc; goto endfunc;}
#endif

You can provide NULL as value for camInit. Then the default values will be used. If you want to add your own settings, please be sure to first pass default values to them, e.g. for camInit the contents of the definition VCCamInit_Default, and second apply your settings.

Content of camNew will be overwritten, so be sure to set values not before the initialisation has been done (e.g. by this function).

Parameters
camNewNew Camera Struct, will be overwritten.
camInitSet to NULL, or provide it with VCCamInit_Default applied and changed by your needs.
See also
vc_cam_init(), vc_cam_deinit().

◆ vc_cam_init()

I32 vc_cam_init ( VCCamCfg camNew,
VCCaptCfg cptNew,
VCCamInit camInit,
VCTrgInit trgInit,
VCSenInit senInit 
)

This function initializes the standard camera configuration which can be used for image acquisitions: This function calls vc_capt_init(). Deinitialization is necessary before leaving your program by using the function vc_capt_deinit() as well as vc_cam_deinit().

You can provide NULL as value for camInit, trgInit and senInit. Then the default values will be used. If you want to add your own settings, please be sure to first pass default values to them, e.g. for senInit the contents of the definition VCSenInit_Default, and second apply your settings.

init.toBeModified = newValue;
rc = vc_cam_init([...], &init, [...]);

Content of camNew and @cptNew will be overwritten, so be sure to set values not before their initialisation has been done (e.g. by this function).

This function must not be called more than once before proper deinitialisation.

Parameters
camNewNew Camera Struct, will be overwritten.
cptNewNew Capture Struct, will be overwritten.
camInitSet to NULL, or provide it with VCCamInit_Default applied and changed by your needs.
trgInitSet to NULL, or provide it with VCTrgInit_Default applied and changed by your needs.
senInitSet to NULL, or provide it with VCSenInit_Default applied and changed by your needs.
See also
vc_cam_init_raw(), vc_capt_init().
vc_cam_init_raw
I32 vc_cam_init_raw(VCCamCfg *camNew, VCCamInit *camInit)
Initializes the Camera.
Definition: vc_cam_generic.c:213
VCTrgInit
Trigger Settings only configurable during Initialization.
Definition: vclinux.h:971
VCSenInit
Sensor Settings only configurable during Initialization.
Definition: vclinux.h:688
vc_cam_init
I32 vc_cam_init(VCCamCfg *camNew, VCCaptCfg *cptNew, VCCamInit *camInit, VCTrgInit *trgInit, VCSenInit *senInit)
Initializes a Standard Camera Setup.
Definition: vc_cam_generic.c:137
VCSenInit_Default
#define VCSenInit_Default
Sensor Initialization Default Settings.
Definition: vclinux.h:715
VCCamInit
Camera Settings only configurable during Initialization.
Definition: vclinux.h:375
SENSYNC_SYNC
@ SENSYNC_SYNC
Definition: vclinux.h:511
VCTrgInit_Default
#define VCTrgInit_Default
Trigger Initialization Default Settings.
Definition: vclinux.h:985
SENSYNC_STANDALONE
@ SENSYNC_STANDALONE
Definition: vclinux.h:510
vc_capt_init_raw
I32 vc_capt_init_raw(VCCaptCfg *cptNew, VCCamCfg *cam, VCTrgInit *cptInit)
Initializes the Capture Setup used for Image Acquisitions.
Definition: vc_capt_generic.c:619
vc_capt_init_sen_add
I32 vc_capt_init_sen_add(VCCaptCfg *cpt, U32 senPortNr, VCSenInit *senInit, VCTrgInit *trgInit)
Adds a Sensor to a pre-initialized Capture Configuration.
Definition: vc_capt_generic.c:767