Algorithm for smoothing

前端 未结 6 518
遥遥无期
遥遥无期 2021-01-01 02:06

I wrote this code for smoothing of a curve . It takes 5 points next to a point and adds them and averages it .

/* Smoothing */
void smoothing(vector

        
6条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-01 02:53

    You make addition with point itself when you need to take neighbor points - just offset index by 1:

    for(int j=0;j

提交回复
热议问题