31 Vec3 cameras_mass_center = Vec3::Zero();
32 for (
int i = 0; i < all_cameras.size(); ++i) {
33 cameras_mass_center += all_cameras[i].t;
35 cameras_mass_center /= all_cameras.size();
38 double max_distance = 0.0;
39 for (
int i = 0; i < all_cameras.size(); ++i) {
40 double distance = (all_cameras[i].t - cameras_mass_center).squaredNorm();
46 if (max_distance == 0.0) {
47 LG <<
"Cameras position variance is too small, cannot rescale";
51 double scale_factor = 1.0 /
sqrt(max_distance);
54 for (
int i = 0; i < all_cameras.size(); ++i) {
55 int image = all_cameras[i].image;
61 for (
int i = 0; i < all_points.size(); ++i) {
62 int track = all_points[i].track;
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between camera
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
vector< EuclideanCamera > AllCameras() const
Returns all cameras.
EuclideanPoint * PointForTrack(int track)
Returns a pointer to the point corresponding to track.
EuclideanCamera * CameraForImage(int image)
Returns a pointer to the camera corresponding to image.
vector< EuclideanPoint > AllPoints() const
Returns all points.
input_tx image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "preview_img") .compute_source("compositor_compute_preview.glsl") .do_static_compilation(true)
void EuclideanScaleToUnity(EuclideanReconstruction *reconstruction)
std::vector< ElementType, Eigen::aligned_allocator< ElementType > > vector
float distance(float a, float b)