darktable-org / darktable-org/darktable

rotate and perspective : not working properly if image was flipped before

Open
#11,640 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug: pending reproduce: confirmed
Dominant language
C
Stars
13.1k
Forks
1.4k
Avg merge
22h 14m
Merged PRs (30d)
198

Description

Did you buy darktable from an application store ?
no, self build from git master

Describe the bug/issue
One of the correction modes of rotate and perspective module (manually draw structure lines) does not work if the image has been horizontally flipped before.

To Reproduce

  1. Select arbitrary image in lighttable
  2. Go to darkroom
  3. Reset history -> only minimal set of modules applied
  4. Go to orientation module, select transform -> flip horizontally
  5. Go to rotate and perspective module
  6. Select structure -> manually draw structure lines
  7. Draw 2 or more approximately vertical lines
  8. Select fit -> automatically correct for vertical perspective distortion
  9. See error message : not enough structure for automatic correction, no correction applied

Expected behavior
Perspective correction should be applied in step 8 even if image was flipped before, no error message

Which commit introduced the error
unknown

Platform
darktable version : 3.9.0+1285-gab83b180b
OS : Linux 5.4.0-109-generic / Ubuntu 20.04.4 LTS
Memory : MemTotal: 65780936 kB
Graphics Card : Product Name : NVIDIA GeForce RTX 2060
Graphics Card : Driver Version : 470.103.01
OpenCL installed : Device OpenCL C Version OpenCL C 1.2
OpenCL activated : yes
Xorg : Version: 1:7.7+19ubuntu14
Desktop : LXQt
GTK+ : 3.24.20
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
CMAKE_BUILD_TYPE : release

  • Can you reproduce with another darktable version(s)? did not try
  • Can you reproduce with a RAW or Jpeg or both? only worked with raw
  • Are the steps above reproducible with a fresh edit (i.e. after discarding history)? yes

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

Reproduce the issue in darktable's darkroom using the orientation module's horizontal flip, then the rotate and perspective module's manually drawn structure lines and automatic vertical correction. Compare behavior with and without the prior flip, and inspect the rotate and perspective implementation and any related tests or error path. Done means vertical perspective correction succeeds after a horizontal flip without the insufficient-structure error.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
computer-graphics, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.