View Source Evision.Intensitytransform (Evision v0.2.9)
Summary
Functions
Given an input bgr or grayscale image, apply autoscaling on domain [0, 255] to increase the contrast of the input image and return the resulting image.
Given an input color image, enhance low-light images using the BIMEF method (@cite ying2017bio @cite ying2017new).
Given an input color image, enhance low-light images using the BIMEF method (@cite ying2017bio @cite ying2017new).
Given an input color image, enhance low-light images using the BIMEF method (@cite ying2017bio @cite ying2017new).
Given an input color image, enhance low-light images using the BIMEF method (@cite ying2017bio @cite ying2017new).
Given an input bgr or grayscale image, apply linear contrast stretching on domain [0, 255] and return the resulting image.
Given an input bgr or grayscale image and constant gamma, apply power-law transformation, a.k.a. gamma correction to the image on domain [0, 255] and return the resulting image.
Given an input bgr or grayscale image and constant c, apply log transformation to the image on domain [0, 255] and return the resulting image.
Types
@type t() :: %Evision.Intensitytransform{ref: reference()}
Type that represents an Intensitytransform
struct.
ref.
reference()
The underlying erlang resource variable.
Functions
@spec autoscaling(Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) :: :ok | {:error, String.t()}
Given an input bgr or grayscale image, apply autoscaling on domain [0, 255] to increase the contrast of the input image and return the resulting image.
Positional Arguments
input:
Evision.Mat
.input bgr or grayscale image.
output:
Evision.Mat
.resulting image of autoscaling.
Python prototype (for reference only):
autoscaling(input, output) -> None
@spec bimef2(Evision.Mat.maybe_mat_in(), number(), number(), number(), number()) :: Evision.Mat.t() | {:error, String.t()}
Given an input color image, enhance low-light images using the BIMEF method (@cite ying2017bio @cite ying2017new).
Positional Arguments
input:
Evision.Mat
.input color image.
k:
float
.exposure ratio.
mu:
float
.enhancement ratio.
a:
float
.a-parameter in the Camera Response Function (CRF).
b:
float
.b-parameter in the Camera Response Function (CRF).
Return
output:
Evision.Mat.t()
.resulting image.
This is an overloaded function with the exposure ratio given as parameter.
@warning This is a C++ implementation of the original MATLAB algorithm. Compared to the original code, this implementation is a little bit slower and does not provide the same results. In particular, quality of the image enhancement is degraded for the bright areas in certain conditions.
Python prototype (for reference only):
BIMEF2(input, k, mu, a, b[, output]) -> output
@spec bimef2( Evision.Mat.maybe_mat_in(), number(), number(), number(), number(), [{atom(), term()}, ...] | nil ) :: Evision.Mat.t() | {:error, String.t()}
Given an input color image, enhance low-light images using the BIMEF method (@cite ying2017bio @cite ying2017new).
Positional Arguments
input:
Evision.Mat
.input color image.
k:
float
.exposure ratio.
mu:
float
.enhancement ratio.
a:
float
.a-parameter in the Camera Response Function (CRF).
b:
float
.b-parameter in the Camera Response Function (CRF).
Return
output:
Evision.Mat.t()
.resulting image.
This is an overloaded function with the exposure ratio given as parameter.
@warning This is a C++ implementation of the original MATLAB algorithm. Compared to the original code, this implementation is a little bit slower and does not provide the same results. In particular, quality of the image enhancement is degraded for the bright areas in certain conditions.
Python prototype (for reference only):
BIMEF2(input, k, mu, a, b[, output]) -> output
@spec bimef(Keyword.t()) :: any() | {:error, String.t()}
@spec bimef(Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}
Given an input color image, enhance low-light images using the BIMEF method (@cite ying2017bio @cite ying2017new).
Positional Arguments
input:
Evision.Mat
.input color image.
Keyword Arguments
mu:
float
.enhancement ratio.
a:
float
.a-parameter in the Camera Response Function (CRF).
b:
float
.b-parameter in the Camera Response Function (CRF).
Return
output:
Evision.Mat.t()
.resulting image.
@warning This is a C++ implementation of the original MATLAB algorithm. Compared to the original code, this implementation is a little bit slower and does not provide the same results. In particular, quality of the image enhancement is degraded for the bright areas in certain conditions.
Python prototype (for reference only):
BIMEF(input[, output[, mu[, a[, b]]]]) -> output
@spec bimef(Evision.Mat.maybe_mat_in(), [a: term(), b: term(), mu: term()] | nil) :: Evision.Mat.t() | {:error, String.t()}
Given an input color image, enhance low-light images using the BIMEF method (@cite ying2017bio @cite ying2017new).
Positional Arguments
input:
Evision.Mat
.input color image.
Keyword Arguments
mu:
float
.enhancement ratio.
a:
float
.a-parameter in the Camera Response Function (CRF).
b:
float
.b-parameter in the Camera Response Function (CRF).
Return
output:
Evision.Mat.t()
.resulting image.
@warning This is a C++ implementation of the original MATLAB algorithm. Compared to the original code, this implementation is a little bit slower and does not provide the same results. In particular, quality of the image enhancement is degraded for the bright areas in certain conditions.
Python prototype (for reference only):
BIMEF(input[, output[, mu[, a[, b]]]]) -> output
@spec contrastStretching( Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in(), integer(), integer(), integer(), integer() ) :: :ok | {:error, String.t()}
Given an input bgr or grayscale image, apply linear contrast stretching on domain [0, 255] and return the resulting image.
Positional Arguments
input:
Evision.Mat
.input bgr or grayscale image.
output:
Evision.Mat
.resulting image of contrast stretching.
r1:
integer()
.x coordinate of first point (r1, s1) in the transformation function.
s1:
integer()
.y coordinate of first point (r1, s1) in the transformation function.
r2:
integer()
.x coordinate of second point (r2, s2) in the transformation function.
s2:
integer()
.y coordinate of second point (r2, s2) in the transformation function.
Python prototype (for reference only):
contrastStretching(input, output, r1, s1, r2, s2) -> None
@spec gammaCorrection( Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in(), number() ) :: :ok | {:error, String.t()}
Given an input bgr or grayscale image and constant gamma, apply power-law transformation, a.k.a. gamma correction to the image on domain [0, 255] and return the resulting image.
Positional Arguments
input:
Evision.Mat
.input bgr or grayscale image.
output:
Evision.Mat
.resulting image of gamma corrections.
gamma:
float
.constant in c*r^gamma where r is pixel value.
Python prototype (for reference only):
gammaCorrection(input, output, gamma) -> None
@spec logTransform(Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) :: :ok | {:error, String.t()}
Given an input bgr or grayscale image and constant c, apply log transformation to the image on domain [0, 255] and return the resulting image.
Positional Arguments
input:
Evision.Mat
.input bgr or grayscale image.
output:
Evision.Mat
.resulting image of log transformations.
Python prototype (for reference only):
logTransform(input, output) -> None