Ask Your Question

miks's profile - activity

2019-03-03 11:58:49 -0600 commented question Change FPS on video capture from file

I read somewhere that if opencv is not compiled with ffmepg, then it uses some default video capture device (like gstrea

2016-04-01 05:33:25 -0600 received badge  Enthusiast
2016-03-31 08:57:25 -0600 received badge  Critic (source)
2016-03-16 09:23:15 -0600 commented question RTrees::setCVFolds() causes EXEC_BAD_ACCESS

Submitted as an issue 6278

2016-01-27 07:06:08 -0600 commented question RTrees::setCVFolds() causes EXEC_BAD_ACCESS

This code:

auto rtrees = cv::ml::RTrees::create(); 
rtrees->setMaxDepth(depth);
rtrees->setMinSampleCount(samplecount);
rtrees->setRegressionAccuracy(0);
rtrees->setUseSurrogates(false);
rtrees->setMaxCategories(16);
rtrees->setPriors(cv::Mat());
rtrees->setCalculateVarImportance(false);
rtrees->setActiveVarCount(0);
rtrees->setTermCriteria({cv::TermCriteria::MAX_ITER, 100, 0});
//rtrees->setCVFolds(10);

rtrees->train(trainingData32F.colRange(1, trainingData32F.cols),
              cv::ml::ROW_SAMPLE, labels);

works fine. When setCVfolds uncommented it crashes during training withEXEC_BAD_ACCESS

2016-01-21 00:04:52 -0600 received badge  Necromancer (source)
2016-01-18 09:42:22 -0600 answered a question Saving an Opencv Mat into a YAML file using python

I had the same problem. Wrap the numpy array with cv.fromarray()

import numpy 
import cv  
a = numpy.ones((5,5,1),float)
cv.Save("a.xml",cv.fromarray(a))

It is depreciated functionality but ATM works.

2016-01-18 09:00:36 -0600 received badge  Supporter (source)
2013-12-17 11:45:47 -0600 answered a question Help to Open Video File

I had the same issue. I recompiled the OpenCV using the official instructions: http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html And now it works fine. It might have been some problems when you don't compile in Release, or libraries are missing. Check your CMakeCache.txt if HAVE_FFMPEG is non-zero.