@@ -57,6 +57,7 @@ raspistillSetting myRaspistillSetting;
5757modeMeanSetting myModeMeanSetting;
5858std::string errorOutput;
5959std::string metadataFile = " " ;
60+ std::string metadataArgs = " " ;
6061
6162
6263// ---------------------------------------------------------------------------------------------
@@ -323,14 +324,9 @@ int RPicapture(config cg, cv::Mat *image)
323324 string s2 = " " ;
324325 if (cg.isLibcamera )
325326 {
326- command += " --metadata ' " + metadataFile + " ' --metadata-format txt " ;
327+ command += metadataArgs ;
327328
328- // If there have been 2 consecutive errors, chances are this one will fail too,
329- // so capture the error message.
330- if (cg.debugLevel >= 3 || numConsecutiveErrors >= 2 )
331- s2 = " > " + errorOutput + " 2>&1" ;
332- else
333- s2 = " 2> /dev/null" ; // gets rid of a bunch of libcamera verbose messages
329+ s2 = " > " + errorOutput + " 2>&1" ;
334330 }
335331
336332 // Create the command we'll actually run.
@@ -531,6 +527,7 @@ int main(int argc, char *argv[])
531527 errorOutput += " /capture_RPi_debug.txt" ;
532528 metadataFile = CG.saveDir ;
533529 metadataFile += " /metadata.txt" ;
530+ metadataArgs = " --metadata '" + metadataFile + " ' --metadata-format txt" ;
534531
535532 int iMaxWidth, iMaxHeight;
536533 double pixelSize;
0 commit comments