NodeODM icon indicating copy to clipboard operation
NodeODM copied to clipboard

Tiles compression using WebP, instead of PNG tiles. Using WebP (optionally) as input format for overall process.

Open holyCowMp3 opened this issue 3 years ago • 4 comments

What is the problem?

PNG tiles, after generating ortophotos - was so huge, so i found my own way of tiles compression. Using Imaginary i achieved ~10x compression (200 mb --> 20 mb) of PNG tiles to WebP tiles without image quality loss.

Example 1:

PNG with size of 157kb PNG tile without compression WEBP tile with compression level 70% and file size 15.2kb WEBP tile with compression level 70%

Example 2:

PNG map zipped size = 243mb: image WebP map non zipped size = 24 mb: image

After this step I tried to use WebP as input for ODM. In case if file named as <filename>.PNG I can pass JPG or WebP as input, but cannot use <filename>.webp. So i compress my dataset for processing ~5Gb from PNG to ~260mb

Input PNG 15.6mb

DJI-0169.jpg

Compressed WebP 2.6mb

file-3.webp

Partially result of using WebP instead of PNG as input.

For using WEBP as input, i just convert it to WebP, and renamed from .webp to .png, and it works! Result: Screenshot

What should be the expected behavior?

Using optional parameter for NodeODM - Compress to tiles to WebP. and Use WebP as input

holyCowMp3 avatar May 20 '21 10:05 holyCowMp3

AVIF would also be amazing to test out as well, as it tends to compress better than WebP in most cases, and with better fidelity.

https://www.ctrl.blog/entry/webp-avif-comparison.html

Saijin-Naib avatar Jun 15 '21 18:06 Saijin-Naib

AVIF would also be amazing to test out as well, as it tends to compress better than WebP in most cases, and with better fidelity.

https://www.ctrl.blog/entry/webp-avif-comparison.html

Main problem is browser support: https://caniuse.com/webp vs https://caniuse.com/?search=avif

holyCowMp3 avatar Jun 16 '21 07:06 holyCowMp3

AVIF would also be amazing to test out as well, as it tends to compress better than WebP in most cases, and with better fidelity.

https://www.ctrl.blog/entry/webp-avif-comparison.html

Main problem is browser support: https://caniuse.com/webp vs https://caniuse.com/?search=avif

It's certainly more forward looking, but I think it'd be great as an additional option alongside WebP.

Saijin-Naib avatar Jun 16 '21 11:06 Saijin-Naib

For a while a go I switched form using seperately generated tiles to Cloud Optimized Geotiff's (which NodeODM generates as well). With a frontend library like geotiffjs, you can use them as if you have seperate files for each tiles. You should check it out.

tteke avatar Jul 06 '21 06:07 tteke

Closing as COGs are probably the better way to do tiling these days (as it's been pointed out).

pierotofy avatar Jan 12 '23 20:01 pierotofy