Ask Your Question
0

Mat output convertion is not working

asked 2013-02-01 08:25:16 -0600

ccng gravatar image

updated 2013-02-02 05:31:15 -0600

Haris gravatar image

Hi all, I have a problem while using cv::format. The error message is as following. My .net environment is win7, 64bit, opencv2.4.2

Windows has triggered a breakpoint in trialtemp.exe.

This may be due to a corruption of the heap, which indicates a bug in trialtemp.exe or any of the DLLs it has loaded.

HEAP[trialtemp.exe]: Invalid address specified to RtlValidateHeap( 0000000000380000, 0000000000398230 ) Windows has triggered a breakpoint in trialtemp.exe.

This may be due to a corruption of the heap, which indicates a bug in trialtemp.exe or any of the DLLs it has loaded.

The source code is as following.

#include <iostream>
#include <cv.h>
#include <cxcore.h>

int main(int argc, char *argv[])
{
  cv::Mat m(4, 2, CV_8UC3);
  cv::randu(m, cv::Scalar::all(0), cv::Scalar::all(255));

  std::cout << "m (default) = " << m << ";" << std::endl << std::endl;
  std::cout << "m (python) = " << cv::format(m,"python") << ";" << std::endl << std::endl;
  std::cout << "m (numpy) = " << cv::format(m,"numpy") << ";" << std::endl << std::endl;
  std::cout << "m (csv) = " << cv::format(m,"csv") << ";" << std::endl << std::endl; 
  std::cout << "m (c) = " << cv::format(m,"C") << ";" << std::endl << std::endl;
}

Looking forward to hear from you. Thanks in advance.

edit retag flag offensive close merge delete

Comments

1

Hi, which compiler do you use?

Hongbo Miao gravatar imageHongbo Miao ( 2013-02-01 08:51:38 -0600 )edit

Hi, I am using vs2010, .net ver 4.0, _MSC_VER = 1600.

ccng gravatar imageccng ( 2013-02-04 03:42:33 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-02-04 06:04:51 -0600

Hongbo Miao gravatar image

updated 2013-02-05 09:29:00 -0600

I think you can try to rebuild your OpenCV.

http://answers.opencv.org/question/6495/visual-studio-2012-and-rtlfreeheap-error/#6603

Before rebuilding OpenCV, I used your codes and I got the similar problem like this.

image description

image description

But after rebuilding OpenCV, all things will work well. The codes can work well.

edit flag offensive delete link more

Comments

Thank you for the suggestion. I have tried it but is not working too. I got the same error as you have.

ccng gravatar imageccng ( 2013-02-05 07:33:04 -0600 )edit

You mean after you rebuilding OpenCV, the codes still cannot work? @ccng

Hongbo Miao gravatar imageHongbo Miao ( 2013-02-05 09:30:38 -0600 )edit

Yes, the code is still not working. So, now I have to use excel convert it manually.

ccng gravatar imageccng ( 2013-02-06 04:07:59 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-02-01 08:25:16 -0600

Seen: 574 times

Last updated: Feb 05 '13