tensorflow:: ops:: קידוד Jpeg

#include <image_ops.h>

קידוד JPEG של תמונה.

תַקצִיר

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

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

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

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

טיעונים:

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

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

  • פורמט: פורמט תמונה לפי פיקסל.
  • איכות: איכות הדחיסה מ-0 עד 100 (גבוה יותר, טוב יותר ואיטי יותר).
  • progressive: אם True, צור JPEG שנטען בהדרגה (מגס עדין).
  • optimize_size: אם True, יש להשתמש במעבד/זיכרון RAM כדי להפחית את הגודל ללא שינוי באיכות.
  • chroma_downsampling: ראה http://en.wikipedia.org/wiki/Chroma_subsampling .
  • density_unit: יחידה המשמשת לציון x_density ו- y_density : פיקסלים לאינץ' ( 'in' ) או סנטימטר ( 'cm' ).
  • x_density: פיקסלים אופקיים ליחידת צפיפות.
  • צפיפות_y: פיקסלים אנכיים ליחידת צפיפות.
  • xmp_metadata: אם אינו ריק, יש להטמיע מטא-נתונים של XMP אלה בכותרת התמונה.

החזרות:

  • Output : תמונה מקודדת בפורמט JPEG 0-D.

בנאים והורסים

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

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

קידוד 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 

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

 operator::tensorflow::Input() const 

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

 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
)

XmpMetadata

Attrs XmpMetadata(
  StringPiece x
)

צפיפות Y

Attrs YDensity(
  int64 x
)