Ask Your Question

jukkaho's profile - activity

2019-08-29 23:12:23 -0600 received badge  Popular Question (source)
2016-04-19 03:15:54 -0600 received badge  Nice Question (source)
2013-01-30 08:38:04 -0600 commented answer How do I access an IP Camera?

pmj, I don't think imread() supports URLs. FFmpeg supports URLs through video interface only.

2013-01-30 08:27:05 -0600 received badge  Editor (source)
2013-01-30 08:16:35 -0600 answered a question /usr/lib/libavcodec.so.53: undefined reference to `speex_header_free' error

This error means that linker does not find a symbol 'speex_header_free' that libavcodec (from ffmpeg) depends on. OpenCV has been compiled with FFMPEG support so this dependency comes from that. That symbol is needed because libavcodec has been compiled with support for speex codec.

One option is that speex library is installed to a path that the linker does not know about. If you use system package management to install all the components, this is unlikely.

Another option is that a different version of speex library has been installed on your system than what libavcodec/ffmpeg has been compiled against. This different speex library then does not export a symbol 'speex_header_free' that libavcodec expects and linker finds that problem.

You should try to make sure that a compatible speex library is in the library paths. You could also try to install FFMPEG without speex codec support to avoid this dependency. This would most likely need you to install it from the sources and that is out of the scope for my answer.

You could try running something like the following to see the missing libraries. Path could be a bit different for 32-bit libraries.

$ ldd /usr/lib64/libavcodec.so

If libspeex.so can be found, then the found library version is probably wrong. If it's missing completely, you need to install correct version of speex library.

2013-01-21 09:47:51 -0600 received badge  Supporter (source)
2013-01-21 09:47:22 -0600 received badge  Scholar (source)
2013-01-19 07:21:48 -0600 received badge  Student (source)
2013-01-18 06:51:27 -0600 asked a question Different behaviour when using cv::Mat and cv::Matx types

There seem to be very different results when using cv::Mat and cv::Matx types for doing some operations. For example:

double a[] = {
    0.8147, 0.6324, 0.9575, 0.9572,
    0.9058, 0.0975, 0.9649, 0.4854,
    0.1270, 0.2785, 0.1576, 0.8003,
    0.9134, 0.5469, 0.9706, 0.1419
};
cv::Mat A(4, 4, CV_64F, a);

std::cout << "Using Mat: " << cv::determinant(A) << std::endl;

cv::Matx44d A2(0.8147, 0.6324, 0.9575, 0.9572,
               0.9058, 0.0975, 0.9649, 0.4854,
               0.1270, 0.2785, 0.1576, 0.8003,
               0.9134, 0.5469, 0.9706, 0.1419);

std::cout << "Using Matx: " << cv::determinant(A2) << std::endl;

Produces:

Using Mat: -0.0261654
Using Matx: 0

Does anyone know what might be causing this kind of differences? The values passed to the function should be exactly the same and seem to work with smaller matrices even with cv::Matx. The result is only correct when using cv::Mat type.