EmguCV CvInvoke.Rectangle {"OpenCV: связность == 8 || связность == 4"}
У меня есть ошибка в emguCV, когда рисует Rectangle, выдает исключение '{"OpenCV: connectivity == 8 || connectivity == 4"} '.
Вот часть моего кода, здесь выдается исключение:
private VectorOfRect FilterMostlyEmptyBoxes(VectorOfMat thresholds, VectorOfRect charRegions)
{
// Of the n thresholded images, if box 3 (for example) is empty in half (for example) of the thresholded images,
// clear all data for every box #3.
//const float MIN_AREA_PERCENT = 0.1;
float MIN_CONTOUR_HEIGHT_PERCENT = Config.Instance.segmentationMinCharHeightPercent;
int[] boxScores = new int[charRegions.Size];
for (int i = 0; i < charRegions.Size; i++)
boxScores[i] = 0;
for (int i = 0; i < thresholds.Size; i++)
{
for (int j = 0; j < charRegions.Size; j++)
{
//float minArea = charRegions[j].area() * MIN_AREA_PERCENT;
Mat tempImg = Mat.Zeros(thresholds[i].Rows, thresholds[i].Cols, thresholds[i].Depth, thresholds[i].NumberOfChannels);
CvInvoke.Rectangle(tempImg, charRegions[j], new MCvScalar(255, 255, 255), thickness: -1, lineType: LineType.Filled);
CvInvoke.BitwiseAnd(thresholds[i], tempImg, tempImg);
CvInvoke.Imshow("FilterMostlyEmptyBoxes", tempImg);
CvInvoke.WaitKey();
в строке CvInvoke.Rectangle при заполнении типа линии (-1) выбрасывает исключение {{OpenCV: connectivity == 8 || connectivity == 4 "} ', но когда я использую другие типы типов, например AntiAlias, EightConnected, FourConnected, я не нет никаких исключений! Итак, что здесь не так?