morphology:MultipassFilter< { operation:{ default:"dilate"; description:"Erode shrinks bright areas, Dilate grows them. Open and Close combine the two to remove specks or fill holes. Gradient outlines shapes; Top-hat and Black-hat keep small bright or dark details."; label:"Operation"; options:{ blackhat:"Black-hat"; close:"Close"; dilate:"Dilate"; erode:"Erode"; gradient:"Gradient"; open:"Open"; tophat:"Top-hat"; }; type:"enum"; }; radius:{ default:2; description:"Size of that shape in pixels."; label:"Radius (px)"; max:15; min:1; type:"int"; unit:"px"; }; shape:{ default:"disk"; description:"The shape moved over the picture: a square, a round disk or a cross."; label:"Structuring element"; options:{cross:"Cross";disk:"Disk";square:"Square"}; type:"enum"; }; }, > = ...
Grey-level morphology per channel (as OpenCV does on colour images), on premultiplied values,
alpha included. Open = erode then dilate, close = dilate then erode; gradient = dilate − erode,
top-hat = image − open, black-hat = close − image (these three keep the input's alpha).
Operation indices: erode 0, dilate 1, open 2, close 3, gradient 4, tophat 5, blackhat 6.
Grey-level morphology per channel (as OpenCV does on colour images), on premultiplied values, alpha included. Open = erode then dilate, close = dilate then erode; gradient = dilate − erode, top-hat = image − open, black-hat = close − image (these three keep the input's alpha). Operation indices: erode 0, dilate 1, open 2, close 3, gradient 4, tophat 5, blackhat 6.