tensorflow::ops::EncodePng

#include <image_ops.h>

แปลงภาพเป็นไฟล์ PNG

สรุป

image เป็น เทนเซอร์ 3 มิติชนิด uint8 หรือ uint16 ที่มีรูปร่าง [height, width, channels] โดยที่ channels คือ:

  • 1: สำหรับภาพขาวดำ
  • 2: สำหรับภาพขาวดำ + ค่าอัลฟา
  • 3: สำหรับ RGB
  • 4: สำหรับ RGBA

ระดับการบีบอัดของ ZLIB ( compression ) สามารถตั้งค่าเป็น -1 สำหรับค่าเริ่มต้นของตัวเข้ารหัส PNG หรือค่าตั้งแต่ 0 ถึง 9 โดย 9 คือระดับการบีบอัดสูงสุด ทำให้ได้ไฟล์ที่มีขนาดเล็กที่สุด แต่จะทำงานช้ากว่า

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • ภาพ: 3 มิติ ที่มีรูปร่าง [height, width, channels]

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

  • ระดับการบีบอัด: ระดับการบีบอัด

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

  • Output : ภาพที่เข้ารหัสแบบ PNG (0 มิติ)

ตัวสร้างและตัวทำลาย

EncodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input image)
EncodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input image, const EncodePng::Attrs & attrs)

คุณลักษณะสาธารณะ

contents
operation

หน้าที่สาธารณะ

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

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

Compression (int64 x)

โครงสร้าง

tensorflow::ops::EncodePng::Attrs

ตัวเลือกในการตั้งค่าแอตทริบิวต์สำหรับ EncodePng

คุณลักษณะสาธารณะ

สารบัญ

::tensorflow::Output contents

การดำเนินการ

Operation operation

หน้าที่สาธารณะ

เข้ารหัส PNG

 EncodePng(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input image
)

เข้ารหัส PNG

 EncodePng(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input image,
  const EncodePng::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

การบีบอัด

Attrs Compression(
  int64 x
)