diff options
author | John Morrison <jcm357@cs.drexel.edu> | 2012-06-15 14:28:59 -0400 |
---|---|---|
committer | John Morrison <jcm357@cs.drexel.edu> | 2012-06-15 14:28:59 -0400 |
commit | bc5e8a9c4f9c6530793037b19d045fc10581823e (patch) | |
tree | d5c47f6dfd311813bc527c5ac3fdc1244d6dbe5e /fly-tools | |
parent | 934882477a0b213a8f263d43a997cce0db1ea86e (diff) |
fixed to use globals and begin to implement optional output of overlay images
Diffstat (limited to 'fly-tools')
-rw-r--r-- | fly-tools/FlyTrackingMain.cpp | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/fly-tools/FlyTrackingMain.cpp b/fly-tools/FlyTrackingMain.cpp index 0595a45..381722e 100644 --- a/fly-tools/FlyTrackingMain.cpp +++ b/fly-tools/FlyTrackingMain.cpp @@ -59,6 +59,7 @@ int endOfAOneObject = -1; vector<string> fnVector; string inputFileName; +bool writeFinalImages = false; // GLOBAL PATHS string maskImagePath; string origImagePath; @@ -2024,13 +2025,7 @@ ofstream foutDebugSpeed; int main(int argc, char **argv) { int c; - int writeFinalImages; string usage = "Usage: FlyTracking -i <inputFile.txt> -o <originalImagePath> -f <finalOutputPath> -m <maskImagePath> -O <outputFilePrefix>"; - string origImagePath; - string finalOutputPath; - string outputFilePrefix; - string maskImagePath; - string inputFileName; opterr = 0; while ((c = getopt (argc, argv, "i:f:m:p:o:hx")) != -1) @@ -2056,7 +2051,7 @@ int main(int argc, char **argv) exit(1); break; case 'x': - writeFinalImages; + writeFinalImages = true; break; default: break; @@ -2151,9 +2146,10 @@ int main(int argc, char **argv) Image* img = new Image(fileName.c_str()); int width = img->columns(),height = img->rows(); diagLength= static_cast<int> ( sqrt( (height*height) + (width*width) ) ); + //cout << "Diagonal length is "<<diagLength<<endl; -// Image* imgWithInfo; -// imgWithInfo = new Image(fileName.c_str()); + // Image* imgWithInfo; + // imgWithInfo = new Image(fileName.c_str()); sprintf(buffer,"%ix%i",width,height); string imsize(buffer); imgSize = imsize; @@ -2766,17 +2762,12 @@ void calculateStatistics(FrameInfo currentFI, string fileName, int isFirst, bool void drawTheFlyObject(FrameInfo currentFI, string fileName, int isFirst, bool singleBlob, bool unprocessed) { cout << "isFirst is "<<isFirst<<endl; - - //string inputFileName = origImagePath + fileName; - // string inputFileName = "output/identified/"+fileName; - - // when do not want to identify on the original comment the line below and uncomment the above line - // debugging for drawing the circle - //string outputFileName = finalOutputPath + fileName; - // string outputFileName = "output/identified_with_cropped/" + fileName; - - //Image* img = new Image(inputFileName.c_str()); - + + if(writeFinalImages) { + string inputFileName = origImagePath + fileName; + string outputFileName = finalOutputPath + fileName; + Image* img = new Image(inputFileName.c_str()); + } vector<FlyObject > fOVector = currentFI.getFOVector(); cout << "While drawing it found objects = "<<fOVector.size()<<endl; |