Lines Matching defs:cols
137 static int read_shape_from_file(int *cols, int *rows, int **values, const char *filename,
156 *cols = FFMAX(*cols, w);
164 if (*rows > (SIZE_MAX / sizeof(int) / *cols)) {
166 *rows, *cols);
169 if (!(*values = av_mallocz_array(sizeof(int) * *rows, *cols)))
181 (*values)[*cols*i + j] = !!av_isgraph(*(p++));
189 if (!(line = av_malloc(*cols + 1)))
192 for (j = 0; j < *cols; j++)
193 line[j] = (*values)[i * *cols + j] ? '@' : ' ';
207 int cols = 0, rows = 0, anchor_x = 0, anchor_y = 0, shape = CV_SHAPE_RECT;
210 sscanf(buf, "%dx%d+%dx%d/%32[^=]=%127s", &cols, &rows, &anchor_x, &anchor_y, shape_str, shape_filename);
217 if ((ret = read_shape_from_file(&cols, &rows, &values, shape_filename, log_ctx)) < 0)
225 if (rows <= 0 || cols <= 0) {
227 "Invalid non-positive values for shape size %dx%d\n", cols, rows);
231 if (anchor_x < 0 || anchor_y < 0 || anchor_x >= cols || anchor_y >= rows) {
234 anchor_x, anchor_y, cols, rows);
238 *kernel = cvCreateStructuringElementEx(cols, rows, anchor_x, anchor_y, shape, values);
244 rows, cols, anchor_x, anchor_y, shape_str);