tensorflow:: ops:: DecodePng

#include <image_ops.h>

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

সারসংক্ষেপ

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

গ্রহণযোগ্য মানগুলো হলো:

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

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

এই অপারেশনটি JPEG এবং নন-অ্যানিমেটেড GIF ডিকোড করাও সমর্থন করে, কারণ এদের ইন্টারফেস একই, যদিও tf.io.decode_image ব্যবহার করা আরও পরিচ্ছন্ন।

যুক্তি:

  • স্কোপ: একটি স্কোপ অবজেক্ট
  • বিষয়বস্তু: ০-ডি। পিএনজি-এনকোডেড ছবিটি।

ঐচ্ছিক অ্যাট্রিবিউটসমূহ (দেখুন 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(
  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
)