grid_map
grid_map copied to clipboard
MedianFillFilter.cpp -> function cleanedMask() 's morphological operational question
in grid_map_filters/src/MedianFillFilter.cpp,
cv::dilate(inputMask, cleanedInputMask, element);
cv::erode(cleanedInputMask, cleanedInputMask, element);
cv::erode(inputMask, cleanedInputMask, element);
cv::dilate(cleanedInputMask, cleanedInputMask, element);
My idea was to write it like this,
cv::dilate(inputMask, cleanedInputMask, element);
cv::erode(cleanedInputMask, cleanedInputMask, element);
cv::erode(cleanedInputMask, cleanedInputMask, element);
cv::dilate(cleanedInputMask, cleanedInputMask, element);
Is there a problem with the third line of code here? Or is there a problem with my understanding. Can you explain what this part of the code does? Thanks!