Script to run multiple OpenCv programs in Windows 8

Discussion in 'Software' started by astronaut, Feb 9, 2017.

  1. astronaut

    astronaut

    Joined:
    Feb 9, 2017
    Messages:
    1
    Likes Received:
    0
    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
    ECHO Timeout waiting for program1.exe to start
    GOTO :EOF

    :: if the output of program2.exe is 1 then run program.exe, else
    if the output of program2.exe is 0 run the program3.exe

    ...
     
    astronaut, Feb 9, 2017
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Building Windows 8

    Enhancing Windows 8 for multiple monitors

    Building Windows 8, May 16, 2012, in forum: Windows 8 News
    Replies:
    0
    Views:
    1,392
    Building Windows 8
    May 16, 2012
  2. allswl

    Does Windows 8 Allow Multiple users?

    allswl, Sep 12, 2012, in forum: Windows 8 Support
    Replies:
    1
    Views:
    2,523
  3. Moe

    SCRIPT ERRORS

    Moe, Dec 7, 2012, in forum: Crashes, BSODs and Debugging
    Replies:
    3
    Views:
    1,400
  4. Tererize
    Replies:
    3
    Views:
    1,024
    davehc
    Aug 7, 2014
  5. Johnny

    I need help with script.

    Johnny, Aug 21, 2014, in forum: Windows 8 Support
    Replies:
    0
    Views:
    793
    Johnny
    Aug 21, 2014
  6. LYGO

    SOLVED Error on 'sys32.vbs - Windows Script Host'

    LYGO, Apr 10, 2016, in forum: General Discussion
    Replies:
    2
    Views:
    830
  7. JamieD

    Windows 8.1 nvlddmkm.sys BSOD 7e

    JamieD, Feb 7, 2017, in forum: Drivers
    Replies:
    0
    Views:
    112
    JamieD
    Feb 7, 2017
  8. MartinL
    Replies:
    0
    Views:
    111
    MartinL
    Feb 13, 2017
Loading...