opencv bug? cvExtractSurf fails with Non-positive width or height exception (opencv 2.1.0)

在使用OpenCV 2.1.0版本时,遇到cvExtractSurf函数抛出'Non-positive width or height'异常。详细探讨了该异常产生的原因及可能的解决方案,帮助开发者解决图像处理过程中的问题。
摘要由CSDN通过智能技术生成
在使用cvExtractSurf提取特征出现

OpenCV Error : Incorrect size of input array ( Non - positive width or height ) in cvCreateMatHeader , file / build / buildd / opencv - 2.1 . 0 / src / cxcore / cxarray . cpp , line 113
terminate called after throwing an instance of 'cv::Exception'
  what ():   / build / buildd / opencv - 2.1 . 0 / src / cxcore / cxarray . cpp : 113 : error : (- 201 ) Non - positive width or height in function cvCreateMatHeader


上网搜了很多,是opencv的BUG吗?



Looks like someone has already created a bug report and found some fixes for this: 

源出处:http://opencv-users.1802565.n2.nabble.com/cvExtractSurf-fails-with-Non-positive-width-or-height-exception-opencv-2-1-0-td4963615.html


引用源内容:

Hello, 

I use opencv 2.1.0-1 on archlinux (i386). I'm not sure if I don'
correctly use the API, if it is an archlinux package problem of if it 
is a opencv bug. Thank you for your help 

This is the output of my program: 

./a.out 
Filesize: 13x29 
OpenCV Error: Incorrect size of input array (Non-positive width or 
height) in cvCreateMatHeader, file 
/build/src/OpenCV-2.1.0/src/cxcore/cxarray.cpp, line 113 
terminate called after throwing an instance of 'cv::Exception' 
  what():  /build/src/OpenCV-2.1.0/src/cxcore/cxarray.cpp:113: error: 
(-201) Non-positive width or height in function cvCreateMatHeader 

Aborted 

And here is the source code: 

#include <cv.h> 
#include <highgui.h> 
#include <stdio.h> 

int main(int argc, char** argv) 
{  
    IplImage* image = cvLoadImage( "image.png",
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值