or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

color.mddata.mddrawing.mdexposure.mdfeatures.mdfiltering.mdindex.mdio.mdmeasurement.mdmorphology.mdrestoration.mdsegmentation.mdtransform.mdutilities.md

exposure.mddocs/

0

# Exposure

1

2

Image intensity and exposure adjustment operations for enhancing image contrast, brightness, and visibility. Includes histogram operations, gamma correction, and adaptive enhancement methods.

3

4

## Capabilities

5

6

### Histogram Operations

7

8

```python { .api }

9

def histogram(image, nbins=256, source_range='image', normalize=False):

10

"""Calculate image histogram."""

11

12

def equalize_hist(image, nbins=256, mask=None):

13

"""Global histogram equalization."""

14

15

def equalize_adapthist(image, kernel_size=None, clip_limit=0.01, nbins=256):

16

"""Adaptive histogram equalization (CLAHE)."""

17

18

def match_histograms(image, reference, multichannel=False, channel_axis=None):

19

"""Match image histogram to reference."""

20

21

def cumulative_distribution(image, nbins=256):

22

"""Compute cumulative distribution function."""

23

```

24

25

### Intensity Adjustment

26

27

```python { .api }

28

def rescale_intensity(image, in_range='image', out_range='dtype'):

29

"""Rescale image intensity values."""

30

31

def adjust_gamma(image, gamma=1, gain=1):

32

"""Apply gamma correction."""

33

34

def adjust_sigmoid(image, cutoff=0.5, gain=10, inv=False):

35

"""Apply sigmoid intensity adjustment."""

36

37

def adjust_log(image, gain=1, inv=False):

38

"""Apply logarithmic intensity adjustment."""

39

```

40

41

### Quality Assessment

42

43

```python { .api }

44

def is_low_contrast(image, fraction_threshold=0.05, lower_percentile=1, upper_percentile=99, method='linear'):

45

"""Check if image has low contrast."""

46

```

47

48

## Types

49

50

```python { .api }

51

from numpy.typing import NDArray

52

import numpy as np

53

54

Histogram = NDArray[np.integer]

55

IntensityRange = tuple

56

GammaValue = float

57

```