I know that "bus error" is often associated with errosr programming. But I really do not see such an error in a three-line program:
int main(int argc, char** argv) { IplImage *src = cvLoadImage("/tmp/Name.tiff", CV_LOAD_IMAGE_COLOR); IplImage* res = cvCreateImage( cvSize( 2, 2), IPL_DEPTH_8U, 3 ); cvSaveImage("/tmp/image.tiff", src); return 0; }
Compile the following command:
gcc -I / Library / Frameworks / OpenCV.framework / Versions / A / Headers / usr / local / lib / libopencv_ * test.c
Execution gives a bus error .
Very important: if I delete the second line (call cvCreateImage
), it works without problems.
I am using opencv 2.3 and MacOs 10.8.5, gcc (i686-apple-darwin9-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5566)
source share