Creating filter pipelines for OpenCV
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),
(equalize,))
where
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?
Thanks!
patrick