tensorflow::ops::DecodeGif
#include <image_ops.h>ถอดรหัสเฟรมของภาพที่เข้ารหัสแบบ GIF ไปเป็นเทนเซอร์ uint8
สรุป
ภาพ GIF ที่มีการบีบอัดกรอบหรือความโปร่งใสไม่ได้รับการสนับสนุน บนระบบ Linux และ MacOS ให้แปลงภาพ GIF แบบเคลื่อนไหวจากแบบบีบอัดเป็นแบบไม่บีบอัดโดยเรียกใช้คำสั่ง:
convert $src.gif -coalesce $dst.gif
ฟังก์ชันนี้ยังรองรับการถอดรหัสไฟล์ JPEG และ PNG ด้วย แต่การใช้ tf.io.decode_image จะดูเรียบร้อยกว่า
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- เนื้อหา: 0 มิติ ภาพที่เข้ารหัสแบบ GIF
การส่งคืนสินค้า:
-
Output: รูปทรง 4 มิติ[num_frames, height, width, 3]ลำดับช่อง RGB
ตัวสร้างและตัวทำลาย | |
|---|---|
DecodeGif (const :: tensorflow::Scope & scope, :: tensorflow::Input contents) |
คุณลักษณะสาธารณะ | |
|---|---|
image | |
operation | |
หน้าที่สาธารณะ | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
คุณลักษณะสาธารณะ
ภาพ
::tensorflow::Output image
การดำเนินการ
Operation operation
หน้าที่สาธารณะ
ถอดรหัส GIF
DecodeGif( const ::tensorflow::Scope & scope, ::tensorflow::Input contents )
โหนด
::tensorflow::Node * node() const
ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต
operator::tensorflow::Input() const
ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต
operator::tensorflow::Output() const