Skip to content

Commit

Permalink
fix: Removed remaining reference to i1.png
Browse files Browse the repository at this point in the history
When initialising CUDA, the code reads an image to obtain the size. This contains
a reference to i1.png which had not been replaced by a reference to the provided
command line argument.  When i1.png is missing, the code fails silently and causes
the output pdflow files to be zero valued.

This change forces the code to read the first provided image parameter.

It doesn't fix the silent fail issue but a missing input file will be caught later
when processing occurs.
  • Loading branch information
Scoobadood committed Nov 9, 2016
1 parent e07ccb1 commit 0337406
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scene_flow_impair.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ void PD_flow_opencv::initializeCUDA()
char name[100];

//Read one image to know the image resolution
sprintf(name, "i1.png");
intensity1 = cv::imread(name, CV_LOAD_IMAGE_GRAYSCALE);
intensity1 = cv::imread(intensity_filename_1, CV_LOAD_IMAGE_GRAYSCALE);

width = intensity1.cols;
height = intensity1.rows;
Expand Down

0 comments on commit 0337406

Please sign in to comment.