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
הערוציםdimension of
התמונהmust be 1. *
rgb: Output an RGB JPEG image. The
הערוציםdimension of
התמונה חייב להיות 3.
אם לא צוין format
או שהמחרוזת הריקה, נבחר פורמט ברירת מחדל בהתאם למספר הערוצים image
:
טיעונים:
- 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) |
תפקידים ציבוריים | |
---|---|
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 )