@Operator public final class DecodeAndCropJpeg extends PrimitiveOp implements Operand<UInt8>
The attr `channels` indicates the desired number of color channels for the decoded image.
Accepted values are:
The attr `ratio` allows downscaling the image by an integer factor during decoding. Allowed values are: 1, 2, 4, and 8. This is much faster than downscaling the image later.
It is equivalent to a combination of decode and crop, but much faster by only decoding partial jpeg image.
| Modifier and Type | Class and Description |
|---|---|
static class |
DecodeAndCropJpeg.Options
Optional attributes for
DecodeAndCropJpeg |
operation| Modifier and Type | Method and Description |
|---|---|
static DecodeAndCropJpeg.Options |
acceptableFraction(Float acceptableFraction) |
Output<UInt8> |
asOutput()
Returns the symbolic handle of a tensor.
|
static DecodeAndCropJpeg.Options |
channels(Long channels) |
static DecodeAndCropJpeg |
create(Scope scope,
Operand<String> contents,
Operand<Integer> cropWindow,
DecodeAndCropJpeg.Options... options)
Factory method to create a class to wrap a new DecodeAndCropJpeg operation to the graph.
|
static DecodeAndCropJpeg.Options |
dctMethod(String dctMethod) |
static DecodeAndCropJpeg.Options |
fancyUpscaling(Boolean fancyUpscaling) |
Output<UInt8> |
image()
3-D with shape `[height, width, channels]`..
|
static DecodeAndCropJpeg.Options |
ratio(Long ratio) |
static DecodeAndCropJpeg.Options |
tryRecoverTruncated(Boolean tryRecoverTruncated) |
equals, hashCode, toStringpublic static DecodeAndCropJpeg create(Scope scope, Operand<String> contents, Operand<Integer> cropWindow, DecodeAndCropJpeg.Options... options)
scope - current graph scopecontents - 0-D. The JPEG-encoded image.cropWindow - 1-D. The crop window: [crop_y, crop_x, crop_height, crop_width].options - carries optional attributes valuespublic static DecodeAndCropJpeg.Options channels(Long channels)
channels - Number of color channels for the decoded image.public static DecodeAndCropJpeg.Options ratio(Long ratio)
ratio - Downscaling ratio.public static DecodeAndCropJpeg.Options fancyUpscaling(Boolean fancyUpscaling)
fancyUpscaling - If true use a slower but nicer upscaling of the
chroma planes (yuv420/422 only).public static DecodeAndCropJpeg.Options tryRecoverTruncated(Boolean tryRecoverTruncated)
tryRecoverTruncated - If true try to recover an image from truncated input.public static DecodeAndCropJpeg.Options acceptableFraction(Float acceptableFraction)
acceptableFraction - The minimum required fraction of lines before a truncated
input is accepted.public static DecodeAndCropJpeg.Options dctMethod(String dctMethod)
dctMethod - string specifying a hint about the algorithm used for
decompression. Defaults to "" which maps to a system-specific
default. Currently valid values are ["INTEGER_FAST",
"INTEGER_ACCURATE"]. The hint may be ignored (e.g., the internal
jpeg library changes to a version that does not have that specific
option.)public Output<UInt8> asOutput()
OperandInputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.
asOutput in interface Operand<UInt8>OperationBuilder.addInput(Output)Copyright © 2015–2019. All rights reserved.