I need to create a block in Simulink to deform a video streaming. I create this code for the 'Interpreted MATLAB Fcn' block of Simulink:
function B = deformation(A,tform)
%#codegen
B=imwarp(A,tform);
For me now the problem is:
- how to create the block to provide the input of tform that is a structure
- how to manage A, that is the signal from 'From Video device' block in Simulink
I already tested imwarp function for a static image, and I've already calculated tform values as input to imwarp
Is there a method to update calculated tform on a block of simulink. They should no change