2012-02-18 20:37:22 +01:00
|
|
|
/*
|
|
|
|
|
~ author: dviid
|
|
|
|
|
~ contact: dviid@labs.ciid.dk
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "AbstractAnalysis.h"
|
|
|
|
|
#include "Poco/Timer.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ShapeFromShadingAnalysis : public AbstractAnalysis
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
ShapeFromShadingAnalysis(): AbstractAnalysis("SHAPEFROMSHADING"){;}
|
|
|
|
|
virtual ~ShapeFromShadingAnalysis(){;}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
void setup(int camWidth, int camHeight);
|
|
|
|
|
void acquire();
|
|
|
|
|
void synthesise();
|
2012-02-21 01:01:49 +01:00
|
|
|
void displayresults();
|
2012-02-18 20:37:22 +01:00
|
|
|
void draw();
|
|
|
|
|
|
|
|
|
|
void save_cb(Poco::Timer& timer);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
string quad;
|
|
|
|
|
bool _RUN_DONE;
|
|
|
|
|
float _flip, _level;
|
|
|
|
|
int _animation_cnt1;
|
|
|
|
|
int _animation_cnt2;
|
|
|
|
|
int _animation_cnt3;
|
|
|
|
|
int _animation_cnt4;
|
|
|
|
|
int _animation_cnt5;
|
|
|
|
|
int _animation_cnt6;
|
|
|
|
|
int _animation_cnt7;
|
|
|
|
|
int _animation_cnt8;
|
|
|
|
|
int _animation_cnt9;
|
|
|
|
|
int _animation_cnt10;
|
|
|
|
|
int _animation_cnt11;
|
|
|
|
|
int _animation_cnt12;
|
|
|
|
|
int _animation_cnt13;
|
|
|
|
|
int _animation_cnt14;
|
|
|
|
|
int _animation_cnt15;
|
|
|
|
|
int _animation_cnt16;
|
|
|
|
|
int _animation_reset; // this reset part didn't get working - so using 16 different counters! yay!
|
2012-02-20 03:40:38 +01:00
|
|
|
|
2012-02-20 19:48:43 +01:00
|
|
|
int _run_cnt, _save_cnt, _anim_cnt;
|
2012-02-20 03:40:38 +01:00
|
|
|
float c, _frame_cnt, _frame_cnt_max, _anim_cnt_max;
|
2012-02-21 01:01:49 +01:00
|
|
|
|
2012-02-21 01:34:24 +01:00
|
|
|
bool _show_image, _image_shown;
|
2012-02-21 01:01:49 +01:00
|
|
|
ofImage image1;
|
2012-02-21 01:34:24 +01:00
|
|
|
ofImage image2;
|
2012-02-21 01:01:49 +01:00
|
|
|
|
2012-02-18 20:37:22 +01:00
|
|
|
};
|