plasmodic/ecto

idiom for interfaces

Closed this issue · 10 comments

Come up with an ecto interface definition idiom.

e.g. static functions that declare io names/types for a face detector, or tracker, etc...

My current thoughts on interfaces are that these are functions in headers that look like:

void declare_video_device_outputs(tendrils& outputs)
{
  //set outputs
  outputs.declare<cv::Mat> ("image", "A video frame.", cv::Mat());
  outputs.declare<int> ("frame_number", "The number of frames captured.", 0);
}

And these are used by clients like:

struct VideoCapture
{
  //....
  static void declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
  {
    //set outputs
    declare_video_device_outputs(outputs);
  }
  //....
};
struct OpenNICapture
{
  //...
  static void declare_io(const tendrils& params, tendrils& inputs, tendrils& outputs)
  {
    //declare standard video device outputs
    declare_video_device_outputs(outputs);

    //nonstandard just for openni cameras.
    outputs.declare<cv::Mat> ("depth", "The output depth map", cv::Mat());
    outputs.declare<cv::Mat> ("valid", "The output valid mask", cv::Mat());
    outputs.declare<cv::Mat>("K","The camera intrinsic matrix.");
  }
  //...
};

Need to add this to a tutorial...

  • A module could simultaneously implement multiple interfaces.
  • What is the architectural coherence with the Black Box, which also presents an interface?

Just needs an idiums page in docs.

i'll take this one

Cool, take it.

I heard you were working on this at home, any progress?

Yes but I need to integrate, and I'm stuck under a nasty roscpp
deadline that got sprung on me yesterday.

On Tue, Jul 12, 2011 at 10:04 AM, ethanrublee
reply@reply.github.com
wrote:

I heard you were working on this at home, any progress?

Reply to this email directly or view it on GitHub:
#4 (comment)

kicked

Not too useful right now. Its easy enough to write some functions that declare interface...