If I execute the following code:
std::vector<std::complex<double>> inArr { 0, 0, 0, 1, 0 };
std::vector<std::complex<double>> outArr;
cv::dft(inArr, outArr);
Then the outArr array will contain:
[
1.+0.j,
-0.80901699+0.58778525i,
0.30901699-0.95105652i,
0.30901699+0.95105652i,
-0.80901699-0.58778525i
]
Although I need a result without calculating negative frequency terms, i.e. such:
[
1.+0.j,
-0.80901699+0.58778525i,
0.30901699-0.95105652i
]
How can I do this ?
P.S. numpy.fft.rfft() works similarly in python.