我按照opencv
在线文档的说明加载了一个caffe框架模型。但是当我在第80行执行代码net.forward()
时,出现了一个unhandled exception
。以下是错误信息。
OpenCV Error: Assertion failed (input.dims() == 4 && (input.type() == CV_32F ||
input.type() == CV_64F)) in cv::dnn::ConvolutionLayerImpl::allocate, file C:\Use
rs\chang\Desktop\opencv_contrib-master\modules\dnn\src\layers\convolution_layer.
cpp, line 89
我真的不知道这个适用于reply.Thanks的exception.Waiting!opencv dnn在线文档:http://docs.opencv.org/3.1.0/d5/de7/tutorial_dnn_googlenet.html opencv extra_contrib dnn示例:https://github.com/opencv/opencv_contrib/tree/master/modules/dnn/samples
发布于 2016-10-22 22:12:26
请尝试替换
dnn::Blob inputBlob = dnn::Blob(img);
使用
dnn::Blob inputBlob = dnn::Blob::fromImages(img);
https://stackoverflow.com/questions/38877316
复制相似问题