Ask Your Question

Bas van Dijk's profile - activity

2018-12-24 11:37:11 -0600 commented answer Will there be a opencv_contrib-4.0.1 release now that opencv-4.0.1 is out?

Great thank you.

2018-12-24 11:36:58 -0600 received badge  Supporter (source)
2018-12-22 10:42:35 -0600 received badge  Student (source)
2018-12-22 10:23:36 -0600 asked a question Will there be a opencv_contrib-4.0.1 release now that opencv-4.0.1 is out?

Will there be a opencv_contrib-4.0.1 release now that opencv-4.0.1 is out? https://github.com/opencv/opencv/releases sho

2016-07-26 16:40:47 -0600 asked a question Segfault when deleting splitted images from cv::split

Are you supposed to delete the splitted images returned in the mvbegin array in the cv::split(const Mat & src,Mat * mvbegin) function?

I guess not since the following example generates a segfault:

#include <stdio.h>
#include <unistd.h>
#include <sys types.h="">
#include <sys stat.h="">
#include <fcntl.h>
#include <opencv2 core.hpp="">
#include <opencv2 imgcodecs.hpp="">

#define N 600000

main(){
  int fd = open("data/kodim23.png", O_RDONLY);

  uchar buf[N];

  int size = read(fd, buf, N);

  cv::_InputArray cbuf = cv::_InputArray(buf, size);
  cv::Mat * img = new cv::Mat(cv::imdecode(cbuf, cv::IMREAD_UNCHANGED));

  cv::Mat imgs[img->channels()];

  cv::split(*img, imgs);

  for(int i; i < img->channels(); i++){
    delete &imgs[i];
  }
}