# EXTRACT\_BOUNDING\_BOX

`ExtractBoundingStep` is a a pipeline step that extracts sub-images from an input image, based on the locations of input bounding boxes. Returns list of image for the cropped image regions.

| Configs              | Descriptions                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| imageName            | Name of the input image key from the previous step. If set to `null`, it will try to find any image in the incoming data instance.                                                                                                                                                                                                                                                                                                                |
| bboxName             | Name of the bounding boxes key from the previous step. If set to `null`, it will try to find any bounding box in the incoming data instance.                                                                                                                                                                                                                                                                                                      |
| outputName           | Name of the output key that will contain the output as images the input image region covered by the bounding boxes.                                                                                                                                                                                                                                                                                                                               |
| keepOtherFields      | If `true`, other data key and values from the previous step are kept and passed on to the next step as well. Default is set to `true`.                                                                                                                                                                                                                                                                                                            |
| aspectRatio          | If set, the smaller dimensions will be increased to keep the aspect ratio correct which may crop outside the image border.                                                                                                                                                                                                                                                                                                                        |
| resizeH              | If specified, the cropped images will be resized to the specified height.                                                                                                                                                                                                                                                                                                                                                                         |
| resizeW              | If specified, the cropped images will be resized to the specified width.                                                                                                                                                                                                                                                                                                                                                                          |
| imageToNDArrayConfig | Used to account for the fact that n-dimensional array from `ImageToNDArrayConfig` may be used to crop images before passing to the network, when the image aspect ratio does not match the NDArray aspect ratio. This allows the step to determine the subset of the image actually passed to the network that produced the bounding boxes. Refer `config` from [IMAGE\_T&#x4F;*\_*&#x4E;DARRAY](/references/pipeline-steps/image_to_ndarray.md). |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://serving.konduit.ai/references/pipeline-steps/extract_bounding_box.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
