Recently I'm spending my time implementing some computer vision algorithms, which usually handle a large amount of data.
The problem I'm facing now is that I have to reform my video data to pass it to
To be precise, I'm trying to apply a temporal filter to video, whose dimension is Time*X*Y*Channel, while I want to apply
video[[All, x, y, c]] (
c are some integers).
I've already tried to naively reform the data using
Table. It works like charm for small data, but for large data, reforming alone takes long and consumes too much memory. (Took about 4 minutes and 3~4 GB of memory to handle data < 100 MBytes)
shiftdim sounds like a nice solution, while I failed to find an equivalent or workarounds for Mathematica. (Or maybe my approach is wrong?)
Is there any way to efficiently reform a multi-dimensional array, just like