This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Add | |
{ | |
static void declare_io(const ecto::tendrils& p, ecto::tendrils& i, ecto::tendrils& o) | |
{ | |
i.declare(&Add::left_,"left"); | |
i.declare(&Add::right_,"right"); | |
o.declare(&Add::out_,"out"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef enum | |
{ | |
XN_IO_IMAGE_FORMAT_BAYER = 0, | |
XN_IO_IMAGE_FORMAT_YUV422 = 1, | |
XN_IO_IMAGE_FORMAT_JPEG = 2, | |
XN_IO_IMAGE_FORMAT_JPEG_420 = 3, | |
XN_IO_IMAGE_FORMAT_JPEG_MONO = 4, | |
XN_IO_IMAGE_FORMAT_UNCOMPRESSED_YUV422 = 5, | |
XN_IO_IMAGE_FORMAT_UNCOMPRESSED_BAYER = 6, | |
} XnIOImageFormats; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import ecto | |
from ecto_X import Sink | |
from ecto_opencv.highgui import imshow, FPSDrawer | |
video = Sink(url='localhost', port=2932) | |
fps = FPSDrawer() | |
video_display = imshow(name='video_cap', waitKey=2) | |
plasm = ecto.Plasm() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import ecto | |
from ecto_X import Source | |
from ecto_opencv.highgui import VideoCapture | |
video_cap = VideoCapture(video_device=0, width=640, height=480) | |
source = Source(port=2932) | |
plasm = ecto.Plasm() | |
plasm.connect(video_cap['image'] >> source['in'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usage: vidcap.py [-h] [-d,--device DEVICE_ID] [--width WIDTH] | |
[--height HEIGHT] [--scheduler SCHEDULER_TYPE] | |
[--nthreads NUMBER_OF_THREADS] [--niter ITERATIONS] [--shell] | |
Capture a video from the device and display it. | |
optional arguments: | |
-h, --help show this help message and exit | |
-d,--device DEVICE_ID | |
The device ID of a video camera. Take the number off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Simple vid cap | |
# | |
import ecto | |
import ecto.opts | |
from ecto_opencv import highgui, calib, imgproc | |
def video_capture_plasm(device=0, width=640, height=480): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyModule(ecto.BlackBox): | |
def __init__(self, start, step): | |
ecto.BlackBox.__init__(self) | |
self.generate = ecto_test.Generate(start=start, step=step) | |
self.inc = ecto_test.Increment() | |
def _outputs(self): | |
return {"out":self.inc["out"]} | |
def _parameters(self): | |
return { | |
"start":self.generate["start"], |
NewerOlder