-
Notifications
You must be signed in to change notification settings - Fork 3
/
appearance_filter.h
51 lines (40 loc) · 1.01 KB
/
appearance_filter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* Copyright (C) 2024, Inria
* GRAPHDECO research group, https://team.inria.fr/graphdeco
* All rights reserved.
*
* This software is free for non-commercial, research and evaluation use
* under the terms of the LICENSE.md file.
*
* For inquiries contact george.drettakis@inria.fr
*/
#pragma once
#include <vector>
#include <Eigen/Dense>
#include "common.h"
#include <iostream>
#include <fstream>
class AppearanceFilter
{
private:
struct CameraParametersColmap {
size_t id;
size_t width;
size_t height;
float fx;
float fy;
float dx;
float dy;
};
struct Camera
{
CameraParametersColmap& params;
Eigen::Vector3f position;
};
std::vector<CameraParametersColmap> camera_params;
std::vector<Camera> cameras;
public:
void init(const char* colmappath);
void filter(ExplicitTreeNode* root, const std::vector<Gaussian>& gaussians, float orig_limit, float layermultiplier);
void writeAnchors(const char* filename, ExplicitTreeNode* root, const std::vector<Gaussian>& gaussians, float limit);
};