1. A method for inspecting a workpiece feature that is proximate to an occluding feature in a workpiece image acquired by a machine vision inspection system, the machine vision inspection system having a user interface usable to define a sequence of operations usable to inspect the workpiece image, the method comprising: acquiring a first workpiece image; choosing a shape of a structuring element based on the shape of the workpiece feature to be inspected in the workpiece image, such that the shape of the structuring element is similar to the shape of at least a portion of the workpiece feature to be inspected; filtering the first workpiece image using the structuring element, at least in a region including the workpiece feature to be inspected, to provide a filtered image at least in a region including the workpiece feature to be inspected; and inspecting the workpiece feature in the filtered image.