RMS
RMS copied to clipboard
Optimize FlatStruct and applyFlat for memory efficiency
Optimize FlatStruct and applyFlat for memory efficiency and bit depth flexibility
Changes
- Refactored
FlatStructto dynamically handle both 8-bit and 16-bit flat field images - Updated
applyFlatfunction to work with the newFlatStruct - Implemented memory-efficient storage using appropriate integer types (uint8 or uint16)
- Eliminated redundant float64 arrays
- Implemented in-place calculations to minimize memory allocation
Motivation
Addresses #392
FlstStruct went from 33MB to 4MB for a 1080p flat.