0

我英语不好。我正在研究使用 live 555 的实时流视频,但我不是从文件流式传输,而是从实时摄像机流式传输。这是我从互联网上获得的代码文件之一:

#ifndef PG_CAMERA_H
#define PG_CAMERA_H
#include "FlyCapture2.h"
#include <unistd.h>
#include <time.h>
#include <cv.h>
#include <highgui.h>
#include <mutex>
#include <thread>
#include <base.hpp>
#include <memory>
//#include <tr1/memory>
#define SOFTWARE_TRIGGER_CAMERA

using namespace FlyCapture2;
using namespace std;
using namespace cv;

/*s=vectors for storing camera and asssociated settings */
typedef std::vector<std::shared_ptr<Camera>> vec_cam;
typedef std::vector<std::shared_ptr<PGRGuid>> vec_guid;
typedef std::vector<std::shared_ptr<CameraInfo>> vec_CamInfo;
typedef std::vector<std::shared_ptr<Format7ImageSettings>>              vec_ImageSettings;
typedef std::vector<std::shared_ptr<FC2Config>> vec_config;
typedef std::vector<std::shared_ptr<TriggerMode>> vec_TriggerMode;



class PG_camera
{
public:
PG_camera();
~PG_camera();
//void initialise();
void default_initialise(unsigned int camera_number, Mode mode);
void disconnect(unsigned int camera_number);
void disconnect(void);
void discover();
void connect(unsigned int camera_number);
void connect(void);
void set_Nimages(unsigned int camera_number, int number);
void set_camera_mode(int mode);
vector<Mat> return_images(unsigned int camera_number);
Error change_ROI(unsigned int camera_number,unsigned int x,unsigned int y, unsigned int width,unsigned int height);
//return busMgr to private after tests
Error configure_camera_image(int camera_number);
Error configure_camera_gain(int camera_number, int gain);
Error configure_camera_framerate(int camera_number, int frame_rate);
Error configure_camera_shutter(int camera_number, int shutter);
Error configure_camera_brightness(int camera_number);
Error configure_camera_sharpness(int camera_number);
Error configure_camera_exposure(int camera_number);
Error configure_camera_gamma(int camera_number);

void get_max_res( int camera_number, int *width, int *height);
int get_number_cams(void);

vec_CamInfo VCamInfo;



private:

Error *error;    
BusManager *busMgr;

vec_cam Vcam;
vec_guid Vguid;
vec_ImageSettings VImageSettings;
vec_config VConfig;
vec_TriggerMode Vtrigmode;



unsigned int number_of_cams;
vector<bool> iscolor;
vector<int> N_images;
//int N_images;
int camera_mode;


void set_colour(unsigned int camera_number, bool colour);
void PrintBuildInfo();
void PrintCameraInfo( CameraInfo* pCamInfo );
void PrintError( Error error );
bool CheckSoftwareTriggerPresence( Camera* pCam );
bool PollForTriggerReady( Camera* pCam );
bool FireSoftwareTrigger( Camera* pCam );
int initialise_format7(Camera *cam, Format7ImageSettings     *image_settings, bool colour, Mode mode);
int trigger_mode_setup(TriggerMode *triggerMode, Camera *cam, int k_numImages);
void configure_strobe(Camera *cam);


};

#endif // PG_CAMERA_H

我添加了库和包含(标准、opencv、flycapture ......),但是没有库和包含定义“类错误”的库。所以有人遇到过这个问题,能给我一些建议吗?谢谢阅读!

4

1 回答 1

0

至少对我来说,问题是错误是模棱两可的。所以你必须指定:

void PrintError(FlyCapture2::Error error);
于 2015-11-17T18:14:31.060 回答