tensorflow::ops::DecodePng

#include <image_ops.h>

ถอดรหัสภาพที่เข้ารหัส PNG ไปเป็นเทนเซอร์ uint8 หรือ uint16

สรุป

ตัวแปร attr channels ระบุจำนวนช่องสีที่ต้องการสำหรับภาพที่ถอดรหัสแล้ว

ค่าที่ยอมรับได้คือ:

  • 0: ใช้จำนวนช่องสัญญาณในภาพที่เข้ารหัส PNG
  • 1: ส่งออกภาพขาวดำ
  • 3: ส่งออกภาพ RGB
  • 4: ส่งออกภาพ RGBA

หากจำเป็น ภาพที่เข้ารหัส PNG จะถูกแปลงเพื่อให้ตรงกับจำนวนช่องสีที่ร้องขอ

ฟังก์ชันนี้ยังรองรับการถอดรหัส JPEG และ GIF ที่ไม่ใช่ภาพเคลื่อนไหว เนื่องจากอินเทอร์เฟซเหมือนกัน แต่การใช้ tf.io.decode_image จะดูเรียบร้อยกว่า

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • เนื้อหา: 0 มิติ ภาพที่เข้ารหัสแบบ PNG

คุณลักษณะเสริม (ดูที่ Attrs ):

  • ช่องสี: จำนวนช่องสีสำหรับภาพที่ถอดรหัสแล้ว

การส่งคืนสินค้า:

  • Output : รูปทรง 3 มิติ ที่มี [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(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input contents
)

ดีโคเดปกองก์

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

โหนด

::tensorflow::Node * node() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต

 operator::tensorflow::Output() const 

ฟังก์ชันคงที่สาธารณะ

ช่องต่างๆ

Attrs Channels(
  int64 x
)

ประเภท D

Attrs Dtype(
  DataType x
)