tensorflow:: אופס:: DecodePng

#include <image_ops.h>

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

סיכום

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

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

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

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

אופציה זו תומכת גם בפענוח JPEG וקובצי GIF שאינם מונפשים מכיוון שהממשק זהה, אם כי נקי יותר להשתמש tf.image.decode_image .

טיעונים:

  • scope: אובייקט Scope
  • תוכן: 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

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

DecodePng

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

DecodePng

 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
)

Dtype

Attrs Dtype(
  DataType x
)