View Source Evision.Bioinspired.RetinaFastToneMapping (Evision v0.2.9)

Summary

Types

t()

Type that represents an Bioinspired.RetinaFastToneMapping struct.

Functions

applies a luminance correction (initially High Dynamic Range (HDR) tone mapping)

applies a luminance correction (initially High Dynamic Range (HDR) tone mapping)

Clears the algorithm state

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Reads algorithm parameters from a file storage

updates tone mapping behaviors by adjusing the local luminance computation area

updates tone mapping behaviors by adjusing the local luminance computation area

Stores algorithm parameters in a file storage

Types

@type t() :: %Evision.Bioinspired.RetinaFastToneMapping{ref: reference()}

Type that represents an Bioinspired.RetinaFastToneMapping struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

Link to this function

applyFastToneMapping(named_args)

View Source
@spec applyFastToneMapping(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

applyFastToneMapping(self, inputImage)

View Source
@spec applyFastToneMapping(t(), Evision.Mat.maybe_mat_in()) ::
  Evision.Mat.t() | {:error, String.t()}

applies a luminance correction (initially High Dynamic Range (HDR) tone mapping)

Positional Arguments
  • self: Evision.Bioinspired.RetinaFastToneMapping.t()

  • inputImage: Evision.Mat.

    the input image to process RGB or gray levels

Return
  • outputToneMappedImage: Evision.Mat.t().

    the output tone mapped image

using only the 2 local adaptation stages of the retina parvocellular channel : photoreceptors level and ganlion cells level. Spatio temporal filtering is applied but limited to temporal smoothing and eventually high frequencies attenuation. This is a lighter method than the one available using the regular retina::run method. It is then faster but it does not include complete temporal filtering nor retina spectral whitening. Then, it can have a more limited effect on images with a very high dynamic range. This is an adptation of the original still image HDR tone mapping algorithm of David Alleyson, Sabine Susstruck and Laurence Meylan's work, please cite: -> Meylan L., Alleysson D., and Susstrunk S., A Model of Retinal Local Adaptation for the Tone Mapping of Color Filter Array Images, Journal of Optical Society of America, A, Vol. 24, N 9, September, 1st, 2007, pp. 2807-2816

Python prototype (for reference only):

applyFastToneMapping(inputImage[, outputToneMappedImage]) -> outputToneMappedImage
Link to this function

applyFastToneMapping(self, inputImage, opts)

View Source
@spec applyFastToneMapping(
  t(),
  Evision.Mat.maybe_mat_in(),
  [{atom(), term()}, ...] | nil
) ::
  Evision.Mat.t() | {:error, String.t()}

applies a luminance correction (initially High Dynamic Range (HDR) tone mapping)

Positional Arguments
  • self: Evision.Bioinspired.RetinaFastToneMapping.t()

  • inputImage: Evision.Mat.

    the input image to process RGB or gray levels

Return
  • outputToneMappedImage: Evision.Mat.t().

    the output tone mapped image

using only the 2 local adaptation stages of the retina parvocellular channel : photoreceptors level and ganlion cells level. Spatio temporal filtering is applied but limited to temporal smoothing and eventually high frequencies attenuation. This is a lighter method than the one available using the regular retina::run method. It is then faster but it does not include complete temporal filtering nor retina spectral whitening. Then, it can have a more limited effect on images with a very high dynamic range. This is an adptation of the original still image HDR tone mapping algorithm of David Alleyson, Sabine Susstruck and Laurence Meylan's work, please cite: -> Meylan L., Alleysson D., and Susstrunk S., A Model of Retinal Local Adaptation for the Tone Mapping of Color Filter Array Images, Journal of Optical Society of America, A, Vol. 24, N 9, September, 1st, 2007, pp. 2807-2816

Python prototype (for reference only):

applyFastToneMapping(inputImage[, outputToneMappedImage]) -> outputToneMappedImage
@spec clear(Keyword.t()) :: any() | {:error, String.t()}
@spec clear(t()) :: t() | {:error, String.t()}

Clears the algorithm state

Positional Arguments
  • self: Evision.Bioinspired.RetinaFastToneMapping.t()

Python prototype (for reference only):

clear() -> None
@spec create(Keyword.t()) :: any() | {:error, String.t()}
@spec create({number(), number()}) :: t() | {:error, String.t()}

create

Positional Arguments
  • inputSize: Size
Return
  • retval: RetinaFastToneMapping

Python prototype (for reference only):

create(inputSize) -> retval
@spec empty(Keyword.t()) :: any() | {:error, String.t()}
@spec empty(t()) :: boolean() | {:error, String.t()}

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Positional Arguments
  • self: Evision.Bioinspired.RetinaFastToneMapping.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
Link to this function

getDefaultName(named_args)

View Source
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@spec getDefaultName(t()) :: binary() | {:error, String.t()}

getDefaultName

Positional Arguments
  • self: Evision.Bioinspired.RetinaFastToneMapping.t()
Return

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.

Python prototype (for reference only):

getDefaultName() -> retval
@spec read(Keyword.t()) :: any() | {:error, String.t()}
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

Positional Arguments

Python prototype (for reference only):

read(fn) -> None
@spec save(Keyword.t()) :: any() | {:error, String.t()}
@spec save(t(), binary()) :: t() | {:error, String.t()}

save

Positional Arguments
  • self: Evision.Bioinspired.RetinaFastToneMapping.t()
  • filename: String

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).

Python prototype (for reference only):

save(filename) -> None
@spec setup(Keyword.t()) :: any() | {:error, String.t()}
@spec setup(t()) :: t() | {:error, String.t()}

updates tone mapping behaviors by adjusing the local luminance computation area

Positional Arguments
  • self: Evision.Bioinspired.RetinaFastToneMapping.t()
Keyword Arguments
  • photoreceptorsNeighborhoodRadius: float.

    the first stage local adaptation area

  • ganglioncellsNeighborhoodRadius: float.

    the second stage local adaptation area

  • meanLuminanceModulatorK: float.

    the factor applied to modulate the meanLuminance information (default is 1, see reference paper)

Python prototype (for reference only):

setup([, photoreceptorsNeighborhoodRadius[, ganglioncellsNeighborhoodRadius[, meanLuminanceModulatorK]]]) -> None
@spec setup(
  t(),
  [
    ganglioncellsNeighborhoodRadius: term(),
    meanLuminanceModulatorK: term(),
    photoreceptorsNeighborhoodRadius: term()
  ]
  | nil
) :: t() | {:error, String.t()}

updates tone mapping behaviors by adjusing the local luminance computation area

Positional Arguments
  • self: Evision.Bioinspired.RetinaFastToneMapping.t()
Keyword Arguments
  • photoreceptorsNeighborhoodRadius: float.

    the first stage local adaptation area

  • ganglioncellsNeighborhoodRadius: float.

    the second stage local adaptation area

  • meanLuminanceModulatorK: float.

    the factor applied to modulate the meanLuminance information (default is 1, see reference paper)

Python prototype (for reference only):

setup([, photoreceptorsNeighborhoodRadius[, ganglioncellsNeighborhoodRadius[, meanLuminanceModulatorK]]]) -> None
@spec write(Keyword.t()) :: any() | {:error, String.t()}
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments

Python prototype (for reference only):

write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}

write

Positional Arguments

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None