이미지 패치 소스 분석 방향: opencv stitching module에 패치 틈을 추가한 결과

1743 단어 opencv
seam_finder->find(images_warped_f, corners, masks_warped);
    imwrite("/Users/pengyuyan/Desktop/data/stitching_warp/mask/masks_warped_1.jpeg", masks_warped[0]);
    imwrite("/Users/pengyuyan/Desktop/data/stitching_warp/mask/masks_warped_2.jpeg", masks_warped[1]);
    imwrite("/Users/pengyuyan/Desktop/data/stitching_warp/mask/images_warped_f_1.jpeg", images_warped_f[0]);
    imwrite("/Users/pengyuyan/Desktop/data/stitching_warp/mask/images_warped_f_2.jpeg", images_warped_f[1]);
    
//    LOGLN("images_warped_f size, " << images_warped_f.size());
//    LOGLN("masks_warped size, " << masks_warped.size());
    
    // canny , , 
    for(int k=0;k<2;k++)
        Canny(masks_warped[k], masks_warped[k], 3, 9,3 );
    
    vector dilate_img(2);
    Mat element = getStructuringElement(MORPH_RECT, Size(10, 10));
    
    for(int k =0; k(y, x) == 255)    // 
                {
                    images_warped[k].getMat(ACCESS_READ).at(y, x)[0] = 255;
                    images_warped[k].getMat(ACCESS_READ).at(y, x)[1] = 0;
                    images_warped[k].getMat(ACCESS_READ).at(y, x)[2] = 255;
                }
            }
        }
    }
    
    imwrite("/Users/pengyuyan/Desktop/data/stitching_warp/seam/seam1.jpg", images_warped[0]);    // 
    imwrite("/Users/pengyuyan/Desktop/data/stitching_warp/seam/seam2.jpg", images_warped[1]);
   
    // Release unused memory
    images.clear();
    images_warped.clear();
    images_warped_f.clear();
    masks.clear();

좋은 웹페이지 즐겨찾기