تدفق التوتر:: العمليات:: EncodeJpeg

#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. * تدرج الرمادي : Output a grayscale JPEG image. The يجب أن يكون dimension of : Output a grayscale JPEG image. The الصورة must be 1. * rgb : Output an RGB JPEG image. The يجب أن يكون dimension of : Output an RGB JPEG image. The للصورة 3.

إذا لم يتم تحديد format أو كانت عبارة عن سلسلة فارغة، فسيتم اختيار تنسيق افتراضي وفقًا لعدد القنوات الموجودة في image :

الحجج:

  • النطاق: كائن النطاق
  • الصورة: ثلاثية الأبعاد بالشكل [height, width, channels] .

السمات الاختيارية (انظر Attrs ):

  • التنسيق: تنسيق الصورة لكل بكسل.
  • الجودة: جودة الضغط من 0 إلى 100 (الأعلى أفضل وأبطأ).
  • تقدمي: إذا كان صحيحًا، فقم بإنشاء ملف JPEG يتم تحميله تدريجيًا (من الخشن إلى الناعم).
  • الأمثل_الحجم: إذا كان صحيحًا، فقم بإنفاق وحدة المعالجة المركزية/ذاكرة الوصول العشوائي لتقليل الحجم دون تغيير الجودة.
  • chroma_downsampling: راجع http://en.wikipedia.org/wiki/Chroma_subsampling .
  • Density_unit: الوحدة المستخدمة لتحديد x_density y_density y: بكسل لكل بوصة ( 'in' ) أو سنتيمتر ( 'cm' ).
  • x_density: وحدات البكسل الأفقية لكل وحدة كثافة.
  • y_density: وحدات البكسل العمودية لكل وحدة كثافة.
  • xmp_metadata: إذا لم يكن فارغًا، فقم بتضمين بيانات تعريف XMP هذه في رأس الصورة.

عائدات:

  • Output : 0-د. صورة بتشفير 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
)

تحسين الحجم

Attrs OptimizeSize(
  bool x
)

تدريجي

Attrs Progressive(
  bool x
)

جودة

Attrs Quality(
  int64 x
)

كثافة X

Attrs XDensity(
  int64 x
)

XmpMetadata

Attrs XmpMetadata(
  StringPiece x
)

Yالكثافة

Attrs YDensity(
  int64 x
)