Subversion Repositories seema-scanner

Rev

Rev 109 | Rev 114 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 109 Rev 113
Line 297... Line 297...
297
 
297
 
298
    // gray-scale
298
    // gray-scale
299
    std::vector<cv::Mat> frames0Gray(N);
299
    std::vector<cv::Mat> frames0Gray(N);
300
    std::vector<cv::Mat> frames1Gray(N);
300
    std::vector<cv::Mat> frames1Gray(N);
301
    for(int i=0; i<N; i++){
301
    for(int i=0; i<N; i++){
302
        cv::cvtColor(frames0[i], frames0Gray[i], CV_RGB2GRAY);
302
        cv::cvtColor(frames0[i], frames0Gray[i], CV_BayerBG2GRAY);
303
        cv::cvtColor(frames1[i], frames1Gray[i], CV_RGB2GRAY);
303
        cv::cvtColor(frames1[i], frames1Gray[i], CV_BayerBG2GRAY);
304
    }
304
    }
305
 
305
 
306
    // colors
306
    // colors
307
    cv::Mat color0 = frames0[0];
307
    cv::Mat color0;
-
 
308
    cv::cvtColor(frames0[0], color0, CV_BayerBG2RGB);
308
    cv::Mat color1 = frames1[0];
309
    cv::Mat color1;
-
 
310
    cv::cvtColor(frames1[0], color1, CV_BayerBG2RGB);
309
 
311
 
310
    // occlusion masks
312
    // occlusion masks
311
    cv::Mat occlusion0, occlusion1;
313
    cv::Mat occlusion0, occlusion1;
312
    cv::subtract(frames0Gray[0], frames0Gray[1], occlusion0);
314
    cv::subtract(frames0Gray[0], frames0Gray[1], occlusion0);
313
    occlusion0 = occlusion0 > 25;
315
    occlusion0 = occlusion0 > 25;