alex-ong / NESTrisOCR

OCR for statistics in NESTris
24 stars 7 forks source link

Update OpenCV to only buffer image for up to 1 second to fix "refresh image" button in calibrator #23

Closed blakegong closed 4 years ago

blakegong commented 4 years ago

😄 Please check the commit message for detailed description 🙏

blakegong commented 4 years ago

Wait I realised the first commit has been fixed by #21, in a different way, alamah! Hold on

blakegong commented 4 years ago

@alex-ong ready for review 🙏

alex-ong commented 4 years ago

OpenCV is different to File right?

alex-ong commented 4 years ago

Ok cool looks good; i think 1 second is a bit weird of a magic time; Does this ensure you get the latest frame in the configurator? Maybe we could change api to choose between buffered (dont drop frames) and latest

blakegong commented 4 years ago

Haha yeah 1 second is a magic number. It's because OpenCV capture were actually written in a slightly different way than others.

All the other capturing method doesn't do any buffering right now.

I think if one day you think capturing source buffering is needed, and have a universal way to do it, then we just do it, including changing this magic number. Before that, having this magic number on OpenCV only should be fine.