Table Of Contents

Previous topic

Contrast transfer function correction

Next topic

Erode

Dilate

Description

Does a binary dilation on the image. The constructor expects a structuring element in form of an image handle. The structuring element can either be created manually or one of the default elements can be taken.

Examples

C++

#include <iplt/image.hh>
#include <iplt/alg/dilate.hh>

using namespace iplt;

int main()
{
  ImageHandle img = LoadImage("...");
  img.ApplyIP( alg::Dilate(alg::Create4n()) );

  return 0;
}

Python

from iplt import *
img = LoadImage("...")
img.ApplyIP( alg.Dilate(alg.Create4n()) )

Example image

../_images/dilate.png

Figure 1: left: original image, right image after dilation

Python interface

class iplt.alg.Dilate((object)arg1, (ConstImageHandle)arg2)
__init__((object)arg1, (ConstImageHandle)arg2) → None :
C++ signature :
void __init__(_object*,ost::img::ConstImageHandle)

C++ interface