Closed JErnestoMtz closed 1 year ago
Very logical, but I would suggest that since you have such an effective tool here anyway, it may be better to jump straight into a little more "fully featured" version a-la what scipy
provides. Just my two cents of course.
What would be the main difference between Numpy and Scipy fft?, I haven't look too deep into the docs of both of them, but I have use both almost interchangeably.
I've been laying the groundwork for the FFT implementation. First I did some file cleanup and organization. But I also added a cool new feature to open images as Ndarr
, and save Ndarr
as images. Here is quick example:
use rapl::*;
use rapl::utils::rapl_img;
fn main() {
//open image as Ndarr<u8,3>
let img: Ndarr<u8,3> = rapl_img::open_rgbu8(&"test_img.jpg").unwrap();
//Split RGB channels by Slicing along 3'th axis and
let channels: Vec<Ndarr<u8,2>> = img.slice_at(2);
//select blue channel and save it as black and white image
channels[2].save_as_luma(&"blue_channel.png", rapl_img::ImageFormat::Png);
}
This of course was mainly added to use in addition with FFT, but I think manipulating images with the simple interface of rapl
turn out to be a quite pleasant experience.
This issue is for raking the implementation for FFT.
Now that we have Complex Numbers, Fast Fourier Transform is one of may logical steps forward, I also think that neither
ndarray
nornalgebra
has FFT as a built in feature, therefore it would provide a lot of value to have a simple to use 1D and 2D FFT with similar API as numpy.