Alternative of graycomatrix and graycoprops for code generation

1 回表示 (過去 30 日間)
Keshav
Keshav 2024 年 3 月 7 日
回答済み: Prasanna 2024 年 8 月 12 日
graycomatrix and graycoprops are not supported for code generation, any alternative for that will be very useful.

回答 (1 件)

Prasanna
Prasanna 2024 年 8 月 12 日
Hi Keshav,
I understand that ‘graycomatrix and graycoprops are not supported for code generation in MATLAB. However, you can create custom functions to achieve similar functionality. You will need to code your algorithm differently, using different functions, for code generation to work.
To implement the ‘graycomatrix’ function in a custom fashion, you can look at the following documentation page: https://www.mathworks.com/help/images/create-a-gray-level-co-occurrence-matrix.html which explains how to create a gray-level co-occurrence matrix from scratch.
With regards to the ‘graycoprops’ function, you can again consider writing a custom function which takes in the Gray-level co-occurrence matrix from the previous function and calculates statistical properties such as contrast, correlation, energy and homogeneity by using the corresponding formulas.
These custom functions should help you achieve similar results to graycomatrix and graycoprops and will be suitable for code generation.
Hope this helps!

カテゴリ

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