printf("Command-line parameter error: either both intrinsic and extrinsic parameters must be specified, or none of them (when the stereo pair is already rectified)\n");
@ -173,7 +160,18 @@ int main(int argc, char** argv)
Matimg1=imread(img1_filename,color_mode);
Matimg2=imread(img2_filename,color_mode);
if(scale!=1.f)
if(img1.empty())
{
printf("Command-line parameter error: could not load the first input image file\n");
return-1;
}
if(img2.empty())
{
printf("Command-line parameter error: could not load the second input image file\n");