alex-ong / NESTrisOCR

OCR for statistics in NESTris
24 stars 7 forks source link

Investigate mss() and how it does bitblt #34

Closed alex-ong closed 4 years ago

alex-ong commented 4 years ago

They seem to use RGBX, we use BGRX. I suspect converting into PIL will be much faster in RGBX mode.

alex-ong commented 4 years ago

Investigated; it uses BGRX too. @blakegong has already modified the API to request RGB vs leaving in BGR for speed.

The slowest part is converting from BGRX to RGBX. Numpy is the fastest (direct copy), PIL is one order of magnitude slower (memcopies twice)

For speed, we will keep all data as BGRX unless necessary for displaying in the calibration tool