Exemple #1
0
#test = line_mod.TestColorTempl(filename="test_tree.txt")
testimage = line_mod.TestColorImage(filename="test_tree.txt",
                                    template_size=cv.Size(45, 120),
                                    sample_skipx=5,
                                    sample_skipy=5,
                                    match_thresh=0.985,
                                    search_skipx=5,
                                    search_skipy=5,
                                    hist_type=1,
                                    overlap_thresh=.75)
#IdGen = line_mod.IdGenerator(object_id="Odwalla");
DrawDetections = line_mod.DrawDetections()

#this will read all images on the user's Desktop
images = highgui.ImageReader(
    "image reader",
    path=os.path.expanduser("/home/bradski/code/data/set01/images"))
#masks = highgui.ImageReader("mask reader",path=os.path.expanduser("/home/bradski/code/data/set01/masks"))
#rgb2gray = imgproc.cvtColor("rgb -> gray",flag=7)

#this is similar to a slide show... Wait forever for a key
image_display = highgui.imshow("image display",
                               name="image",
                               waitKey=-1,
                               autoSize=True)
#mask_display = highgui.imshow("mask display", name="mask", waitKey=-1, autoSize=True)
colormod_display = highgui.imshow("mod display",
                                  name="mod",
                                  waitKey=-1,
                                  autoSize=True)
detections_display = highgui.imshow("detections",
#!/bin/python
import ecto
#import ecto_opencv.cv_bp as opencv
from ecto_opencv import highgui, calib, imgproc

import os

debug = True

plasm = ecto.Plasm()

#this will read all images on the user's Desktop
images = highgui.ImageReader(path=os.path.expanduser("~/Desktop"))

#this is similar to a slide show... Wait for half a second
imshow = highgui.imshow(name="image", waitKey=500, autoSize=True)

plasm.connect(images, "out", imshow, "input")

if debug:
    ecto.view_plasm(plasm)

while(imshow.outputs.out not in (27, ord('q'))):
    x = plasm.execute()
    if x :
        break;