텐서플로우:: ops:: DecodeJpeg

#include <image_ops.h>

JPEG으로 인코딩된 이미지를 uint8 텐서로 디코딩합니다.

요약

attr channels 디코딩된 이미지에 대해 원하는 색상 채널 수를 나타냅니다.

허용되는 값은 다음과 같습니다.

  • 0: JPEG으로 인코딩된 이미지의 채널 수를 사용합니다.
  • 1: 회색조 이미지를 출력합니다.
  • 3: RGB 이미지를 출력합니다.

필요한 경우 JPEG로 인코딩된 이미지는 요청된 색상 채널 수에 맞게 변환됩니다.

속성 ratio 사용하면 디코딩 중에 이미지를 정수 배율로 축소할 수 있습니다. 허용되는 값은 1, 2, 4, 8입니다. 이는 나중에 이미지를 축소하는 것보다 훨씬 빠릅니다.

이 연산은 인터페이스가 동일하므로 PNG 및 애니메이션이 없는 GIF 디코딩도 지원하지만, tf.image.decode_image 사용하는 것이 더 깔끔합니다.

논거:

  • 범위: Scope 객체
  • 내용: 0-D. JPEG 형식으로 인코딩된 이미지.

선택적 속성( Attrs 참조):

  • 채널: 디코딩된 이미지의 색상 채널 수.
  • 비율: 축소 비율.
  • fancy_upscaling: true로 설정하면 크로마 평면의 업스케일링 속도는 느리지만 더 나은 품질을 제공합니다(yuv420/422만 해당).
  • try_recover_truncated: true인 경우, 잘린 입력 이미지에서 복구를 시도합니다.
  • acceptable_fraction: 잘린 입력이 허용되기 전에 필요한 최소 줄 수 비율입니다.
  • dct_method: 압축 해제에 사용되는 알고리즘에 대한 힌트를 지정하는 문자열입니다. 기본값은 ""이며, 이는 시스템별 기본값에 해당합니다. 현재 유효한 값은 ["INTEGER_FAST", "INTEGER_ACCURATE"]입니다. 이 힌트는 무시될 수 있습니다(예: 내부 JPEG 라이브러리가 해당 옵션을 지원하지 않는 버전으로 변경되는 경우).

보고:

  • Output : [height, width, channels] 크기의 3D 이미지

생성자와 소멸자

DecodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input contents)
DecodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input contents, const DecodeJpeg::Attrs & attrs)

공개 속성

image
operation

공공 기능

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

공개 정적 함수

AcceptableFraction (float x)
Channels (int64 x)
DctMethod (StringPiece x)
FancyUpscaling (bool x)
Ratio (int64 x)
TryRecoverTruncated (bool x)

구조

텐서플로우:: ops:: DecodeJpeg:: Attrs

DecodeJpeg 에 대한 선택적 속성 설정기입니다.

공개 속성

영상

::tensorflow::Output image

작업

Operation operation

공공 기능

DecodeJpeg

 DecodeJpeg(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input contents
)

DecodeJpeg

 DecodeJpeg(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input contents,
  const DecodeJpeg::Attrs & attrs
)

마디

::tensorflow::Node * node() const 

연산자::텐서플로우::입력

 operator::tensorflow::Input() const 

연산자::텐서플로우::출력

 operator::tensorflow::Output() const 

공개 정적 함수

허용 가능한 비율

Attrs AcceptableFraction(
  float x
)

채널

Attrs Channels(
  int64 x
)

DCT 방법

Attrs DctMethod(
  StringPiece x
)

팬시업스케일링

Attrs FancyUpscaling(
  bool x
)

비율

Attrs Ratio(
  int64 x
)

TryRecoverTruncated

Attrs TryRecoverTruncated(
  bool x
)