how to make visionhdl_​bilatrailf​ilter block parameter spatial and intensity sigma a programmable constant

2 views (last 30 days)
I was trying to make the two sigma parameter spatial and intensity sigma values as a proggramable output. In vision HDL tool box when it was declared as an extra argument in the function call, the following error messsage was shown.
"Failed to compute constant value for nontunable property 'SpatialStdDev'. In code generation, nontunable properties can only be assigned constant values."
Can anyone help me to tune this parameter as a programmable variable?
Thanks in advance.

Accepted Answer

Chris Maliepaard
Chris Maliepaard on 26 Oct 2021
Hi Gayathri,
The Bilateral Filter does not support programmable parameters.
There are some potential workarounds you could pursue. You can implement parallel Bilateral Filters and use a Multiport Switch to select the appropriate filter's output at runtime. Alternatively, you could implement a Bilateral Filter using Image Filter blocks which support programmable coefficients.
I hope that helps,
Chris
  2 Comments
Chris Maliepaard
Chris Maliepaard on 27 Oct 2021
Hi Gayathri,
The bilateral filter can be described as a Gaussian filter in the spatial dimension that modifies the coefficients of a second Gaussian filter that operates on intensity.
The documentation for the Bilateral Filter provides a section on its algorithm, you would need to implement a coefficient calculation system similar to that shown in the dashed region of the algorithm documentation and pass this to the coeff input port of an Image Filter.
Kind regards,
Chris

Sign in to comment.

More Answers (0)

Tags

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!