Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idiom for interfaces #4

Closed
ethanrublee opened this issue Jun 1, 2011 · 10 comments
Closed

idiom for interfaces #4

ethanrublee opened this issue Jun 1, 2011 · 10 comments
Assignees
Labels
Milestone

Comments

@ethanrublee
Copy link
Member

Come up with an ecto interface definition idiom.

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

@ethanrublee
Copy link
Member Author

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.");
  }
  //...
};

@ethanrublee
Copy link
Member Author

Need to add this to a tutorial...

@straszheim
Copy link
Member

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

@ethanrublee
Copy link
Member Author

Just needs an idiums page in docs.

@ghost ghost assigned straszheim Jul 8, 2011
@straszheim
Copy link
Member

i'll take this one

@ethanrublee
Copy link
Member Author

Cool, take it.

@ethanrublee
Copy link
Member Author

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

@straszheim
Copy link
Member

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)

@straszheim
Copy link
Member

kicked

@ethanrublee
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants