Skip to content

Commit

Permalink
Merge pull request #4 from nohayassin/smearing_passed_autocal7_integr…
Browse files Browse the repository at this point in the history
…ation

Smearing passed autocal7 integration
  • Loading branch information
nohayassin authored May 14, 2020
2 parents 1d63c2b + f8bd9b1 commit e46c6ff
Show file tree
Hide file tree
Showing 12 changed files with 743 additions and 405 deletions.
8 changes: 4 additions & 4 deletions src/algo/depth-to-rgb-calibration/coeffs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ namespace depth_to_rgb_calibration {
{
coeffs<rotation_in_angles> res;
auto engles = extract_angles_from_rotation( yuy_intrin_extrin.rot.rot );
auto v = z_data.vertices;
auto v = z_data.vertices_all;
res.x_coeffs.resize( v.size() );
res.y_coeffs.resize( v.size() );

Expand Down Expand Up @@ -750,7 +750,7 @@ namespace depth_to_rgb_calibration {
{
coeffs<p_matrix> res;

auto v = z_data.vertices;
auto v = z_data.vertices_all;
res.y_coeffs.resize(v.size());
res.x_coeffs.resize(v.size());

Expand All @@ -767,7 +767,7 @@ namespace depth_to_rgb_calibration {
{
coeffs<translation> res;

auto v = z_data.vertices;
auto v = z_data.vertices_all;
res.y_coeffs.resize( v.size() );
res.x_coeffs.resize( v.size() );

Expand Down Expand Up @@ -871,7 +871,7 @@ namespace depth_to_rgb_calibration {
iteration_data_collect * data)
{
coeffs<k_matrix> res;
auto v = z_data.vertices;
auto v = z_data.vertices_all;
res.x_coeffs.resize( v.size() );
res.y_coeffs.resize( v.size() );

Expand Down
2 changes: 1 addition & 1 deletion src/algo/depth-to-rgb-calibration/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
#define AC_LOG_PREFIX "AC1: "
#define AC_LOG(TYPE,MSG) LOG_##TYPE( AC_LOG_PREFIX << (std::string)( to_string() << MSG ))
//#define AC_LOG(TYPE,MSG) LOG_ERROR( AC_LOG_PREFIX << MSG )
//#define AC_LOG(TYPE,MSG) std::cout << (std::string)( to_string() << "-" << #TYPE [0] << "- " << MSG ) << std::endl; //LOG_INFO((std::string)( to_string() << "-" << #TYPE [0] << "- " << MSG ));
//#define AC_LOG(TYPE,MSG) std::cout << (std::string)( to_string() << std::setprecision(6)<<std::fixed << "-" << #TYPE [0] << "- " << MSG ) << std::endl; //LOG_INFO((std::string)( to_string() << "-" << #TYPE [0] << "- " << MSG ));
//#define AC_LOG_CONTINUE(TYPE,MSG) std::cout << (std::string)( to_string() << "-" << #TYPE [0] << "- " << MSG )

44 changes: 36 additions & 8 deletions src/algo/depth-to-rgb-calibration/frame-data.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ namespace depth_to_rgb_calibration {
struct ir_frame_data : frame_data
{
std::vector< ir_t > ir_frame;
std::vector< double > ir_edges;
std::vector<double> edges;
std::vector< double > edges;
std::vector< double > local_edges;

// smearing
std::vector<double> gradient_x;
std::vector<double> gradient_y;
std::vector< byte > section_map_depth;
std::vector<uint8_t> valid_edge_pixels_by_ir;
std::vector<double> valid_edge_pixels_by_ir;
std::vector<byte> valid_section_map;
std::vector<double>valid_gradient_x;
std::vector<double>valid_gradient_y;
std::vector<double> edges2;
//std::vector<double> edges;
std::vector<direction> directions;
std::vector<double> direction_deg;
std::vector<double> valid_location_rc_x;
Expand All @@ -51,8 +51,9 @@ namespace depth_to_rgb_calibration {
std::vector<double> local_region[4];
std::vector<double> local_region_x[4];//for debug
std::vector<double> local_region_y[4]; // for debug
std::vector<double> local_edges;
//std::vector<double> ir_edges;
std::vector<uint8_t> is_supressed;
std::vector<double> fraq_step;

};

Expand All @@ -67,16 +68,43 @@ namespace depth_to_rgb_calibration {
std::vector<double> edges;
std::vector<double> supressed_edges;
size_t n_strong_edges;
std::vector<direction> directions;
//std::vector<direction> valid_directions;
std::vector<double> subpixels_x;
std::vector<double> subpixels_y;
std::vector< uint16_t> closest;
//std::vector< uint16_t> closest;
std::vector<double> weights;
std::vector<double> direction_deg;
std::vector<double3> vertices;
std::vector<double3> vertices_all;

//smearing
std::vector< byte > section_map_depth;
std::vector< byte > section_map_depth_inside;
std::vector<double> local_x;
std::vector<double> local_y;
std::vector<double> gradient;
std::vector<double> local_values;
std::vector<double> grad_in_direction;
std::vector<double> grad_in_direction_inside;
std::vector<double> values_for_subedges;
std::vector<double> closest;
//std::vector< byte > supressed_edges;
std::vector<double> direction_per_pixel;
std::vector<double> valid_direction_per_pixel;
std::vector<byte> valid_section_map;
std::vector<double> local_rc_subpixel;
std::vector<double> edge_sub_pixel;
std::vector<double> valid_directions;
std::vector<double> directions;
std::vector<double> valid_edge_sub_pixel;
std::vector<double > valid_edge_sub_pixel_x;
std::vector<double > valid_edge_sub_pixel_y;
std::vector<double> sub_points;
//std::vector<double3> vertices;
std::vector<double3> vertices;
std::vector<double> vertices3;
std::vector<double2> uvmap;
std::vector<double> is_inside;

// input validation
std::vector<byte> section_map;
bool is_edge_distributed;
Expand Down
Loading

0 comments on commit e46c6ff

Please sign in to comment.