تينسورفلو :: العمليات :: ترميز
#include <image_ops.h>
JPEG- ترميز صورة.
ملخص
image
هي 3-D uint8 التنسور الشكل [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
يجب أن يكون image` 3.
إذا لم يتم تحديد format
أو كانت السلسلة فارغة ، فسيتم اختيار تنسيق افتراضي وفقًا لعدد القنوات في image
:
الحجج:
- النطاق: كائن النطاق
- الصورة: ثلاثية الأبعاد مع الشكل
[height, width, channels]
.
السمات الاختيارية (انظر Attrs
):
- التنسيق: تنسيق الصورة لكل بكسل.
- الجودة: جودة الضغط من 0 إلى 100 (الأعلى هو الأفضل والأبطأ).
- تقدمي: إذا كان هذا صحيحًا ، فقم بإنشاء ملف JPEG يتم تحميله تدريجيًا (من الخشنة إلى الدقيقة).
- optimize_size: إذا كان هذا صحيحًا ، فقم بإنفاق وحدة المعالجة المركزية / ذاكرة الوصول العشوائي لتقليل الحجم دون تغيير الجودة.
- chroma_downsampling: راجع http://en.wikipedia.org/wiki/Chroma_subsampling .
- كثافة_وحدة: الوحدة المستخدمة لتحديد
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( const ::tensorflow::Scope & scope, ::tensorflow::Input image )
ترميز
EncodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input image, const EncodeJpeg::Attrs & attrs )
العقدة
::tensorflow::Node * node() const
المشغل :: tensorflow :: الإدخال
operator::tensorflow::Input() const
المشغل :: Tensorflow :: Output
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 )
X الكثافة
Attrs XDensity( int64 x )
Xmp البيانات الوصفية
Attrs XmpMetadata( StringPiece x )
Y الكثافة
Attrs YDensity( int64 x )
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-04-20 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Translation issue"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"مشكلة في العيّنات / التعليمات البرمجية"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]