OpenDroneMap / OpenDroneMap/ODM

JPEG compression for orthophoto handles alpha channels incorrect.

Open
#1,827 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

possible software fault
Dominant language
Python
Stars
6.5k
Forks
1.3k
Avg merge
5d 6h
Merged PRs (30d)
4

Description

This issue origins from another issue

The resulting odm_orthophoto.tif when passing --orthophoto-compression JPEG cant be understood by libtiff5-dev

This can be fixed by gdal_translate by running
gdal_translate odm_orthophoto.tif odm_orthophoto_jpeg.tif -b 1 -b 2 -b 3 -mask 4 -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR
from the official documentation
https://gdal.org/en/stable/programs/gdal_translate.html

passing the alpha channel with the -mask parameter

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the implementation of the --orthophoto-compression option and trace how odm_orthophoto.tif is written for JPEG compression. Compare the output with the documented gdal_translate command, including -b 1 -b 2 -b 3 and -mask 4; done means the resulting TIFF can be understood by libtiff5-dev.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.