ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Creating filter pipelines for OpenCV

asked 2012-02-25 04:17:33 -0600

Pi Robot gravatar image

updated 2012-02-25 14:46:17 -0600

Hello ROS fans,

I'd like to use or develop a simple pipeline interface for sticking together various OpenCV filters. As far as I can tell, the only package that currently works like this is ecto but it is a little more than I need right now so I was looking for a simple alternative.

I came across a simple method using Python that seems to get the job done. For example, the following code glues together a grey_scale filter followed by Gaussian smoothing and histogram equalization. The functions grey_scale, blur and equalize are defined in terms of standard OpenCV functions:

pipeline = create_pipeline((grey_scale,),
                           (blur, cv.CV_GAUSSIAN, 15, 0, 7.0),


def create_pipeline(self, *filters):
   def pipeline(frame):
       piped_frame = frame
       for filter in filters:
           piped_frame = filter[0](piped_frame, *filter[1:])
       return piped_frame
   return pipeline

I don't want to reinvent any wheels if someone has already developed something similar. Is there anything like this out there other than ecto?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-07-23 11:18:20 -0600

Vincent Rabaud gravatar image

updated 2012-07-23 12:12:02 -0600

Eric Perko gravatar image and ecto would be your best bets I think

edit flag offensive delete link more


Thanks @vincent. I'm very impressed with Ecto to the extent that I have played with it. I have also taken a quick look at simplecv and that looks nice too.

Pi Robot gravatar image Pi Robot  ( 2012-07-23 14:15:19 -0600 )edit

Question Tools

1 follower


Asked: 2012-02-25 04:17:33 -0600

Seen: 1,079 times

Last updated: Jul 23 '12