#include "camera.h"
#include <QRandomGenerator>
#include <string>
#include <functional>
#include <QDebug>

Camera::Camera(cam::Camera::Description desc)
{
	cameraId_ = desc.getId();
	std::function<void(cv::Mat)> cb = [this](cv::Mat image){newImage(Image(image, cameraId_));};
	camera_ = new cam::Camera(cb);
	camera_->openCamera(desc);
}

Camera::~Camera()
{
	delete camera_;
}
