Ask Your Question

Creating filter pipelines for OpenCV

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

Pi Robot gravatar image

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

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 -0500

Vincent Rabaud gravatar image

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

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 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


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

Seen: 986 times

Last updated: Jul 23 '12