Welcome to kwimage’s documentation!

The Kitware Image Module (kwimage) contains functions to accomplish lower-level image operations via a high level API.

Read the docs

https://kwimage.readthedocs.io

Gitlab (main)

https://gitlab.kitware.com/computer-vision/kwimage

Github (mirror)

https://github.com/Kitware/kwimage

Pypi

https://pypi.org/project/kwimage

Module features:

  • Image reader / writer functions with multiple backends

  • Wrapers around opencv that simplify and extend its functionality

  • Annotation datastructure with configurable backends.

  • Many function have awareness of torch tensors and can be used interchangably with ndarrays.

  • Misc image manipulation functions

Function Usefulness

Function name

Usefulness

kwimage.Boxes()

498

kwimage.Affine()

351

kwimage.Polygon()

291

kwimage.imread()

242

kwimage.imwrite()

240

kwimage.Detections()

208

kwimage.Color()

164

kwimage.grab_test_image()

157

kwimage.imresize()

141

kwimage.stack_images()

118

kwimage.draw_text_on_image()

105

kwimage.MultiPolygon()

96

kwimage.normalize_intensity()

96

kwimage.ensure_uint255()

94

kwimage.Mask()

91

kwimage.ensure_float01()

89

kwimage.ensure_alpha_channel()

74

kwimage.Points()

69

kwimage.grab_test_image_fpath()

68

kwimage.normalize()

67

kwimage.convert_colorspace()

66

kwimage.Heatmap()

65

kwimage.draw_header_text()

58

kwimage.atleast_3channels()

53

kwimage.stack_images_grid()

53

kwimage.overlay_alpha_layers()

49

kwimage.Coords()

46

kwimage.Projective()

36

kwimage.gaussian_patch()

34

kwimage.warp_affine()

33

kwimage.overlay_alpha_images()

29

kwimage.load_image_shape()

28

kwimage.make_heatmask()

27

kwimage.gaussian_blur()

22

kwimage.PolygonList()

22

kwimage.Segmentation()

19

kwimage.fill_nans_with_checkers()

19

kwimage.MaskList()

14

kwimage.warp_projective()

14

kwimage.PointsList()

14

kwimage.warp_tensor()

12

kwimage.num_channels()

12

kwimage.warp_points()

11

kwimage.SegmentationList()

11

kwimage.morphology()

10

kwimage.imscale()

9

kwimage.encode_run_length()

9

kwimage.draw_clf_on_image()

8

kwimage.non_max_supression()

6

kwimage.checkerboard()

6

kwimage.subpixel_accum()

5

kwimage.fourier_mask()

5

kwimage.nodata_checkerboard()

5

kwimage.draw_vector_field()

5

kwimage.imcrop()

5

kwimage.add_homog()

5

kwimage.subpixel_getvalue()

4

kwimage.decode_run_length()

4

kwimage.warp_image()

4

kwimage.draw_line_segments_on_image()

4

kwimage.subpixel_slice()

4

kwimage.rle_translate()

3

kwimage.make_vector_field()

3

kwimage.daq_spatial_nms()

3

kwimage.make_channels_comparable()

3

kwimage.Matrix()

3

kwimage.Transform()

2

kwimage.subpixel_setvalue()

2

kwimage.padded_slice()

1

kwimage.remove_homog()

1

kwimage.subpixel_translate()

1

kwimage.Linear()

1

kwimage.subpixel_maximum()

1

Indices and tables