Changeset 64 in pacpussensors for trunk/StereoVisionDisparity


Ignore:
Timestamp:
09/04/14 11:19:05 (10 years ago)
Author:
phudelai
Message:

Programme détection d'obstacles amélioré

Location:
trunk/StereoVisionDisparity
Files:
4 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/StereoVisionDisparity/CMakeLists.txt

    r53 r64  
    5252set(
    5353        PROJECT_SRCS
    54         VDisparity.cpp   
    55         VDisparity.h
    56         UDisparity.cpp   
    57         UDisparity.h
    5854        DisparityMap.cpp
    5955        DisparityMap.h
     
    6965set(
    7066        FILES_TO_MOC
    71         VDisparity.h
    72         UDisparity.h   
    7367        DisparityMap.h
    7468        ObstacleDetectionComponent.h
  • trunk/StereoVisionDisparity/DisparityMap.h

    r57 r64  
    3131
    3232#include <QThread>
    33 #include <QMutex>
    3433
    3534namespace pacpus {
  • 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
  • trunk/StereoVisionDisparity/ObstacleDetectionComponent.h

    r56 r64  
    3131
    3232#include <QThread>
    33 #include <QMutex>
    3433
    3534namespace pacpus {
     
    7170        int cam_height;                 // image height
    7271        int cam_channels;               // number of channels
     72        double cam_ref_cx;              // cx camera divide by x image size
     73        double cam_ref_cy;              // cy camera divide by y image size
     74        double cam_ref_fx;              // fx camera divide by x image size
     75        double cam_ref_fy;              // fy camera divide by y image size
    7376        bool showdebug;                 // Show frame acquired
    7477        int min_disp;                   // Minimum disparity value to detect obstacles in the u/v-disp map
     
    191194        A CalcMedian(std::vector<A> vetor) const;
    192195
     196        //bool PointTriangulate(int row, int col, double &x, double &y, double &z, double disparity);
    193197};
    194198
Note: See TracChangeset for help on using the changeset viewer.