バイナリ イメージを使用したいfindContours
のですが、コールバック関数でエラーが発生します。
RtlFreeHeap に無効なアドレスが指定されました
戻るとき。
clear()
値を解放するために使用したい場合vector<vector<Point> >
、同じ例外が発生し、free.c の次の行でコードがクラッシュしました。
if (retval == 0) errno = _get_errno_from_oserr(GetLastError());
例えば:
void onChangeContourMode(int, void *)
{
Mat m_frB = imread("3.jpg", 0);
vector<vector<Point>> contours
vector<Vec4i> hierarchy;
findContours(m_frB, contours, hierarchy, g_contour_mode, CV_CHAIN_APPROX_SIMPLE);
for( int idx = 0 ; idx >= 0; idx = hierarchy[idx][0] )
drawContours( m_frB, contours, idx, Scalar(255,255,255),
CV_FILLED, 8, hierarchy );
imshow( "Contours", m_frB );
}
誰でも私を助けることができますか?どうもありがとうございました!