post future everything commit

This commit is contained in:
Jamie Allen 2012-05-19 18:43:54 +02:00
parent 58fdce259f
commit 7e7136fad0
3 changed files with 15 additions and 16 deletions

View File

@ -33,6 +33,8 @@ void CamNoiseAnalysis::setup(int camWidth, int camHeight)
ofSetLineWidth(5.0f);
glPointSize(5.0f);
glEnable(GL_DEPTH_TEST);
//blendMode = OF_BLENDMODE_ADD;
//blendMode = OF_BLENDMODE_MULTIPLY;
//blendMode = OF_BLENDMODE_SUBTRACT;
@ -974,6 +976,7 @@ vector<float> CamNoiseAnalysis::_returnDepthsAtEachPixel(ofImage &image1, vector
// cout<<" average: "<<averageDepths[inc]<<" actual: "<<imageColor1.getBrightness()<<" ";
}
// int thisDiff=imageColor1.getBrightness();
int thisDiff=-(imageColor1.getBrightness() - averageDepths[inc] );
//int thisDiff=abs(imageColor1.getLightness());
//int thisDiff=-abs(imageColor1.r);

View File

@ -27,7 +27,7 @@ void ColorSingleAnalysis::setup(int camWidth, int camHeight)
meshIsComplete=false;
_gotFirstImage=false;
_mesh_size_multiplier=8;
vertexSubsampling = 2;
vertexSubsampling = 1;
chooseColour=1;
int acq_run_time; // 10 seconds of acquiring per run
@ -743,16 +743,12 @@ vector<float> ColorSingleAnalysis::_returnDepthsAtEachPixel(ofImage &image1, ofI
if(chooseComparison==1){
//for each pixel...
float _maxPossibleDistanceToCentre=ofDist(0,0,imagePixels1.getWidth()/2, imagePixels1.getHeight()/2);
for(int i=0;i<imagePixels1.size();i+=3){
ofColor imageColor1 = imagePixels1.getColor(x, y);
//ofColor colourImage2 = imagePixels2.getColor(x, y);
float _distanceToCentre=ofDist(imagePixels1.getWidth()/2, imagePixels1.getHeight()/2, x, y);
float _presumedBrightness=ofMap(sqrt(_maxPossibleDistanceToCentre)-sqrt(_distanceToCentre), 0, sqrt(_maxPossibleDistanceToCentre), 0, 255);
//int thisDiff=abs(imageColor1.getHue());
//int thisDiff=abs(imageColor1.getBrightness());
//int thisDiff=abs(imageColor1.getBrightness()-_presumedBrightness);
@ -761,25 +757,25 @@ vector<float> ColorSingleAnalysis::_returnDepthsAtEachPixel(ofImage &image1, ofI
if(fileNameColor=="RED")
{
thisDiff=abs(imageColor1.r);
//thisDiff=abs(imageColor1.r);
//thisDiff=abs(255-imageColor1.r);
thisDiff=abs(255-imageColor1.r);
} else if(fileNameColor=="GREEN")
{
thisDiff=abs(imageColor1.g);
//thisDiff=abs(imageColor1.g);
//thisDiff=abs(255-imageColor1.g);
thisDiff=abs(255-imageColor1.g);
} else if(fileNameColor=="BLUE")
{
thisDiff=abs(imageColor1.b);
//thisDiff=abs(imageColor1.b);
//thisDiff=abs(255-imageColor1.b);
thisDiff=abs(255-imageColor1.b);
} else if(fileNameColor=="FADING") {
thisDiff=imageColor1.getBrightness();
//thisDiff=255-imageColor1.getBrightness();
//thisDiff=imageColor1.getBrightness();
thisDiff=255-imageColor1.getBrightness();
}
@ -789,7 +785,7 @@ vector<float> ColorSingleAnalysis::_returnDepthsAtEachPixel(ofImage &image1, ofI
//green hue: 120
//blue hue: 240
float multiplier=3.0;
float multiplier=8.0;
differences.push_back(multiplier* thisDiff);

View File

@ -165,7 +165,7 @@ void IResponseAnalysis::synthesise()
ofPixels backgroundPixels = _background.getPixelsRef();
//background subtraction//
/*
for(int i=0;i<imagePixels1.size();i++){
//unsigned char val=imagePixels1[i];
// cout<<(int)backgroundPixels[i]<< " thesePixels[i] "<<(int)imagePixels1[i]<<endl;
@ -176,7 +176,7 @@ void IResponseAnalysis::synthesise()
imagePixels1[i]=0;
}
}
*/
//update the images with their new background subtracted selves
image1.setFromPixels(imagePixels1);