RefractiveIndex/src/ShadowScapesAnalysis.h

49 lines
1.0 KiB
C
Raw Normal View History

/* */
2012-01-24 15:13:07 +01:00
#pragma once
#include "AbstractAnalysis.h"
#include "Poco/Timer.h"
2012-02-21 17:26:16 +01:00
#include "ofxOpenCv.h"
2012-01-24 15:13:07 +01:00
enum shadow_type {
H, V, D,
};
class ShadowScapesAnalysis : public AbstractAnalysis
{
public:
ShadowScapesAnalysis(shadow_type dir): AbstractAnalysis("SHADOWSCAPE"), _dir(dir){;}
2012-02-11 18:54:46 +01:00
ShadowScapesAnalysis(): AbstractAnalysis("SHADOWSCAPE"), _dir(H){;}
2012-01-24 15:13:07 +01:00
virtual ~ShadowScapesAnalysis(){;}
public:
void setup(int camWidth, int camHeight);
void acquire();
2012-02-21 01:34:24 +01:00
void synthesise();
void displayresults();
2012-01-24 15:13:07 +01:00
void draw();
void save_cb(Poco::Timer& timer);
2012-01-24 15:13:07 +01:00
protected:
bool _RUN_DONE;
float _line;
float _speed; // pix per second
float _scanLineWidth; // pix per second
float _step;
2012-01-24 15:13:07 +01:00
shadow_type _dir;
int _run_cnt, _save_cnt, _anim_cnt;
float c, _frame_cnt, _frame_cnt_max, _anim_cnt_max;
2012-01-24 15:13:07 +01:00
2012-02-21 01:34:24 +01:00
bool _show_image, _image_shown;
2012-02-21 17:26:16 +01:00
ofImage image1;
ofImage image2;
ofxCvColorImage cvImage1;
2012-02-21 01:34:24 +01:00
2012-01-24 15:13:07 +01:00
};