Vector CANoe configuration integrating Image/Video capture using AForge.NET. Compatible with any camera that interfaces with DirectShow on Microsoft Windows.
Based upon the latest AForge.NET code with the following modifications:
- Update projects to target .NET Framework 4 Client Profile
- Integrated IAMVideoProcAmp change (details)
- Updated FFMPEG to release 4.3.2 (build)
- Backported code from Accord.NET to allow AForge.Video.FFMPEG to integrate with newer versions of FFMPEG
- Removed parts of AForge.NET that are not required for just Image/Video capture
Writing to the System Variables in the CANoe configuration allows for control of the camera interface:
System Variable | Description |
---|---|
CameraProperties | Structure containing the following elements:
Note: The minimum, maximum and default values are set for use with a Microsoft® LifeCam Studio(TM); if you use a different camera then update these values to reflect what is appropriate for your camera! |
CurrentCamera | The friendly name of the camera currently being used |
PreferredCamera | Structure containing the following elements:
|
SnapShotFileName | The filename of an image to be saved, updating this variable trigger saving the next available video frame as an image. File format is judged based upon file extension. |
VideoBitRate | The bitrate to be used when saving video data |
VideoFileName | The filename of a video to be saved. FFMPEG uses the default codec based upon the file extension |
VideoState | Toggle between Stopped (0) and Running (1) in order to begin or end video recording |
Note: If WebCam is added to an existing CANoe configuration then the name of the sysvar dll referenced in WebCam/WebCam.csproj will need to be modified to reflect the name of the new CANoe configuration name.
Sysvars can be added to an existing project by importing WebCam/Canoe/WebCam.vsysvar
Info: This node uses a callback whenever a new frame is available from the camera which can have some unintended behaviour:
- If the exposure value is set too long then you will not receive the expected frame rate from the camera which will cause any recorded video to playback too fast
- If the exposure is set to Auto and the lighting enviornment changes then any recorded video may contain time dilation due the the exposure dynamically modifying the frame rate