Link Search Menu Expand Document

DrawBoundingBoxes


tensorflow C++ API

tensorflow::ops::DrawBoundingBoxes

Draw bounding boxes on a batch of images.


Summary

Outputs a copy ofimagesbut draws on top of the pixels zero or more bounding boxes specified by the locations inboxes. The coordinates of the each bounding box inboxesare 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.

For example, if an image is 100 x 200 pixels and the bounding box is[0.1, 0.2, 0.5, 0.9], the bottom-left and upper-right coordinates of the bounding box will be(10, 40)to(50, 180).

Parts of the bounding box may fall outside the image.

Arguments:

  • scope: A Scope object
  • images: 4-D with shape[batch, height, width, depth]. A batch of images.
  • boxes: 3-D with shape[batch, num_bounding_boxes, 4]containing bounding boxes. float.

Returns:

  • Output: 4-D with the same shape asimages. The batch of input images with bounding boxes drawn on the images.

Constructor

  • DrawBoundingBoxes(const ::tensorflow::Scope & scope, ::tensorflow::Input images, ::tensorflow::Input boxes) .

Public attributes

  • tensorflow::Output image.

DrawBoundingBoxes block

Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_image_ops.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • images: connect Input node.
  • boxes : connect Input node or input 3 dimensions float value. ex) channels_ = 0;

Return:

  • Output output: Output object of DrawBoundingBoxes class object.

Result:

  • std::vector(Tensor) product_result : Returned object of executed result by calling session.

Using Method