ITADN
liuliu/ccv/Issues

TLD bug in unstable

#267Openabagnall-riverside 创建于 2025-04-11
Hi, I was trying to use the predator implementation in [ccv_tld.c](https://github.com/liuliu/ccv/blob/78c20efe87774f0f27aadad4d79d13e23abdeda3/lib/ccv_tld.c) (unstable), and encountered the following assertion failure: > ccv_tld.c:485: float _ccv_tld_sv_classify(ccv_tld_t *, ccv_dense_matrix_t *, int, int, int *, int *): Assertion `a->rows == tld->patch.height && a->cols == tld->patch.width' failed. I think the problem is in [this call to `ccv_resample`](https://github.com/liuliu/ccv/blob/78c20efe87774f0f27aadad4d79d13e23abdeda3/lib/ccv_tld.c#L448). It looks like the `rows` and `cols` parameters of `ccv_resample` have been changed at some point to `rows_scale` and `cols_scale`, but the corresponding change hasn't been applied at this call site. I fixed it locally (or so I think) by changing ```c ccv_resample(c, b, type, tld->patch.height, tld->patch.width, CCV_INTER_AREA | CCV_INTER_CUBIC); ``` to ```c ccv_resample(c, b, type, tld->patch.height / (double)c->rows, tld->patch.width / (double)c->cols, CCV_INTER_AREA | CCV_INTER_CUBIC); ```
0 条评论