# Tag Info

3

The Hit-or-Miss transform as the name suggest uses 2 structuring elements (SE) to identify structures which are specific to the foreground (first SE) and background (second SE). Here, you have a good example for corner detection. The only difference is that the two SE are merged into 1: The 1 are part of the foreground SE in order to determine a specific ...

3

First of all, are you using gray-scale morphology? If so, then I would threshold the map first, to get a binary image, and then apply binary morphology to fill in gaps and get rid of the noise. Second, instead of erosion and dilation, try opening and closing, which are higher order morphological operations. Opening is erosion followed by dilation with the ...

2

According to this paper, the grayscale dilation of image $I$ by a non-flat structuring element $S$ is defined as follows: $[I ⊕ S](x,y) = \displaystyle\max_{(s,t)∈S}\{I(x-s,y-t)+S(s,t)\}$ Since the origin of the structuring element is in the top right corner, we have that $s∈[0,1]$ and $t∈[-2,0]$ excluding the point $(s,t)=(0,-1)$. So using your example of ...

2

This is more of an extension to the ideas mentioned by @Dima and @heltonbiker. As @heltonbiker said, it might be a good idea to apply thresholding first: I would be more confident this is the right approach if the images you posted were a bit bigger so I could examine the details for myself. Adaptive thresholding is one that is (more or less) robust to ...

1

As you said closing is completely defined by a dilatation followed by an erosion with the same structuring element (SE) (respectively opening is an erosion followed by a dilation with the same structuring element). The key point is that is must be the same structuring element and this is much more specific than an erosion followed by a dilatation with ...

1

If you know the median filter principle, that's exactly the same type of operation. For each pixel, you take a look to all the neighbor pixels (defined by the structuring element), and you take the max (dilation) or the min (erosion). Therefore it's like the median filter, but instead of taking the median value, you take the min/max. The mathematical ...

1

Structuring element is mostly supposed to be a binary array (though you can try 0 0 7 7 by yourself). H=[0 0 1 1] u, v are the pixel coordinate at I. In your example, the only pixel value that will change is I(1,2) (the array label starts from 0 instead of 1). I = 1 2 3 3 7 2 Consider I(1,2), from the formula, I(1,2) I(1,1), and I(1,0)...

1

You are actually drawing the skeleton of the background (brighter region). change cv::threshold(image, image, threshold, 255, cv::THRESH_BINARY); in your codes to cv::threshold(image, image, threshold, 255, cv::THRESH_BINARY_INV); You should be able to get the right skeleton.

1

The masked area hidden by leaves is very large and while the border and shading seems to imply what is hidden to a human being it is unsuited to "inpainting" which relies on pretty consistent boundary, such as where a foreground object temporarily obscures something continuing behind. The branch orientation is a start but not enough data on its own to imply ...

1

imfill would work with images and not volumes. However Matlab has many basic tools to fill the holes, that is to interpolate missing data points. What you are after is interpolation and Matlab has a function called interp3.

Only top voted, non community-wiki answers of a minimum length are eligible