SVM->trainAuto() Segmentation fault (core dumped) [closed]

asked 2019-11-23 07:02:50 -0500

HelloWorld gravatar image

Code:

outSVM = cv::ml::SVM::create();
outSVM->setType(SVM::C_SVC);
outSVM->setKernel(SVM::CHI2);
//outSVM->setC(100);
//outSVM->setGamma(100);
Ptr<TrainData> pt = ml::TrainData::create(samples, ml::ROW_SAMPLE,
        labels);
// bool result = outSVM->train(pt);
bool result = outSVM->trainAuto(pt);

Error:

Segmentation fault (core dumped)

The outSVM->train(pt); can run , but the trainAuto(pt) can't work .

Debug informetion:

#0  0x00007fffee4b7707 in __memmove_avx_unaligned_erms ()
    at /usr/lib/libc.so.6
#1  0x00007ffff2e41db9 in cv::ml::SVMImpl::do_train(cv::Mat const&, cv::Mat const&) () at /usr/local/lib/libopencv_ml.so.4.1
#2  0x00007ffff2e4691d in cv::ml::SVMImpl::TrainAutoBody::operator()(cv::Range const&) const () at /usr/local/lib/libopencv_ml.so.4.1
#3  0x00007fffeeb726d7 in (anonymous namespace)::ParallelLoopBodyWrapper::operator()(cv::Range const&) const ()
    at /usr/local/lib/libopencv_core.so.4.1
#4  0x00007fffeeb7358d in cv::ParallelJob::execute(bool) ()
    at /usr/local/lib/libopencv_core.so.4.1
#5  0x00007fffeeb739d9 in cv::WorkerThread::thread_body() ()
    at /usr/local/lib/libopencv_core.so.4.1
#6  0x00007fffeeb73bf9 in cv::WorkerThread::thread_loop_wrapper(void*)
    () at /usr/local/lib/libopencv_core.so.4.1
#7  0x00007fffee3354cf in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007fffee4522d3 in clone () at /usr/lib/libc.so.6
edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by HelloWorld
close date 2019-11-28 03:33:22.787665

Comments

1

opencv version ? os ? compiler ?

berak gravatar imageberak ( 2019-11-24 02:39:21 -0500 )edit

System information (version)

OpenCV => 4.1.2-dev

Operating System / Platform => ArchLinux 5.3.11-arch1-1 x86_64 GNU/Linux (31.0 GiB)

Compiler => Eclipse/Cmake

HelloWorld gravatar imageHelloWorld ( 2019-11-25 22:03:07 -0500 )edit

System information (version)

OpenCV => 4.1.2-dev

Operating System / Platform => ArchLinux 5.3.11-arch1-1 x86_64 GNU/Linux (31.0 GiB)

Compiler => Eclipse/Cmake

HelloWorld gravatar imageHelloWorld ( 2019-11-25 22:03:17 -0500 )edit
1
HelloWorld gravatar imageHelloWorld ( 2019-11-28 03:32:25 -0500 )edit

just trying to debug it ;)

berak gravatar imageberak ( 2019-11-28 04:22:08 -0500 )edit