Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moiree When Using "Rotate and Perspective" Module on Grainy Image #18167

Open
JaydedCompanion opened this issue Jan 6, 2025 · 0 comments
Open

Comments

@JaydedCompanion
Copy link

Describe the bug

When rotating certain particularly grainy images (in this case a JPEG scan of Ilford Delta 3200), a moiree pattern emerges which is especially noticeable in areas with little to no detail, such as skies and walls. Note that this effect is not noticeable in the original image, nor is it visible in darktable so long as the Rotate and Perspective module is disabled (or set to 0°). These examples are screenshots from within darktable, but the same effect is visible in the exported images unless downscaled.

The only workaround I've found is to export images at a smaller resolution, which I suppose causes some resampling to occur, fixing the issue. Needless to say, this is an unsatisfactory workaround as it prevents me from exporting images at higher resolutions.

Example A:
No rotation:
Screenshot 2025-01-06 at 2 32 20 PM
With rotation:
Screenshot 2025-01-06 at 2 32 26 PM

Example B:
No rotation:
Screenshot 2025-01-06 at 2 34 14 PM
With rotation (much smaller pattern size in this one, seemingly due to the greater rotation angle):
Screenshot 2025-01-06 at 2 34 21 PM

Example C:
No rotation:
Screenshot 2025-01-06 at 2 34 36 PM
With rotation:
Screenshot 2025-01-06 at 2 34 41 PM

Steps to reproduce

  1. Import a grainy jpeg image (might occur with other image formats too, though I assume the compression plays a role here) which contains uniformly coloured, textureless areas, such as plain walls, skies, etc. and switch to darkroom. I'm attaching a portion of an image where this is most noticeable.
    sampleimage2

  2. Enable the Rotate and Perspective module

  3. Change the rotation factor to any value other than 0°. The farther the value is from 0°, the smaller the moiree pattern will appear. I find the effect is most noticeable at around ±1°, though this varies depending on the image resolution.

  4. The image will now have a moiree effect, most noticeable around areas with little to no detail/texture/etc. Depending on the resolution of the image and amount of rotation applied, it might not be very noticeable without zooming in/out.

Expected behavior

Darktable should rotate the image without producing any odd artifacts

Logfile | Screenshot | Screencast

No response

Commit

No response

Where did you obtain darktable from?

downloaded from www.darktable.org

darktable version

5.0.0

What OS are you using?

Windows

What is the version of your OS?

Windows 10 Pro. Also occurs on darktable running on MacOS Sonoma 14.6.1

Describe your system?

Windows 10 system has a Ryzen 1700, 32gb of ram and a 1080Ti with 11gb of vram. MacOS Sonoma system is a 16-inch 2019 MacBook Pro and has a 2.6Ghz 6 core i7, 16gb or ram and a Radeon Pro 5300M with 4gb of vram. Darktable was installed via the .exe downloaded from the website on the Windows 10 system, and via homebrew on the MacOS Sonoma system.

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

Nvidia 1080Ti 11GB

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

I haven't tested other versions. This occurs with JPEG files, I don't have RAW files to test this with. The above steps are reproducible with a fresh edit. The issue appears in the output image, but is first apparent within darktable itself. Nevertheless, I have attached the corresponding .xmp file (which has had .txt appended to the filename so Github will accept the file). The issue is present with a new config (I installed darktable on another system while troubleshooting to confirm that it wasn't an issue with my machine). I don't use lua scripts.

400533955-b9709f33-015d-4170-9b69-3b4c3f3efb1d.jpg.xmp.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant