Files
vision_sjtu_19/others/include/camera/camera_wrapper.h
2019-04-27 16:16:53 +08:00

52 lines
1.0 KiB
C++

//
// Created by zhikun on 18-11-7.
// used for testing double cameras
// camera0 is left camera, camera1 is right camera.
//
#ifndef VIDEO_TEST1_CAMERA_WRAPPER_H
#define VIDEO_TEST1_CAMERA_WRAPPER_H
#include <stdio.h>
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/imgproc/imgproc.hpp>
#include "camera/wrapper_head.h"
#include "camera/camera_api.h"
class CameraWrapper: public WrapperHead {
private:
const std::string name;
unsigned char* rgb_buffer;
int camera_cnts;
int camera_status;
tSdkCameraDevInfo camera_enum_list[2];
int h_camera;
char camera_name[32];
tSdkCameraCapbility tCapability;
tSdkFrameHead frame_info;
BYTE *pby_buffer;
IplImage* iplImage;
int channel;
public:
CameraWrapper();
CameraWrapper(const std::string &n);
~CameraWrapper() final;
bool init() final;
bool read(cv::Mat& src) final;
bool readRaw(cv::Mat& src);
bool readProcessed(cv::Mat& src);
};
#endif //VIDEO_TEST1_CAMERA_WRAPPER_H