# Last edited on 2025-08-28 16:23:48 by stolfi # Scale each spectral component to standard deviation 1.0, # to give it equal chances of contributing to the result: # sys.stderr.error(f"scaling band images to unit deviation ...\n") # C = normalize_band_intensities_to_unit_std(C) # tfile = f"/tmp/{os.getpid()}-read_mask_image.pnm" # bash(f"convert {fname} -set colorspace LinearGray -colorspace LinearGray {tfile}") # M = read_pnm_image(tfile, 0, 0)