Skip to content
Egor Burkov edited this page Mar 4, 2018 · 37 revisions

OpenCV bindings for Torch

Goal: A complete set of OpenCV 3.1 bindings for Torch, with almost all toolboxes (including CUDA, excluding OpenCL). It's going to be like OpenCV's Python bindings, but using Torch Tensors instead of numpy.

Here's an example of code.

Check out the progress in issues.

High Priority Toolboxes

  • imgproc
  • imgcodecs
  • videoio
  • video
  • ml
  • flann
  • photo
  • optflow
  • features2d
  • superres

cuda

  • cudaarithm
  • cudabgsegm
  • cudacodec
  • cudafeatures2d
  • cudafilters
  • cudaimgproc
  • cudaoptflow
  • cudastereo
  • cudawarping
  • cudaobjdetect

Mid Priority Toolboxes

  • calib3d
  • tracking
  • xphoto
  • ximgproc
  • stitching

Low Priority Toolboxes

  • highgui
  • viz
  • shape
  • reg
  • rgbd
  • xfeatures2d

Not needed Toolboxes

  • objdetect
  • bioinspired
  • cvv
  • datasets
  • face
  • Binary descriptors for lines extracted from an image
  • text

Documentation

Generally, you should refer to OpenCV documentation. Most functions' signatures match their C++ originals, but some of them, for example, exclude OutputArrays, so please check functions' definitions in cv/<module-name>/init.lua. In Python, help(cv2.someFunction) is provided; we're working on the same feature for TREPL: ? cv.someFunction.

Tutorials for users:

Contribution

  1. What we mostly need at the time being are unit tests and smoke tests for the work that is already done. Watch the issues as well.
  2. See the issues list for the work to be tested.
  3. Let's work via pull requests.
  4. Please check the tutorials first, and consult with the existing code. For example, imgproc module has examples for almost every pattern that you might encounter.

Tutorials for contributors: