Doesn't show images of cells with index > 29,122 #129
Comments
I do not observe this with Ubuntu. Does this happen on Mac OSx and on Windows? |
only windows.
not on MacOS
Von meinem Telefon gesendet
… Am 21.02.2017 um 18:58 schrieb Paul Müller ***@***.***>:
I do not observe this with Ubuntu. Does this happen on Mac OSx and on Windows?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
It might be a bug of OpenCV. Using imageio (https://pypi.python.org/pypi/imageio) it is possible to get images from larger .avi files |
@maikherbig |
@maikherbig import imageio
import numpy as np
cap = imageio.get_reader("path/to/file.avi")
img0 = cap.get_data(0)
img1 = cap.get_data(2000)
img2 = cap.get_data(0)
assert np.all(img0==img2), "repeatedly reading first frame works"
assert np.all(img1==0), "seeking to a high index results in zero image" I have implemented a workaround by iterating through the video with steps of 50 frames. But this makes image reading quite slow: If this problem is not present on Windows, then we could move to imageio. I am starting to think that this is an ffmpeg problem. |
We should move to imageio once the new rtdc file format is implemented. Then, we can convert the tdms/avi data to hdf5 in one run and won't have this seeking problem. |
@paulmueller np.all(img0==img2) np.all(img1==0) On windows it seems to work fine. On my machine there is just a window popping up (ffmpeg.win32.exe) anytime the imageio.get_reader function is called. |
It looks like the problem I had only appears with avi files that are somehow broken (e.g. VLC player offers to repair something about it). |
I removed the OpenCV from ShapeOut. Could you please test the binary: And let me know if
Writing videos with imageio seems to be simpler than with opencv. The output video is now "rawvideo" with the "gray" pixel format. |
Displaying event images work, but there is always the ffmpeg-win32-v3.2.4.exe window popping up when a new cell is clicked (very annoying). |
I modified the [EDIT] @maikherbig I just triggered a new build for the commit above that uses a different pixel format (YUV 4:4:4) in dclab. Maybe that fixes your VirtualDub problem. |
I tested it and all problems are solved now :) |
0.7.0dev16 (32 and 64 bit) don't show the image of a cell, if its index is > 29,122.
The text was updated successfully, but these errors were encountered: