টেনসরফ্লো :: অপস:: ডিকোডপিএনজি

#include <image_ops.h>

একটি PNG-এনকোড করা ছবিকে একটি uint8 বা uint16 টেনসরে ডিকোড করুন।

সারসংক্ষেপ

attr channels ডিকোড করা ছবির জন্য কাঙ্খিত সংখ্যক রঙের চ্যানেল নির্দেশ করে।

গৃহীত মান হল:

  • 0: PNG-এনকোড করা ছবিতে চ্যানেলের সংখ্যা ব্যবহার করুন।
  • 1: একটি গ্রেস্কেল চিত্র আউটপুট।
  • 3: একটি RGB ইমেজ আউটপুট।
  • 4: একটি RGBA ইমেজ আউটপুট করুন।

প্রয়োজনে, পিএনজি-এনকোড করা ছবিকে কালার চ্যানেলের অনুরোধ করা সংখ্যার সাথে মেলে রূপান্তরিত করা হয়।

এই অপটি JPEGs এবং নন-অ্যানিমেটেড GIFs ডিকোডিং সমর্থন করে যেহেতু ইন্টারফেস একই, যদিও এটি tf.image.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
)

ডিটাইপ

Attrs Dtype(
  DataType x
)