How can I generate c code for inbuilt MATLABfunction using codegen ?
Show older comments
codegen worked fine in simple functions I wrote. I have to generate c code forestimateGeometricTransform
1)Tried with all inputs defined | *
codegen estimateGeometricTransform -args {M1,M2,ch} -report -config:lib
*Error recieved* * _:The extrinsic function 'projective2d' is not available for standalone code generation. It must be eliminated for stand-alone code to be generated. It could not be eliminated because its outputs appear to influence the calling function. Fix this error by not using 'projective2d' or by ensuring that its outputs are unused.
Error in ==> estimateGeometricTransform Line: 174 Column: 17 Code generation failed: Open error report. Error using codegen (line 144)_ *
2)So tried to bypass code generation of projective2d by addinf a line in the inbuilt function
coder.extrinsic ('affine2d','projective2d');
*Error recieved* same as above
3)tried to eliminate line of code where ' * projective2d' * appears
%tform = projective2d(tmatrix);
Error recieved Output argument 'tform' is not assigned on some execution paths.
Error in ==> estimateGeometricTransform Line: 1 Column: 11 Code generation failed: Open error report. Error using codegen (line 144)
Accepted Answer
More Answers (0)
Categories
Find more on Function Definition in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!