<commit_before>#include <pcl/common/common.h>
#include <pcl/search/kdtree.h>

#include <eigen3/Eigen/Core>
#include <image_cloud/common/small_helpers.hpp>

#ifndef PCL_DEPTH_FILTER_NEIGHBORS_H_
#define PCL_DEPTH_FILTER_NEIGHBORS_H_

namespace filter_3d
{

template <typename PointT>
inline void
depth_filter_neighbors(
		pcl::PointCloud<PointT> &in,
		pcl::PointCloud<PointT> &out,
		int neighbors = 2,
		float epsilon = 0.5,
		float distance_max = 20
)
{
	std::cout << "neigbors " << neighbors << " epsilon " << epsilon << " distance_max " << distance_max <<std::endl;
	sleep(4);
	boost::shared_ptr<pcl::search::KdTree<PointT> > tree_n( new pcl::search::KdTree<PointT>() );
	tree_n->setInputCloud(in.makeShared());
	tree_n->setEpsilon(epsilon);

	for(int i = 0; i< in.points.size(); ++i){
		std::vector<int> k_indices;
		std::vector<float> square_distance;

		if ( in.points.at(i).z > distance_max || in.points.at(i).z < 0) continue;

		//Position in image is known
		tree_n->nearestKSearch(in.points.at(i), neighbors, k_indices, square_distance);

		//std::cout << "hier " << i << " z " << in.points.at(i).z  <<std::endl;

<commit_msg>removed forgotten sleep (debug)<commit_after>#include <pcl/common/common.h>
#include <pcl/search/kdtree.h>

#include <eigen3/Eigen/Core>
#include <image_cloud/common/small_helpers.hpp>

#ifndef PCL_DEPTH_FILTER_NEIGHBORS_H_
#define PCL_DEPTH_FILTER_NEIGHBORS_H_

namespace filter_3d
{

template <typename PointT>
inline void
depth_filter_neighbors(
		pcl::PointCloud<PointT> &in,
		pcl::PointCloud<PointT> &out,
		int neighbors = 2,
		float epsilon = 0.5,
		float distance_max = 20
)
{
	std::cout << "neigbors " << neighbors << " epsilon " << epsilon << " distance_max " << distance_max <<std::endl;

	boost::shared_ptr<pcl::search::KdTree<PointT> > tree_n( new pcl::search::KdTree<PointT>() );
	tree_n->setInputCloud(in.makeShared());
	tree_n->setEpsilon(epsilon);

	for(int i = 0; i< in.points.size(); ++i){
		std::vector<int> k_indices;
		std::vector<float> square_distance;

		if ( in.points.at(i).z > distance_max || in.points.at(i).z < 0) continue;

		//Position in image is known
		tree_n->nearestKSearch(in.points.at(i), neighbors, k_indices, square_distance);

		//std::cout << "hier " << i << " z " << in.points.at(i).z  <<std::endl;


{'fraction_non_alphanumeric': 0.16958808063102543, 'fraction_numerical': 0.008326029798422436, 'mean_word_length': 5.254794520547946, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 35, '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': '1564219', 'n_tokens_mistral': 939, 'n_tokens_neox': 890, 'n_words': 160}