mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
opencv: 'for' loop initial declaration
'for' loop initial declarations are not allowed in C89, moving the declarations to before the 'for' loops.
This commit is contained in:
parent
666a80236c
commit
9c729ef678
1 changed files with 4 additions and 2 deletions
|
@ -332,6 +332,8 @@ gst_retinex_transform_ip (GstBaseTransform * btrans, GstBuffer * buf)
|
|||
where O is the output, H is a gaussian 2d filter and I is the input image
|
||||
sum_i means summatory on var i with i in [0..scales) and wi are the weights */
|
||||
else if (METHOD_MULTISCALE == retinex->method) {
|
||||
int i;
|
||||
|
||||
/* allocate or reallocate the weights and sigmas according to scales */
|
||||
if (retinex->current_scales != retinex->scales || !retinex->sigmas) {
|
||||
retinex->weights =
|
||||
|
@ -340,7 +342,7 @@ gst_retinex_transform_ip (GstBaseTransform * btrans, GstBuffer * buf)
|
|||
retinex->sigmas =
|
||||
(double *) g_realloc (retinex->sigmas,
|
||||
sizeof (double) * retinex->scales);
|
||||
for (int i = 0; i < retinex->scales; i++) {
|
||||
for (i = 0; i < retinex->scales; i++) {
|
||||
retinex->weights[i] = 1.0 / (double) retinex->scales;
|
||||
retinex->sigmas[i] = 10.0 + 4.0 * (double) retinex->scales;
|
||||
}
|
||||
|
@ -352,7 +354,7 @@ gst_retinex_transform_ip (GstBaseTransform * btrans, GstBuffer * buf)
|
|||
cvLog (retinex->cvA, retinex->cvB);
|
||||
|
||||
/* Filter at each scale */
|
||||
for (int i = 0; i < retinex->scales; i++) {
|
||||
for (i = 0; i < retinex->scales; i++) {
|
||||
filter_size = (int) floor (retinex->sigmas[i] * 6) / 2;
|
||||
filter_size = filter_size * 2 + 1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue