Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If I understand your question correctly, you want to make a copy of the array slices, and not just have a view?

If so, replace tmp_image=frame[x*roi_height:(x+1)*roi_height, y*roi_width:(y+1)*roi_width] with tmp_image = np.copy(frame[x*roi_height:(x+1)*roi_height, y*roi_width:(y+1)*roi_width]) or something similar.