Ask Your Question

yhd's profile - activity

2017-04-26 07:35:14 -0600 received badge  Student (source)
2017-04-26 02:04:12 -0600 received badge  Editor (source)
2017-04-26 01:37:55 -0600 asked a question I have a question about how to use xml.
cv::Mat A(181, 181, CV_32FC(28), Scalar(0));

There are 181 rows, 181 cols and 28 channels.

An error occurs when reading this after saving it in xml file.

FileStorage fs2("tau.yml", FileStorage::READ);
Mat AA;
fs2["A"] >> AA; // error occur

I think 181, 181, and 28 do not seem to parse.

Can I use the opencv library to solve this?

Or should I write new code to read this?

Thanks for reading.

2015-08-14 10:52:45 -0600 asked a question An error occurred during the contour-related code.
 std::vector<std::vector<cv::Point>>::iterator itc = contours.begin();
// for all contours
int cntCheck = 0;
while (itc != contours.end())
{
// verify contour size
size_t contourSize = itc->size();
if ((contourSize > 30) && (contourSize < 600))
{
++itc;
cntCheck = cntCheck + 1;
}
else
{
itc = contours.erase(itc);
}
}

This code is removing the contour that wrong size

This was code for normal operation in visual studio 2013. but This does not work in visual studio 2015.

When less than 30 works well. But an error is greater than 600.

How do i fix this?

thanks for reading.

image description