Why wiener and median filter doesnt work after convert with embedded coder in c language?
이전 댓글 표시
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?
답변 (1개)
Harsh
2025년 3월 20일
0 개 추천
The wiener and median filters that you created might not be working in C due to various reasons:
- 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
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 -
카테고리
도움말 센터 및 File Exchange에서 Digital Filter Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!