Skip to SOLUTION.md for my solution.
In this challenge, you will be asked to write a simple application in C/C++ to find the bounding boxes of the objects in an image, as shown in Figure 1. An object is defined as a continuous "Blob" of non-black pixels.
Figure 1. Detected Objects |
---|
Your task is to
- Use
main.cpp
as a starting point to loaddata.bin
file into memory - Read in
data.bin
, which contains an array ofunsigned char
numbers (0 - 255), which holds image frames with shape (10, 600, 800). Each image is stored in row-major format. - Implement an algorithm that identifies the bounding boxes of the objects in each image frame. All bounding boxes should be exported in format (top, left, height, width) to a txt file; One line for each image frame.
The success criteria for your programme are:
- Accurate number of bounding boxes
- Accurate positions and sizes
- High performance (please use the macro provided to measure running time)
- Bug free
Please note:
- Don't use any third party library to implement the algorithm (you can do better than them). However, you can use any tool to visualise the images for debugging purposes.
- Make comments wherever relevant