tensor akışı:: işlem:: KodlamaJpeg

#include <image_ops.h>

Bir görüntüyü JPEG olarak kodlayın.

Özet

image [height, width, channels] şeklinde bir 3 boyutlu uint8 Tensördür .

Attr format kodlanmış çıktının renk formatını geçersiz kılmak için kullanılabilir. Değerler şunlar olabilir:

  • `'' : Use a default format based on the number of channels in the image. * gri tonlamalı : Output a grayscale JPEG image. The Görüntünün : Output a grayscale JPEG image. The dimension of must be 1. * rgb : Output an RGB JPEG image. The Görüntünün : Output an RGB JPEG image. The dimension of 3 olmalıdır.

format belirtilmemişse veya boş dize ise, image kanal sayısına göre varsayılan bir format seçilir:

Argümanlar:

  • kapsam: Bir Kapsam nesnesi
  • görüntü: Şekilli 3 boyutlu [height, width, channels] .

İsteğe bağlı özellikler (bkz. Attrs ):

  • format: Piksel başına resim formatı.
  • kalite: Sıkıştırma kalitesi 0'dan 100'e kadar (daha yüksek, daha iyi ve daha yavaştır).
  • aşamalı: Doğruysa, aşamalı olarak (kabadan inceye) yüklenen bir JPEG oluşturun.
  • optimize_size: Doğruysa, kalite değişikliği olmadan boyutu azaltmak için CPU/RAM harcayın.
  • chroma_downsampling: Bkz. http://en.wikipedia.org/wiki/Chroma_subsampling .
  • yoğunluk_birimi: x_density ve y_density belirtmek için kullanılan birim: inç başına piksel ( 'in' ) veya santimetre ( 'cm' ).
  • x_density: Yoğunluk birimi başına yatay piksel sayısı.
  • y_density: Yoğunluk birimi başına dikey piksel sayısı.
  • xmp_metadata: Boş değilse, bu XMP meta verilerini resim başlığına gömün.

İadeler:

  • Output : 0-D. JPEG kodlu görüntü.

Yapıcılar ve Yıkıcılar

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

Genel özellikler

contents
operation

Kamu işlevleri

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

Genel statik işlevler

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)

Yapılar

tensorflow:: ops:: EncodeJpeg:: Öznitelikler

EncodeJpeg için isteğe bağlı nitelik ayarlayıcılar.

Genel özellikler

içindekiler

::tensorflow::Output contents

operasyon

Operation operation

Kamu işlevleri

KodlamaJpeg

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

KodlamaJpeg

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

düğüm

::tensorflow::Node * node() const 

operatör::tensorflow::Giriş

 operator::tensorflow::Input() const 

operatör::tensorflow::Çıktı

 operator::tensorflow::Output() const 

Genel statik işlevler

ChromaAltörnekleme

Attrs ChromaDownsampling(
  bool x
)

YoğunlukBirimi

Attrs DensityUnit(
  StringPiece x
)

Biçim

Attrs Format(
  StringPiece x
)

Boyutu Optimize Et

Attrs OptimizeSize(
  bool x
)

Aşamalı

Attrs Progressive(
  bool x
)

Kalite

Attrs Quality(
  int64 x
)

XYoğunluk

Attrs XDensity(
  int64 x
)

XmpMeta Verileri

Attrs XmpMetadata(
  StringPiece x
)

Yoğunluk

Attrs YDensity(
  int64 x
)