def semanticElements(i): try: Helpers.removeMatlabSemanticElementsOutputFile() logger.info('Running '+ matLabSemanticElementsScr) out,err,retCd = SysCall.sh([matLabSemanticElementsScr, '"'+i['lcImageName']+'"']) #out,err,retCd = SysCall.sh([matLabFeatureScr, Helpers.getTestImageName(), 'false']) logger.info('ret code:' +str(retCd)) logger.info('Script returned: ' + str( out)) if Helpers.checkFileNameExists(Helpers.getMatlabFeatureOutputFile()): return SerializeSemanticElements.ToDict(Helpers.getMatlabSemanticElementsOutputFile()) else: return {} except: logger.exception('Error Updating Features For '+i['imageFile']) raise
def features(i): logger.info('Image:' +i['imageFile'] + ' modified %s ' % time.ctime(i['imageLastTouched'])) logger.info('Image:' +i['dataFile'] + ' Exists: '+ str(i['dataFileExists']) + ' Modified %s ' % time.ctime(i['dataLastTouched'])) logger.info('Requires Update: '+str(i['dataFileRequiresUpdate'])) try: Helpers.removeMatlabFeatureOutputFile() logger.info('Running '+ matLabFeatureScr) out,err,retCd = SysCall.sh([matLabFeatureScr, '"'+i['imageFile']+'"', 'false']) #out,err,retCd = SysCall.sh([matLabFeatureScr, Helpers.getTestImageName(), 'false']) logger.info('ret code:' +str(retCd)) logger.info('Script returned: ' + str( out)) if Helpers.checkFileNameExists(Helpers.getMatlabFeatureOutputFile()): return SerializeImageFeatures.ToDict(Helpers.getMatlabFeatureOutputFile()) else: return {} except: logger.exception('Error Updating Features For '+i['imageFile']) raise