My question is simple. It may be too easy. But in the process of working on one of my projects, I used the following lines to expand the binary image.
cv::dilate(c_Proj, c_Proj, Mat(), Point(), 2);
Which basically expands the binary image with a 3x3 rectangular structural element. From the last argument, you can see that I am doing 2 iterations of these operations, which is equivalent to:
cv::dilate(c_Proj, c_Proj, Mat(), Point(), 1);
cv::dilate(c_Proj, c_Proj, Mat(), Point(), 1);
My question is: Instead of doing two iterations, if I only do one iteration using a 6x6 structuring element, is this equivalent to the code above in terms of accuracy and performance? Is it faster when the image is repeated only once?
source
share