0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ProcessingでOpenCVのVideoCaptureで「native codeは実行できないよ」とエラー出た時の対処法

Posted at

import org.opencv.core.*;
import org.opencv.highgui.*;
VideoCapture cap;

void setup(){  
  cap = new VideoCapture(0);
  fullScreen();
}

を実行時に次のようなエラー出る場合

A library relies on native code that's not available.
Or only works properly when the sketch is run as a 32-bit application.

JNIを使えるように一行追加してやる必要がある


void setup(){  
  System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
  cap = new VideoCapture(0);
  fullScreen();
}

JNIって何?って方は次を参考に。
javaを利用したopencvにて System.loadLib

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?