Clause getBoxCoverageRequirement(ViewType& view, size_t boxSize, CellType reqCellType) { Clause req; for (int row = view.height()-boxSize; row < view.height(); row++) { for (int col = view.width()-boxSize; col < view.width(); col++) { req |= view[row][col] == reqCellType; } } return req; }
void draw_v_disparity_line(ViewType &view, PixelType &color, const GroundPlaneEstimator::line_t &v_disparity_line) { const int x1 = 0, y1 = v_disparity_line.origin()(0); const int x2 = view.width(), y2 = v_disparity_line.origin()(0) + x2*v_disparity_line.direction()(0); draw_line(view, color, x1, y1, x2, y2); // printf("draw_v_disparity_line (origin, direction) == (%.2f, %.2f) -> (x2, y2) == (%i, %i)\n", // v_disparity_line.origin()(0), v_disparity_line.direction()(0), // x2, y2); return; }
inline bool isInside(const ViewType& v, const CoordType i, const CoordType j) { return i>=0 && j>=0 && i<v.width() && j<v.height(); }