Closed Sum02dean closed 4 years ago
Hi Dean,
I cannot figure out what is wrong. I do not get this exception on Windows. Can you paste the following lines on line 90 of ViterbiTrackLinking.cpp, recompile and run the program again.
lout << "tMax = " << tMax << endl;
lout << "maxCount = " << maxCount << endl;
lout << "numMigs = " << numMigs << endl;
lout << "numMits = " << numMits << endl;
lout << "numApos = " << numApos << endl;
lout << "numAppear = " << numAppear << endl;
lout << "numDisappear = " << numDisappear << endl;
That will print the values of all variables that could have incorrect values due to the changes in my last commit. Hopefully we find something there which explains the exception.
Hi,
Here is the printouts that you requested:
Running ViterbiTrackLinking from Matlab.
tMax = 90
maxCount = -3
numMigs = 29797
numMits = 68861
numApos = 0
numAppear = 8502
numDisappear = 8517
Error using Track (line 179)
Unexpected Standard exception from MEX file.
What() is:std::bad_array_new_length
..
Error in SaveTrack (line 41)
cells = Track(aImData, 'SegmentationCores', aSegmentationCores);
Error in BaxterAlgorithmsTermial (line 44)
parfor i = 1:length(allSeqPaths)
Exellent! Thank you! The problem is that maxCount is negative. Something went wrong when the dimensions of one of the inputs was extracted. That was the problem before my last commit. Have you updated the whole repository including ViterbiTrackLinking.cpp?
Is this what you have on lines 72-85?
// Get the dimensions of the inputs.
const mwSize *countSize = mxGetDimensions(prhs[1]);
const mwSize *migSize = mxGetDimensions(prhs[2]);
const mwSize *mitSize = mxGetDimensions(prhs[3]);
const mwSize *apoSize = mxGetDimensions(prhs[4]);
const mwSize *appearSize = mxGetDimensions(prhs[5]);
const mwSize *disappearSize = mxGetDimensions(prhs[6]);
int tMax = (int) mxGetNumberOfElements(prhs[0]); // Allow numDetsA to be either row or column vector.
int maxCount = countSize[1]-3; // first element is t, second is detection index and the third is the debris probability
int numMigs = migSize[0];
int numMits = mitSize[0];
int numApos = apoSize[0];
int numAppear = appearSize[0];
int numDisappear = disappearSize[0];
If so I am missing something here.
Good Morning!
Yes the issue was that I only copied the Segmentation directory... My mistake, everything seems in order now. I will make a new pull request.
tack så mycket
Merge request has been sent. Please if you see two merge requests, use the most recent one titled "Merge Request Dean - Compiled and functioning code." Decline the other.
Hi Klas,
I am trying to run segmentation and tracking by calling BaxterAlgorithmsTermial.m from within matlab. This results in an "unexpected error" being thrown therefor I can not complete tracking. Here is my script:
And here is the new error
Note: This is after I compiled the mex files from an earlier issue.
Best,
Dean