I need to filter a signal without it losing its properties so that later that signal is inserted into an artificial neural network. I'm using the R and the signal library, I thought about using a low-pass filter or an FFT.
This is the signal to be filtered, it is about the displacement of pixels in a video, to each frame I get the distance covered by the pixels based on the previous frame. In case I calculated the result of vectors X and Y to get only one value and thus generate this graph / signal:

Using the signal library and the fftfilt function, I got the following signal, which seems to be easier for a neural network to be trained, but I did not understand what the function is doing and if the signal properties remained.
resulting <- fftfilt(rep(1,50)/50,resulting)

One could explain how this function works or suggest a better method to filter this signal without it losing its properties.