OpenCV中文网站

 找回密码
 立即注册
搜索
热搜: 安装 配置
查看: 4277|回复: 2

cvloadimage出错啊

[复制链接]
发表于 2009-4-15 21:09:25 | 显示全部楼层 |阅读模式
#include <stdlib.h>
#include <stdio.h>
#include &quot;_cv.h&quot;
#include &quot;_cxcore.h&quot;
int main()
{
    FILE*     f_in = NULL;
    FILE*     f_out = NULL;
    long len = 0;
    char*    buf=NULL;
    //声明IplImage指针
IplImage* pImg = NULL;
IplImage* pBinImg = NULL;
if( (pImg = cvLoadImage(&quot;C:\\CCStudio_v3.3\\MyProjects\\OpencvTest1\\beauty.bmp&quot;, 0)) != 0 )
    {

     }

    return 0;

}
//cmd文件
/*
* Copyright (C) 2003 Texas Instruments Incorporated
* All Rights Reserved
*/
/*
*--
*
*/

-stack 0x9000
-heap 0x9000

MEMORY
{
        SDRAM        :        origin = 0x80000000,        len = 0x4000000
        SRAM        :        origin = 0x00000400,        len = 0xffffff
}
SECTIONS
{
        .text                >        SRAM
        .cinit                >        SRAM
        .const                >        SRAM
        .far                >        SRAM
        .stack                >        SRAM
        .cio                >        SRAM
        .bss                >        SRAM
        .sysmem                >        SRAM
        .off_ram        >        SDRAM
}

//错误如下
OpenCV ERROR: Insufficient memory (Out of memory)
        in function cvAlloc, cxalloc.cpp(60)
Terminating the application...
Assertion failed, (0), file cxerror.cpp, line 352
编译时有警告:
warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
回复

使用道具 举报

发表于 2010-9-19 20:54:49 | 显示全部楼层

cvloadimage出错啊

我也是同样的错误,请问目前解决了吗?
回复 支持 反对

使用道具 举报

发表于 2010-9-28 09:42:39 | 显示全部楼层

cvloadimage出错啊

#include <stdlib.h>
#include <stdio.h>
#include &quot;_cv.h&quot;
#include &quot;_cxcore.h&quot;
int main()
{
    FILE*     f_in = NULL;
    FILE*     f_out = NULL;
    long len = 0;
    char*    buf=NULL;
    //声明IplImage指针
IplImage* pImg = NULL;
IplImage* pBinImg = NULL;
if( (pImg = cvLoadImage(&quot;C:\\\\CCStudio_v3.3\\\\MyProjects\\\\OpencvTest1\\\\beauty.bmp&quot;, 0)) != 0 )
    {

     }

    return 0;

}
//cmd文件
/*
* Copyright (C) 2003 Texas Instruments Incorporated
* All Rights Reserved
*/
/*
*--
*
*/

-stack 0x9000
-heap 0x9000

MEMORY
{
        SDRAM        :        origin = 0x80000000,        len = 0x4000000
        SRAM        :        origin = 0x00000400,        len = 0xffffff
}
SECTIONS
{
        .text                >        SRAM
        .cinit                >        SRAM
        .const                >        SRAM
        .far                >        SRAM
        .stack                >        SRAM
        .cio                >        SRAM
        .bss                >        SRAM
        .sysmem                >        SRAM
        .off_ram        >        SDRAM
}

//错误如下
OpenCV ERROR: Insufficient memory (Out of memory)
        in function cvAlloc, cxalloc.cpp(60)
Terminating the application...
Assertion failed, (0), file cxerror.cpp, line 352
编译时有警告:
warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported
>> warning: missing DW_AT_name attribute
>> warning: function definitions in CSU declarations are not supported

以后这种长代码的必须要排版,不要要删贴了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|OpenCV中文网站

GMT+8, 2024-4-26 15:47 , Processed in 0.008938 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表