#! /bin/csh -f #Image file(s) details set IMAGE_DATABASE_DIR = \/home\/pgsangam\/src\/ARC\/imageData\/LastFlight22Feb03\/Clip224 set IMAGE_PREFIX = clipInstance set IMAGE_SUFFIX = ppm set IMAGE_NUM = 0 #Template file(s) details set TEMPLATE_DIR = \/home\/pgsangam\/src\/ARC\/templateImages set TEMPLATE_PREFIX = ${TEMPLATE_DIR}/iarcTemplate set TEMPLATE_SUFFIX = ppm set NUMBER_OF_TEMPLATES = 7 #Result directory and log file details #*****CHANGE THESE TO HOWEVER YOU WISH***** set RESULT_DIR = \/home\/pgsangam\/flight_result set LOG_FILENAME = ${RESULT_DIR}/recognition-results.log #Directory which contains the executable set EXECUTABLE_DIR = \/home\/pgsangam\/bin\/linux_386_xeon loop: set PRESENT_IMAGE = ${IMAGE_DATABASE_DIR}/${IMAGE_PREFIX}${IMAGE_NUM}.${IMAGE_SUFFIX} set COUNTER = 0 #Wait for 10s at the max for the present image to appear in the directory poll: if ( ( ! -e ${PRESENT_IMAGE} ) && ( ${COUNTER} < 10 ) ) then sleep 1 @ COUNTER += 1 goto poll endif #If 10s have gone and the image has still not appeared, #increment the image number and start looking for it in the database if ( ( ! -e ${PRESENT_IMAGE} ) && ( ${COUNTER} == 10 ) ) then echo 'Cannot find image' ${PRESENT_IMAGE} @ IMAGE_NUM += 1 goto loop #else it means that the image has apeared, so process it #also increment the image number and start looking for it in the database else echo 'Processing image' ${PRESENT_IMAGE} ${EXECUTABLE_DIR}/pruningBasedTemplateMatch ${PRESENT_IMAGE} ${TEMPLATE_PREFIX} ${TEMPLATE_SUFFIX} ${NUMBER_OF_TEMPLATES} >> ${LOG_FILENAME} @ IMAGE_NUM += 1 goto loop endif