Effacer les filtres
Effacer les filtres

function alternatives in simulink

3 vues (au cours des 30 derniers jours)
Rowan
Rowan le 23 Juin 2015
Modifié(e) : Rena Berman le 16 Juil 2024 à 16:49
Basically I'm creating a Simulink model that will be compiled to run on Dspace 1104 and i'm also using a matlab function block for a script that uses a webcam to acquire frames compute the difference between the current one and the last one to find an objects position.
my problem is basically that the matlab function
imbsdiff
is NOT supported for code generation. this function is what would normally compute the differences between the two images, but I need to find an alternative to this. so does anyone either know:
a) of an alternative function to imbsdiff that is supported by code generation (I'm checking the supported functions list but it's gonna take me a while to look through them all) and will do roughly the same thing as imbsdiff?
b) Any examples of using Simulink to find an objects position (note "position" not just track an object, as that's something often already shown)
One other thing, as I mentioned at the start, this is getting compiled into Dspace, so it's helpful if any function suggestions are applicable for real time (i.e. they don't take too long to compute)

Réponse acceptée

Drew Davis
Drew Davis le 24 Juin 2015
Modifié(e) : Rena Berman le 16 Juil 2024 à 16:49
a) according to the documentation, if your images are stored as double arrays, you can use:
abs(img1 - img2)
instead of 'imabsdiff'
b) see this example which uses the blob analysis block
  1 commentaire
Rowan
Rowan le 10 Juil 2015
thanks for the advice. sadly this turned out to be moot as it transpires Dspace can't work with webcams, unless you can find a way to make them connect directly to the terminal

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by