Undefined function or method 'assignDetectionsToTracks' for input arguments of type 'double'
이전 댓글 표시
Hi,I don't understand where is the error
function [assignments, unassignedTracks, unassignedDetections] = detectionToTrackAssignment()
nTracks = length(tracks);
nDetections = size(centroids, 1);
% Compute the cost of assigning each detection to each track.
cost = zeros(nTracks, nDetections);
for i = 1:nTracks
cost(i, :) = distance(tracks(i).kalmanFilter, centroids);
end
% Solve the assignment problem.
costOfNonAssignment = 20;
[assignments, unassignedTracks, unassignedDetections] =assignDetectionsToTracks(cost, costOfNonAssignment);
end
답변 (1개)
Image Analyst
2013년 10월 27일
You don't have the function assignDetectionsToTracks. Type this in the command window:
which -all assignDetectionsToTracks
if it's there, it will say so. But most likely you don't have that function. Why do you think that you should have it?
댓글 수: 12
luigi
2013년 10월 28일
Image Analyst
2013년 10월 29일
Well, wherever you have it, it's not being seen by MATLAB. Make sure it's on the search path. Do what I said and issue the which command right before you try to call it. It will probably say it can't find it. What folder and m-file is that code you gave in?
luigi
2013년 10월 29일
Wayne King
2013년 10월 29일
which release are you using? Do you have the Computer Vision System Toolbox installed?
Image Analyst
2013년 10월 29일
luigi, I have no idea. It's easy enough to try it and see.
luigi
2013년 10월 29일
편집: Image Analyst
2013년 10월 30일
Image Analyst
2013년 10월 30일
The current name is assignDetectionsToTracks - not sure if they changed that or not. Maybe you or someone typed it in and just got it wrong? Did you try to switch names and see if that worked? Of course upgrading is usually the best approach so I'd encourage you to do that.
luigi
2013년 10월 30일
Image Analyst
2013년 10월 31일
But detectionToTrackAssignment is not a function in the current version, so why would your code suddenly no longer complain about that function?
luigi
2013년 10월 31일
Image Analyst
2013년 10월 31일
I know, but detectionToTrackAssignment is not in there. So unless you changed the name in your code, it will still complain.
luigi
2013년 10월 31일
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!