firstroboticsosu / lunabotics

1 stars 2 forks source link

#4 add an option to disable the opencv preview, drawing the edge and id … #6

Closed WangQiHao-Charlie closed 1 week ago

WangQiHao-Charlie commented 1 week ago

Issue #4

  1. Added an enableDraw flag to control whether detection outlines and text are drawn. This reduces unnecessary processing when visual output is not needed.
  2. Modified the loop method to skip displaying and waiting operations if enableDraw is false, thus avoiding performance overhead during detection.
  3. Included checks for empty frames and improved error messages for better debugging.
BanceDev commented 1 week ago

I misread the original pr. I thought u changed cerr to printf not the other way around. 🫠 Ill just fix my mistake in a commit and then we can merge this.