-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
write_videofile jumps #71
Comments
I am not sure but I think the issue is that the frames are taken in aphanumerical order by ImageSequenceClip, and the way you wrote it "frame2.tiff" will be between "frame19.tiff" and "frame20.tiff", which explains the jumps. If you rename it to "frame02.tiff" it will work. So you should use plt.imsave(directory+"/frame%02d.tiff"%i, matrice[i,:,:], etc.) |
On a side note, maybe you could avoid writing everything as image files, because ImageSequenceClip can be fed directly by numpy arrays. Theoretically you could pass "matrice" as as arguments directly, but I am not sure what their format is. So what is matrice made of ? Numbers between 0 and 1, or numbers between 0 and 255 ? |
I previously tried to pass "matrice" to ImageSequenceClip but it doesn't work matrice is a numpy matrix from 0 to 255 thanks very much for early reply... i will give u a feedback as soon as possible |
Yeah ImageSequenceClip only accepts RGB pictures. You should try to convert the levels in matrice into RGB, like that (works on my computer):
|
it works perfectly! it now write from directory of frames and also from numpy shaped as you wrote thank you very much for this wonderful library :) |
Cool ! Maybe you can remove the video you put on youtube now, it makes a bad publicity for the library ;) |
sure :) |
Hi to all
i'm trying to create a pipeline for frame-by-frame analysis of medical images (cineangiographies)
i wrote a little script that reads a DICOM file that contains an angiograpy and generates the corresponding .avi file
i have this "jumps" in my final video
https://www.youtube.com/watch?v=VfinQD6buZA&feature=youtu.be
ideas?
The text was updated successfully, but these errors were encountered: