Scriabin
Scriabin

Reputation: 21

For a 2D single channel image, what is an appropriate criterion to reorder the rows, such that a JPEG-like encoder performs the best?

I have a huge amount of time series data, each representing some observations at a certain position. Thus of course there exists spatial correlation. I am trying to reorganize these lines of observations to make it as smooth as possible, such that it could be efficiently encoded with an image compressor.

Here the strange thing happens, I reorder these lines with a brute-force algorithm, to minimize the L1-norm between adjcent lines, in a greedy manner, and the 2d "image" does look more smoothier. However, when comes to compression, it performs only slightly better than a random shuffle, and is far worse then the "natural" order, a zig-zag scan of the observed sites.

The compression ratio is (original floating values, ranging from -200 to 200, are enlarged 100 times before converting to integers, they are all encoded with libjxl in loseless mode, the effort level has minor influences):

  1. natural, spatial zig-zag order, 29%
  2. Minimized delta L1-norm, 34%
  3. Random shuffle, 36%

And these are the images:

Manually sorted version, to minimize the delta L1-norm Manually sorted version, to minimize the delta L1-norm

Natural spatial zig zag order, the image is not that smooth Natural spatial zig zag order, the image is not that smooth

And this is a comparison between the image gradients (sum of the absolute delta in x and y direction) enter image description here

I have tried different parameters for the libjxl, and different norms to measure the delta between observation lines. I scrutinized the details of the "2d observation image".

Upvotes: 0

Views: 35

Answers (0)

Related Questions