# Creating a Bounding Box

**URL:** <https://discourse.nodered.org/t/creating-a-bounding-box/88492>\
**Category:** General\
**Tags:** function-node\
**Created:** [4 June 2024 07:54 UTC](https://discourse.nodered.org/t/creating-a-bounding-box/88492 "2024-06-04T07:54:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![user1234](https://avatars.discourse-cdn.com/v4/letter/u/47e85d/32.png) [@user1234](https://discourse.nodered.org/u/user1234)\
**Post date:** [4 June 2024 07:54 UTC](https://discourse.nodered.org/t/creating-a-bounding-box/88492/1 "2024-06-04T07:54:24Z")

</div>

Hey Guys,

I attempted at creating a bounding box inside an image with the rectangle shape, I managed to get the data as x,y,width and height. To solve this, I tried using the palette node-red-contrib-post-object-detection but still met Failure \* ERR\_DLOPEN\_FAILED so is there any other way to solve it? Node-red-node-annotate-image was also tested out by me but no output obtained.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [5 June 2024 06:31 UTC](https://discourse.nodered.org/t/creating-a-bounding-box/88492/2 "2024-06-05T06:31:45Z")

</div>

> [@user1234](#):
>
> I tried using the palette node-red-contrib-post-object-detection but still met Failure \* ERR\_DLOPEN\_FAILED

Hi @user1234,  
Did you follow all the installation [steps](https://discourse.nodered.org/t/object-detection-using-node-red-contrib-tfjs-coco-ssd/22931) of that node? That is required because it uses the [canvas](https://www.npmjs.com/package/canvas) npm package as a dependency for fast(er) drawing of the bounding boxes on the images.

Some other nodes (like e.g. node-red-contrib-object-detection) do it in pure javascript, so you don't need to do such extra build steps. But those use the [pureimage](https://www.npmjs.com/package/pureimage) npm package which is really slow and eats a lot of cpu. Which is not usable when you want to do a lot of image processing on hardware like e.g. a Raspberry Pi.

What is your use case? Do you need a lot of image processing?

Bart

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [5 June 2024 07:25 UTC](https://discourse.nodered.org/t/creating-a-bounding-box/88492/3 "2024-06-05T07:25:40Z")

</div>

BTW for completeness: the fastest (native) bounding box drawing mechanism that I found in the past is tfjs. See [here](https://github.com/lovell/sharp/issues/3359#issuecomment-1250019235).
