Ask Your Question
0

opencv2 crash on Linux ubuntu 3.8.0-29

asked 2014-01-30 13:51:41 -0600

oliver gravatar image

Hi,

I have several 24bit bitmap image created on the Windows system, then used following line to display it but it failed with following error message: ePadvisionSS: malloc.c:2451: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.

My code: cv::Mat src = cv::Imread(filepath, -1);

Is some special format of bitmap not support? Oliver

edit retag flag offensive close merge delete

Comments

See if it opens in GIMP. If it does, re-save it as a bitmap (export to). There's a small chance it has a weird bitmap header.

Nghia gravatar imageNghia ( 2014-01-30 17:28:15 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-01-31 15:44:54 -0600

keghn gravatar image

Hello,

cv::Mat src = cv::Imread("filepath.jpg",CV_LOAD_IMAGE_COLOR);

or:

cv::Mat src = cv::Imread("/home/you/pictures/filepath.jpg",CV_LOAD_IMAGE_COLOR);

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-01-30 13:51:41 -0600

Seen: 214 times

Last updated: Jan 31 '14