OPENCV Configuration (Java)

Source: Internet
Author: User

Configuration environment: myeclipse2013+jdk1.7 (32-bit) +OPENCV 2.4.8+win8.1 (64-bit)

OPENCV installation path: D:\USERS\OPENCV as an example

1. Importing the JAR Package

Locate Opencv-248.jar under Path D:\Users\opencv\build\java and import to the Java project.

2. Configuring DLL paths

Item properties in the imported Jar Package selection Native Library location: (None), click on the right side edit add d:\users\opencv/build/java/x86 (32-bit JDK with x86 path) and then click OK, Configuration is complete.

3. Sample Programs

import Org.opencv.core.Core;

import Org.opencv.core.CvType;

import Org.opencv.core.Mat;

Public class Main {

Public Static void Main (string[] args) {

System. out. println ("Welcome to OpenCV" + Core. VERSION);

System. loadLibrary (Core. native_library_name);

Mat m = Mat. Eye (3, 3, Cvtype. cv_8uc1);

System. out. println ("m =" + M.dump ());

}

}

OPENCV Configuration (Java)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.