Script to run multiple OpenCv programs in Windows

astronaut

New Member
Messages
1
0down votefavorite
I like to run several OpenCV programs one by one in a DO Loop. After searching the web , think for this case need to use batch file. Is that right?
I have 10 OpenCV programs. Each program detect specific features in the image with some successful rate. So, for any image(with many features to be detected) I wonna run first the program with the highest successful rate. If this failed to detect feature then run next one with second highest rate and so on. So, for example program1 is the one with the highest rate, then come program2 and so on
So I have output for each of the 10 OpenCv programs. Let we say output 1 if detect the feature (or the object) in the image and 0 if it failed. So the script should start the program 1 first and if the outcome of this program is 1 then will do something (not important at the moment what), but if the outcome is 0 then need to start the program 2. Same for program 2. If the output of program 2 is 1 then do something (also not important what), but if the output is 0 (means did not detect the object) then run the next program (means program3)
Any idea how it should look like?
I have thinking of something like this , but not sure about the control




down votefavorite
I like to run several OpenCV programs one by one in a DO Loop. After searching the web , think for this case need to use batch file. Is that right?
I have 10 OpenCV programs. Each program detect specific features in the image with some successful rate. So, for any image(with many features to be detected) I wonna run first the program with the highest successful rate. If this failed to detect feature then run next one with second highest rate and so on. So, for example program1 is the one with the highest rate, then come program2 and so on
So I have output for each of the 10 OpenCv programs. Let we say output 1 if detect the feature (or the object) in the image and 0 if it failed. So the script should start the program 1 first and if the outcome of this program is 1 then will run some other .exe program (let we say program.exe) but if the outcome is 0 then need to start the program 2. Same for program 2. If the output of program 2 is 1 then will run the same program.exe, but if the output is 0 (means did not detect the object) then run the next program (means program3). Same for program 3
Any idea how it should look like?
I have thinking of something like this , but not sure about the control


@ECHO OFF
START program1.exe
ECHO Timeout waiting for program1.exe to start
GOTO :EOF

:: if the output of program1.exe is 1 then run program.exe, else
if the output of program1.exe is 0 run the program2.exe
:startnext
program2.exe
:: or START program2.exe

 

My Computer

System One

  • OS
    Windows 8
Back
Top