Shortcuts

BinarizeImage

class mmedit.datasets.transforms.BinarizeImage(keys, binary_thr, a_min=0, a_max=1, dtype=<class 'numpy.uint8'>)[source]

Binarize image.

Parameters
  • keys (Sequence[str]) – The images to be binarized.

  • binary_thr (float) – Threshold for binarization.

  • amin (int) – Lower limits of pixel value.

  • amx (int) – Upper limits of pixel value.

  • dtype (np.dtype) – Set the data type of the output. Default: np.uint8

transform(results)[source]

The transform function of BinarizeImage.

Parameters

results (dict) – A dict containing the necessary information and data for augmentation.

Returns

A dict containing the processed data and information.

Return type

dict

Read the Docs v: zyh/doc-notfound-extend
Versions
master
latest
stable
zyh-doc-notfound-extend
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.