Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
aliran tensor:: operasi:: Sesuaikan Kontras
#include <image_ops.h>
Sesuaikan kontras satu atau lebih gambar.
Ringkasan
images
adalah tensor minimal 3 dimensi. 3 dimensi terakhir diartikan sebagai [height, width, channels]
. Dimensi lainnya hanya mewakili kumpulan gambar, seperti [batch, height, width, channels].
Kontras disesuaikan secara independen untuk setiap saluran pada setiap gambar.
Untuk setiap saluran, Op pertama-tama menghitung rata-rata piksel gambar dalam saluran tersebut dan kemudian menyesuaikan setiap komponen setiap piksel menjadi (x - mean) * contrast_factor + mean
.
Argumen:
- ruang lingkup: Objek Lingkup
- gambar: Gambar untuk disesuaikan. Setidaknya 3-D.
- kontras_faktor: Pengganda mengambang untuk menyesuaikan kontras.
Pengembalian:
-
Output
: Gambar atau gambar yang disesuaikan kontrasnya.
Atribut publik
Fungsi publik
simpul
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Keluaran
operator::tensorflow::Output() const
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-26 UTC."],[],[],null,["# tensorflow::ops::AdjustContrast Class Reference\n\ntensorflow::ops::AdjustContrast\n===============================\n\n`#include \u003cimage_ops.h\u003e`\n\nAdjust the contrast of one or more images.\n\nSummary\n-------\n\n`images` is a tensor of at least 3 dimensions. The last 3 dimensions are interpreted as `[height, width, channels]`. The other dimensions only represent a collection of images, such as `[batch, height, width, channels].`\n\nContrast is adjusted independently for each channel of each image.\n\nFor each channel, the Op first computes the mean of the image pixels in the channel and then adjusts each component of each pixel to `(x - mean) * contrast_factor + mean`.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- images: Images to adjust. At least 3-D.\n- contrast_factor: A float multiplier for adjusting contrast.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The contrast-adjusted image or images.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [AdjustContrast](#classtensorflow_1_1ops_1_1_adjust_contrast_1a817234337682fcf4afdfe94eb7c6bcc2)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` images, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` contrast_factor)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_adjust_contrast_1ad06f8f55756cdb0ea76bda27f433c069) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_adjust_contrast_1ac8e60cb2d1938fbf4467419d9bed3e27) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|---------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_adjust_contrast_1afef7b99274258f8232f30829973001b3)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_adjust_contrast_1ad6c68cabac0d2c21e087ed3547d64eae)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_adjust_contrast_1a56529eeed8eb996474cf2f47f8658ca2)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### AdjustContrast\n\n```gdscript\n AdjustContrast(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input images,\n ::tensorflow::Input contrast_factor\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]