Image Processing .m Code to HDL CODE

3 views (last 30 days)
Amal
Amal on 28 Feb 2012
I am working on an image processing noise removal code and I would like to transfer this code to HDL.
Is it supported by Embedded Matlab function or Code Generator?
If yes, what are the steps that are to be taken to go from .m to HDL? (needed in detail)
The more the links, the merrier as I am extremely confused.
P.S. My noise removal code is working perfectly.
  1 Comment
Kiran Kintali
Kiran Kintali on 24 Mar 2012
Edited: Randy Souza on 15 Apr 2015
Hi Amal,
Please check out the new demos in HDL Coder, particularly those related to our new MATLAB to HDL workflow.
The MATLAB to HDL workflow now helps you convert your floating-point MATLAB code to fixed-point and then generate optimized HDL.
We do not support Image Processing Toolbox but you can easily roll your own custom noise removal algorithm using the subset of MATLAB we support for HDL code generation.
Let me know if you need more information.

Sign in to comment.

Answers (2)

Tim McBrayer
Tim McBrayer on 28 Feb 2012
You have made a pretty tall request here. The general answer is yes, you can do what you have proposed. You can use the MATLAB Function Block to generate HDL code from MATLAB code. Whether this will work for any particular MATLAB code depends on whether the code conforms to the supported language subset, and the best way to know is to try it out. If your code conforms to the embedded subset, and if your code is in a hardware-friendly design (for example: streaming pixels through the design and not operating on a full frame at once) then it can be as easy as calling your code from a MATLAB Function block.
There are a large set of demos that will help you walk through the basics of using Simulink HDL Coder; many of them use the MATLAB Function block, and there are several that use the block to implement various image processing algorithms. These are all available with the installed documentation, but one in particular that appears appropriate for your is on the MathWorks website at http://www.mathworks.com/products/slhdlcoder/demos.html?file=/products/demos/shipping/hdlcoder/hdlcoderrecon2_m.html.
  1 Comment
krishna amar
krishna amar on 5 Feb 2015
Hi, I am unable to gernerate the VHDL test bench for the example code given On RGB to YUV convertion. Mtlab is running for long time but I am not getting the Output. I have got the VHDL code but unable to generate Test bench.Please help me with this...................

Sign in to comment.


Bharath Venkataraman
Bharath Venkataraman on 15 Apr 2015
Is this an error or is it taking a long time? For the latter issue, reduce the amount of time you are running the simulation and see if the test bench generation completes.

Products

Community Treasure Hunt

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

Start Hunting!