![]() |
IRSOL
C++ code implementing socket server for interacting with Baumer camera.
|
Example application using the irsol
library to initialize logging, connect to a camera, capturing a sequence of images and displaying them.
More...
Go to the source code of this file.
Classes | |
struct | Params |
Command-line parameters for the program. More... | |
Macros | |
#define | PROGRAM_NAME "loading-images-opencv-demo" |
Functions | |
const std::string | getProgramName () |
Returns the program name, typically used for logging. If PROGRAM_NAME is not defined at compile time, returns "loading-images-opencv-demo" . | |
Params | getParams (int argc, char **argv) |
Parses command-line arguments using args library. | |
void | runCapture (irsol::camera::Interface &cam) |
Captures a single image using the provided camera interface, logs metadata and performance stats. | |
int | main (int argc, char **argv) |
Program entrypoint. | |
Example application using the irsol
library to initialize logging, connect to a camera, capturing a sequence of images and displaying them.
This example is only build when opencv
is found by the build toolchain.
This program serves as a minimal working example for new developers to understand how to interact with the core components of the irsol
library. It demonstrates:
Build system integration is expected to define PROGRAM_NAME
for logging.
Definition in file main-opencv.cpp.
#define PROGRAM_NAME "loading-images-opencv-demo" |
Params getParams | ( | int | argc, |
char ** | argv | ||
) |
Parses command-line arguments using args
library.
Supported arguments:
--log-level
, -l
: Set logging level (trace, debug, info, warn, error)--frames-count
, -f
: Set number of frames to capture--help
, -h
: Show help message and exitargc | Argument count |
argv | Argument vector |
Params
struct Definition at line 57 of file main-opencv.cpp.
const std::string getProgramName | ( | ) |
Returns the program name, typically used for logging. If PROGRAM_NAME
is not defined at compile time, returns "loading-images-opencv-demo"
.
Definition at line 25 of file main-opencv.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Program entrypoint.
Definition at line 120 of file main-opencv.cpp.
void runCapture | ( | irsol::camera::Interface & | cam | ) |
Captures a single image using the provided camera interface, logs metadata and performance stats.
cam | Reference to an initialized irsol::camera::Interface instance. |
Definition at line 98 of file main-opencv.cpp.