Commit Graph

2894 Commits

Author SHA1 Message Date
Desmis
89bdb7e848 merge with dev 2019-12-30 10:28:19 +01:00
Desmis
31ae02e080 merge with dev 2019-12-30 10:14:27 +01:00
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
Ingo Weyrich
f501ec6398 Simplify copyAndClampLine, make in place transformations when gamutwarning is disabled 2019-12-28 13:19:45 +01: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
253da17bc7 Add homogeneous scale transformation
Add function to generate homogeneous 3 dimensional scale transformation
matrices.
2019-12-25 14:45:47 -08:00
Lawrence
1c6a635497 Add homogeneous coordinate functions
Add functions for transformations in 3 dimensional homogeneous space.
These include functions that generate transformation matrices and
perform matrix multiplication.
2019-12-24 15:18:15 -08:00
Ingo Weyrich
b2cfb457cc multithread darkframe subtraction, #5582 2019-12-24 19:07:32 +01:00
Ingo Weyrich
c4cf68c6b5 Speedup for darkframe subtraction 2019-12-24 19:01:36 +01:00
Ingo Weyrich
5face2e449 buildBlendMask: remove multiplication by amount as amount always was 1 2019-12-20 17:44:51 +01:00
Floessie
f8f100262f Merge pull request #5573 from luzpaz/typos
Fix doxygen typo and other various typos
2019-12-20 13:39:27 +01:00
Flössie
bd6088837c Fix crash on DCraw::data_error (fixes #5571) 2019-12-20 13:34:37 +01:00
luz.paz
c5d2e00ba3 Fixed previous commit per review feedback 2019-12-20 06:06:52 -05:00
luz.paz
765499bf55 Fix doxygen typo and other various typos 2019-12-19 20:46:35 -05: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
3a207dace7 Some optimizations for capture sharpening 2019-12-18 17:33:41 +01:00
Ingo Weyrich
5e0ad767ad Capture sharpening: fix wrong calculation for radius > 0.84 2019-12-18 13:16:37 +01:00
Ingo Weyrich
6b22101500 better white level for FUJIFILM X-A7 2019-12-15 17:00:50 +01:00
Desmis
b2c1f5de66 merge with dev 2019-12-15 08:24:35 +01:00
Desmis
025f444d7e Improve contrast levels with sigma 2019-12-15 08:21:41 +01:00
Ingo Weyrich
eb4fe6a7c6 Merge pull request #5562 from Beep6581/review_demosaicers
Clip negative values to zero in raw processing, #5561
2019-12-13 16:54:51 +01:00
Ingo Weyrich
0c10b1466e raw crop for Leica SL2 2019-12-13 14:39:05 +01:00
Ingo Weyrich
92c29bcd65 Skip capture sharpening for predemosaiced raw files, fixes #5563 2019-12-13 13:50:00 +01:00
Ingo Weyrich
4d72fc0b5b Do not generate negative values if raw values are less than black level, #5562 2019-12-12 20:05:43 +01:00
Ingo Weyrich
637e8454ef Do not generate negative values in output of raw ca-correction, #5562 2019-12-12 19:59:27 +01:00
Ingo Weyrich
b2218d05dd clip negative output of demosaicers to zero, #5561 2019-12-12 18:45:18 +01:00
Ingo Weyrich
a2dd906115 flush denormals to zeros for mask blur, #5560 2019-12-11 13:00:09 +01:00
Ingo Weyrich
1d08c9355d Capture sharpening: speedup processing of flat areas 2019-12-09 15:34:04 +01:00
Floessie
ba36a92240 Merge pull request #5534 from Beep6581/cr3_cleanup
CR3 decoder cleanup and fixes
2019-12-07 11:57:36 +01:00
Flössie
b1bce98c06 supportsPartial is bool 2019-12-07 09:38:18 +01:00
Desmis
44e01ffcb9 merge with dev 2019-12-06 17:30:03 +01:00
Desmis
4761b28333 merge with dev 2019-12-06 17:19:21 +01:00
Ingo Weyrich
743827c7c8 Fix cppcheck warnings 2019-12-06 12:21:19 +01:00
Flössie
b0e52b3202 Whitespace corrections 2019-12-06 09:28:34 +01:00
Flössie
03c094a42b Fix fseek()/ftell() issue 2019-12-06 09:18:16 +01:00
Flössie
8f82a8362a Finalize const/bool cleanup 2019-12-06 08:18:17 +01:00
Ingo Weyrich
10b085b01e lmmse demosaic: own compilation unit and some cleanups 2019-12-05 21:40:32 +01:00
Ingo Weyrich
170a3a18c5 white level for Fujifilm HS30EXR 2019-12-05 17:15:06 +01:00
Ingo Weyrich
7fd54cb56f white level for Fujifilm X10 2019-12-05 16:40:44 +01:00
Flössie
2ceda11912 Fix Apple build (fixes #5553) 2019-12-05 09:54:16 +01:00
Flössie
49f5833002 More bool and const (WIP) 2019-12-04 10:25:52 +01:00
Ingo Weyrich
a2b0167339 Fix broken non OMP build 2019-12-02 19:46:00 +01:00
Ingo Weyrich
f95acfe74e Multithread lensfun vignetting correction 2019-12-02 17:32:13 +01:00
Flössie
5852ee02b9 Make LFDatabase::findModifier() non-static 2019-12-02 08:20:25 +01:00
Desmis
d701afdef0 merge with dev 2019-12-01 06:56:16 +01:00
Desmis
c0da01cf9a merge with dev 2019-12-01 06:53:23 +01:00
Ingo Weyrich
92e6768bee Improve caching of lensfun mismatches 2019-11-29 15:19:34 +01:00
Flössie
c4fe355fbb Fix formatting and use bool (WIP) 2019-11-29 14:57:14 +01:00
Ingo Weyrich
b8dcd93a6a Reduce searches for lensfun data if there is no entry for the combo of camera and lens 2019-11-29 13:09:37 +01:00
Ingo Weyrich
200d746465 Capture sharpening: fix border issues 2019-11-28 16:07:41 +01:00