AdjustContrast
tensorflow C++ API
tensorflow::ops::AdjustContrast
Adjust the contrast of one or more images.
Summary
images
is a tensor of at least 3 dimensions. The last 3 dimensions are interpreted as[height, width, channels]
. The other dimensions only represent a collection of images, such as[batch, height, width, channels].
Contrast is adjusted independently for each channel of each image.
For each channel, the Op first computes the mean of the image pixels in the channel and then adjusts each component of each pixel to(x - mean) * contrast_factor + mean
.
Arguments:
- scope: A Scope object
- images: Images to adjust. At least 3-D. Datatype must be float.
- contrast_factor: A float multiplier for adjusting contrast.
Returns:
Output
: The contrast-adjusted image or images.
Constructor
- AdjustContrast(const ::tensorflow::Scope & scope, ::tensorflow::Input images, ::tensorflow::Input contrast_factor).
Public attributes
- tensorflow::Output output.
AdjustContrast block
Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_image_ops.cpp
Argument:
- Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
- images : connect Input node.
- contrast_factor : connect Input node or input float value.
Return:
- Output output: Output object of AdjustContrast class object.
Result:
- std::vector(Tensor) product_result : Returned object of executed result by calling session.
Using Method
Input contents datatype of images must be float.