Graycomatrix and nlfilter not Supported for Code Generation

2 次查看(过去 30 天)
When using Coder to generate C code for a script which uses graycomatrix and nlfilter I get the warning messages:
graycomatrix is not supported for code generation
nlfilter is not supported for code generation
How can I compile a script using these two functions?

回答(1 个)

Mike Croucher
Mike Croucher 2024-3-5
To work out if code generation is supported or not for any given function, go to its documentation page and scroll to the bottom to look at the functions' 'Extended Capabilities' panel. Here's what you get for the eye function, for example. Identity matrix - MATLAB eye - MathWorks United Kingdom
We can see that lots of additional things are supported for the eye function including C/C++ code generation, GPU code generation and more.
Unfortunately, there is no such panel for graycomatrix and nlfilter which means C/C++ code generation is not supported. You will need to code your algorithm differently, using different functions, for code generation to work.
I will add your requirement for code generation for these functions to our feature request database. You could also explain why code generation for these functions is important to you on the Ideas section of our discussion forum. Such information could then be added to our database for pirority setting reasons.
  1 个评论
Keshav
Keshav 2024-3-8
Thank you, Mike Croucher for considering our request to add these functions.
As per the importance of 'graycomatrix' and 'grapcoprops' are concerned, documentation section of MATLAB explains these function in a very lucid manner.
'graycomatrix' creates a gray-level co-occurrence matrix (GLCM) from image. It creates the GLCM by calculating how often a pixel with gray-level (grayscale intensity) value occurs horizontally adjacent to a pixel with the value.
Like wise 'graycoprops' are also important for normalizing the GLCM.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by