Results 1 to 6 of 6

Thread: The scale value Custom convolution kernel

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    11

    The scale value Custom convolution kernel

    In the OpenVX custom convolution kernel, what "scale" value exactly mean?

    Is it just a kernel size? (e.g., 9 in 3x3 ksize..)

    Best regards,
    Sanghyun

  2. #2
    Junior Member
    Join Date
    Mar 2014
    Posts
    11
    Or... is it the sum of each element of kernel matrix?

  3. #3
    Junior Member
    Join Date
    Nov 2013
    Posts
    19
    Scale is the final divisor of the sum.

    example:
    input image = p
    coefficients[3][3] = c
    scale = s
    output value = v

    v = ( (p[0][0] * c[0][0]) + (p[0][1] * c[0][1]) + (p[0][2] * c[0][2]) + (p[1][0] * c[1][0]) + (p[1][1] * c[1][1]) + (p[1][2] * c[1][2]) + (p[2][0] * c[2][0]) + (p[2][1] * c[2][1]) + (p[2][2] * c[2][2]) ) / s;

  4. #4
    Junior Member
    Join Date
    Nov 2013
    Posts
    19
    Also s != 0

    - - - Updated - - -

    Normally s is the sum of the coefficients, but it can be set manually too.

  5. #5
    Junior Member
    Join Date
    Mar 2014
    Posts
    11
    Thanks for your reply.
    The reason why I asked this question is that there's no field named "scale" in the specification document, describing the Custom Convolution kernel. Specifically, there's no input parameter named "scale" in vxConvolveNode(...).

    You've said that the scale value can be set menually. Then, the scale variable is one of the member field of vx_convolution? or vx_image?
    Where should 'scale' be located?

    Best regards,
    Sanghyun

  6. #6
    Junior Member
    Join Date
    Nov 2013
    Posts
    19
    It's an attribute of the vx_convolution object. *

    vxSetConvolutionAttribute(conv, VX_CONVOLUTION_ATTRIBUTE_SCALE, &scale, sizeof(scale));

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •