tensorflow:: אופס:: EncodeJpeg

#include <image_ops.h>

JPEG-קודד תמונה.

סיכום

image היא תלת-ממדית uint8 Tensor של צורה [height, width, channels] .

ניתן להשתמש format attr כדי לעקוף את פורמט הצבע של הפלט המקודד. ערכים יכולים להיות:

  • `'' : Use a default format based on the number of channels in the image. * גווני אפור : Output a grayscale JPEG image. The ממד : Output a grayscale JPEG image. The dimension of התמונה must be 1. * rgb : Output an RGB JPEG image. The ממד : Output an RGB JPEG image. The dimension of התמונה חייב להיות 3.

אם לא צוין format או שהמחרוזת הריקה, נבחר פורמט ברירת מחדל בהתאם למספר הערוצים image :

  • 1: פלט תמונה בגווני אפור.
  • 3: פלט תמונת RGB.

טיעונים:

  • scope: אובייקט Scope
  • תמונה: תלת מימדית עם צורה [height, width, channels] .

מאפיינים אופציונליים (ראה Attrs ):

  • פורמט: פורמט תמונה לכל פיקסל.
  • איכות: איכות הדחיסה מ-0 עד 100 (גבוהה יותר טובה ואיטית יותר).
  • פרוגרסיבי: אם נכון, צור JPEG שנטען בהדרגה (מגס עד עדין).
  • optimize_size: אם נכון, השקיע מעבד/זיכרון RAM כדי להקטין את הגודל ללא שינוי באיכות.
  • chroma_downsampling: ראה http://en.wikipedia.org/wiki/Chroma_subsampling .
  • density_unit: היחידה המשמשת לציון x_density ו- y_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:: Attrs

קובעי תכונות אופציונליים עבור EncodeJpeg .

תכונות ציבוריות

תוכן

::tensorflow::Output contents

מבצע

Operation operation

תפקידים ציבוריים

EncodeJpeg

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

EncodeJpeg

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

צוֹמֶת

::tensorflow::Node * node() const 

מפעיל::tensorflow::קלט

 operator::tensorflow::Input() const 

אופרטור::tensorflow::פלט

 operator::tensorflow::Output() const 

פונקציות סטטיות ציבוריות

ChromaDownsampling

Attrs ChromaDownsampling(
  bool x
)

יחידת צפיפות

Attrs DensityUnit(
  StringPiece x
)

פוּרמָט

Attrs Format(
  StringPiece x
)

OptimizeSize

Attrs OptimizeSize(
  bool x
)

פּרוֹגרֵסִיבִי

Attrs Progressive(
  bool x
)

איכות

Attrs Quality(
  int64 x
)

XDensity

Attrs XDensity(
  int64 x
)

XmpMetadata

Attrs XmpMetadata(
  StringPiece x
)

YDensity

Attrs YDensity(
  int64 x
)