Now that I have the distance of the closest object on screen, I can make variable standards of distance to 3 different levels of safety:
1. Safe - Green visual - no audio alerting
2. Caution - Yellow visual - medium alarm audio
3. Danger - Red visual - Urgent alarm audio
The visual alerts are represented by a border on the user interface with the border changing color based on the current state. Quickly painting in C# (as seen in professor McVey's 350 class) can be a very computationally expensive task. It is important to only paint the border when a safety state transitions. For example, if no object is detected in view of the camera, the border should be painted green initially and not every frame iteration or program will experience extreme lag and will likely crash. As I have seen throughout this project, carefully handling resources and using them efficiently is critical to success.
1. Safe - Green visual - no audio alerting
2. Caution - Yellow visual - medium alarm audio
3. Danger - Red visual - Urgent alarm audio
The visual alerts are represented by a border on the user interface with the border changing color based on the current state. Quickly painting in C# (as seen in professor McVey's 350 class) can be a very computationally expensive task. It is important to only paint the border when a safety state transitions. For example, if no object is detected in view of the camera, the border should be painted green initially and not every frame iteration or program will experience extreme lag and will likely crash. As I have seen throughout this project, carefully handling resources and using them efficiently is critical to success.