scipy.ndimage.morphology.binary_hit_or_miss(input, structure1=None, structure2=None, output=None, origin1=0, origin2=None)

Multi-dimensional binary hit-or-miss transform.

An output array can optionally be provided. The origin parameters controls the placement of the structuring elements. If the first structuring element is not given one is generated with a squared connectivity equal to one. If the second structuring element is not provided, it set equal to the inverse of the first structuring element. If the origin for the second structure is equal to None it is set equal to the origin of the first.