tensorflow::ops::EncodeJpeg

#include <image_ops.h>

Bir görüntüyü JPEG formatında kodlamak.

Özet

image [height, width, channels] şeklinde 3 boyutlu bir uint8 Tensor'dur .

`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. * grayscale : Output a grayscale JPEG image. The Görüntünün kanal dimension of must be 1. * rgb : Output an RGB JPEG image. The Görüntünün kanal dimension of 3 olmalıdır.

format belirtilmemişse veya boş bir dize ise, image kanal sayısına bağlı olarak varsayılan bir biçim seçilir:

Argümanlar:

  • kapsam: Bir Kapsam nesnesi
  • Resim: [height, width, channels] şeklinde 3 boyutlu.

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

  • Biçim: Piksel başına görüntü biçimi.
  • Kalite: Sıkıştırma kalitesi 0 ile 100 arasında (daha yüksek değer daha iyi ve daha yavaş anlamına gelir).
  • progressive: Eğer True ise, kademeli olarak (kaba çözünürlükten ince çözünürlüğe doğru) yüklenen bir JPEG dosyası oluşturun.
  • optimize_size: True ise, kalite değişikliği olmadan boyutu küçültmek için CPU/RAM kullanın.
  • chroma_downsampling: Bkz. http://en.wikipedia.org/wiki/Chroma_subsampling .
  • density_unit: x_density ve y_density belirtmek için kullanılan birim: inç ( 'in' ) veya santimetre ( 'cm' ) başına piksel.
  • 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 ekleyin.

İadeler:

  • Output : 0 boyutlu 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

Kamusal işlevler

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

Herkese açık statik fonksiyonlar

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::Attrs

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

Genel özellikler

içerik

::tensorflow::Output contents

operasyon

Operation operation

Kamusal işlevler

EncodeJpeg

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

EncodeJpeg

 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 

Herkese açık statik fonksiyonlar

Krom Örnekleme Azaltma

Attrs ChromaDownsampling(
  bool x
)

Yoğunluk Birimi

Attrs DensityUnit(
  StringPiece x
)

Biçim

Attrs Format(
  StringPiece x
)

OptimizeBoyut

Attrs OptimizeSize(
  bool x
)

İlerici

Attrs Progressive(
  bool x
)

Kalite

Attrs Quality(
  int64 x
)

XYoğunluk

Attrs XDensity(
  int64 x
)

XmpMetadata

Attrs XmpMetadata(
  StringPiece x
)

YDensity

Attrs YDensity(
  int64 x
)