[英]Fatal error in libopencv_imgproc.so on cvPyrUp
I try to execute this JavaCV code: 我尝试执行以下JavaCV代码:
IplImage src; // simple image
IplImage gray = cvCreateImage( cvGetSize(src), IPL_DEPTH_8U, 1 );
cvConvertImage(src, gray, 0);
CvSize sz = cvSize(gray.width() & -2, gray.height() & -2);
IplImage pyr = cvCreateImage(cvSize(sz.width()/2, sz.height()/2), gray.depth(), gray.nChannels());
cvPyrDown(gray, pyr, CV_GAUSSIAN_5x5);
cvPyrUp(pyr, gray, CV_GAUSSIAN_5x5); // - fatal error on this line
cvReleaseImage(pyr);
For some images i get an error message (on cvPyrUp): 对于某些图像,我得到一条错误消息(在cvPyrUp上):
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x64ec6407, pid=31902, tid=3060738880
#
# JRE version: Java(TM) SE Runtime Environment (8.0_77-b03) (build 1.8.0_77-b03)
# Java VM: Java HotSpot(TM) Server VM (25.77-b03 mixed mode linux-x86 )
# Problematic frame:
# C [libopencv_imgproc.so.3.0+0x1c8407]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /var/www/iseeyou-anrp/hs_err_pid31902.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
To watch all code go to https://github.com/gorcer/iseeyou-anrp/blob/master/src/main/java/com/gorcer/iseeyou/Recognizer.java#L47 要观看所有代码,请访问https://github.com/gorcer/iseeyou-anrp/blob/master/src/main/java/com/gorcer/iseeyou/Recognizer.java#L47
I found the solution https://github.com/bytedeco/javacv/issues/409 我找到了解决方案https://github.com/bytedeco/javacv/issues/409
IplImage pyrUp = cvCreateImage(cvSize(2*pyr.width(), 2*pyr.height()), pyr.depth(), pyr.nChannels());
cvPyrUp(pyr, pyrUp, CV_GAUSSIAN_5x5);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.