tensorflow:: ops:: DecodePng

#include <image_ops.h>

פענח תמונה מקודדת PNG לטנזור uint8 או uint16.

תַקצִיר

channels attr מציינים את מספר ערוצי הצבע הרצוי עבור התמונה המפוענחת.

הערכים המקובלים הם:

  • 0: השתמש במספר הערוצים בתמונה המקודדת בפורמט PNG.
  • 1: הפקת תמונה בגווני אפור.
  • 3: פלט תמונת RGB.
  • 4: פלט תמונת RGBA.

במידת הצורך, התמונה המקודדת ב-PNG עוברת טרנספורמציה כך שתתאים למספר ערוצי הצבע המבוקש.

פעולה זו תומכת גם בפענוח קבצי JPEG ו-GIF לא מונפשים מכיוון שהממשק זהה, אם כי נקי יותר להשתמש tf.io.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

קובעי מאפיינים אופציונליים עבור DecodePng .

מאפיינים ציבוריים

תְמוּנָה

::tensorflow::Output image

מִבצָע

Operation operation

תפקידים ציבוריים

פענוחPng

 DecodePng(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input contents
)

פענוחPng

 DecodePng(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input contents,
  const DecodePng::Attrs & attrs
)

צוֹמֶת

::tensorflow::Node * node() const 

אופרטור::tensorflow::קלט

 operator::tensorflow::Input() const 

אופרטור::tensorflow::פלט

 operator::tensorflow::Output() const 

פונקציות סטטיות ציבוריות

ערוצים

Attrs Channels(
  int64 x
)

סוג D

Attrs Dtype(
  DataType x
)