필터 지우기
필터 지우기

Support for MATLAB functions "medfilt2" and "adapthisteq" on Simulink

조회 수: 2 (최근 30일)
Hi,
I want to use the MATLAB functions medfilt2 and adapthisteq on Simulink (and then Xilinx System Generator). Before starting, I want to make sure that these two functions are supported by Simulink.
I haven't yet come across any document giving a list of functions which Simulink supports within the user defined MATLAB Function block (i.e. apart from the readily available blocks in the Simulink library.)
Although there are no readily available blocks on Simulink, I can call a user defined "MATLAB Function" block where my function includes medfilt2 and adapthisteq, right?
If it is not possible this way, should I use coder.extrinsic? Does this support these two functions on Simulink?
What are the other ways by which I can get my algorithm which includes these two functions to be working on Simulink?
I appreciate any inputs since I am new to Simulink.
Regards.

채택된 답변

Sebastian Castro
Sebastian Castro 2015년 2월 2일
편집: Sebastian Castro 2015년 2월 2일
Hi Sanya
For C/C++ code generation, the supported functions are listed here. Searching through the Image Processing toolbox, it seems that only medfilt2 is directly supported.
As you said, you can always declare a built-in (or user-defined) function as extrinsic, and this will let you run the model within the Simulink environment. If you generate code, you can instead have your own external implementation of the unsupported function and swap things out.
Given that you mentioned Xilinx System Generator, perhaps you're looking into HDL code generation. In this case, the following pages are available (EDIT: Or you can read Tim's response, which expands more on HDL)
- Sebastian
  댓글 수: 1
Meghana Dinesh
Meghana Dinesh 2015년 2월 6일
Sebastian and Tim McBrayer, thanks for your response.
What are the other ways by which I can implement CLAHE and get an RTL through HDL Coder.
Since this involves knowledge about MATLAB and Xilinx tools, it's pretty difficult to ask for help on Mathworks/Xilinx forums.
Regards.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Tim McBrayer
Tim McBrayer 2015년 2월 2일
편집: Tim McBrayer 2015년 2월 2일
In general the supported functions inside a MATLAB Function block are the same ones as for generating HDL from MATLAB, as documented in this Answer.
Neither of the functions you are looking for are supported for HDL code generation. You cannot use coder.extrinsic, either. It's not possible to call external code on a FPGA.

Community Treasure Hunt

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

Start Hunting!

Translated by