Ask Your Question

tommi's profile - activity

2013-02-01 13:13:35 -0600 received badge  Editor (source)
2013-02-01 13:07:22 -0600 asked a question Xcode 3.2.6: compiler returns exception

Hi all.

I've a problem when i try to compile a simple C code. In particular, compiler generates a BAD ACCESS exception when i try to access image data.

My code is:

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

int main(int argc, char *argv)
{
    IplImage *image_in = 0;

    int w,ws,h;

    image_in = cvLoadImage("./clown.bmp",0);

    w = image_in->width;

}

and compiler returns:

Program received signal: “EXC_BAD_ACCESS”.

for the instruction

w = image_in->width;

I'm new in opencv world, and code seems correct, so I don't know what this exception means. Please help me!

Tommi

N.B.: I'm using OpenCV 2.4.3

P.s.: sorry for my not excellent english...