示例#1
0
    utils::VisualizationDescription ORBFeatureDetector::FeatureSetClass::vis() const{
      VisualizationDescription d;
      d.color(255,0,0,255);
      for(size_t i=0;i<impl->keyPoints.size();++i){
        const ocv::KeyPoint &k = impl->keyPoints[i];
        float s = k.size / 2;

        float cx = k.pt.x;
        float cy = k.pt.y;

        d.color(0,255,0,255);

        if(k.angle != -1){
          float angle = k.angle*M_PI/180.0;
          int cx2 = cx + cos(angle) * s;
          int cy2 = cy + sin(angle) * s;
          d.linewidth(2);
          d.line(cx,cy,cx2,cy2);
        }

        d.linewidth(1);
        d.color(0,100,255,255);

        d.fill(255,0,0,0);
        d.circle(cx,cy,s);
      }
      return d;
    }
示例#2
0
文件: crop.cpp 项目: ethz-asl/iclcv
 VisualizationDescription vis() const{
   VisualizationDescription d;
   d.color(255,0,0,255);
   d.linewidth(2);
   d.fill(255,0,0,40);
   std::vector<Point> pso = ps;
   d.polygon(pso);
   d.linewidth(1);
   for(int i=0;i<4;++i){
     d.fill(255,0,0,1+127*handles[i]);
     d.rect(pso[i].x-5,pso[i].y-5,11,11);
   }
   return d;
 }