Google I/O에 참여해 주셔서 감사합니다. 주문형 모든 세션 보기 주문형 시청

텐서플로:: 작전:: 인코딩Jpeg

#include <image_ops.h>

이미지를 JPEG로 인코딩합니다.

요약

image[height, width, channels] 모양의 3차원 uint8 텐서 입니다.

attr format 은 인코딩된 출력의 색상 형식을 재정의하는 데 사용할 수 있습니다. 값은 다음과 같을 수 있습니다.

  • `'' : Use a default format based on the number of channels in the image. * grayscale : Output a grayscale JPEG image. The 이미지 : Output a grayscale JPEG image. The 채널 dimension of must be 1. * rgb : Output an RGB JPEG image. The image` : Output an RGB JPEG image. The 채널 dimension of 3이어야 합니다.

format 이 지정되지 않았거나 빈 문자열이면 image 의 채널 수에 따라 기본 형식이 선택됩니다.

  • 1: 회색조 이미지를 출력 합니다.
  • 3: RGB 이미지를 출력 합니다.

인수:

  • 범위: 범위 개체
  • 이미지: [height, width, channels] 모양의 3D

선택적 속성( Attrs 참조):

  • 형식: 픽셀당 이미지 형식입니다.
  • 품질: 0에서 100까지의 압축 품질(높을수록 좋고 느림).
  • Progressive: True인 경우 점진적으로 로드되는 JPEG를 만듭니다(거친에서 미세로).
  • optimize_size: True이면 CPU/RAM을 사용하여 품질 변경 없이 크기를 줄입니다.
  • chroma_downsampling: http://en.wikipedia.org/wiki/Chroma_subsampling 참조.
  • density_unit: x_densityy_density 를 지정하는 데 사용되는 단위: 인치당 픽셀 수( 'in' ) 또는 센티미터( 'cm' ).
  • x_density: 밀도 단위당 가로 픽셀입니다.
  • y_density: 밀도 단위당 수직 픽셀입니다.
  • xmp_metadata: 비어 있지 않은 경우 이 XMP 메타데이터를 이미지 헤더에 포함합니다.

보고:

  • Output : 0-D. JPEG로 인코딩된 이미지.

생성자와 소멸자

EncodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input image)
EncodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input image, const EncodeJpeg::Attrs & attrs)

공개 속성

contents
operation

공공 기능

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

공개 정적 함수

ChromaDownsampling (bool x)
DensityUnit (StringPiece x)
Format (StringPiece x)
OptimizeSize (bool x)
Progressive (bool x)
Quality (int64 x)
XDensity (int64 x)
XmpMetadata (StringPiece x)
YDensity (int64 x)

구조체

tensorflow:: ops:: EncodeJpeg:: 속성

EncodeJpeg 에 대한 선택적 속성 설정자.

공개 속성

내용물

::tensorflow::Output contents

작업

Operation operation

공공 기능

인코딩Jpeg

 EncodeJpeg(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input image
)

인코딩Jpeg

 EncodeJpeg(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input image,
  const EncodeJpeg::Attrs & attrs
)

마디

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

공개 정적 함수

크로마다운샘플링

Attrs ChromaDownsampling(
  bool x
)

밀도 단위

Attrs DensityUnit(
  StringPiece x
)

체재

Attrs Format(
  StringPiece x
)

크기 최적화

Attrs OptimizeSize(
  bool x
)

프로그레시브

Attrs Progressive(
  bool x
)

품질

Attrs Quality(
  int64 x
)

XDensity

Attrs XDensity(
  int64 x
)

Xmp메타데이터

Attrs XmpMetadata(
  StringPiece x
)

Y밀도

Attrs YDensity(
  int64 x
)