CPC H04N 19/167 (2014.11) [H04N 19/30 (2014.11); H04N 23/80 (2023.01)] | 18 Claims |
1. A method of compression and/or decompression, the method comprising:
obtaining a set of pixel values;
obtaining a first set of control points specifying a first set of compression ratios corresponding to respective first regions of a compression domain for the pixel values;
obtaining a minimum uncompressed value within the compression domain;
obtaining a maximum uncompressed value within the compression domain;
scaling the first set of control points based on the minimum uncompressed value and the maximum uncompressed value to obtain a scaled set of control points, wherein a first scaled control point of the scaled set of control points is located at the minimum uncompressed value, and a last scaled control point of the scaled set of control points is located at the maximum uncompressed value;
adjusting at least one scaled control point of the scaled set of control points to obtain an adjusted scaled set of control points such that a slope of a set of slopes among the adjusted scaled set of control points is less than or equal to 1;
mapping between the compression domain for the pixel values and a range of compressed values, wherein mapping comprises
compressing from the compression domain into the range of compressed values, or
decompressing from the range of compressed values into the compression domain; and
obtaining an updated minimum uncompressed value and an updated maximum uncompressed value;
rescaling the scaled set of control points based on the updated minimum uncompressed value and the updated maximum uncompressed value to obtain a rescaled set of control points, wherein a first rescaled control point is located at the updated minimum uncompressed value, and a last rescaled control point is located at the updated maximum uncompressed value; and
readjusting at least one rescaled control point of the rescaled set of control points such that an updated slope of a set of updated slopes among the rescaled set of control points is less than or equal to 1.
|