Home | History | Annotate | Download | only in src

Lines Matching refs:ncols

199 inline int pix(int y, int x, int ncols)
201 return y * ncols + x;
232 const int ncols = src.cols;
245 Graph<SegmLinkVal> g(nrows * ncols, 4 * (nrows - 1) * (ncols - 1)
246 + (nrows - 1) + (ncols - 1));
261 for (int x = 0; x < ncols - 1; ++x)
289 g.addEdge(pix(y, x, ncols), pix(y, x + 1, ncols), SegmLinkVal(dr[0], dsp[0]));
290 g.addEdge(pix(y, x, ncols), pix(y + 1, x, ncols), SegmLinkVal(dr[1], dsp[1]));
291 g.addEdge(pix(y, x, ncols), pix(y + 1, x + 1, ncols), SegmLinkVal(dr[2], dsp[2]));
292 g.addEdge(pix(y, x + 1, ncols), pix(y + 1, x, ncols), SegmLinkVal(dr[3], dsp[3]));
297 r1 = rmap.at<Vec4b>(y, ncols - 1);
298 r2[0] = rmap.at<Vec4b>(y + 1, ncols - 1);
299 sp1 = spmap.at<Vec2s>(y, ncols - 1);
300 sp2[0] = spmap.at<Vec2s>(y + 1, ncols - 1);
303 g.addEdge(pix(y, ncols - 1, ncols), pix(y + 1, ncols - 1, ncols), SegmLinkVal(dr[0], dsp[0]));
305 for (int x = 0; x < ncols - 1; ++x)
313 g.addEdge(pix(nrows - 1, x, ncols), pix(nrows - 1, x + 1, ncols), SegmLinkVal(dr[0], dsp[0]));
359 std::vector<Vec4i> sumcols(nrows * ncols, Vec4i(0, 0, 0, 0));
363 for (int x = 0; x < ncols; ++x)
365 int parent = comps.find(pix(y, x, ncols));
381 for (int x = 0; x < ncols; ++x)
383 int parent = comps.find(pix(y, x, ncols));