- Check whether the data types are being mapped correctly as you want them in C. For more information, please refer to the following documentation - https://www.mathworks.com/help/releases/R2022b/coder/ug/specify-data-types-used-in-generated-code.html
- Check if the dimensions of your filters are correctly set in the C code. If needed, you can rearrange them in MATLAB using “permute”. For more information refer to the following page - https://www.mathworks.com/help/releases/R2022b/matlab/ref/double.permute.html
Why wiener and median filter doesnt work after convert with embedded coder in c language?
3 views (last 30 days)
Show older comments
Hello,
I am using wiener and median filter to remove gaussian noise in c language. My project use real sound and add gaussian noise then filtering with both fiter. I created matlab function for gaussian noise and both filter. I am using embedded coder to convert matlab function to c language and when i use that c code in my project both filter not work. When i convert gaussian noise everithing work fine but when i convert both filter same way, they dont work. My function is very simple only input, output and wiener and median matlab function. How can i fix this problem?
0 Comments
Answers (1)
Harsh
on 20 Mar 2025
The wiener and median filters that you created might not be working in C due to various reasons:
You may consider using “weiner2” and “medfilt1” rather than implementing them by yourself. Both functions are supported for code generation. Please refer to the following documentation for more info -
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!