microscope
microscope copied to clipboard
pvcam: wrong frame dimensions in circular buffer mode
This bug only affects circular buffer mode and only when a non-square ROI is used.
https://github.com/python-microscope/microscope/blob/ef280c3402606941d1427b72950b472feb2b6cae/microscope/cameras/pvcam.py#L1510-L1522
The problem is with line 1518, where the frame buffer is cast to a numpy array. The shape of the array is supposed to be (height, width), so the dimensions need to be swapped like this:
frame_p, (self.roi[3], self.roi[2])
Implemented in https://github.com/dstoychev/microscope/commit/965fa39588c281ad5194024f094c71eeba7b2b8f.