Python uses multiprocessing+opencv to realize that one process reads the real-time picture and the other process operates on the screen.

the process that wants to read the picture by sharing memory stores the picture matrix in memory, and the operating process gets the picture matrix from memory to edit

although the type from the dtype matrix is uint8, it still reports an error when using mp.Value ("I store, 0)

the error message is < TypeError: only size-1 arrays can be converted to Python scalars >

.

ask multiprocessing"s Value and Array how to store matrices.

Mar.20,2021
Menu