<commit_before>#pragma once

#include "opencv2/opencv.hpp"

#include "structures.hpp"
#include "Associativity.hpp"

class Pipeline {

public:
	/**
	 * Constructors
	 */
	Pipeline(std::string folder_path);
	/**
	 * Run pipeline
	 */
	void run();

private:
	std::string folder_path;
	const cv::Mat cameraMatrix;
	const cv::Mat distCoeffs;

	void load_images(std::string _folder_path, Images& images);

	// detect features and extract descriptors. features are stored in CamFrames::key_points
	void extract_features(const Images& images, CamFrames& cam_Frames, DescriptorsVec& descriptors_vec);
	// find matching features and valid matching frames
	void find_matching_pairs(
		const Images& images,
		const CamFrames& camframes,
		const DescriptorsVec& descriptors_vec,
		ImagePairs& pairs);
	// get pairwise camera pose from matching frames
	void register_camera(ImagePairs& pairs,CamFrames& cam_Frames);
	// 3D-2D registration
	// bool ransacRegistration(ImagePair* pair);

	const int build_spanning_tree(const ImagePairs& pairs, Associativity& assocMat,
		Associativity& tree);

	void glo_cam_poses(Images& images, CameraPoses& cameraPoses, const ImagePairs& pairs,
		Associativity& tree);

	// find and cluster depth points from local camera frame to global camera frame
	void find_clusters(Associativity& assocMat,const CameraPoses& cameraPoses,
		const CamFrames& camFrames,PointClusters& pointClusters,PointMap& pointMap);

	void find_CoM(const PointClusters& pointClusters,PointCloud& pointCloud);
};<commit_msg>changed cameraMatrix and distcoeff to public member<commit_after>#pragma once

#include "opencv2/opencv.hpp"

#include "structures.hpp"
#include "Associativity.hpp"

class Pipeline {

public:
	/**
	 * Constructors
	 */
	Pipeline(std::string folder_path);

	const cv::Mat cameraMatrix;
	const cv::Mat distCoeffs;

	/**
	 * Run pipeline
	 */
	void run();

private:
	std::string folder_path;

	void load_images(std::string _folder_path, Images& images);

	// detect features and extract descriptors. features are stored in CamFrames::key_points
	void extract_features(const Images& images, CamFrames& cam_Frames, DescriptorsVec& descriptors_vec);
	// find matching features and valid matching frames
	void find_matching_pairs(
		const Images& images,
		const CamFrames& camframes,
		const DescriptorsVec& descriptors_vec,
		ImagePairs& pairs);
	// get pairwise camera pose from matching frames
	void register_camera(ImagePairs& pairs,CamFrames& cam_Frames);
	// 3D-2D registration
	// bool ransacRegistration(ImagePair* pair);

	const int build_spanning_tree(const ImagePairs& pairs, Associativity& assocMat,
		Associativity& tree);

	void glo_cam_poses(Images& images, CameraPoses& cameraPoses, const ImagePairs& pairs,
		Associativity& tree);

	// find and cluster depth points from local camera frame to global camera frame
	void find_clusters(Associativity& assocMat,const CameraPoses& cameraPoses,
		const CamFrames& camFrames,PointClusters& pointClusters,PointMap& pointMap);

	void find_CoM(const PointClusters& pointClusters,PointCloud& pointCloud);

	void bundle_adjustment(const PointMap& pointMap,const CamFrames& camFrames,const int camera_num,PointCloud pointCloud);
};
{'fraction_non_alphanumeric': 0.08886107634543179, 'fraction_numerical': 0.0018773466833541927, 'mean_word_length': 5.890086206896552, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7439622', 'n_tokens_mistral': 1014, 'n_tokens_neox': 948, 'n_words': 281}