tensorflow::ops::EncodeJpeg

#include <image_ops.h>

تحويل الصورة إلى صيغة JPEG.

ملخص

image عبارة عن موتر ثلاثي الأبعاد من نوع uint8 ذو شكل [height, width, channels] .

يمكن استخدام format السمة لتجاوز تنسيق الألوان في المخرجات المشفرة. القيم الممكنة هي:

  • `'' : 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 (الأعلى أفضل وأبطأ).
  • التقدمي: إذا كانت القيمة صحيحة، فأنشئ ملف 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 : صورة مشفرة بصيغة 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 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

الدوال الثابتة العامة

تقليل دقة الألوان

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
)

إكس دينسيتي

Attrs XDensity(
  int64 x
)

بيانات تعريف Xmp

Attrs XmpMetadata(
  StringPiece x
)

كثافة Y

Attrs YDensity(
  int64 x
)