Changeset 29544 for trunk/psModules/src/camera/pmFPAMaskWeight.c
- Timestamp:
- Oct 25, 2010, 2:46:07 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAMaskWeight.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAMaskWeight.c
r26893 r29544 476 476 } 477 477 478 479 478 // find any pixels which are not already masked (with maskTest) which are not valid and raise maskSet bits 479 bool pmReadoutMaskInvalid (const pmReadout *readout, psImageMaskType maskTest, psImageMaskType maskSet) { 480 481 if (!readout) return true; 482 483 psImage *image = readout->image; 484 psImage *mask = readout->mask; 485 psImage *variance = readout->variance; 486 for (int y = 0; y < image->numRows; y++) { 487 for (int x = 0; x < image->numCols; x++) { 488 if (mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskTest) continue; 489 bool valid = false; 490 valid = isfinite(image->data.F32[y][x]); 491 if (valid && variance) { 492 valid &= isfinite(variance->data.F32[y][x]); 493 } 494 if (valid) continue; 495 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= maskSet; 496 } 497 } 498 499 return true; 500 } 501 502 // raise maskVal for any invalid pixels 480 503 bool pmReadoutMaskNonfinite(pmReadout *readout, psImageMaskType maskVal) 481 504 {
Note:
See TracChangeset
for help on using the changeset viewer.
