1

I need some methods of OpenCV Java 2.4.9 and 3.1, but 3.1 version Imgproc class has no copyMakeBorder() method, while it was present in version 2.4.9. Note that I can run them successfully if I only choose to add only one of them as library with some deficiencies. So, is there a way that I can use them simultaneously?

Miki
  • 40,887
  • 13
  • 123
  • 202
mualloc
  • 495
  • 9
  • 24
  • 2
    Instead of using them together if it is possible then get the Source package of OpenCV 2.4.9 and copy that class and its dependency classes. Using OpenCV 2.4.9 and 3.1.1 would only create clash on classpath. – Vighanesh Gursale Mar 21 '16 at 19:09

1 Answers1

10

You can use OpenCV 3.1 only. copyMakeBorder has been moved to Core, and you can call it like:

int border = 2;
Core.copyMakeBorder(src, dst, border, border, border, border, Core.BORDER_REFLECT_101);
Miki
  • 40,887
  • 13
  • 123
  • 202