LARS
LARS (Light Augmented Reality System) is an open-source framework for light-based interaction and real-time tracking in multi-robot experiments. Inspired by ARK, LARS extends the augmented reality paradigm to robotic collectives by projecting dynamic visual cues and environments onto the arena, enabling new experimental possibilities for collective robotics research, education, and outreach. LARS features integrated tracking, light projection, and modular experiment control with a user-friendly Qt GUI.
Loading...
Searching...
No Matches
pylon.h
1#ifndef _PYLON_H_
2#define _PYLON_H_
3
4#include <opencv4/opencv2/videoio.hpp>
5#include <pylon/InstantCamera.h>
6#include <pylon/ImageFormatConverter.h>
7#include <pylon/PylonBase.h>
8#include <pylon/PylonImage.h>
9
10class PylonVideoSource : public cv::VideoCapture {
11
12 std::shared_ptr<Pylon::CInstantCamera> mCamera;
13 bool mOpened = false;
14 Pylon::CGrabResultPtr mGrabResult;
15 Pylon::CImageFormatConverter mImgFormater;
16
17 // VideoCapture interface
18public:
19 explicit PylonVideoSource();
20 ~PylonVideoSource();
21
22 bool isOpened() const;
23 void release();
24 bool retrieve(cv::OutputArray image, int flag = 0);
25 bool open(int index, int apiPreference = cv::CAP_ANY );
26
27 void readAllParameterValues();
28
29 void writeParameterValues();//VarList* varList);
30
31private:
32 // freq should always be 125 MHz for Basler-ace-1300-75gc
33 int camera_frequency = 125e6;
34 int* v_camera_id;
35// VarDouble* v_framerate;
36// VarInt* v_balance_ratio_red;
37// VarInt* v_balance_ratio_green;
38// VarInt* v_balance_ratio_blue;
39// VarBool* v_auto_gain;
40// VarInt* v_gain;
41// VarBool* v_gamma_enable;
42// VarDouble* v_gamma;
43// VarDouble* v_black_level;
44// VarBool* v_auto_exposure;
45// VarDouble* v_manual_exposure;
46// VarStringEnum* v_color_mode;
47
48 void resetCamera(unsigned int new_id);
49 bool _stopCapture();
50 bool _buildCamera();
51
52 // A slight blur helps to reduce noise and improve color recognition.
53 #ifdef OPENCV
54 static const double blur_sigma;
55 void gaussianBlur(RawImage& img);
56 void contrast(RawImage& img, double factor);
57 void sharpen(RawImage& img);
58 #endif
59
60
61};
62
63#endif