تينسورفلو :: العمليات :: فك الشفرة
#include <image_ops.h>
فك تشفير صورة PNG إلى موتر uint8 أو uint16.
ملخص
تشير channels
Attr إلى العدد المطلوب من القنوات الملونة للصورة التي تم فك تشفيرها.
القيم المقبولة هي:
- 0: استخدم عدد القنوات في الصورة المشفرة بتنسيق PNG.
- 1: إخراج صورة ذات تدرج رمادي.
- 3: إخراج صورة RGB.
- 4: إخراج صورة RGBA.
إذا لزم الأمر ، يتم تحويل الصورة المشفرة بتنسيق PNG لتطابق العدد المطلوب من قنوات الألوان.
يدعم هذا المرجع أيضًا فك تشفير ملفات JPEG وملفات GIF غير المتحركة نظرًا لأن الواجهة هي نفسها ، على الرغم من أنه من الأنظف استخدام tf.image.decode_image
.
الحجج:
- النطاق: كائن النطاق
- المحتويات: 0-D. الصورة المشفرة بتنسيق PNG.
السمات الاختيارية (انظر Attrs
):
- القنوات: عدد القنوات الملونة للصورة المشفرة.
عائدات:
-
Output
: ثلاثي الأبعاد مع الشكل[height, width, channels]
.
البنائين والمدمرين | |
---|---|
DecodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input contents) | |
DecodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input contents, const DecodePng::Attrs & attrs) |
السمات العامة | |
---|---|
image | |
operation |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
وظائف ثابتة عامة | |
---|---|
Channels (int64 x) | |
Dtype (DataType x) |
الهياكل | |
---|---|
tensorflow :: ops :: DecodePng :: Attrs |
السمات العامة
صورة
::tensorflow::Output image
عملية
Operation operation
الوظائف العامة
فك الشفرة
DecodePng( const ::tensorflow::Scope & scope, ::tensorflow::Input contents )
فك الشفرة
DecodePng( const ::tensorflow::Scope & scope, ::tensorflow::Input contents, const DecodePng::Attrs & attrs )
العقدة
::tensorflow::Node * node() const
المشغل :: tensorflow :: الإدخال
operator::tensorflow::Input() const
المشغل :: Tensorflow :: Output
operator::tensorflow::Output() const
وظائف ثابتة عامة
القنوات
Attrs Channels( int64 x )
نوع
Attrs Dtype( DataType 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.