# Image processing using opencv

**URL:** <https://discuss.ocaml.org/t/image-processing-using-opencv/3159>\
**Category:** Learning\
**Created:** [January 14, 2019, 12:49pm UTC](https://discuss.ocaml.org/t/image-processing-using-opencv/3159 "2019-01-14T12:49:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![indykish](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@indykish](https://discuss.ocaml.org/u/indykish)\
**Post date:** [January 14, 2019, 12:49pm UTC](https://discuss.ocaml.org/t/image-processing-using-opencv/3159/1 "2019-01-14T12:49:38Z")

</div>

Hello  
I have a python code which i would like to convert it to OCaml.

The library take a PNG remove border, horizontal lines, crops the image to pieces, denoises and resize again.

We use opencv.

I searched around in opam, github to find the following link that perform some functions that i need.

1. [http://pauillac.inria.fr/camlimages/](http://pauillac.inria.fr/camlimages/)

The below two links demostrate an FFI - “extern C” approach.

1. FFI interface to opencv [https://github.com/tovbinm/ocaml-faces](https://github.com/tovbinm/ocaml-faces)
2. FFI interface to opencv [https://github.com/ChesleyTan/ascii-chat](https://github.com/ChesleyTan/ascii-chat)

Are there packages in OCaml for imageprocessing like opencv ?

Should i take the FFI interface to opencv from OCaml ?

Your thoughts are welcome.

---

<div class="post-metadata">

**Author:** ![paurkedal](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/paurkedal/32/586_2.png) [@paurkedal](https://discuss.ocaml.org/u/paurkedal)\
**Post date:** [January 15, 2019, 7:59am UTC](https://discuss.ocaml.org/t/image-processing-using-opencv/3159/2 "2019-01-15T07:59:07Z")

</div>

I don’t have any opinion on what’s the best approach in your case, but there is a [newer project page for ocamlimages](https://bitbucket.org/camlspotter/camlimages), which indicates that it’s actively maintained, with latest commits last year and a long history.

---

<div class="post-metadata">

**Author:** ![indykish](https://avatars.discourse-cdn.com/v4/letter/i/ba8739/32.png) [@indykish](https://discuss.ocaml.org/u/indykish)\
**Post date:** [January 15, 2019, 7:31pm UTC](https://discuss.ocaml.org/t/image-processing-using-opencv/3159/3 "2019-01-15T19:31:22Z")

</div>

Thanks for your reply.

Will check it out.
