Error on C++ code generation: Code generation does not support MATLAB class 'vision.internal.BRISKPoints_cg' in this context.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Michael G.
am 27 Apr. 2018
Kommentiert: Michael G.
am 27 Apr. 2018
Hi, I am trying to make C++ code generation from this example function:
function [a,b] = featuresSquareFinder(image)
points = detectBRISKFeatures(uint8(image));
[a,b] = extractFeatures(image, points.selectStrongest(500), 'Method','BRISK');
end
I have Matlab 2018a, Computer vision toolbox and Image processing toolbox installed. And coder ends with this screen:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/190072/image.png)
How to make it work? Does Computer vision toolbox installs with itself the opencv library of needed version? If not, how to run matlab with custom opencv library path?
0 Kommentare
Akzeptierte Antwort
Ji Lee
am 27 Apr. 2018
Bearbeitet: Ji Lee
am 27 Apr. 2018
In this case, the generic-sounding error is occurring because the BRISKPoints class does not currently support code generation where instances are returned as an output from a top-level (entry point) function. To get around this limitation, there is a toStruct method in the BRISKPoints class that provides a struct representation of it that can be used as an output.
For instance, in your example, adding the following line to the end of featurureSquareFinder will eliminate the error seen in your screenshot.
b = toStruct(b);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Code Generation, GPU, and Third-Party Support finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!