# Output Image Size

The output image generated by a morphology operator will be smaller than the input image. In general, the number of rows and columns lost on each side of the input image will equal the number of rows and columns on each side of the origin within the structuring element, not including the origin itself. For example, a 3x3 structuring element with the origin at the center will generate an output image smaller by one row and one column on all sides, as shown:

For opening and closing morphology operations, the rows and columns lost in the output image are doubled, since each of these morphology operations includes both an erosion and a dilation. For example, an opening or closing operator using the structuring element shown in the previous figure would generate an output image smaller by two rows along the top, two columns on the left, four rows along the bottom and four columns along the right side.