The below code is a sample.
cv::Mat mat = cv::Mat ( 500, 400, CV_32F, cv::Scalar::all ( 2.0 ) );
cv::Mat mat2;
cv::resize(mat, mat2, cv::Size(400,600), 0, 0, cv::INTER_LINEAR);
This give me this error
OpenCV Error: The function/feature is not implemented (Unknown/unsupported array type) in getMat_, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp, line 1319
terminate called after throwing an instance of 'cv::Exception'
what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp:1319: error: (-213) Unknown/unsupported array type in function getMat_
I have installed opencv 2.4.13 in /usr/locl as the default version and opencv 3.3.1 along with the ROS kinetic.
My cmake project A was built upon opencv 2.4.13 and it works properly. Now I need to transition to opencv 3.3.1 because another catkin package B depends on A and opencv 3.3.1. However, the problem occurs as above and I cannot fix it after day's googling.
Note that cv::resize works normally when tested using a single cpp file based project depending on either opencv 2.4.13 or 3.3.1.
It also works normally in project A depending upon opencv 2.4.13.
However, it causes running error in project A depending upon opencv 3.3.1
Any ideas are welcomed
I have also tried to compile both A and B using Opencv 2 and then I use find_package( OpenCV 2 REQUIRED) in my cmakelists.txt file. Another ruuning error caused by resize() was reported as below (may vary):
OpenCV Error: The function/feature is not implemented
Unknown/unsupported array type) in getMat_, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp, line 1319
terminate called after throwing an instance of 'cv::Exception' what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp:1319:
error: (-213) Unknown/unsupported array type in function getMat_
or
OpenCV Error: The function/feature is not implemented (You should explicitly call mapHost/unmapHost methods for ogl::Buffer object) in getMat_,
file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp, line 1299
terminate called after throwing an instance of 'cv::Exception' what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/core/src/matrix.cpp:1299:
error: (-213) You should explicitly call mapHost/unmapHost methods for ogl::Buffer object in function getMat_
crazy( ⊙ o ⊙ )!
Finally, I re-implement those related functions where cv::resize is used in project A in my current project B, then it works.(⊙o⊙)
[Ubuntu14.04]
I'm trying to run darknet.
(https://pjreddie.com/darknet/yolov2/)
I have the error caused by that I'm using OpenCV 3.4.2 version.
(terminate called after throwing an instance of 'cv::Exception'
what():
OpenCV(3.4.2)/home/kasamatsu/opencv/modules/core/src/matrix_wrap.cpp:800:
error: (-215:Assertion failed) (flags & FIXED_TYPE) != 0 in function
'type')
I found I can solve the problem by changing the version of OpenCV used.
But I have no ideas about how to change it.
now my
/etc/ld.so.conf.d/opencv.conf
says /usr/local/lib
my /usr/local/libincludes
libopencv_highgui.so.3.2
libopencv_highgui.so.3.2.0
libopencv_highgui.so.3.4
libopencv_highgui.so.3.4.2
・・・and so on.
So I think my environment references only libopencv_highgui.so.3.4.2.
I would like to change this target.
I am a beginner of stack overflow and OpenCV.
Thank you in advance.
Im trying to follow this tutorial: http://pointclouds.org/documentation/tutorials/openni_grabber.php#openni-grabber but I'm not being able to complete it. The tutorial seems simple enough, but nothing seems to be working.
When I try to compile it I get the following error: point_cloud_geometry_handlers.h:48:29: fatal error: vtkSmartPointer.h: No such file or directory compilation terminated.
I've tried to find out what this vtkSmartPointer.h is about but with no luck, probably it has something to do with that ConstPtr type?
Thanks in advance
I am using Vc++(2012) with allegro 5.0.7. and following this link for tutorials.
I get assertion Failed error when I compiled the code present at the above given link. Here is a snapshot of my error.
You are trying to use a null bitmap. The most common reason is you are running your program from a directory that you are not expecting, causing your relative paths to fail.
Read and follow the advice of this article to solve the issue.
I'm learning OpenCV and I have tried running this sample which comes from opencv official samples. This sample uses SURF to find a known object. I created a VS2010 project and added the following to the project:
opencv_core231.lib opencv_highgui231.lib opencv_features2d231.lib
opencv_video231.lib
I can compile the project successfully. However, when I run it I receive the following error:
Expression: vector subscript out of range
I debugged the program and found out the error occurs on lin e60: double dist = matches[i].distance. I don't understand why I am getting the error. Can enyone help me correct this?