Graycomatrix and nlfilter not Supported for Code Generation

조회 수: 3 (최근 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 CenterFile Exchange에서 MATLAB Code Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by