Commit 2b19d109 authored by Andrew Cohen's avatar Andrew Cohen

null in db cost is infinite in tracker, cell distance goes ^tdiff not *tdiff

parent 9d137b38
// runs in node.js only - no browser // runs in node.js only - no browser
// manages child processes of leverjs that bind to database and do resegandtrack and edit stuff // manages child processes of leverjs that bind to database and do resegandtrack and edit stuff
var NPROCESS=8; var NPROCESS=16;
// currently running // currently running
var inProcessQ; var inProcessQ;
// waiting to be run // waiting to be run
...@@ -190,7 +190,7 @@ function addFileToProcess(leverCommand,nSlot) ...@@ -190,7 +190,7 @@ function addFileToProcess(leverCommand,nSlot)
}); });
inProcessQ[nSlot].childProc.stderr.on('data', (data) => { inProcessQ[nSlot].childProc.stderr.on('data', (data) => {
console.log('error in: '+inProcessQ[nSlot].leverFile+': '+' '+data); console.error('error in: '+inProcessQ[nSlot].leverFile+': '+' '+data);
}); });
inProcessQ[nSlot].childProc.on('close', (code) => { inProcessQ[nSlot].childProc.on('close', (code) => {
......
...@@ -152,7 +152,10 @@ static int costQueryCallback(void *qr, int argc, char **argv, char **azColName) ...@@ -152,7 +152,10 @@ static int costQueryCallback(void *qr, int argc, char **argv, char **azColName)
costElement *pqueryResult; costElement *pqueryResult;
pqueryResult = (costElement *)qr; pqueryResult = (costElement *)qr;
pqueryResult->cost = atof(argv[0]); if (NULL==argv[0])
pqueryResult->cost = dbltype::infinity();
else
pqueryResult->cost = atof(argv[0]);
return 0; return 0;
} // costQueryCallback } // costQueryCallback
......
...@@ -85,7 +85,7 @@ for nChannel=1:CONSTANTS.imageData.NumberOfChannels ...@@ -85,7 +85,7 @@ for nChannel=1:CONSTANTS.imageData.NumberOfChannels
dCC = max(d12,d21); dCC = max(d12,d21);
% penalize occlusion distances % penalize occlusion distances
tDiff=abs(t1-t0); tDiff=abs(t1-t0);
dCC=dCC * 10^(tDiff-1); dCC=dCC^(tDiff-1);
end end
if t0<t1 if t0<t1
updateDistance.setInt(1,id0); updateDistance.setInt(1,id0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment