#include <Ricom.h>
Definition at line 53 of file Ricom.h.
◆ Ricom_kernel()
Ricom_kernel::Ricom_kernel |
( |
| ) |
|
|
inline |
Definition at line 77 of file Ricom.h.
std::vector< float > kernel_x
std::vector< float > kernel_y
std::vector< float > f_approx
std::array< int, 2 > kernel_filter_frequency
std::vector< float > kernel_filter
◆ ~Ricom_kernel()
Ricom_kernel::~Ricom_kernel |
( |
| ) |
|
|
inline |
◆ approximate_frequencies()
void Ricom_kernel::approximate_frequencies |
( |
size_t |
n_im | ) |
|
Definition at line 111 of file Ricom.cpp.
116 for (
size_t i = 0; i < nx_im; i++)
118 float x = 2 * i * M_PI;
119 f_approx[i] = (nx_im / x) * (1 - cos(k / 2 * (x / nx_im)));
◆ compute_filter()
void Ricom_kernel::compute_filter |
( |
| ) |
|
Definition at line 66 of file Ricom.cpp.
78 if (dist <= ub && dist > lb)
◆ compute_kernel()
void Ricom_kernel::compute_kernel |
( |
| ) |
|
Definition at line 21 of file Ricom.cpp.
23 float rot_rad = M_PI *
rotation / 180;
24 float cos_rot = cos(rot_rad);
25 float sin_rot = sin(rot_rad);
39 float d = ix_s * ix_s + iy_s * iy_s;
40 int ix_e =
k_area - iy_e + ix - 1;
44 float ix_sd = (ix_s / d);
45 float iy_sd = (iy_s / d);
46 kernel_x[ix_e] = cos_rot * ix_sd - sin_rot * iy_sd;
47 kernel_y[ix_e] = sin_rot * ix_sd + cos_rot * iy_sd;
◆ draw_surfaces()
void Ricom_kernel::draw_surfaces |
( |
| ) |
|
Definition at line 129 of file Ricom.cpp.
135 std::cout <<
"Surface could not be created! SDL Error: " << SDL_GetError() << std::endl;
140 std::cout <<
"Surface could not be created! SDL Error: " << SDL_GetError() << std::endl;
143 std::pair kx_min_max = std::minmax_element(
kernel_x.begin(),
kernel_x.end());
144 std::pair ky_min_max = std::minmax_element(
kernel_y.begin(),
kernel_y.end());
152 float valx = (
kernel_x[ic + x] - kx_min_max.first[0]) / (kx_min_max.second[0] - kx_min_max.first[0]);
154 float valy = (
kernel_y[ic + x] - ky_min_max.first[0]) / (ky_min_max.second[0] - ky_min_max.first[0]);
void draw_pixel(SDL_Surface *surface, int x, int y, float val, int col_map)
◆ fftshift_map()
std::vector<int> Ricom_kernel::fftshift_map |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
◆ include_filter()
void Ricom_kernel::include_filter |
( |
| ) |
|
Definition at line 87 of file Ricom.cpp.
90 std::vector<std::complex<float>> x2c = FFT2D::r2c(
kernel_x);
91 std::vector<std::complex<float>> y2c = FFT2D::r2c(
kernel_y);
94 for (
int id = 0;
id <
k_area;
id++)
102 fft2d.ifft(x2c, x2c);
103 fft2d.ifft(y2c, y2c);
104 for (
int id = 0;
id <
k_area;
id++)
◆ b_filter
bool Ricom_kernel::b_filter |
◆ f_approx
std::vector<float> Ricom_kernel::f_approx |
◆ k_area
◆ k_width_sym
int Ricom_kernel::k_width_sym |
◆ kernel_filter
std::vector<float> Ricom_kernel::kernel_filter |
◆ kernel_filter_frequency
std::array<int, 2> Ricom_kernel::kernel_filter_frequency |
◆ kernel_size
int Ricom_kernel::kernel_size |
◆ kernel_x
std::vector<float> Ricom_kernel::kernel_x |
◆ kernel_y
std::vector<float> Ricom_kernel::kernel_y |
◆ nx_cam
uint16_t Ricom_kernel::nx_cam |
◆ ny_cam
uint16_t Ricom_kernel::ny_cam |
◆ rotation
float Ricom_kernel::rotation |
◆ srf_kx
SDL_Surface* Ricom_kernel::srf_kx |
◆ srf_ky
SDL_Surface* Ricom_kernel::srf_ky |
The documentation for this class was generated from the following files: