Created
          February 11, 2014 12:42 
        
      - 
      
 - 
        
Save denkiwakame/8934163 to your computer and use it in GitHub Desktop.  
    greaterでソートしたけど捨てた
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | std::map< uchar, cv::Point, std::greater<uchar> > reliabilities; | |
| int max_size = this->reliabilities.size() * percent/100.0; | |
| std::map<uchar,cv::Point>::iterator map_itr = reliabilities.begin(); | |
| for(int i=0; i<max_size; i++){ | |
| // map_itr.first; | |
| // draw | |
| cv::Point img_pt = (*map_itr).second; | |
| int graycode_x = this->decoded_dataX.at<unsigned short>(img_pt.y, img_pt.x); | |
| int graycode_y = this->decoded_dataY.at<unsigned short>(img_pt.y, img_pt.x); | |
| cv::Point graycode_pt = cv::Point(graycode_x, graycode_y); | |
| cv::circle(mask_campus, img_pt, 5, cv::Scalar(0), -1); | |
| cv::circle(mask_campus, img_pt, 20, cv::Scalar(0)); | |
| cv::circle(graycode_campus, graycode_pt, 2, cv::Scalar(255), -1); | |
| cv::circle(graycode_campus, graycode_pt, 8, cv::Scalar(255)); | |
| _imshow("GRAYCODE_PATTERN", graycode_campus); | |
| _imshow("PRESS ESC TO EXIT", mask_campus); | |
| cv::waitKey(1000); | |
| std::cout << "rel:" << (int)(*map_itr).first << "\t imgrow:" << (*map_itr).second.y << "\timgcol:" << (*map_itr).second.x << std::endl; | |
| map_itr++; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment