304 Commits

Author SHA1 Message Date
Lawrence
f83a62be5b Add back the old perspective tool
Add perspective correction method chooser to allow choice between the
original perspective tool (simple) and the new one (camera-based).
2019-12-28 17:18:59 -08:00
Lawrence
f9a8875bb5 Add more perspective correction adjusters
Add camera lens/sensor shift support with horizontal/vertical shift
adjusters.

Add shifting and rotation of corrected image. This allows
post-correction adjustments to be made more easily given the fixed image
canvas size.

Add scaling of final result. This also helps reduce frustrations with
the fixed image canvas size.

Replace field of view with focal length and crop factor. Use of focal
length and crop factor is more common than diagonal angular field of
view. The new adjusters should be more intuitive for most photographers.
The implementation of perspective correction uses a focal length
relative to the image dimensions. The existing code calculates that
focal length with trigonometry. The new code does it by multiplying
by a ratio.

Replace vertical bias with horizontal and vertical perspective
distortion recovery. Vertical bias is not intuitive as it causes
vertical lines to converge off-center if horizontal correction is
applied. The new adjusters perform perspective distortion on the
projection of the corrected image, allowing vertical/horizontal lines to
converge towards the center lines of the image.

Refactor perspective transformation math to use dynamically computed
homogeneous coordinate matrices instead of pre-calculated formulas. This
should add some overhead, but results in more maintainable code and
possible improved performance due to the reduced number of arithmetic
and assignments needed for each pixel.

Integrate new adjusters in the GUI. This includes fine granularity for
batch processing add/set modes and history.
2019-12-27 16:40:41 -08:00
Lawrence
f4c37598ee Generalize perspective correction
Revise perspective transformation to remove hard-coded angular field of
view and horizontal perspective axis of rotation. Add vertical bias
parameter to retain ability to perform vertical perspective
transformation independent of the horizontal perspective axis of
rotation. Add field of view parameter as a tentative method for
specifying angular field of view.

The current implementation of perspective transformation applies
horizontal perspective transformation in such a way that preserves the
orientation of a horizontal line going through the center of the image.
In common use cases, horizontal lines such as the horizon do not go
through the center of the image. In such cases, the horizontal
perspective axis of rotation should not be parallel to the image's
y-axis. This commit makes the axis of rotation dependent on the vertical
parameter.

The two axes of rotation should be placed at the appropriate distance
from the image in order to prevent stretched or compressed proportions.
In the current implementation, the axes are at a fixed relative distance
from the image. This commit adds the ability to specify the distance in
the form of the diagonal angular field of view.
2019-12-18 10:22:05 -08:00
Ingo Weyrich
f054ed00e8 Pixelshift: optionally use RCD+VNG4 for motion parts 2019-11-25 01:00:49 +01:00
Ingo Weyrich
3be7016517 Capture sharpening: Remove range adjuster and introduce 2019-11-13 21:05:24 +01:00
Ingo Weyrich
e525f5bec1 Capture sharpening: added range-adjuster to exclude bright areas from sharpening 2019-11-12 14:37:15 +01:00
Ingo Weyrich
d32c570383 Capture sharpening: removed gamma 2019-11-10 16:05:24 +01:00
Ingo Weyrich
6335b68a80 Further reduction of include dependencies 2019-11-03 14:52:42 +01:00
Ingo Weyrich
cac2eb53ef Further reduction of include dependencies 2019-10-31 20:41:08 +01:00
Ingo Weyrich
7a8225d274 procparams: apply changes requested by @Floessie in code review 2019-09-23 13:40:19 +02:00
Ingo Weyrich
0fc0eced5a Merge branch 'dev' into dehaze_speedup 2019-09-22 15:39:19 +02:00
Ingo Weyrich
7ff3192cc9 dehaze: added lumimance mode from ART, #5456, thanks to @agriggio 2019-09-20 14:03:09 +02:00
Ingo Weyrich
f2cdbd0e4d Capture sharpening: experimental radius offset depending on distance to center 2019-09-16 15:09:47 +02:00
Ingo Weyrich
4079bb9920 Capture Sharpening: automatic radius calculation 2019-09-11 18:56:07 +02:00
Ingo Weyrich
ba43437220
Merge pull request #5445 from Beep6581/capture_sharpening
Merge Capture sharpening into dev to get more tests
2019-09-10 19:27:01 +02:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +02:00
Ingo Weyrich
062b5a6bbc Capture Sharpening: change default values for iterations and gamma 2019-09-07 16:16:28 +02:00
Ingo Weyrich
f882309f59 capture sharpening: own compilation unit, smooth progressbar, #5412 2019-08-30 14:45:45 +02:00
Ingo Weyrich
a1a680fbdc Merge branch 'dev' into capture_sharpening 2019-08-29 22:07:55 +02:00
Ingo Weyrich
df8367558b Do not treat white balance changes as related to panning if before and after uses camera whitebalance 2019-08-29 22:07:15 +02:00
Ingo Weyrich
1ff505432c Do not treat changes of tonecurve.fromHistMatching as related to panning 2019-08-29 21:04:56 +02:00
Ingo Weyrich
7b3c50bc31 Capture sharpening: auto contrast threshold 2019-08-17 15:18:24 +02:00
Ingo Weyrich
8421f8780a capture sharpening: contrast threshold 2019-08-15 20:40:32 +02:00
Ingo Weyrich
506254ce46 capture sharpening: first mockup 2019-08-14 17:19:26 +02:00
Ingo Weyrich
96bf78fe87 Merge branch 'dev' into cppcheck 2019-08-05 16:34:48 +02:00
Ingo Weyrich
e7d10bbf76 Fixes broken clear processing profile when image has same rank as thumb 2019-08-02 16:03:03 +02:00
Ingo Weyrich
41fc34c5c6 Do not assign empty strings on creation of std::string or Glib::ustring 2019-07-31 20:21:16 +02:00
Ingo Weyrich
f523149582 Clear processing profile is broken, fixes #5392 2019-07-29 13:56:38 +02:00
Ingo Weyrich
cbb3f05b7e use empty() instead of comparison with an empty string 2019-07-22 13:49:08 +02:00
Beep6581
275f11e97d Merge pull request #5325 from erjiang/embedded-ratings
Use ratings from image metadata
2019-07-17 15:28:55 +02:00
rom9
b4c109f275 ProcParams now contain red and blue ratios, to be aligned with values in the GUI. 2019-06-29 16:06:40 +02:00
rom9
4e09fd4f21 Changed master exponent default from 2.0 to 1.5; it was too large for high-contrast negatives. Set all sliders as log-scale, centered at 1.0, so that reasonable values can be fine-tuned more easily. 2019-06-28 21:29:06 +02:00
rom9
7040378dec Merge remote-tracking branch 'origin/dev' into filmnegative 2019-06-23 23:40:56 +02:00
Flössie
ca387e0379 Use terser C++11 resets in ProcParams::setDefaults() 2019-06-18 09:22:45 +02:00
Flössie
015cffc73a Peripheral cleanups and a fix
- Whitespace, braces, sorting
- Fixed missing filmnegative in `ProcParams::operator ==(ProcParams)`
2019-06-13 09:52:13 +02:00
rom9
8d0755eddc Raised default master exponent from 1.0 to 2.0, to get a reasonable contrast right from the start. 2019-06-11 22:50:36 +02:00
rom9
9df8008949 Film negative processing: first usable version. Only supports bayer raw files, thumbnails don't work
Added performance improvements suggested by heckflosse. Lowered median sampling step from 7 to 5 since calculation is now much faster.

Added support for Fuji X-Trans raw files.

Applied SSE2 patch provided by @heckflosse, improves performance in main processing loop.

Moved film negative processing stuff in its own compilation unit.

Code cleanup: removed redundant omp directives.

Added check for dead pixels, going above threshold after inversion. ST_BAYER only for now.

Reverted leftover hack in cropwindow.cc
2019-06-08 01:40:29 +02:00
heckflosse
a391e256bc Fix possibly uninitialized variable 2019-06-04 16:30:54 +02:00
Eric Jiang
820024972a Use rating from EXIF/XMP where available 2019-05-18 15:22:00 -07:00
Flössie
9fe6bcaab1 Merge branch 'dev' into relax-procparam-dependency 2019-03-10 12:54:04 +01:00
heckflosse
520a3709bf Allow user defined border for xtrans, #5198 2019-03-01 14:47:55 +01:00
Flössie
0cbc4923bc Relax dependency from procparams.h 2019-02-28 20:44:50 +01:00
heckflosse
46aabd2003 Unfix fixed white level, #5187 2019-02-23 14:00:45 +01:00
heckflosse
b9942422e7 Change microcontrast uniformity adjuster range, fixes #5129 2019-01-01 17:36:17 +01:00
heckflosse
4a46da1b34 Merge branch 'dev' into blur-flat-regions 2018-12-17 11:58:34 +01:00
Morgan Hardwood
920e9f7a16 Renamed key to CurveFromHistogramMatching for clarity, #5089 2018-12-11 23:13:40 +01:00
heckflosse
5162484517 First quick&dirty version of flat region blur, #5075 2018-12-08 21:57:56 +01:00
Alberto Griggio
4e4a83b576
Merge pull request #5011 from Beep6581/colortoning-labregions-cdl
Enhanced version of the "L*a*b* regions" color toning
2018-11-23 17:07:30 +01:00
heckflosse
190772af5e Fix some issues found by cppcheck 2018-11-22 18:40:09 +01:00
Alberto Griggio
73898e1a3f Enhanced version of the "L*a*b* regions" color toning, adding mask blur and ASC-CDL controls 2018-11-22 09:45:59 +01:00