tensör akışı:: operasyon:: DecodePng
#include <image_ops.h>
PNG kodlu bir görüntünün kodunu bir uint8 veya uint16 tensörüne çözün.
Özet
attr channels
, kodu çözülen görüntü için istenen renk kanalı sayısını gösterir.
Kabul edilen değerler:
- 0: PNG kodlu görüntüdeki kanal sayısını kullanın.
- 1: gri tonlamalı bir görüntü çıktısı alın.
- 3: bir RGB görüntüsü çıktısı alın.
- 4: bir RGBA görüntüsünün çıktısını alın.
Gerekirse, PNG kodlu görüntü, istenen renk kanalı sayısına uyacak şekilde dönüştürülür.
Bu işlem, tf.image.decode_image
kullanmak daha temiz olsa da, arayüz aynı olduğundan, JPEG'lerin ve animasyonlu olmayan GIF'lerin kodunun çözülmesini de destekler.
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- içindekiler: 0-D. PNG kodlu görüntü.
İsteğe bağlı özellikler (bkz. Attrs
):
- kanallar: Kodu çözülen görüntü için renk kanallarının sayısı.
İadeler:
-
Output
: Şekil[height, width, channels]
ile 3 boyutlu .
Yapıcılar ve Yıkıcılar | |
---|---|
DecodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input contents) | |
DecodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input contents, const DecodePng::Attrs & attrs) |
Genel özellikler | |
---|---|
image | |
operation |
Kamu işlevleri | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Genel statik işlevler | |
---|---|
Channels (int64 x) | |
Dtype (DataType x) |
yapılar | |
---|---|
tensorflow:: ops:: DecodePng:: Attrs | DecodePng için isteğe bağlı öznitelik ayarlayıcılar. |
Genel özellikler
resim
::tensorflow::Output image
operasyon
Operation operation
Kamu işlevleri
DecodePng
DecodePng( const ::tensorflow::Scope & scope, ::tensorflow::Input contents )
DecodePng
DecodePng( const ::tensorflow::Scope & scope, ::tensorflow::Input contents, const DecodePng::Attrs & attrs )
düğüm
::tensorflow::Node * node() const
operatör::tensorflow::Giriş
operator::tensorflow::Input() const
operatör::tensorflow::Çıkış
operator::tensorflow::Output() const
Genel statik işlevler
Kanallar
Attrs Channels( int64 x )
Dtype
Attrs Dtype( DataType x )