Arbitrary crop/rescale/reformat and ROI return
See original GitHub issueStart with the why:
Often in CV/AI pipelining there is some ROI (region of interest), or series of ROIs, which should be used in the pipeline - whether set dynamically based on results in the pipeline - or set statically based on some a-priori or tacitly-understood application information.
So being able to specify via the DepthAI API (USB, SPI (https://github.com/luxonis/depthai/issues/140), or microPython (https://github.com/luxonis/depthai/issues/207)) for the results from some other node (e.g. the color camera output) to be cropped, rescaled and/or reformatted and for this ROI to be returned (internally, to a next stage, or to the host) is very valuable.
And example is ignoring the hood of a car when making a smart dash-cam (as YOLO will identify the hood as ‘car’, and well, that is already known).
Move to the how:
Implement support for at arbitrary crop/rescale/reformat Gen2 pipeline builder node (https://github.com/luxonis/depthai/issues/136) which can be controlled by DepthAI API via USB, SPI, or on-board microPython.
Move to the what:
Support arbitrary crop/rescale/reformat nodes as part of the Gen2 pipeline builder.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7

Top Related StackOverflow Question
Thanks @neixlo !
Yes, that’s exactly right and exactly what we had envisioned this for.
Yes, that’s exactly right.
I think we just finished this actually. But I need to check about when it will be integrated and usable in the Gen2 branch (it might be there already). @themarpe can you comment? And CC: @VanDavv
Here’s the latest internally:
Currently it can do:
For future features, we want to add:
Thank you for the kind words! There have been products in my past where I think “Man, I sure am happy that someone made this.” This is exactly what we are trying to build here. So hearing this is great, and we hope to make it even more valuable over time.
Thanks again, Brandon
Awesome! I tried, it worked. Good example to see how the host can change the crop while runtime.