Skip to content
Snippets Groups Projects
Commit 6cba1eb7 authored by David Hammer's avatar David Hammer
Browse files

Fix the subtraction of mean from nominators, simplify with fun_ring

parent 1d4a8162
No related branches found
No related tags found
1 merge request!139(Not for merging) online indexing + LPD parallel gain testing
......@@ -149,13 +149,13 @@ extern "C" __global__ void pf9(const unsigned short num_frames,
// whole peak should have sufficent SNR
float peak_weighted_row;
float peak_weighted_col;
float peak_total_mass = pixel_val - mean;
float peak_total_mass = 0;
{
/* TODO: more compact form */
float peak_weighted_row_nom = static_cast<float>(row) * pixel_val;
float peak_weighted_col_nom = static_cast<float>(col) * pixel_val;
float peak_weighted_row_nom = 0;
float peak_weighted_col_nom = 0;
const float peak_pixel_threshold = mean + min_snr_peak_pixels * sigma;
for (unsigned short layer=1; layer<=window_radius; ++layer) {
for (unsigned short layer=0; layer<=window_radius; ++layer) {
float total_mass_before = peak_total_mass;
masked_frame.fun_ring(row, col, layer, [&] (unsigned short i, unsigned short j, float val) {
if (val > peak_pixel_threshold) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment