debug the reading kernel buffer
This commit is contained in:
@@ -74,7 +74,7 @@ __kernel void compute_residual(
|
||||
if(uv_ref_i.x - (PATCH_HALFSIZE + 1) < 0 || uv_ref_i.y - (PATCH_HALFSIZE + 1) < 0 || uv_ref_i.x + (PATCH_HALFSIZE + 1) >= get_image_dim(image_ref)[0] || uv_ref_i.y + (PATCH_HALFSIZE + 1) >= get_image_dim(image_ref)[1])return;
|
||||
// evaluate projection jacobian
|
||||
double frame_jac[6]={0.0}; // 2X3
|
||||
jacobian_xyz2uv(sqrt(pow(ref_feature[f] - ref_pose[0], 2.0)), &frame_jac);
|
||||
jacobian_xyz2uv(sqrt(pow(ref_feature[f] - (double3)(ref_pose[0].x,0.0,ref_pose[0].y), 2.0)), &frame_jac);
|
||||
|
||||
// compute bilateral interpolation weights for reference image
|
||||
double2 subpix= uv_ref - uv_ref_i;
|
||||
|
||||
@@ -164,10 +164,12 @@ FrameHandlerBase::UpdateResult FrameHandlerMono::processFrame()
|
||||
if(img_align.run(last_frame_, new_frame_)==0)return RESULT_FAILURE;
|
||||
//assert (false);
|
||||
reprojector_.reprojectMap(new_frame_, overlap_kfs_);
|
||||
/*
|
||||
std::cout<<"Reprojection Map nPoint: "<<overlap_kfs_.back().second
|
||||
<<"\tnCell: "<<reprojector_.n_trials_<<"\t nMatches: "<<reprojector_.n_matches_
|
||||
<<"\t distance between two frames: "<<
|
||||
(last_frame_->T_f_w_.se2().translation()-new_frame_->T_f_w_.se2().translation()).norm()<<'\n';
|
||||
(last_frame_->T_f_w_.se2().translation()-new_frame_->T_f_w_.se2().translation()).norm()<<'\n';*/
|
||||
|
||||
size_t sfba_n_edges_final=0;
|
||||
double sfba_thresh, sfba_error_init, sfba_error_final;
|
||||
pose_optimizer::optimizeGaussNewton(
|
||||
|
||||
@@ -78,7 +78,7 @@ size_t SparseImgAlignGpu::run(FramePtr ref_frame, FramePtr cur_frame)
|
||||
optimize(T_cur);
|
||||
}
|
||||
cl_double3 pos[1]={0};
|
||||
residual_->read(0,2,pos);
|
||||
residual_->read(1,2,pos);
|
||||
cur_frame->T_f_w_ = SE2_5(pos[0].x,pos[0].y,pos[0].z);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
ros::Time imu_time_;
|
||||
boost::thread* imu_the_= nullptr;
|
||||
#if VIO_DEBUG
|
||||
svo::Visualizer visualizer_;
|
||||
vio::Visualizer visualizer_;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user