تدفق التوتر:: العمليات:: DrawBoundingBoxes
#include <image_ops.h>
ارسم مربعات محيطة على مجموعة من الصور.
ملخص
يقوم بإخراج نسخة من images
ولكنه يرسم أعلى وحدات البكسل صفرًا أو أكثر من المربعات المحيطة المحددة حسب المواقع الموجودة في boxes
. يتم ترميز إحداثيات كل مربع محيط في boxes
كـ [y_min, x_min, y_max, x_max]
. إحداثيات المربع المحيط هي عوامات في [0.0, 1.0]
بالنسبة لعرض الصورة الأساسية وارتفاعها.
على سبيل المثال، إذا كانت الصورة 100 × 200 بكسل (الارتفاع × العرض) وكان المربع المحيط هو [0.1, 0.2, 0.5, 0.9]
، فإن الإحداثيات العلوية اليسرى واليمنى السفلية للمربع المحيط ستكون (40, 10)
إلى (180, 50)
(في الإحداثيات (س، ص)).
قد تقع أجزاء من المربع المحيط خارج الصورة.
الحجج:
- النطاق: كائن النطاق
- الصور: 4D بالشكل
[batch, height, width, depth]
. مجموعة من الصور. - صناديق: ثلاثية الأبعاد ذات شكل
[batch, num_bounding_boxes, 4]
تحتوي على مربعات محيطة.
العوائد:
-
Output
: 4D بنفس شكل images
. مجموعة الصور المدخلة مع المربعات المحيطة المرسومة على الصور.
الصفات العامة
عملية
Operation operation
الإخراج
::tensorflow::Output output
الوظائف العامة
DrawBoundingBoxes
DrawBoundingBoxes(
const ::tensorflow::Scope & scope,
::tensorflow::Input images,
::tensorflow::Input boxes
)
العقدة
::tensorflow::Node * node() const
operator::tensorflow::Input() const
المشغل::tensorflow::الإخراج
operator::tensorflow::Output() const
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# tensorflow::ops::DrawBoundingBoxes Class Reference\n\ntensorflow::ops::DrawBoundingBoxes\n==================================\n\n`#include \u003cimage_ops.h\u003e`\n\nDraw bounding boxes on a batch of images.\n\nSummary\n-------\n\nOutputs a copy of `images` but draws on top of the pixels zero or more bounding boxes specified by the locations in `boxes`. The coordinates of the each bounding box in `boxes` are encoded as `[y_min, x_min, y_max, x_max]`. The bounding box coordinates are floats in `[0.0, 1.0]` relative to the width and height of the underlying image.\n\nFor example, if an image is 100 x 200 pixels (height x width) and the bounding box is `[0.1, 0.2, 0.5, 0.9]`, the upper-left and bottom-right coordinates of the bounding box will be `(40, 10)` to `(180, 50)` (in (x,y) coordinates).\n\nParts of the bounding box may fall outside the image.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- images: 4-D with shape `[batch, height, width, depth]`. A batch of images.\n- boxes: 3-D with shape `[batch, num_bounding_boxes, 4]` containing bounding boxes.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 4-D with the same shape as `images`. The batch of input images with bounding boxes drawn on the images.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [DrawBoundingBoxes](#classtensorflow_1_1ops_1_1_draw_bounding_boxes_1a36778a64785d4874761fc8cd75c7963d)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` images, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` boxes)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_draw_bounding_boxes_1ade5996b5c08a78404427015175077267) | [Operation](/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_draw_bounding_boxes_1aefea4317485f5bf21a230bb2c5f1360a) | `::`[tensorflow::Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_draw_bounding_boxes_1a5e8d732e824b4d741105479608cc4a4b)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_draw_bounding_boxes_1a79b868abb859e248316d87c58807e6f8)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_draw_bounding_boxes_1a9c857ad52358b4df98f879d531c8d33d)`() 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### DrawBoundingBoxes\n\n```gdscript\n DrawBoundingBoxes(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input images,\n ::tensorflow::Input boxes\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```"]]