Subversion Repositories seema-scanner

Rev

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

Rev 98 Rev 113
Line 225... Line 225...
225
    // gray-scale and remap
225
    // gray-scale and remap
226
    std::vector<cv::Mat> frames0Rect(N);
226
    std::vector<cv::Mat> frames0Rect(N);
227
    std::vector<cv::Mat> frames1Rect(N);
227
    std::vector<cv::Mat> frames1Rect(N);
228
    for(int i=0; i<N; i++){
228
    for(int i=0; i<N; i++){
229
        cv::Mat temp;
229
        cv::Mat temp;
230
        cv::cvtColor(frames0[i], temp, CV_RGB2GRAY);
230
        cv::cvtColor(frames0[i], temp, CV_BayerBG2GRAY);
231
        cv::remap(temp, frames0Rect[i], map0X, map0Y, CV_INTER_CUBIC);
231
        cv::remap(temp, frames0Rect[i], map0X, map0Y, CV_INTER_CUBIC);
232
        cv::cvtColor(frames1[i], temp, CV_RGB2GRAY);
232
        cv::cvtColor(frames1[i], temp, CV_BayerBG2GRAY);
233
        cv::remap(temp, frames1Rect[i], map1X, map1Y, CV_INTER_CUBIC);
233
        cv::remap(temp, frames1Rect[i], map1X, map1Y, CV_INTER_CUBIC);
234
    }
234
    }
235
 
235
 
236
//    cvtools::writeMat(frames0Rect[0], "frames0Rect_0.mat", "frames0Rect_0");
236
//    cvtools::writeMat(frames0Rect[0], "frames0Rect_0.mat", "frames0Rect_0");
237
//    cvtools::writeMat(frames0Rect[1], "frames0Rect_1.mat", "frames0Rect_1");
237
//    cvtools::writeMat(frames0Rect[1], "frames0Rect_1.mat", "frames0Rect_1");
Line 243... Line 243...
243
//    cv::imwrite("frames0Rect[0].png", frames0Rect[0]);
243
//    cv::imwrite("frames0Rect[0].png", frames0Rect[0]);
244
 
244
 
245
//    cv::imwrite("frames1[0].png", frames1[0]);
245
//    cv::imwrite("frames1[0].png", frames1[0]);
246
//    cv::imwrite("frames1Rect[0].png", frames1Rect[0]);
246
//    cv::imwrite("frames1Rect[0].png", frames1Rect[0]);
247
 
247
 
248
 
-
 
249
    // color remaps
248
    // color debayer and remap
-
 
249
    cv::Mat temp;
250
    cv::Mat color0Rect, color1Rect;
250
    cv::Mat color0Rect, color1Rect;
-
 
251
    cv::cvtColor(frames0[0], temp, CV_BayerBG2RGB);
251
    cv::remap(frames0[0], color0Rect, map0X, map0Y, CV_INTER_CUBIC);
252
    cv::remap(temp, color0Rect, map0X, map0Y, CV_INTER_CUBIC);
-
 
253
    cv::cvtColor(frames1[0], temp, CV_BayerBG2RGB);
252
    cv::remap(frames1[0], color1Rect, map1X, map1Y, CV_INTER_CUBIC);
254
    cv::remap(temp, color1Rect, map1X, map1Y, CV_INTER_CUBIC);
253
 
255
 
254
    int frameRectRows = frames0Rect[0].rows;
256
    int frameRectRows = frames0Rect[0].rows;
255
    int frameRectCols = frames0Rect[0].cols;
257
    int frameRectCols = frames0Rect[0].cols;
256
 
258
 
257
    // occlusion masks
259
    // occlusion masks