Ignore:
Timestamp:
Sep 4, 2014, 11:19:05 AM (10 years ago)
Author:
phudelai
Message:

Programme détection d'obstacles amélioré

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/StereoVisionDisparity/ObstacleDetectionComponent.cpp

    r56 r64  
    504504                                cv::waitKey(1);
    505505                        }
    506 
     506               
    507507                        // Remap the v-disparity point in the original image and create binary masks
    508508                        //std::pair<cv::Mat, cv::Mat> masks = this->MaskSurface2(Disp_map, color_v_disp_map1, color_uv_disp_map.first, this->min_disp, this->max_disp, 1);
     
    599599                                cv::imshow("ObstacleDetectionComponent - Final Classification", reference);
    600600                        }
     601
    601602                        //---------------------------------------------------------------------------
    602603
     
    622623                cvDestroyAllWindows();
    623624}
     625
     626/*      PointTriangulate
     627Description:
     628Calculate the point triangulation in the world
     629Parameters:
     630row,col = row and column in the image
     631x,y,z = world coordinates
     632disparity = disparity value
     633
     634bool ObstacleDetectionComponent::PointTriangulate(int row, int col, double &x, double &y, double &z, double disparity)
     635{
     636                bool valid_point = false;
     637
     638        if(disparity > 0.0 && disparity < 255.0)
     639        {
     640                z = this->cam_width * this->cam_fx * this->cam_baseline / disparity;
     641                double u = col / (this->cam_width - 1.0) - this->cam_cx;
     642                double v = row / (this->cam_height - 1.0) - this->cam_cy;
     643
     644                x = u * z / this->cam_fx;
     645
     646                y = v * z / this->cam_fy;
     647
     648                valid_point = true;
     649        }
     650
     651        return valid_point;
     652}*/
     653
    624654
    625655// Function to calculate the U/V disparity map
Note: See TracChangeset for help on using the changeset viewer.