RMS icon indicating copy to clipboard operation
RMS copied to clipboard

Optimize FlatStruct and applyFlat for memory efficiency

Open Cybis320 opened this issue 1 year ago • 1 comments

Optimize FlatStruct and applyFlat for memory efficiency and bit depth flexibility

Changes

  • Refactored FlatStruct to dynamically handle both 8-bit and 16-bit flat field images
  • Updated applyFlat function to work with the new FlatStruct
  • 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

Cybis320 avatar Aug 27 '24 21:08 Cybis320

FlstStruct went from 33MB to 4MB for a 1080p flat.

Cybis320 avatar Aug 27 '24 22:08 Cybis320