Graycomatrix and nlfilter not Supported for Code Generation

2 ビュー (過去 30 日間)
Marc McLean
Marc McLean 2019 年 11 月 25 日
コメント済み: Keshav 2024 年 3 月 8 日
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 件のコメント
Keshav
Keshav 2024 年 3 月 5 日
Me too getting the same error while generating the code using MATLAB CODER

サインインしてコメントする。

回答 (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 Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by