コード例 #1
0
    camera.SetPosition(0, 0, 0.44)
    ren2.SetActiveCamera(camera)
    #    camera.SetFocalPoint(0, 0, 0)
    #ren2.GetActiveCamera().Zoom(1.5)

    renWin.Render()

    reportname = "TireAuditReport"

    reportdirToTest = dirToTest + "\\" + reportname
    reportdirToTestJPG = dirToTest + "\\" + reportname + ".png"

    #ExportAsPDF(reportdirToTest,renWin)
    ExportAsPNG(reportdirToTestJPG, renWin)
    #ExportAsPDF(reportdirToTest,renWin)

    #    renWin = ren.GetRenderWindow()
    renWin.Finalize()
    #    ren.TerminateApp()

    del renWin, ren2
    print("\n*** report path is ", reportdirToTest)
    AddLogo(reportdirToTestJPG)

    print("\n hello")


pollTireStates.pollTireTransactionStatus(
    ProcessReportNew1, tireProcessStateSettings.stateReadyForReportProcessing,
    tireProcessStateSettings.stateReadyForEmailProcessing, 3)
コード例 #2
0
                        generate_emailResultsSettings.toUID, msg.as_string())

    mailserver.quit()
    return (0)


def generate_emailResults(dirtotest):

    #    reportname="TireAuditReport"
    #
    #    reportfullpath=dirtotest+"\\"+reportname
    #    #fp="D:\\temp\\TireAuditRoot\\TireScans\\2016-05-29_08-08-08\\tire.ply"

    metaDataFile = dirtotest + "\\" + commonSettings.metaDataFile

    #emailAddress=metaDataExtraction.getAttributeValueFromFile(dirtotest,"email", metaDataFile)
    emailAddress = "*****@*****.**"
    tiremodel = "TireModel Not Provided"
    tiresize = "TireSize Not Provided"
    print("\n emailaddress is ", emailAddress)
    reportFile = dirtotest + "\\" + generate_reportsMSettings.reportFile
    status = sendEmail(tiremodel, tiresize, reportFile)

    #DisplaySimpleReport1(orientedTireSwath,reportfullpath )


pollTireStates.pollTireTransactionStatus(
    generate_emailResults,
    tireProcessStateSettings.stateReadyForEmailProcessing,
    tireProcessStateSettings.stateFinal, 3)
コード例 #3
0

#fp="C:\\Projects\\123DCatch\\TireEagle19560R15_New_KinkosSamsungAForTesting\\A\\"
#fp="C:\\Projects\\123DCatch\\TireEagle19560R15_New_KinkosSamsungAForTesting\\A\\"
#fp="D:\\temp\\tirepythontest\\tobeprocessed\\2015-11-24_16-09-15\\"
#fp="D:\\temp\\tirepythontest\\DeleteMe\\b\\"
#
#argList=["checkboard7x11",170]
###
#
#fp="D:\\temp\\delme1\\lnewclamp\\"
#fp="D:\\temp\\delme2\\b\\"
##fp="D:\\temp\\delme2\\inewclamp130mmHMaskWornEagle\\"
##fp="D:\\temp\\delme2\\inewclamp130mmHMaskNewEagle\\"
#fp="D:\\temp\\delme2\\inewclamp130mmHMaskWornEagleInflatedReal\\"
##fp="D:\\temp\\delme2\\April26Clamp130mmByHandNewEagle\\"
#fp="D:\\temp\\delme2\\inewclamp130mmWornEagleInflatedNewTireScanAppA\\"
#fp="D:\\temp\\delme2\\inewclamp130mmWornEagleInflatedNewTireScanApp_2016-05-21_11-02-09\\"
#fp="D:\\temp\\delme2\\inewclamp130mmWornEagleInflatedNewTireScanApp_2016-05-21_14-43-28_tw\\"
#fp="D:\\temp\\TireAuditRoot\\TireScans\dup\\"


#fp="D:\\temp\\\inewclamp130mmHMaskNewEagleInflated\\"

#
#ret=ProcessAgisoft(fp, argList) 
  

pollTireStates.pollTireTransactionStatus(generate3D, tireProcessStateSettings.stateReadyFor3DProcessing, tireProcessStateSettings.stateReadyForReportProcessing,5)

コード例 #4
0
ファイル: generate_masksM.py プロジェクト: jzoken/test2
            #imagehsv2bgrMasked[startRowIndexForNextPhoto+1:endRowIndex,xEndOfLeftTarget:xStartOfRightTarget]=[255,255,255]

            imagehsv2bgrMasked[sindex:eindex,
                               xEndOfLeftTarget:xStartOfRightTarget] = [
                                   255, 255, 255
                               ]

            # write out mask
        else:
            break
        startRowIndex = startRowIndexForNextPhoto

    # returns the index of the border photo
    return (currentPhotoIndex)


def generateMasks(dirtotest):

    onlyTirePhotoIndexStartingFromLeft = generateMasksForSideAndFindBorder(
        True, dirtotest)
    onlyTirePhotoIndexStartingFromRight = generateMasksForSideAndFindBorder(
        False, dirtotest)

    print("\n ****************", onlyTirePhotoIndexStartingFromLeft,
          onlyTirePhotoIndexStartingFromRight)


pollTireStates.pollTireTransactionStatus(
    generateMasks, tireProcessStateSettings.stateReadyForMaskProcessing,
    tireProcessStateSettings.stateReadyFor3DProcessing, 3)
コード例 #5
0
    imageMasked[:, :] = [255, 255, 255]

    imageMasked[:, 0:maskBorderSize] = [0, 0, 0]
    imageMasked[:, width - maskBorderSize:width] = [0, 0, 0]
    imageMasked[0:maskBorderSize, :] = [0, 0, 0]
    imageMasked[height - maskBorderSize:height, :] = [0, 0, 0]

    # set up the partial mask here
    #    #imageMasked[:,maskBorder:width-maskBorder]=[255,255,255]
    #    imageMasked[maskBorder:height-maskBorder,:]=[255,255,255]

    for currentPhotoIndex in range(len(photoFiles)):
        fnname = dirtotest + "\\M" + photoFiles[currentPhotoIndex]
        cv2.imwrite(fnname, imageMasked)

    # returns the index of the border photo
    return (currentPhotoIndex)


def generateMasksSmartPhone(dirtotest):

    generateMasksSmartPhoneMaskFiles(dirtotest)

    #print ("\n ****************", onlyTirePhotoIndexStartingFromLeft,onlyTirePhotoIndexStartingFromRight)


pollTireStates.pollTireTransactionStatus(
    generateMasksSmartPhone,
    tireProcessStateSettings.stateSmartPhoneOnlyReadyForMaskProcessing,
    tireProcessStateSettings.stateSmartPhoneOnlyReadyFor3DProcessing, 3)
コード例 #6
0
    
    
    
    EndWatch('EntireProgram') 
    
    print ("\n****  Performane Results ***\n", sorted(performanceTimeTrackingList, key=lambda dct: dct[0]) )
    
    
    progPortions = set([l1[0] for l1 in performanceTimeTrackingList])
    keylist=list(progPortions)
    
    for key in keylist:
        tup=(key,'TotalTime')
        print ("%s: %s" % (key, performanceTimeTrackingList[tup]))
        
        



waitingForState=1
nextState=2
sleepTime=2

argList=["checkboard7x11",170]

print("hello")

pollTireStates.pollTireTransactionStatus(generateCodes, tireProcessStateSettings.stateReadyForCodeProcessing, tireProcessStateSettings.stateReadyForMaskProcessing,sleepTime)