及时我正在写一个小seam-carving应用程序
我的问题是以有效的方式从图像中删除检测到的“接缝”。
我有以下代码:
    private void removePathFromImageV(CvMat img, int[] path){
    int band = 3;
    double ch = 0.0;
        for (int y = 0; y < img.rows()-1; ++y){
            for (int x = path[y]-1; x < img.cols()-1; ++x){
                for (int b = 0; b < band; ++b){
                ch = img.get(y,x+1,b);
                img.put(y,x,b,ch);
            }
        }
    }
}
有没有将元素从 path[y]-1 转移到 img.cols()-1 的选项?
问候