I am at the moment trying to dilate and erode an binary image, but it doesn't seem to me that OpenCV is even trying to do so, am I applying incorrectly?
Here is the code:
Mat src = imread();
Mat Temp = ColorTransform(src,8);
cvtColor(Temp,Temp,CV_BGR2GRAY);
int morph_elem = 0;
int morph_size = 11;
int morph_operator = 0;
int const max_operator = 4;
int const max_elem = 2;
int const max_kernel_size = 21;
Mat temp= ColorTransForm(src,8);
cvtColor(temp,temp, CV_BGR2GRAY);
Mat bin;
Mat dones;
double thresh = 250;
double maxValue = 255;
threshold(temp,bin, thresh, maxValue, THRESH_BINARY);
for(int j = 0; j< 50 ; j++)
{
cout <<"Morph: " << j<
↧