Ask Your Question
1

propID not found, please help

asked 2018-01-18 12:01:15 -0600

Che gravatar image

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:.. } } }

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-01-18 12:06:33 -0600

berak gravatar image

updated 2018-01-18 12:09:50 -0600

for opencv3.x it is: Videoio.CAP_PROP_FOURCC

(bookmarking a link to the docs will save you a lot more questions)

edit flag offensive delete link more

Comments

yes, the moment i posted this, i knew it, thank you. But i did not find the answer in the docs. Do you know to the specific part, where it is discribed, that you can access these propIDs under Videoio? Sorry, i cant upvote at the moment as im a new member. Your Answer is correct though.

Che gravatar imageChe ( 2018-01-18 14:30:24 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-01-18 12:01:15 -0600

Seen: 220 times

Last updated: Jan 18 '18