Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

propID not found, please help

A friendly hi @all, I am running openCV 3.4.0 on Windows in the Eclipse IDE Version Oxygen in Java. When trying to insert specific propIDs some of them cant be found. Specifically i want to get VideoCapture Information with .get() method with the id CV_CAP_PROP_FOURCC. In another post i read, that the "CV_" part at the beginning should be lost. There the propIDs were called by the dot operator of an import like cv2. This cant be found either in my system.

here's some tutorial code. Can anyone help? Thank you in advance. Greets Che


package openCV;
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.videoio.VideoCapture;
import org.opencv.core.CvType;
import org.opencv.core.Mat;
import org.opencv.core.MatOfPoint;
import org.opencv.core.Scalar;
import org.opencv.core.Size;
import org.opencv.imgproc.Imgproc;
import org.opencv.videoio.VideoWriter;

import org.opencv.imgcodecs.; import org.opencv.highgui.;

public class SimpleSample { public static void main(String arg[]) { System.loadLibrary(Core.NATIVE_LIBRARY_NAME); VideoCapture captRefrnc = new VideoCapture("Megamind.avi"); VideoCapture captUndTst = new VideoCapture("Megamind_bugy.avi"); if (!captRefrnc.isOpened()) { System.out.println("Opening failed!"); } else { System.out.println("Opening succeeded!"); } Mat frameReference = new Mat(); Mat frameUnderTest = new Mat(); captRefrnc.read(frameReference); captUndTst.read(frameUnderTest); captRefrnc.get(CV_CAP_PROP_FOURCC); while(!(frameReference.empty() || frameUnderTest.empty())) { //TODO:.. } } }