image_processing icon indicating copy to clipboard operation
image_processing copied to clipboard

Adding OpenCV support

Open janosrusiczki opened this issue 4 years ago • 0 comments

Would it be possible to add OpenCV supoort (eg. via ruby-opencv) to the chain? Why? For example, to be able to center thumbnails on faces or objects in the image.

I was thinking if it would be possible to write something like:

pipeline = ImageProcessing::MiniMagick.source(file)

... and then ...

large     = pipeline.resize_to_limit!(800, 800)
thumbnail = pipeline.opencv(opencv_options).resize_to_limit!(300, 300)

I looked at the codebase, but at this point I'm not sure if the .opencv call would be able to pass down parameters to the resize_to_limit! call to specify a zone of interest in the image.

janosrusiczki avatar Dec 26 '20 09:12 janosrusiczki