- Timestamp:
- Jul 31, 2012, 11:45:50 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120627/ppStack/src/ppStackSources.c
r31158 r34245 461 461 462 462 // XXX something of a hack: require at least 2 detections or the nominated fraction of the max possible 463 int minMatches = PS_MAX(2, fracMatch * num);// Minimum number of matches required 463 //int minMatches = PS_MAX(2, fracMatch * num);// Minimum number of matches required 464 //MEH - if many poor images, will hit oddity with num fraction. use numGoodImages instead 465 int minMatches = PS_MAX(2, fracMatch * numGoodImages);// Minimum number of matches required 466 467 int good0 = 0; 468 for (int i = 0; i < num; i++) { 469 if (inputMask->data.U8[i]) { 470 continue; 471 } 472 good0 = i; 473 break; 474 } 475 464 476 for (int i = 0; i < matches->n; i++) { 465 477 pmSourceMatch *match = matches->data[i]; // Match of interest … … 469 481 470 482 // We need to grab a single instance of this source: just take the first available 471 int image = match->image->data.S32[0]; // Index of image 472 int index = match->index->data.S32[0]; // Index of source within image 483 // MEH - if first available is a rejected image, then problem. so take first non-rejected instance above 484 //int image = match->image->data.S32[0]; // Index of image 485 //int index = match->index->data.S32[0]; // Index of source within image 486 int image = match->image->data.S32[good0]; // Index of image 487 int index = match->index->data.S32[good0]; // Index of source within image 473 488 psArray *sources = sourceLists->data[image]; // Sources for image 474 489 pmSource *source = sources->data[index]; // Source of interest
Note:
See TracChangeset
for help on using the changeset viewer.
