Beispiel #1
0
    base_path = r"j:\temcaRaw"
    # end user changable parameters

    logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")

    timestr = time.strftime("%Y%m%d-%H%M%S")  # 20120515-155045
    if not os.path.exists(base_path):
        os.mkdir(base_path)
    image_dir = os.path.join(base_path, timestr)
    if not os.path.exists(image_dir):
        os.mkdir(image_dir)
    meta_file = open(os.path.join(base_path, timestr, "meta.txt"), "w")

    # stage = RadishStage("*", 8000, 8001, "http://10.128.26.51:8090")
    # stage = DummyRadishStage("*", 8000, 8001, "http://localhost:8090")
    stage = SmarActStage()

    # Open the DLL which runs all TEMCA graphs
    temcaGraph = TemcaGraph()
    temcaGraph.open(dummyCamera=False, dummyPath=r"J:\temcaRaw\20160211-144213")

    showRawImage = False
    showPreviewImage = False

    if showRawImage or showPreviewImage:
        import numpy as np

        if showRawImage:
            imgRaw = temcaGraph.allocate_frame()
        if showPreviewImage:
            imgPreview = temcaGraph.allocate_preview_frame()  # 8bpp and decimated
Beispiel #2
0
import sys
import yaml
import subprocess
import numpy as np
import cv2
from temca_graph import *
import msvcrt
from pytemca.stage.stage import RadishStage, DummyRadishStage
from pytemca.stage.smarAct.smaract_stage import SmarActStage

if __name__ == '__main__':

    logging.basicConfig(level=logging.INFO,
                format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')

    stage = SmarActStage()
    #stage = RadishStage("*", 8000, 8001, "http://10.128.26.51:8090")
    #stage = DummyRadishStage("*", 8000, 8001, "http://localhost:8090")

    # Open the DLL which runs all TEMCA graphs
    temcaGraph = TemcaGraph() 
    temcaGraph.open(dummyCamera = False) 

    showRawImage = False
    showPreviewImage = False

    if showRawImage or showPreviewImage:
        import numpy as np
        if showRawImage:
            imgRaw = temcaGraph.allocate_frame()
        if showPreviewImage: