merge local master
This commit is contained in:
commit
bc19757de2
@ -97,23 +97,23 @@ void RefractiveIndex::setup()
|
|||||||
|
|
||||||
//TODO: whichever one of these is first - it always runs twice ?
|
//TODO: whichever one of these is first - it always runs twice ?
|
||||||
|
|
||||||
// _analysisVector.push_back(new ShadowScapesAnalysis(V));
|
_analysisVector.push_back(new ShadowScapesAnalysis(V));
|
||||||
// _analysisVector.push_back(new ShadowScapesAnalysis(H));
|
_analysisVector.push_back(new ShadowScapesAnalysis(H));
|
||||||
// _analysisVector.push_back(new ShadowScapesAnalysis(D));
|
_analysisVector.push_back(new ShadowScapesAnalysis(D));
|
||||||
|
|
||||||
// _analysisVector.push_back(new RelaxRateAnalysis());
|
_analysisVector.push_back(new RelaxRateAnalysis());
|
||||||
|
|
||||||
// _analysisVector.push_back(new IResponseAnalysis());
|
_analysisVector.push_back(new IResponseAnalysis());
|
||||||
|
|
||||||
_analysisVector.push_back(new ShapeFromShadingAnalysis());
|
_analysisVector.push_back(new ShapeFromShadingAnalysis());
|
||||||
|
|
||||||
// _analysisVector.push_back(new StrobeAnalysis());
|
_analysisVector.push_back(new StrobeAnalysis());
|
||||||
|
|
||||||
// _analysisVector.push_back(new CamNoiseAnalysis());
|
_analysisVector.push_back(new CamNoiseAnalysis());
|
||||||
|
|
||||||
// _analysisVector.push_back(new ColorSingleAnalysis());
|
_analysisVector.push_back(new ColorSingleAnalysis());
|
||||||
|
|
||||||
// _analysisVector.push_back(new ColorMultiAnalysis());
|
_analysisVector.push_back(new ColorMultiAnalysis());
|
||||||
|
|
||||||
_analysisVector.push_back(new DiffNoiseAnalysis());
|
_analysisVector.push_back(new DiffNoiseAnalysis());
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,14 @@
|
|||||||
|
|
||||||
#define SCREEN_WIDTH 800
|
#define SCREEN_WIDTH 800
|
||||||
#define SCREEN_HEIGHT 600
|
#define SCREEN_HEIGHT 600
|
||||||
|
/////////////////////////dis is the new shit///////////
|
||||||
|
|
||||||
|
/////////////////////////dis is the new shit///////////
|
||||||
|
|
||||||
|
/////////////////////////dis is the new shit///////////
|
||||||
|
|
||||||
|
/////////////////////////dis is the new shit///////////
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
ofAppGlutWindow window;
|
ofAppGlutWindow window;
|
||||||
|
|||||||
@ -74,6 +74,9 @@ void CamNoiseAnalysis::draw()
|
|||||||
// still need to deal with latency frames here - i.e.: there are frames
|
// still need to deal with latency frames here - i.e.: there are frames
|
||||||
/// *** TODO *** ///
|
/// *** TODO *** ///
|
||||||
|
|
||||||
|
if (_frame_cnt < _frame_cnt_max)
|
||||||
|
{
|
||||||
|
|
||||||
ofEnableAlphaBlending();
|
ofEnableAlphaBlending();
|
||||||
ofColor aColour;
|
ofColor aColour;
|
||||||
|
|
||||||
@ -112,11 +115,16 @@ void CamNoiseAnalysis::draw()
|
|||||||
// cout << "FADE OUT STROBE TIME " << endl;
|
// cout << "FADE OUT STROBE TIME " << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_frame_cnt++;
|
|
||||||
ofDisableAlphaBlending();
|
ofDisableAlphaBlending();
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
_RUN_DONE = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
_frame_cnt++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case STATE_SYNTHESISING:
|
case STATE_SYNTHESISING:
|
||||||
@ -153,7 +161,7 @@ void CamNoiseAnalysis::save_cb(Timer& timer)
|
|||||||
|
|
||||||
_saved_filenames.push_back(file);
|
_saved_filenames.push_back(file);
|
||||||
|
|
||||||
if(_save_cnt >= NUM_SAVE_PER_RUN)
|
//if(_save_cnt >= NUM_SAVE_PER_RUN)
|
||||||
_RUN_DONE = true;
|
// _RUN_DONE = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -124,6 +124,11 @@ void ColorMultiAnalysis::draw()
|
|||||||
switch (_state) {
|
switch (_state) {
|
||||||
case STATE_ACQUIRING:
|
case STATE_ACQUIRING:
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (_frame_cnt < _frame_cnt_max)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
int _fade_in_frames = _frame_cnt_max/50;
|
int _fade_in_frames = _frame_cnt_max/50;
|
||||||
|
|
||||||
if (_frame_cnt < _fade_in_frames) {
|
if (_frame_cnt < _fade_in_frames) {
|
||||||
@ -163,6 +168,12 @@ void ColorMultiAnalysis::draw()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
_RUN_DONE = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
_frame_cnt++;
|
_frame_cnt++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -202,10 +213,17 @@ void ColorMultiAnalysis::save_cb(Timer& timer)
|
|||||||
|
|
||||||
// cout<<_whole_file_path<<endl;
|
// cout<<_whole_file_path<<endl;
|
||||||
ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST);
|
ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST);
|
||||||
|
<<<<<<< HEAD
|
||||||
// _saved_filenames.push_back("/Users/tomschofield/of_preRelease_v007_osx/apps/myApps/refractiveIndexDavidFeb/bin/data/"+_whole_file_path+"/"+file_name);
|
// _saved_filenames.push_back("/Users/tomschofield/of_preRelease_v007_osx/apps/myApps/refractiveIndexDavidFeb/bin/data/"+_whole_file_path+"/"+file_name);
|
||||||
_saved_filenames.push_back("fish.jpg");
|
_saved_filenames.push_back("fish.jpg");
|
||||||
|
|
||||||
if(_save_cnt >= NUM_SAVE_PER_RUN){
|
if(_save_cnt >= NUM_SAVE_PER_RUN){
|
||||||
_RUN_DONE = true;
|
_RUN_DONE = true;
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
|
||||||
|
//if(_save_cnt >= NUM_SAVE_PER_RUN){
|
||||||
|
// _RUN_DONE = true;
|
||||||
|
//}
|
||||||
|
>>>>>>> 88fa0375934e9ad87053542e88a0f9fe61af0a66
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,8 +73,12 @@ void ColorSingleAnalysis::draw()
|
|||||||
switch (_state) {
|
switch (_state) {
|
||||||
case STATE_ACQUIRING:
|
case STATE_ACQUIRING:
|
||||||
{
|
{
|
||||||
float one_third_of_frame_count_max=_frame_cnt_max/3;
|
|
||||||
|
|
||||||
|
|
||||||
|
if (_frame_cnt < _frame_cnt_max)
|
||||||
|
{
|
||||||
|
|
||||||
|
float one_third_of_frame_count_max=_frame_cnt_max/3;
|
||||||
int _fade_in_frames = one_third_of_frame_count_max/10;
|
int _fade_in_frames = one_third_of_frame_count_max/10;
|
||||||
|
|
||||||
if (_frame_cnt < _fade_in_frames){
|
if (_frame_cnt < _fade_in_frames){
|
||||||
@ -120,6 +124,10 @@ void ColorSingleAnalysis::draw()
|
|||||||
fileNameTag = "FADING";
|
fileNameTag = "FADING";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
_RUN_DONE = true;
|
||||||
|
}
|
||||||
|
|
||||||
_frame_cnt++;
|
_frame_cnt++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -156,7 +164,7 @@ void ColorSingleAnalysis::save_cb(Timer& timer)
|
|||||||
|
|
||||||
//cout<<_whole_file_path+"/"+file_name<<endl;
|
//cout<<_whole_file_path+"/"+file_name<<endl;
|
||||||
|
|
||||||
if(_save_cnt >= NUM_SAVE_PER_RUN)
|
//if(_save_cnt >= NUM_SAVE_PER_RUN)
|
||||||
_RUN_DONE = true;
|
// _RUN_DONE = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -69,6 +69,10 @@ void DiffNoiseAnalysis::draw()
|
|||||||
switch (_state) {
|
switch (_state) {
|
||||||
case STATE_ACQUIRING:
|
case STATE_ACQUIRING:
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (_frame_cnt < _frame_cnt_max)
|
||||||
|
{
|
||||||
|
|
||||||
ofColor aColour;
|
ofColor aColour;
|
||||||
int rectSize = 5;
|
int rectSize = 5;
|
||||||
ofEnableAlphaBlending();
|
ofEnableAlphaBlending();
|
||||||
@ -130,6 +134,12 @@ void DiffNoiseAnalysis::draw()
|
|||||||
|
|
||||||
ofDisableAlphaBlending();
|
ofDisableAlphaBlending();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
_RUN_DONE = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
_frame_cnt++;
|
_frame_cnt++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -182,7 +192,7 @@ void DiffNoiseAnalysis::save_cb(Timer& timer)
|
|||||||
|
|
||||||
}
|
}
|
||||||
_save_cnt++;
|
_save_cnt++;
|
||||||
if(_save_cnt >= NUM_SAVE_PER_RUN)
|
//if(_save_cnt >= NUM_SAVE_PER_RUN)
|
||||||
_RUN_DONE = true;
|
// _RUN_DONE = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,6 +79,8 @@ void IResponseAnalysis::draw()
|
|||||||
ofSetColor(c, c, c);
|
ofSetColor(c, c, c);
|
||||||
ofRect(0, 0, ofGetWidth(), ofGetHeight());
|
ofRect(0, 0, ofGetWidth(), ofGetHeight());
|
||||||
c = 255.0 * (_frame_cnt_max*_frame_cnt_max - _frame_cnt*_frame_cnt)/(_frame_cnt_max*_frame_cnt_max);
|
c = 255.0 * (_frame_cnt_max*_frame_cnt_max - _frame_cnt*_frame_cnt)/(_frame_cnt_max*_frame_cnt_max);
|
||||||
|
} else {
|
||||||
|
_RUN_DONE = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_frame_cnt++;
|
_frame_cnt++;
|
||||||
@ -121,6 +123,6 @@ void IResponseAnalysis::save_cb(Timer& timer)
|
|||||||
|
|
||||||
ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST);
|
ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST);
|
||||||
|
|
||||||
if(_save_cnt >= NUM_SAVE_PER_RUN)
|
//if(_save_cnt >= NUM_SAVE_PER_RUN)
|
||||||
_RUN_DONE = true;
|
// _RUN_DONE = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@ void RelaxRateAnalysis::setup(int camWidth, int camHeight)
|
|||||||
{
|
{
|
||||||
DELTA_T_SAVE = 300;
|
DELTA_T_SAVE = 300;
|
||||||
NUM_PHASE = 1;
|
NUM_PHASE = 1;
|
||||||
NUM_RUN = 1;
|
NUM_RUN = 3;
|
||||||
NUM_SAVE_PER_RUN = 100;
|
NUM_SAVE_PER_RUN = 100;
|
||||||
|
|
||||||
create_dir();
|
create_dir();
|
||||||
@ -75,7 +75,7 @@ void RelaxRateAnalysis::draw()
|
|||||||
// still need to deal with latency frames here - i.e.: there are frames
|
// still need to deal with latency frames here - i.e.: there are frames
|
||||||
/// *** TODO *** ///
|
/// *** TODO *** ///
|
||||||
|
|
||||||
if (_frame_cnt <= _frame_cnt_max)
|
if (_frame_cnt < _frame_cnt_max)
|
||||||
{
|
{
|
||||||
|
|
||||||
float lightLevel=pow(_level,2);
|
float lightLevel=pow(_level,2);
|
||||||
@ -93,7 +93,8 @@ void RelaxRateAnalysis::draw()
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
cout << "RELAXRATE RUN COMPLETED" << endl;
|
cout << "RELAXRATE RUN COMPLETED" << endl;
|
||||||
_state = STATE_SYNTHESISING;
|
//_state = STATE_SYNTHESISING;
|
||||||
|
_RUN_DONE = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_frame_cnt++;
|
_frame_cnt++;
|
||||||
@ -138,7 +139,7 @@ void RelaxRateAnalysis::save_cb(Timer& timer)
|
|||||||
|
|
||||||
_saved_filenames.push_back(file);
|
_saved_filenames.push_back(file);
|
||||||
|
|
||||||
if(_save_cnt >= NUM_SAVE_PER_RUN)
|
//if(_save_cnt >= NUM_SAVE_PER_RUN)
|
||||||
_RUN_DONE = true;
|
// _RUN_DONE = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -166,21 +166,21 @@ void ShadowScapesAnalysis::draw()
|
|||||||
|
|
||||||
if(_dir == V && int(_line) >= (ofGetHeight()+4*_scanLineWidth)){
|
if(_dir == V && int(_line) >= (ofGetHeight()+4*_scanLineWidth)){
|
||||||
cout << "VERTICAL IS DONE - _line >= (ofGetHeight()+4*_scanLineWidth) is TRUE" << endl;
|
cout << "VERTICAL IS DONE - _line >= (ofGetHeight()+4*_scanLineWidth) is TRUE" << endl;
|
||||||
_state = STATE_SYNTHESISING;
|
//_state = STATE_SYNTHESISING;
|
||||||
_RUN_DONE = true;
|
_RUN_DONE = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_dir == H && int(_line) >= (ofGetWidth()+4*_scanLineWidth)) {
|
if(_dir == H && int(_line) >= (ofGetWidth()+4*_scanLineWidth)) {
|
||||||
|
|
||||||
//cout << "HORIZONTAL IS DONE - _line >= (ofGetWidth()+4*_scanLineWidth)) is TRUE" << endl;
|
//cout << "HORIZONTAL IS DONE - _line >= (ofGetWidth()+4*_scanLineWidth)) is TRUE" << endl;
|
||||||
_state = STATE_SYNTHESISING;
|
//_state = STATE_SYNTHESISING;
|
||||||
_RUN_DONE = true;
|
_RUN_DONE = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_dir == D && int(_line) >= (1.5*ofGetHeight()+4*_scanLineWidth)) {
|
if(_dir == D && int(_line) >= (1.5*ofGetHeight()+4*_scanLineWidth)) {
|
||||||
//cout << "DIAGONAL IS DONE - _line >= (1.5*ofGetHeight()+4*_scanLineWidth)) is TRUE" << endl;
|
//cout << "DIAGONAL IS DONE - _line >= (1.5*ofGetHeight()+4*_scanLineWidth)) is TRUE" << endl;
|
||||||
_state = STATE_SYNTHESISING;
|
//_state = STATE_SYNTHESISING;
|
||||||
_RUN_DONE = true;
|
_RUN_DONE = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -89,7 +89,7 @@ void ShapeFromShadingAnalysis::draw()
|
|||||||
switch (_state) {
|
switch (_state) {
|
||||||
case STATE_ACQUIRING:
|
case STATE_ACQUIRING:
|
||||||
{
|
{
|
||||||
if (_frame_cnt <= _frame_cnt_max)
|
if (_frame_cnt < _frame_cnt_max)
|
||||||
{
|
{
|
||||||
|
|
||||||
ofEnableAlphaBlending();
|
ofEnableAlphaBlending();
|
||||||
@ -344,7 +344,7 @@ void ShapeFromShadingAnalysis::save_cb(Timer& timer)
|
|||||||
ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST);
|
ofSaveImage(RefractiveIndex::_pixels, _whole_file_path+"/"+file_name, OF_IMAGE_QUALITY_BEST);
|
||||||
_save_cnt++;
|
_save_cnt++;
|
||||||
|
|
||||||
if(_save_cnt >= NUM_SAVE_PER_RUN)
|
//if(_save_cnt >= NUM_SAVE_PER_RUN)
|
||||||
_RUN_DONE = true;
|
// _RUN_DONE = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,6 +73,9 @@ void StrobeAnalysis::draw()
|
|||||||
|
|
||||||
switch (_state) {
|
switch (_state) {
|
||||||
case STATE_ACQUIRING:
|
case STATE_ACQUIRING:
|
||||||
|
{
|
||||||
|
|
||||||
|
if (_frame_cnt < _frame_cnt_max)
|
||||||
{
|
{
|
||||||
ofEnableAlphaBlending();
|
ofEnableAlphaBlending();
|
||||||
ofColor aColour;
|
ofColor aColour;
|
||||||
@ -117,8 +120,12 @@ void StrobeAnalysis::draw()
|
|||||||
// cout << "FADE OUT STROBE TIME " << endl;
|
// cout << "FADE OUT STROBE TIME " << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
_frame_cnt++;
|
|
||||||
ofDisableAlphaBlending();
|
ofDisableAlphaBlending();
|
||||||
|
} else {
|
||||||
|
_RUN_DONE = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
_frame_cnt++;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -154,8 +161,8 @@ void StrobeAnalysis::save_cb(Timer& timer)
|
|||||||
cout << "_save_cnt_max" << _save_cnt_max << endl;
|
cout << "_save_cnt_max" << _save_cnt_max << endl;
|
||||||
|
|
||||||
//TODO: something fucked here with my calc of _save_cnt_max - new structure should fix it?
|
//TODO: something fucked here with my calc of _save_cnt_max - new structure should fix it?
|
||||||
if(_save_cnt >= _save_cnt_max-10) {
|
//if(_save_cnt >= _save_cnt_max-10) {
|
||||||
_RUN_DONE = true;
|
// _RUN_DONE = true;
|
||||||
}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user