Merge branch 'dev' into metadata-exiv2
13
.clang-format
Normal file
@ -0,0 +1,13 @@
|
||||
BasedOnStyle: LLVM
|
||||
BreakBeforeBraces: Linux
|
||||
UseTab: Never
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
ColumnLimit: 0
|
||||
AccessModifierOffset: -4
|
||||
AllowShortIfStatementsOnASingleLine: Always
|
||||
AlignAfterOpenBracket: DontAlign
|
||||
BreakConstructorInitializers: AfterColon
|
||||
NamespaceIndentation: None
|
||||
IndentCaseLabels: true
|
||||
SortIncludes: Never
|
40
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Is something not working as it should? Please report it here.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- READ THIS FIRST
|
||||
Please check the following before you report:
|
||||
1. Search through the open and closed issues on GitHub for keywords related to your issue. Avoid creating duplicates. Many issues from the latest release version will already have been fixed.
|
||||
2. Read http://rawpedia.rawtherapee.com/How_to_write_useful_bug_reports to ensure you provide as much information as possible.
|
||||
3. If your problem is related to a specific image or edit, always (!) provide the image and corresponding sidecar (pp3) file.
|
||||
-->
|
||||
|
||||
**Short description**
|
||||
<!-- Give a brief summary of the issue. Remove this section if you can fit the summary in the title of the issue. -->
|
||||
|
||||
**Steps to reproduce**
|
||||
<!-- Provide the necessary steps to reproduce the issue. For example:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error -->
|
||||
|
||||
**Expected behavior**
|
||||
<!-- Explain the expected behavior and how it differs from the actual behavior. -->
|
||||
|
||||
**Additional information**
|
||||
<!-- Some essentials:
|
||||
- Version of RawTherapee
|
||||
- Version of your operating system
|
||||
- If you built from source, the contents of the `AboutThisBuild.txt` file in the installation folder
|
||||
|
||||
Other useful information:
|
||||
- Screenshots or screencast
|
||||
- Image file + sidecar (pp3)
|
||||
- Stacktrace from a debug build
|
||||
-->
|
13
.github/ISSUE_TEMPLATE/camera-support---color-calibration.md
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
name: Camera support / color calibration
|
||||
about: Report new file formats or requests for color calibration support here
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- If files from your camera cannot be opened by RawTherapee, or the colors are wrong, please provide information to improve support for your camera. Please read http://rawpedia.rawtherapee.com/Adding_Support_for_New_Raw_Formats and provide the necessary shots.
|
||||
If you own a color calibration target (such as an X-Rite ColorChecker Passport), you can further improve the color rendition of files from your camera. Please read http://rawpedia.rawtherapee.com/How_to_create_DCP_color_profiles and provide the necessary shots.
|
||||
|
||||
Requests without providing the necessary information will be deleted. -->
|
15
.github/ISSUE_TEMPLATE/feature-request---enhancements.md
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
name: Feature request / enhancements
|
||||
about: Ideas and suggestions for improvement are always welcome!
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- READ THIS FIRST
|
||||
Suggestions are always welcome, but we cannot guarantee that these can or will be implemented. Development capacity is limited.
|
||||
Please make sure to search through the open and closed issues for keywords related to your suggestion. Avoid creating duplicates.
|
||||
-->
|
||||
|
||||
<!-- Give a clear and complete description of WHAT your suggestion improvement is, WHY you think this would be useful or better, and ideally HOW the improvement should be implemented. -->
|
12
.github/workflows/main.yml
vendored
@ -14,16 +14,16 @@ on:
|
||||
- created
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-10.15
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
date -u
|
||||
mkdir build
|
||||
date +%s > build/stamp
|
||||
brew uninstall --ignore-dependencies libtiff
|
||||
brew install libtiff gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++ little-cms2 libiptcdata fftw lensfun expat pkgconfig libomp shared-mime-info | tee -a depslog
|
||||
brew install libtiff gtk+3 gtkmm3 gtk-mac-integration adwaita-icon-theme libsigc++@2 little-cms2 libiptcdata fftw lensfun expat pkgconfig libomp shared-mime-info | tee -a depslog
|
||||
date -u
|
||||
echo "----====Pourage====----"
|
||||
cat depslog | grep Pouring
|
||||
@ -82,11 +82,11 @@ jobs:
|
||||
echo "=== artifact: ${ARTIFACT}"
|
||||
# defining environment variables for next step as per
|
||||
# https://github.com/actions/starter-workflows/issues/68
|
||||
echo "::set-env name=ARTIFACT_PATH::${GITHUB_WORKSPACE}/build/${ARTIFACT}"
|
||||
echo "::set-env name=ARTIFACT_FILE::${ARTIFACT}"
|
||||
echo "ARTIFACT_PATH=${GITHUB_WORKSPACE}/build/${ARTIFACT}" >> $GITHUB_ENV
|
||||
echo "ARTIFACT_FILE=${ARTIFACT}" >> $GITHUB_ENV
|
||||
zsh -c 'echo "Bundled in $(printf "%0.2f" $(($[$(date +%s)-$(cat bundlestamp)]/$((60.))))) minutes"'
|
||||
exit
|
||||
- uses: actions/upload-artifact@v1
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{env.ARTIFACT_FILE}}
|
||||
path: ${{env.ARTIFACT_PATH}}
|
||||
|
@ -144,6 +144,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=delete-incomplete")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-math-errno")
|
||||
|
||||
# suppress warning https://github.com/Beep6581/RawTherapee/issues/6105
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-attributes")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
|
||||
|
||||
# Special treatment for x87 and x86-32 SSE (see GitHub issue #4324)
|
||||
include(FindX87Math)
|
||||
if(HAVE_X87_MATH)
|
||||
@ -456,13 +460,13 @@ if(GTK_VERSION VERSION_GREATER "3.24.1" AND GTK_VERSION VERSION_LESS "3.24.7")
|
||||
)
|
||||
endif()
|
||||
|
||||
pkg_check_modules(GLIB2 REQUIRED glib-2.0>=2.44)
|
||||
pkg_check_modules(GLIBMM REQUIRED glibmm-2.4>=2.44)
|
||||
pkg_check_modules(GLIB2 REQUIRED glib-2.0>=2.48)
|
||||
pkg_check_modules(GLIBMM REQUIRED glibmm-2.4>=2.48)
|
||||
pkg_check_modules(CAIROMM REQUIRED cairomm-1.0)
|
||||
pkg_check_modules(GIO REQUIRED gio-2.0>=2.44)
|
||||
pkg_check_modules(GIOMM REQUIRED giomm-2.4>=2.44)
|
||||
pkg_check_modules(GTHREAD REQUIRED gthread-2.0>=2.44)
|
||||
pkg_check_modules(GOBJECT REQUIRED gobject-2.0>=2.44)
|
||||
pkg_check_modules(GIO REQUIRED gio-2.0>=2.48)
|
||||
pkg_check_modules(GIOMM REQUIRED giomm-2.4>=2.48)
|
||||
pkg_check_modules(GTHREAD REQUIRED gthread-2.0>=2.48)
|
||||
pkg_check_modules(GOBJECT REQUIRED gobject-2.0>=2.48)
|
||||
pkg_check_modules(SIGC REQUIRED sigc++-2.0>=2.3.1)
|
||||
pkg_check_modules(LENSFUN REQUIRED lensfun>=0.2)
|
||||
pkg_check_modules(RSVG REQUIRED librsvg-2.0>=2.40)
|
||||
@ -500,7 +504,8 @@ endif()
|
||||
pkg_check_modules(LCMS REQUIRED lcms2>=2.6)
|
||||
pkg_check_modules(EXPAT REQUIRED expat>=2.1)
|
||||
pkg_check_modules(FFTW3F REQUIRED fftw3f)
|
||||
pkg_check_modules(TIFF REQUIRED libtiff-4>=4.0.4)
|
||||
pkg_check_modules(IPTCDATA REQUIRED libiptcdata)
|
||||
find_package(TIFF 4.0.4 REQUIRED)
|
||||
find_package(JPEG REQUIRED)
|
||||
find_package(PNG REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
@ -697,7 +702,7 @@ if(WIN32)
|
||||
elseif(APPLE)
|
||||
set(
|
||||
ABOUT_COMMAND_WITH_ARGS
|
||||
cmake
|
||||
${CMAKE_COMMAND}
|
||||
-DPROJECT_SOURCE_DIR:STRING=${PROJECT_SOURCE_DIR}
|
||||
-DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX}
|
||||
-P ${PROJECT_SOURCE_DIR}/UpdateInfo.cmake
|
||||
|
@ -1,6 +1,6 @@
|
||||
RawTherapee - A powerful, cross-platform raw image processing program.
|
||||
Copyright (C) 2004-2012 Gabor Horvath <hgabor@rawtherapee.com>
|
||||
Copyright (C) 2010-2020 RawTherapee development team.
|
||||
Copyright (C) 2010-2021 RawTherapee development team.
|
||||
|
||||
RawTherapee is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -6,7 +6,13 @@ set(PROC_TARGET_1_FLAGS "-mtune=generic" CACHE STRING "Processor-1 flags")
|
||||
|
||||
# This second choice should be used for your own build only
|
||||
set(PROC_TARGET_2_LABEL native CACHE STRING "Processor-2 label - use it for your own build")
|
||||
set(PROC_TARGET_2_FLAGS "-march=native" CACHE STRING "Processor-2 flags")
|
||||
|
||||
# The flag is different on x86 and Arm based processors
|
||||
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL arm64)
|
||||
set(PROC_TARGET_2_FLAGS "-mcpu=native" CACHE STRING "Processor-2 flags")
|
||||
else()
|
||||
set(PROC_TARGET_2_FLAGS "-march=native" CACHE STRING "Processor-2 flags")
|
||||
endif()
|
||||
|
||||
# The later choices is intended to be used if you want to provide specific builds, but it should match your own processor
|
||||
# You can cross compile but you have to know what you're doing, this mechanism has not been designed for that
|
||||
|
30
licenses/sleef_LICENSE.txt
Normal file
@ -0,0 +1,30 @@
|
||||
=============================================================================
|
||||
Boost Software License - Version 1.0
|
||||
|
||||
This license applies to selected portions of the software derived from SLEEF
|
||||
(https://sleef.org/), as noted in the applicable source file headers.
|
||||
=============================================================================
|
||||
|
||||
Boost Software License - Version 1.0 - August 17th, 2003
|
||||
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
BIN
rtdata/dcpprofiles/Canon EOS R.dcp
Normal file
BIN
rtdata/dcpprofiles/Canon EOS R5.dcp
Normal file
BIN
rtdata/dcpprofiles/Canon EOS R6.dcp
Normal file
BIN
rtdata/dcpprofiles/Panasonic DC-S5.dcp
Normal file
135
rtdata/images/svg/histogram-ellipsis-small.svg
Normal file
@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="histogram-ellipsis-small.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/tmp/template.png"
|
||||
id="SVGRoot"
|
||||
version="1.1"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
width="16">
|
||||
<sodipodi:namedview
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:snap-others="false"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-height="1041"
|
||||
inkscape:window-width="1920"
|
||||
showgrid="true"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="px"
|
||||
inkscape:cy="6.2923433"
|
||||
inkscape:cx="3.5003527"
|
||||
inkscape:zoom="33.366433"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666768"
|
||||
pagecolor="#E0E1E2"
|
||||
id="base">
|
||||
<inkscape:grid
|
||||
dotted="false"
|
||||
empspacing="7"
|
||||
originy="1"
|
||||
originx="1"
|
||||
id="grid1374"
|
||||
type="xygrid" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs815" />
|
||||
<metadata
|
||||
id="metadata818">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Lawrence Lee</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:description>RawTherapee icon.</dc:description>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
transform="translate(0,-8)"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
y="10"
|
||||
x="2"
|
||||
height="12"
|
||||
width="12"
|
||||
id="rect896"
|
||||
style="opacity:0.3;fill:#2a7fff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
y="9.5"
|
||||
x="1.5"
|
||||
height="13.000001"
|
||||
width="13"
|
||||
id="rect849"
|
||||
style="opacity:1;fill:none;fill-opacity:0.3;stroke:#000000;stroke-width:0.999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<circle
|
||||
style="fill:#2a7fff;fill-opacity:1;stroke-linecap:square"
|
||||
id="path852"
|
||||
cx="4.5"
|
||||
cy="16"
|
||||
r="1.5" />
|
||||
<circle
|
||||
style="fill:#2a7fff;fill-opacity:1;stroke-linecap:square"
|
||||
id="path852-5"
|
||||
cx="8"
|
||||
cy="16"
|
||||
r="1.5" />
|
||||
<circle
|
||||
style="fill:#2a7fff;fill-opacity:1;stroke-linecap:square"
|
||||
id="path852-6"
|
||||
cx="11.5"
|
||||
cy="16"
|
||||
r="1.5" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
@ -17,8 +15,8 @@
|
||||
inkscape:export-filename="/tmp/template.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:version="0.92.2 2405546, 2018-03-11"
|
||||
sodipodi:docname="histogram-bayer-off-small.svg">
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="histogram-type-histogram-small.svg">
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#E0E1E2"
|
||||
@ -26,14 +24,14 @@
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="50.75"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:zoom="27.621949"
|
||||
inkscape:cx="7.1257597"
|
||||
inkscape:cy="9.4855375"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1019"
|
||||
inkscape:window-height="1041"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
@ -44,7 +42,8 @@
|
||||
inkscape:snap-others="false"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:snap-bbox-midpoints="false">
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:document-rotation="0">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid1374"
|
||||
@ -63,10 +62,10 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Maciej Dworak</dc:title>
|
||||
<dc:title>Lawrence Lee</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
@ -100,40 +99,24 @@
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Layer 1"
|
||||
transform="translate(0,-8)">
|
||||
<path
|
||||
style="fill:#2a7fff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 2,22 c 0,0 1.5857864,-4 3,-4 1.4142136,0 2,2 3,2 1,0 1,-10 2.5,-10 1.5,0 2.5,12 2.5,12 z"
|
||||
id="path851"
|
||||
sodipodi:nodetypes="cszzcc" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:0.94495413;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="rect937"
|
||||
width="9"
|
||||
height="9"
|
||||
x="3.4999998"
|
||||
y="11.5" />
|
||||
y="10"
|
||||
x="2"
|
||||
height="12"
|
||||
width="12"
|
||||
id="rect1467"
|
||||
style="opacity:0.3;fill:#2a7fff;stroke-linecap:square;fill-opacity:1" />
|
||||
<rect
|
||||
style="opacity:1;fill:#30d043;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="rect1869"
|
||||
width="4"
|
||||
height="4"
|
||||
x="4"
|
||||
y="12" />
|
||||
<rect
|
||||
y="12"
|
||||
x="8"
|
||||
height="4"
|
||||
width="4"
|
||||
id="rect1871"
|
||||
style="opacity:1;fill:#d03030;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||
<rect
|
||||
y="16"
|
||||
x="8"
|
||||
height="4"
|
||||
width="4"
|
||||
id="rect2416"
|
||||
style="opacity:1;fill:#30d043;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal" />
|
||||
<rect
|
||||
style="opacity:1;fill:#3030d0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="rect2418"
|
||||
width="4"
|
||||
height="4"
|
||||
x="4"
|
||||
y="16" />
|
||||
style="opacity:1;fill:none;fill-opacity:0.3;stroke:#000000;stroke-width:0.999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect849"
|
||||
width="13"
|
||||
height="13.000001"
|
||||
x="1.5"
|
||||
y="9.5" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 3.9 KiB |
132
rtdata/images/svg/histogram-type-parade-small.svg
Normal file
@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 16 16"
|
||||
version="1.1"
|
||||
id="SVGRoot"
|
||||
inkscape:export-filename="/tmp/template.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="histogram-type-parade-small.svg">
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#E0E1E2"
|
||||
bordercolor="#666768"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="26.672054"
|
||||
inkscape:cx="6.4865394"
|
||||
inkscape:cy="9.5260087"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1041"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-others="false"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:document-rotation="0">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid1374"
|
||||
originx="1"
|
||||
originy="1"
|
||||
empspacing="7"
|
||||
dotted="false" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs815" />
|
||||
<metadata
|
||||
id="metadata818">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Lawrence Lee</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:description>RawTherapee icon.</dc:description>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Layer 1"
|
||||
transform="translate(0,-8)">
|
||||
<rect
|
||||
style="opacity:0.3;fill:#2a7fff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect896"
|
||||
width="12"
|
||||
height="12"
|
||||
x="2"
|
||||
y="10" />
|
||||
<path
|
||||
transform="translate(0,8)"
|
||||
d="M 11 4.0234375 C 10.691576 4.0252479 10.345351 4.1582074 10 4.3535156 L 10 11.367188 C 12.008913 10.233429 14 8.0234375 14 8.0234375 L 14 6 C 14 6 12.197351 4.0164165 11 4.0234375 z "
|
||||
style="fill:#0000ff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="path894" />
|
||||
<rect
|
||||
style="opacity:1;fill:none;fill-opacity:0.3;stroke:#000000;stroke-width:0.999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect849"
|
||||
width="13"
|
||||
height="13.000001"
|
||||
x="1.5"
|
||||
y="9.5" />
|
||||
<path
|
||||
transform="translate(0,8)"
|
||||
d="M 2 6 L 2 8.0234375 C 2 8.0234375 3.9910868 10.233429 6 11.367188 L 6 7.6972656 C 5.6537675 7.8922018 5.3071207 8.0252714 5 8.0234375 C 3.7936541 8.0162345 2 6 2 6 z "
|
||||
style="fill:#fd0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="path834" />
|
||||
<path
|
||||
transform="translate(0,8)"
|
||||
d="M 10 4.3535156 C 8.9719096 4.9349372 7.9511719 6.0839844 7.9511719 6.0839844 C 7.9511719 6.0839844 6.9807951 7.1450573 6 7.6972656 L 6 11.367188 C 6.6915471 11.757472 7.3844485 12.023438 8 12.023438 C 8.6155516 12.023438 9.3084528 11.757472 10 11.367188 L 10 4.3535156 z "
|
||||
style="fill:#00ff00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
id="path844" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.9 KiB |
131
rtdata/images/svg/histogram-type-vectorscope-hc-small.svg
Normal file
@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="histogram-type-vectorscope-hc-small.svg"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/tmp/template.png"
|
||||
id="SVGRoot"
|
||||
version="1.1"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
width="16">
|
||||
<sodipodi:namedview
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:snap-others="false"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-height="1041"
|
||||
inkscape:window-width="1920"
|
||||
showgrid="true"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="px"
|
||||
inkscape:cy="8.3797862"
|
||||
inkscape:cx="7.2745301"
|
||||
inkscape:zoom="42.234842"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666768"
|
||||
pagecolor="#E0E1E2"
|
||||
id="base">
|
||||
<inkscape:grid
|
||||
dotted="false"
|
||||
empspacing="7"
|
||||
originy="1"
|
||||
originx="1"
|
||||
id="grid1374"
|
||||
type="xygrid" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs815" />
|
||||
<metadata
|
||||
id="metadata818">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Lawrence Lee</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:description>RawTherapee icon.</dc:description>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
transform="translate(0,-8)"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
y="10"
|
||||
x="2"
|
||||
height="12"
|
||||
width="12"
|
||||
id="rect896"
|
||||
style="opacity:0.3;fill:#2a7fff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<circle
|
||||
r="5.5"
|
||||
cy="16"
|
||||
cx="8"
|
||||
id="path1487"
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#2a7fff;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
id="path1489"
|
||||
d="m 2.5,16 h 11"
|
||||
style="fill:none;stroke:#2a7fff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;stroke:#2a7fff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 8.0000001,10.5 -2e-7,11"
|
||||
id="path1489-2" />
|
||||
<rect
|
||||
y="9.5"
|
||||
x="1.5"
|
||||
height="13.000001"
|
||||
width="13"
|
||||
id="rect849"
|
||||
style="opacity:1;fill:none;fill-opacity:0.3;stroke:#000000;stroke-width:0.999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
135
rtdata/images/svg/histogram-type-vectorscope-hs-small.svg
Normal file
@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="histogram-type-vectorscope-hs-small.svg"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/tmp/template.png"
|
||||
id="SVGRoot"
|
||||
version="1.1"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
width="16">
|
||||
<sodipodi:namedview
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:snap-others="false"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-height="1041"
|
||||
inkscape:window-width="1920"
|
||||
showgrid="true"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="px"
|
||||
inkscape:cy="9.5260087"
|
||||
inkscape:cx="6.4865394"
|
||||
inkscape:zoom="26.672054"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666768"
|
||||
pagecolor="#E0E1E2"
|
||||
id="base">
|
||||
<inkscape:grid
|
||||
dotted="false"
|
||||
empspacing="7"
|
||||
originy="1"
|
||||
originx="1"
|
||||
id="grid1374"
|
||||
type="xygrid" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs815" />
|
||||
<metadata
|
||||
id="metadata818">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Lawrence Lee</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:description>RawTherapee icon.</dc:description>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
transform="translate(0,-8)"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<rect
|
||||
y="10"
|
||||
x="2"
|
||||
height="12"
|
||||
width="12"
|
||||
id="rect896"
|
||||
style="opacity:0.3;fill:#2a7fff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<circle
|
||||
r="5.5"
|
||||
cy="16"
|
||||
cx="8"
|
||||
id="path1487"
|
||||
style="opacity:1;fill:none;fill-opacity:1;stroke:#2a7fff;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<path
|
||||
id="path1489"
|
||||
d="m 2.5,16 h 11"
|
||||
style="fill:none;stroke:#2a7fff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<path
|
||||
style="fill:none;stroke:#2a7fff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 5.25,11.23686 5.5,9.52628"
|
||||
id="path1489-2" />
|
||||
<path
|
||||
style="fill:none;stroke:#2a7fff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 5.25,20.76314 5.5,-9.52628"
|
||||
id="path1489-7" />
|
||||
<rect
|
||||
y="9.5"
|
||||
x="1.5"
|
||||
height="13.000001"
|
||||
width="13"
|
||||
id="rect849"
|
||||
style="opacity:1;fill:none;fill-opacity:0.3;stroke:#000000;stroke-width:0.999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.5 KiB |
122
rtdata/images/svg/histogram-type-waveform-small.svg
Normal file
@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
sodipodi:docname="histogram-type-waveform-small.svg"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="/tmp/template.png"
|
||||
id="SVGRoot"
|
||||
version="1.1"
|
||||
viewBox="0 0 16 16"
|
||||
height="16"
|
||||
width="16">
|
||||
<sodipodi:namedview
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:snap-others="false"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:pagecheckerboard="false"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-height="1041"
|
||||
inkscape:window-width="1920"
|
||||
showgrid="true"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="px"
|
||||
inkscape:cy="9.5260087"
|
||||
inkscape:cx="6.4865394"
|
||||
inkscape:zoom="26.672054"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666768"
|
||||
pagecolor="#E0E1E2"
|
||||
id="base">
|
||||
<inkscape:grid
|
||||
dotted="false"
|
||||
empspacing="7"
|
||||
originy="1"
|
||||
originx="1"
|
||||
id="grid1374"
|
||||
type="xygrid" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs815" />
|
||||
<metadata
|
||||
id="metadata818">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Lawrence Lee</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<dc:rights>
|
||||
<cc:Agent>
|
||||
<dc:title />
|
||||
</cc:Agent>
|
||||
</dc:rights>
|
||||
<dc:description>RawTherapee icon.</dc:description>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
transform="translate(0,-8)"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
sodipodi:nodetypes="caccacacc"
|
||||
id="path894"
|
||||
d="m 2,16.024327 c 0,0 3.5962991,4 6,4 2.403701,0 6,-4 6,-4 V 14 c 0,0 -1.802649,-1.982694 -3,-1.975673 -1.2265841,0.0072 -3.0492981,2.059811 -3.0492981,2.059811 0,0 -1.7735807,1.947218 -2.9507019,1.940189 C 3.7936541,16.017124 2,14 2,14 Z"
|
||||
style="fill:#2a7fff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
<rect
|
||||
y="10"
|
||||
x="2"
|
||||
height="12"
|
||||
width="12"
|
||||
id="rect896"
|
||||
style="opacity:0.3;fill:#2a7fff;fill-opacity:1;stroke:none;stroke-width:1;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
<rect
|
||||
y="9.5"
|
||||
x="1.5"
|
||||
height="13.000001"
|
||||
width="13"
|
||||
id="rect849"
|
||||
style="opacity:1;fill:none;fill-opacity:0.3;stroke:#000000;stroke-width:0.999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.2 KiB |
@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
@ -17,7 +15,7 @@
|
||||
inkscape:export-filename="/tmp/template.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:version="0.92.2 2405546, 2018-03-11"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
sodipodi:docname="power-off-small.svg">
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
@ -26,16 +24,16 @@
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="50.625"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:zoom="48.806956"
|
||||
inkscape:cx="7.6926668"
|
||||
inkscape:cy="8.0255665"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1019"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-width="3440"
|
||||
inkscape:window-height="1387"
|
||||
inkscape:window-x="3832"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:pagecheckerboard="false"
|
||||
@ -44,7 +42,8 @@
|
||||
inkscape:snap-others="false"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:snap-bbox-midpoints="false">
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:document-rotation="0">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid1374"
|
||||
@ -63,7 +62,7 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Maciej Dworak</dc:title>
|
||||
@ -100,11 +99,15 @@
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Layer 1"
|
||||
transform="translate(0,-8)">
|
||||
<circle
|
||||
style="opacity:0.5;fill:none;fill-opacity:0.75294118;fill-rule:nonzero;stroke:#2a7fff;stroke-width:1.50047243;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
id="path2547"
|
||||
cx="8"
|
||||
cy="17"
|
||||
r="3.2497637" />
|
||||
<path
|
||||
style="display:inline;opacity:0.5;fill:none;fill-opacity:0.752941;fill-rule:nonzero;stroke:#2a7fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
d="m 11.030908,13.501206 a 4.3252046,4.3407218 0 0 1 1.294297,3.096681 v 0 A 4.3252046,4.3407218 0 0 1 8,20.938608 4.3252046,4.3407218 0 0 1 3.6747954,16.597887 4.3252046,4.3407218 0 0 1 4.9720116,13.498331"
|
||||
id="path5608"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="opacity:0.5;fill:none;fill-rule:evenodd;stroke:#2a7fff;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
d="m 7.9999995,11.259782 v 3.39629"
|
||||
id="path2553"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 4.0 KiB |
@ -1,6 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
@ -17,8 +15,8 @@
|
||||
inkscape:export-filename="/tmp/template.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:version="0.92.2 2405546, 2018-03-11"
|
||||
sodipodi:docname="power-on.svg">
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
sodipodi:docname="power-on-small.svg">
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#E0E1E2"
|
||||
@ -26,16 +24,16 @@
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="50.75"
|
||||
inkscape:cx="8"
|
||||
inkscape:cy="8"
|
||||
inkscape:zoom="32"
|
||||
inkscape:cx="10.989922"
|
||||
inkscape:cy="9.722799"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1019"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-width="3440"
|
||||
inkscape:window-height="1387"
|
||||
inkscape:window-x="3832"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:pagecheckerboard="false"
|
||||
@ -44,14 +42,18 @@
|
||||
inkscape:snap-others="false"
|
||||
inkscape:object-nodes="false"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:snap-bbox-midpoints="false">
|
||||
inkscape:snap-bbox-midpoints="false"
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:snap-global="false">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid1374"
|
||||
originx="1"
|
||||
originy="1"
|
||||
empspacing="7"
|
||||
dotted="false" />
|
||||
dotted="false"
|
||||
visible="true"
|
||||
enabled="true" />
|
||||
</sodipodi:namedview>
|
||||
<defs
|
||||
id="defs815" />
|
||||
@ -63,7 +65,7 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Maciej Dworak</dc:title>
|
||||
@ -97,18 +99,36 @@
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Layer 1"
|
||||
transform="translate(0,-8)">
|
||||
transform="translate(0,-8)"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
style="opacity:1;fill:none;fill-opacity:0.75294118;fill-rule:nonzero;stroke:#2a7fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
d="M 11.503774,13.432989 A 5,5 0 0 1 13,17 v 0 A 5,5 0 0 1 8,22 5,5 0 0 1 3,17 5,5 0 0 1 4.499601,13.429677"
|
||||
id="path5608"
|
||||
inkscape:connector-curvature="0" />
|
||||
style="display:none;opacity:0.75;fill:none;fill-opacity:0.752941;fill-rule:nonzero;stroke:#2a7fff;stroke-width:2.9;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
d="M 11.503774,13.128228 A 5,5 0 0 1 13,16.695239 v 0 a 5,5 0 0 1 -5,5 5,5 0 0 1 -5,-5 5,5 0 0 1 1.499601,-3.570323"
|
||||
id="path5608-3"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:label="bottom round glow" />
|
||||
<path
|
||||
style="fill:none;fill-rule:evenodd;stroke:#2a7fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
style="display:none;opacity:0.75;fill:none;fill-rule:evenodd;stroke:#2a7fff;stroke-width:3.9;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
d="m 7.9999994,10.551133 v 3.912126"
|
||||
id="path2553"
|
||||
inkscape:connector-curvature="0" />
|
||||
id="path2553-6"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:label="bottom straight glow" />
|
||||
<path
|
||||
id="path839"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#f1f1f1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.266667;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="M 8.0000002,9.2447604 A 1.2218936,1.2217828 0 0 0 6.77751,10.46714 v 3.846109 a 1.2218936,1.2217828 0 0 0 1.2224902,1.22238 1.2218936,1.2217828 0 0 0 1.22249,-1.22238 V 10.46714 A 1.2218936,1.2217828 0 0 0 8.0000002,9.2447604 Z M 4.5455258,11.780796 A 1.2218936,1.2217828 0 0 0 3.6971212,12.128 c -1.1790295,1.153783 -1.8435795,2.735852 -1.8435795,4.384817 -4e-7,3.376499 2.7671706,6.136953 6.1464585,6.136953 3.3792878,0 6.1464588,-2.760454 6.1464578,-6.136953 0,-1.646953 -0.663499,-3.22596 -1.839998,-4.379448 a 1.2218936,1.2217828 0 0 0 -1.727238,0.01611 1.2218936,1.2217828 0 0 0 0.01611,1.72887 c 0.709034,0.695164 1.107938,1.643337 1.107938,2.63447 0,2.05355 -1.642357,3.693983 -3.7032678,3.693983 -2.0609116,0 -3.7032683,-1.640433 -3.7032681,-3.693983 0,-0.992346 0.399166,-1.942703 1.1097276,-2.638049 a 1.2218936,1.2217828 0 0 0 0.019688,-1.72708 1.2218936,1.2217828 0 0 0 -0.8806222,-0.366892 z" />
|
||||
<path
|
||||
style="display:none;opacity:0.1;fill:none;fill-opacity:0.752941;fill-rule:nonzero;stroke:#1f90e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
d="M 11.503774,13.13695 A 5,5 0 0 1 13,16.703961 v 0 a 5,5 0 0 1 -5,5 5,5 0 0 1 -5,-5 5,5 0 0 1 1.499601,-3.570323"
|
||||
id="path5608-36"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:label="blue glow round" />
|
||||
<path
|
||||
style="display:none;opacity:0.05;fill:none;fill-rule:evenodd;stroke:#1f90e0;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:normal"
|
||||
d="m 7.9999994,10.551133 v 3.912126"
|
||||
id="path2553-7"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:label="blue glow straight" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 7.2 KiB |
@ -809,7 +809,7 @@ ICCPROFCREATOR_PROF_V2;ICC v2
|
||||
ICCPROFCREATOR_PROF_V4;ICC v4
|
||||
ICCPROFCREATOR_SAVEDIALOG_TITLE;Enregistrer le profil ICC sous...
|
||||
ICCPROFCREATOR_SLOPE;Pente
|
||||
ICCPROFCREATOR_TRC_PRESET;Courbe de réponse tonale:
|
||||
ICCPROFCREATOR_TRC_PRESET;Courbe de réponse tonale
|
||||
IPTCPANEL_CATEGORY;Catégorie
|
||||
IPTCPANEL_CATEGORYHINT;Identifie le sujet de l'image selon l'opinion du fournisseur.
|
||||
IPTCPANEL_CITY;Ville
|
||||
@ -1297,8 +1297,8 @@ TP_BWMIX_AUTOCH;Auto
|
||||
TP_BWMIX_CC_ENABLED;Ajuster les couleurs complémentaires
|
||||
TP_BWMIX_CC_TOOLTIP;Activer pour permettre l'ajustage automatique des couleur complémentaire dans le mode ROJVCBPM
|
||||
TP_BWMIX_CHANNEL;Égaliseur de Luminance
|
||||
TP_BWMIX_CURVEEDITOR1;Courbe 'avant'
|
||||
TP_BWMIX_CURVEEDITOR2;Courbe 'après'
|
||||
TP_BWMIX_CURVEEDITOR1;Courbe 'avant':
|
||||
TP_BWMIX_CURVEEDITOR2;Courbe 'après':
|
||||
TP_BWMIX_CURVEEDITOR_AFTER_TOOLTIP;Courbe tonale, après la conversion en N&B, à la fin du traitement
|
||||
TP_BWMIX_CURVEEDITOR_BEFORE_TOOLTIP;Courbe tonale, juste avant la conversion en N&B\nPeut prendre en compte les composantes couleur
|
||||
TP_BWMIX_CURVEEDITOR_LH_TOOLTIP;Modifie la luminance en fonction de la teinte\nFaites attention aux valeurs extrêmes qui peuvent causer des artefacts
|
||||
@ -1363,6 +1363,7 @@ TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotation vers la gauche\nRaccourci: <b>[</b>\n\nRa
|
||||
TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotation vers la droite\nRaccourci: <b>]</b>\n\nRaccourci en mode Éditeur unique: <b>Alt-]</b>
|
||||
TP_COARSETRAF_TOOLTIP_VFLIP;Symétriser / axe horizontal
|
||||
TP_COLORAPP_ABSOLUTELUMINANCE;Luminance absolue
|
||||
TP_COLORAPP_ADAPSCEN_TOOLTIP;Correspond à la luminance en candelas par m2 au moment de la prise de vue, calculée automatiquement à partir des données exif.
|
||||
TP_COLORAPP_ALGO;Algorithme
|
||||
TP_COLORAPP_ALGO_ALL;Tout
|
||||
TP_COLORAPP_ALGO_JC;Luminosité + Chroma (JC)
|
||||
@ -1429,6 +1430,7 @@ TP_COLORAPP_TEMP_TOOLTIP;Pour sélectionner un illuminant, toujours régler Tein
|
||||
TP_COLORAPP_TONECIE;Compression Tonale utilisant CIECAM02
|
||||
TP_COLORAPP_TONECIE_TOOLTIP;Si cette option est désactivée, la compression tonale est faite dans l'espace Lab.\nSi cette options est activée, la compression tonale est faite en utilisant CIECAM02.\nL'outil Compression Tonale doit être activé pour que ce réglage prenne effet
|
||||
TP_COLORAPP_VIEWING_ABSOLUTELUMINANCE_TOOLTIP;Luminance absolue de l'environnement de visionnage\n(souvent 16cd/m²)
|
||||
TP_COLORAPP_YBOUT_TOOLTIP;Yb est la luminance relative de l'arrière plan, exprimée e % de gris. Un gris à 18% correspond à une luminance exprimée en CIE L de 50%.\nCette donnée prend en compte la luminance moyenne de l'image.
|
||||
TP_COLORAPP_WBCAM;BB [RT+CAT02] + [sortie]
|
||||
TP_COLORAPP_WBRT;BB [RT] + [sortie]
|
||||
TP_COLORTONING_AB;o C/L
|
||||
@ -1436,7 +1438,7 @@ TP_COLORTONING_AUTOSAT;Automatique
|
||||
TP_COLORTONING_BALANCE;Balance
|
||||
TP_COLORTONING_BY;o C/L
|
||||
TP_COLORTONING_CHROMAC;Opacité
|
||||
TP_COLORTONING_COLOR;Couleur
|
||||
TP_COLORTONING_COLOR;Couleur:
|
||||
TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP;Opacité chroma en fonction de la luminance oC=f(L)
|
||||
TP_COLORTONING_HIGHLIGHT;Hautes lumières
|
||||
TP_COLORTONING_HUE;Teinte
|
||||
@ -1518,11 +1520,11 @@ TP_DEHAZE_STRENGTH;Force
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_AMZ;Multi-zones auto
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_AUTOGLOBAL;Global automatique
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_BLUEYELLOW;Chrominance - Bleu-Jaune
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_CURVE;Courbe de chrominance
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_CURVE;Courbe de chrominance:
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_CURVE_TOOLTIP;Augmente (multiplie) la valeur de tous les curseurs de chrominance.\nCette courbe vous permet d'ajuster la force de la réduction de bruit chromatique en fonction de la chromaticité, par exemple pour augmenter l'action dans les zones faiblement saturées et pour la diminuer dans celles très saturées.
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_FRAME;Chrominance
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_MANUAL;Manuel
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_MASTER;Chrominance - Maître
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_MASTER;Chrominance-Maître
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_METHOD;Méthode
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_METHODADVANCED_TOOLTIP;Manuel\nAgit sur l'image entière.\nVous controlez les paramètres de réduction de bruit manuellement.\n\nGlobal automatique\nAgit sur l'image entière.\n9 zones sont utilisées pour calculer un réglage de réduction de bruit de chroma.\n\nAperçu\nAgit sur l'image entière.\nLa partie visible de l'image dans l'aperçu est utilisé pour calculer un réglage de réduction de bruit de chroma.
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_METHOD_TOOLTIP;Manuel\nAgit sur l'image entière.\nVous controlez les paramètres de réduction de bruit manuellement.\n\nGlobal automatique\nAgit sur l'image entière.\n9 zones sont utilisées pour calculer un réglage de réduction de bruit de chroma.\n\nAutomatique multi-zones\nPas d'aperçu - ne fonctionne que lors de l'enregistrement, mais utiliser la méthode "Aperçu" en faisant correspondre la taille et le centre de la tuile à la taille et au centre de l'aperçu, vous permet d'avoir une idée des résultats attendus.\nL'image est divisé en tuiles (entre 10 et 70 en fonction de la taille de l'image) et chaque tuile reçoit son propre réglage de réduction de bruit de chrominance.\n\nAperçu\nAgit sur l'image entière.\nLa partie de l'image visible dans l'aperçu est utilisé pour calculer un réglage de réduction de bruit de chroma.
|
||||
@ -1536,7 +1538,7 @@ TP_DIRPYRDENOISE_CHROMINANCE_PREVIEW_TILEINFO;Taille des tuiles =%1, Centre: Tx=
|
||||
TP_DIRPYRDENOISE_CHROMINANCE_REDGREEN;Chrominance - Rouge-Vert
|
||||
TP_DIRPYRDENOISE_LABEL;Réduction de Bruit
|
||||
TP_DIRPYRDENOISE_LUMINANCE_CONTROL;Contrôle de luminance
|
||||
TP_DIRPYRDENOISE_LUMINANCE_CURVE;Courbe de luminance
|
||||
TP_DIRPYRDENOISE_LUMINANCE_CURVE;Courbe de luminance:
|
||||
TP_DIRPYRDENOISE_LUMINANCE_DETAIL;Niveau de détails de Luminance
|
||||
TP_DIRPYRDENOISE_LUMINANCE_FRAME;Luminance
|
||||
TP_DIRPYRDENOISE_LUMINANCE_SMOOTHING;Luminance
|
||||
@ -1655,7 +1657,7 @@ TP_HLREC_ENA_TOOLTIP;Peut être activé par le bouton Niveau Auto
|
||||
TP_HLREC_LABEL;Reconstruction des hautes lumières
|
||||
TP_HLREC_LUMINANCE;Récupération de la luminance
|
||||
TP_HLREC_METHOD;Méthode:
|
||||
TP_HSVEQUALIZER_CHANNEL;Canal
|
||||
TP_HSVEQUALIZER_CHANNEL;Canal:
|
||||
TP_HSVEQUALIZER_HUE;T
|
||||
TP_HSVEQUALIZER_LABEL;Égaliseur TSV
|
||||
TP_HSVEQUALIZER_SAT;S
|
||||
@ -1753,7 +1755,7 @@ TP_LOCALCONTRAST_LIGHTNESS;Niveau des hautes-lumières
|
||||
TP_LOCALCONTRAST_RADIUS;Rayon
|
||||
TP_LOCALLAB_ACTIV;Luminosité seulement
|
||||
TP_LOCALLAB_ACTIVSPOT;Activer le Spot
|
||||
TP_LOCALLAB_ADJ;Egalisateur Bleu-jaune Rouge-vert
|
||||
TP_LOCALLAB_ADJ;Egalisateur couleur
|
||||
TP_LOCALLAB_ALL;Toutes les rubriques
|
||||
TP_LOCALLAB_AMOUNT;Quantité
|
||||
TP_LOCALLAB_ARTIF;Détection de forme
|
||||
@ -1769,8 +1771,8 @@ TP_LOCALLAB_BILATERAL;Filtre Bilateral
|
||||
TP_LOCALLAB_BLACK_EV;Noir Ev
|
||||
TP_LOCALLAB_BLCO;Chrominance seulement
|
||||
TP_LOCALLAB_BLENDMASKCOL;Mélange - fusion
|
||||
TP_LOCALLAB_BLENDMASKMASK;Ajout / soustrait le masque Luminance
|
||||
TP_LOCALLAB_BLENDMASKMASKAB;Ajout / soustrait le masque Chrominance
|
||||
TP_LOCALLAB_BLENDMASKMASK;Ajout/soustrait masque Luminance
|
||||
TP_LOCALLAB_BLENDMASKMASKAB;Ajout/soustrait masque Chro.
|
||||
TP_LOCALLAB_BLENDMASK_TOOLTIP;Si fusion = 0 seule la détection de forme est améliorée.\nSi fusion > 0 le masque est ajouté à l'image. Si fusion < 0 le masque est soustrait à l'image
|
||||
TP_LOCALLAB_BLENDMASKMASK_TOOLTIP;Si ce curseur = 0 pas d'action.\nAjoute ou soustrait le masque de l'image originale
|
||||
TP_LOCALLAB_BLGUID;Filtre guidé
|
||||
@ -1802,14 +1804,14 @@ TP_LOCALLAB_BUTTON_DEL;Effacer
|
||||
TP_LOCALLAB_BUTTON_DUPL;Dupliquer
|
||||
TP_LOCALLAB_BUTTON_REN;Renommer
|
||||
TP_LOCALLAB_BUTTON_VIS;Montrer/Cacher
|
||||
TP_LOCALLAB_CBDL;Contraste par niveaux de détail
|
||||
TP_LOCALLAB_CBDL;Contr. par niveaux détail
|
||||
TP_LOCALLAB_CBDLCLARI_TOOLTIP;Ajuste les tons moyens et les réhausse.
|
||||
TP_LOCALLAB_CBDL_ADJ_TOOLTIP;Agit comme un outil ondelettes.\nLe premier niveau (0) agit sur des détails de 2x2.\nLe dernier niveau (5) agit sur des détails de 64x64.
|
||||
TP_LOCALLAB_CBDL_THRES_TOOLTIP;Empêche d'augmenter le bruit
|
||||
TP_LOCALLAB_CBDL_TOOLNAME;Contraste par niveaux de détail - 2
|
||||
TP_LOCALLAB_CENTER_X;Centre X
|
||||
TP_LOCALLAB_CENTER_Y;Centre Y
|
||||
TP_LOCALLAB_CH;Courbes CL - LC
|
||||
TP_LOCALLAB_CH;CL - LC
|
||||
TP_LOCALLAB_CHROMA;Chrominance
|
||||
TP_LOCALLAB_CHROMABLU;Niveaux Chroma
|
||||
TP_LOCALLAB_CHROMABLU_TOOLTIP;Agit comme un amplificateur-reducteur d'action en comparant aux réglages de luma.\nEn dessous de 1 reduit, au dessus de 1 amplifie
|
||||
@ -1822,7 +1824,7 @@ TP_LOCALLAB_CHRRT;Chroma
|
||||
TP_LOCALLAB_CIRCRADIUS;Taille Spot
|
||||
TP_LOCALLAB_CIRCRAD_TOOLTIP;Contient les références du RT-spot, utile pour la détection de forme (couleur, luma, chroma, Sobel).\nLes faibles valeurs peuvent être utiles pour les feuillages.\nLes valeurs élevées peuvent être utile pour la peau
|
||||
TP_LOCALLAB_CLARICRES;Fusion Chroma
|
||||
TP_LOCALLAB_CLARIFRA;Clarté & Masque de netteté - Fusion & adoucir images
|
||||
TP_LOCALLAB_CLARIFRA;Clarté & Masque netteté/Fusion & adoucir
|
||||
TP_LOCALLAB_CLARILRES;Fusion Luma
|
||||
TP_LOCALLAB_CLARISOFT;Rayon adoucir
|
||||
TP_LOCALLAB_CLARISOFT_TOOLTIP;Actif pour Clarté et Masque de netteté si différent de zéro.\n\nActif pour toutes les pyramides ondelettes.\nInactif si rayon = 0
|
||||
@ -1830,7 +1832,7 @@ TP_LOCALLAB_CLARITYML;Clarté
|
||||
TP_LOCALLAB_CLARI_TOOLTIP;En dessous ou égal à 4, 'Masque netteté' est actif.\nAu dessus du niveau ondelettes 5 'Clarté' est actif.\nUtilesu=i vous utilisez 'Compression dynamique des niveaux'
|
||||
TP_LOCALLAB_CLIPTM;Clip Recupère données (gain)
|
||||
TP_LOCALLAB_COFR;Couleur & Lumière
|
||||
TP_LOCALLAB_COLORDE;Couleur prévisualisation sélection ΔE - Intensité
|
||||
TP_LOCALLAB_COLORDE;Couleur prévis. sélection ΔE - Intensité
|
||||
TP_LOCALLAB_COLORDEPREV_TOOLTIP;Bouton Prévisualisation ΔE a besoin qu'un seul outil soit activé (expander).\nPour pouvoir avoir une Prévisualisation ΔE avec plusieurs outils activés utiliser Masque et modifications - Prévisualisation ΔE
|
||||
TP_LOCALLAB_COLORDE_TOOLTIP;Affiche la prévisualisation ΔE en bleu si négatif et en vert si positif.\n\nMasque et modifications (montre modifications sans masque): montre les modifications réelles si positf, montre les modifications améliorées (luminance seule) en bleu et jaune si négatif.
|
||||
TP_LOCALLAB_COLORSCOPE;Etendue Outils Couleur
|
||||
@ -1852,8 +1854,8 @@ TP_LOCALLAB_CONTRESID;Contraste
|
||||
TP_LOCALLAB_CONTTHMASK_TOOLTIP;Vous permet de déterminer quelles parties de l'image seront concernées par la texture.
|
||||
TP_LOCALLAB_CONTTHR;Seuil contraste
|
||||
TP_LOCALLAB_CONTWFRA;Contrast Local
|
||||
TP_LOCALLAB_CSTHRESHOLD;Ψ Ondelettes niveaux
|
||||
TP_LOCALLAB_CSTHRESHOLDBLUR;Ψ Masque Ondelettes niveau
|
||||
TP_LOCALLAB_CSTHRESHOLD;Ondelettes niveaux
|
||||
TP_LOCALLAB_CSTHRESHOLDBLUR;Masque Ondelettes niveau
|
||||
TP_LOCALLAB_CURV;Luminosité - Contraste - Chrominance "Super"
|
||||
TP_LOCALLAB_CURVCURR;Normal
|
||||
TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP;Si la courbe est au sommet, le masque est compétement noir aucune transformation n'est réalisée par le masque sur l'image.\nQuand vous descendez la courbe, progressivement le masque va se colorer et s'éclaicir, l'image change de plus en plus.\n\nIl est recommendé (pas obligatoire) de positionner le sommet des courbes curves sur la ligne de transition grise qui représnte les références (chroma, luma, couleur).
|
||||
@ -1876,8 +1878,10 @@ TP_LOCALLAB_DELTAD;Delta balance
|
||||
TP_LOCALLAB_DELTAEC;Masque ΔE Image
|
||||
TP_LOCALLAB_DENOIS;Ψ Réduction du bruit
|
||||
TP_LOCALLAB_DENOI_EXP;Réduction du bruit
|
||||
TP_LOCALLAB_DENOIQUA_TOOLTIP;Conservatif préserve les fréquences basses, alors que agressif tend à les effacer
|
||||
TP_LOCALLAB_DENOIQUA_TOOLTIP;Conservatif préserve les fréquences basses, alors que agressif tend à les effacer.\nConservatif et agressif utilisent les ondelletes et DCT et peuvent être utilisées en conjonction avec "débruitage par morceaux - luminance"
|
||||
TP_LOCALLAB_DENOIEQUAL_TOOLTIP;Equilibre l'action de denoise luminance entre les ombres et les lumières
|
||||
TP_LOCALLAB_DENOI1_EXP;De-bruite basé sur masque luminance
|
||||
TP_LOCALLAB_DENOI2_EXP;Récupération basée sur masque luminance
|
||||
TP_LOCALLAB_DENOI_TOOLTIP;Ce module peut être utilisé seul (à la fin du processus), ou en complément de Réduction du bruit (au début).\nEtendue(deltaE)permet de différencier l'action.\nVous pouvez compléter avec "median" ou "Filtre guidé" (Adoucir Flou...).\nVous pouvez compléter l'action avec "Flou niveaux" "Ondelette pyramide"
|
||||
TP_LOCALLAB_DENOILUMDETAIL_TOOLTIP;Permet de récupérer les détails de luminance par mise en oeuvre progressive de la transformée de Fourier (DCT)
|
||||
TP_LOCALLAB_DENOICHROF_TOOLTIP;Agit sur les fins détails du bruit de chrominance
|
||||
@ -1887,9 +1891,10 @@ TP_LOCALLAB_DENOITHR_TOOLTIP;Règle l'effet de bord pour privilégier l'action s
|
||||
TP_LOCALLAB_DENOIEQUALCHRO_TOOLTIP;Equilibre l'action de denoise chrominance entre les bleus-jaunes et les rouges-verts
|
||||
TP_LOCALLAB_DENOIBILAT_TOOLTIP;Traite le bruit d'impulsion (poivre et sel)
|
||||
TP_LOCALLAB_DEPTH;Profondeur
|
||||
TP_LOCALLAB_DETAIL;Contrast local
|
||||
TP_LOCALLAB_DETAIL;Contraste local
|
||||
TP_LOCALLAB_DETAILFRA;Détection bord - DCT
|
||||
TP_LOCALLAB_DETAILSH;Details
|
||||
TP_LOCALLAB_DETAILTHR;Seuil Detail Luminance Chroma (DCT ƒ)
|
||||
TP_LOCALLAB_DETAILTHR;Seuil Detail Luma-Chroma
|
||||
TP_LOCALLAB_DUPLSPOTNAME;Copier
|
||||
TP_LOCALLAB_EDGFRA;Netteté des bords
|
||||
TP_LOCALLAB_EDGSHOW;Montre tous les outils
|
||||
@ -1912,9 +1917,10 @@ TP_LOCALLAB_EV_VIS_ALL;Montrer tout
|
||||
TP_LOCALLAB_EXCLUF;Exclure
|
||||
TP_LOCALLAB_EXCLUF_TOOLTIP;Peut être utilsé pour exclure une partie des données - agir sur Etendue pour prendre en compte plus de couleurs.\n Vous pouvez utiliser tous les réglages pour ce type de RT-spot.
|
||||
TP_LOCALLAB_EXCLUTYPE;Spot méthode
|
||||
TP_LOCALLAB_EXCLUTYPE_TOOLTIP;Spot Normal utilise les données récursives.\n\nSpot exclusion réinitialise les données d'origine.\nPeut être utilsé pour annuler totalement ou partiellement une action précédente ou pour réaliser un mode inverse
|
||||
TP_LOCALLAB_EXCLUTYPE_TOOLTIP;Spot Normal utilise les données récursives.\n\nSpot exclusion réinitialise les données d'origine.\nPeut être utilsé pour annuler totalement ou partiellement une action précédente ou pour réaliser un mode inverse.\n\nImage entière vous permet d'utiliser 'local adjustments" sur le totalité de l'image.\nLes délimiteurs sont positionnés au delà de la prévisualisation\nTransition est mis à 100.\nVous pouvez avoir à repositionner le Spot ainsi que sa taille pour obtenir les effets désirés.\nNotez que l'utilisation de De-bruite, ondelettes, FFTW en image entière va utiliser de grosses quantités de mémoire, et peut amener l'application à 'planter' sur des systèmes à faible capacité.
|
||||
TP_LOCALLAB_EXECLU;Spot Exclusion
|
||||
TP_LOCALLAB_EXNORM;Spot Normal
|
||||
TP_LOCALLAB_EXFULL;Image entière
|
||||
TP_LOCALLAB_EXPCBDL_TOOLTIP;Peut être utilisé pour retirer les marques sur le capteur ou la lentille.
|
||||
TP_LOCALLAB_EXPCHROMA;Chroma compensation
|
||||
TP_LOCALLAB_EXPCHROMA_TOOLTIP;Seulement en association avec compensation d'exposition et PDE Ipol.\nEvite la desaturation des couleurs
|
||||
@ -1934,13 +1940,13 @@ TP_LOCALLAB_EXPLAP_TOOLTIP;Plus vous agissez sur ce curseur de seuil, plus grand
|
||||
TP_LOCALLAB_EXPMERGEFILE_TOOLTIP;Autorise de nombreuses possibilités de fusionner les images (comme les calques dans Photosshop) : difference, multiply, soft light, overlay...avec opacité...\nOriginale Image : fusionne le RT-spot en cours avec Originale.\nSpot Précédent : fusionne le RT-spot en cours avec le précédent - si il n'y a qu'un spot précédent = original.\nArrière plan : fusionne le RT-spot en cours avec la couleur et la luminance de l'arrière plan (moins de possibilités)
|
||||
TP_LOCALLAB_EXPMETHOD_TOOLTIP;Standard : utilise un algorithme similaire à Exposure principal mais en L*a*b* et en prenant en compte le deltaE.\n\nCompression dynamique et atténuateur de contraste : utilise un autre algorithme aussi avec deltaE et avec l'équation de Poisson pour résoudre le Laplacien dans l'espace de Fourier.\nAtténuateur, Compression dynamqiue et Standard peuvent être combinés.\nFFTW La transformée de Fourier est optimisée en taille pour réduire les temps de traitement.\nRéduit les artéfacts et le bruit.
|
||||
TP_LOCALLAB_EXPNOISEMETHOD_TOOLTIP;Applique un median avant la transformée de Laplace pour éviter les artéfacts (bruit).\nVous pouvez aussi utiliser l'outil "Réduction du bruit".
|
||||
TP_LOCALLAB_EXPOSE;Compression dynamique & Exposition
|
||||
TP_LOCALLAB_EXPOSE;Plage dynamique & Exposition
|
||||
TP_LOCALLAB_EXPOSURE_TOOLTIP;Modifie l'exposition dans l'espace L*a*b* en utilisant un Laplacien et les algorithmes PDE en prenant en compte dE, minimise les artéfacts.
|
||||
TP_LOCALLAB_EXPRETITOOLS;Outils Retinex avancés
|
||||
TP_LOCALLAB_EXPSHARP_TOOLTIP;RT-Spot minimum 39*39.\nUtiliser de basses valeurs de transition et de hautes valeurs de transition affaiblissement et Etendue pour simuler un petit RT-spot.
|
||||
TP_LOCALLAB_EXPTOOL;Outils exposition
|
||||
TP_LOCALLAB_EXPTRC;Courbe de réponse Tonale - TRC
|
||||
TP_LOCALLAB_EXP_TOOLNAME;Compression Dynamique & Exposition- 10
|
||||
TP_LOCALLAB_EXP_TOOLNAME;Plage Dynamique & Exposition- 10
|
||||
TP_LOCALLAB_FATAMOUNT;Quantité
|
||||
TP_LOCALLAB_FATANCHOR;Ancre
|
||||
TP_LOCALLAB_FATANCHORA;Décalage
|
||||
@ -1949,15 +1955,15 @@ TP_LOCALLAB_FATFRA;Compression Dynamique ƒ
|
||||
TP_LOCALLAB_FATFRAME_TOOLTIP;PDE Fattal - utilise Fattal Tone mapping algorithme.
|
||||
TP_LOCALLAB_FATLEVEL;Sigma
|
||||
TP_LOCALLAB_FATRES;Quantité de Residual Image
|
||||
TP_LOCALLAB_FATSHFRA;Compression Dynamique Masque ƒ
|
||||
TP_LOCALLAB_FATSHFRA;Compression Dynamique Masque
|
||||
TP_LOCALLAB_FEATH_TOOLTIP;Largeur du Gradient en porcentage de la diagonale du Spot\nUtilisé par tous les Filtres Gradués dans tous les outils.\nPas d'action si les filtres gradués ne sont pas utilisés.
|
||||
TP_LOCALLAB_FEATVALUE;Adoucissement gradient (Filtres Gradués)
|
||||
TP_LOCALLAB_FEATVALUE;Adouc. gradient(Filtres Gradués)
|
||||
TP_LOCALLAB_FFTCOL_MASK;FFTW ƒ
|
||||
TP_LOCALLAB_FFTMASK_TOOLTIP;Utilise une transformée de Fourier pour une meilleure qualité (accroit le temps de traitement et le besoin en mémoire)
|
||||
TP_LOCALLAB_FFTW;ƒ - Utilise Fast Fourier Transform
|
||||
TP_LOCALLAB_FFTW2;ƒ - Utilise Fast Fourier Transform (TIF, JPG,..)
|
||||
TP_LOCALLAB_FFTWBLUR;ƒ - Utilise toujours Fast Fourier Transform
|
||||
TP_LOCALLAB_FULLIMAGE;Calcule les valeurs Noir Ev - Blanc Ev - sur l'image entière
|
||||
TP_LOCALLAB_FULLIMAGE;Calcule les valeurs NoirEv-blancEv - image entière
|
||||
TP_LOCALLAB_FULLIMAGELOG_TOOLTIP;Calcule les valeurs Ev sur l'image entière.
|
||||
TP_LOCALLAB_GAM;Gamma
|
||||
TP_LOCALLAB_GAMFRA;Courbe Réponse Tonale (TRC)
|
||||
@ -1993,12 +1999,13 @@ TP_LOCALLAB_GUIDSTRBL_TOOLTIP;Force du filtre guidé
|
||||
TP_LOCALLAB_GUIDEPSBL_TOOLTIP;Détail - agit sur la répartition du filtre guidé, les valeurs négatives simulent un flou gaussien
|
||||
TP_LOCALLAB_HHMASK_TOOLTIP;Ajustements fin de la teinte par exemple pour la peau.
|
||||
TP_LOCALLAB_HIGHMASKCOL;Hautes lumières masque
|
||||
TP_LOCALLAB_HLH;Courbes H
|
||||
TP_LOCALLAB_HLH;H
|
||||
TP_LOCALLAB_IND;Independant (souris)
|
||||
TP_LOCALLAB_INDSL;Independant (souris + curseurs)
|
||||
TP_LOCALLAB_INVERS;Inverse
|
||||
TP_LOCALLAB_INVERS_TOOLTIP;Si sélectionné (inverse) moins de possibilités.\n\nAlternative\nPremier Spot:\n image entière - delimiteurs en dehors de la prévisualisation\n RT-spot forme sélection : rectangle. Transition 100\n\nDeuxième spot : Spot Exclusion
|
||||
TP_LOCALLAB_INVBL_TOOLTIP;Alternative\nPremier Spot:\n image entière - delimiteurs en dehors de la prévisualisation\n RT-spot forme sélection : rectangle. Transition 100\n\nDeuxième spot : Spot Exclusion
|
||||
TP_LOCALLAB_INVMASK;Algorithme inverse
|
||||
TP_LOCALLAB_ISOGR;Plus gros (ISO)
|
||||
TP_LOCALLAB_LABBLURM;Masque Flouter
|
||||
TP_LOCALLAB_LABEL;Ajustements Locaux
|
||||
@ -2017,7 +2024,7 @@ TP_LOCALLAB_LC_FFTW_TOOLTIP;FFT améliore la qualité et autorise de grands rayo
|
||||
TP_LOCALLAB_LC_TOOLNAME;Constraste Local & Ondelettes - 7
|
||||
TP_LOCALLAB_LEVELBLUR;Maximum Flouter
|
||||
TP_LOCALLAB_LEVELLOCCONTRAST_TOOLTIP;En abscisse le contraste local (proche du concept de luminance). En ordonnée, amplification ou reduction du contraste local.
|
||||
TP_LOCALLAB_LEVELWAV;Ψ Ondelettes Niveaux
|
||||
TP_LOCALLAB_LEVELWAV;Ondelettes Niveaux
|
||||
TP_LOCALLAB_LEVELWAV_TOOLTIP;Le niveau est automatiquement adapté à la taille du spot et de la prévisualisation.\nDu niveau 9 taille max 512 jusqu'au niveau 1 taille max = 4
|
||||
TP_LOCALLAB_LEVFRA;Niveaux
|
||||
TP_LOCALLAB_LIGHTNESS;Luminosité
|
||||
@ -2029,40 +2036,108 @@ TP_LOCALLAB_LIST_TOOLTIP;Vous pouvez choisir 3 niveaux de complexité pour chaqu
|
||||
TP_LOCALLAB_LMASK_LEVEL_TOOLTIP;Donne priorité à l'action sur les tons moyens et hautes lumières en choisissant les niveaux concernés d'ondelettes
|
||||
TP_LOCALLAB_LMASK_LL_TOOLTIP;Vous permet de modifier librement le contraste du masque. Peut amener de artefacts.
|
||||
TP_LOCALLAB_LOCCONT;Masque Flou
|
||||
TP_LOCALLAB_LOC_CONTRAST;Contraste Local & Ondelettes
|
||||
TP_LOCALLAB_LOC_CONTRASTPYR;Ψ Pyramide 1:
|
||||
TP_LOCALLAB_LOC_CONTRASTPYR2;Ψ Pyramide 2:
|
||||
TP_LOCALLAB_LOC_CONTRASTPYR2LAB; Contr. par niveaux- Tone Mapping - Cont.Dir.
|
||||
TP_LOCALLAB_LOC_CONTRASTPYRLAB; Filtre Gradué - Netteté bords - Flouter
|
||||
TP_LOCALLAB_LOC_CONTRAST;Contr. Local & Ondelettes
|
||||
TP_LOCALLAB_LOC_CONTRASTPYR;Pyramide 1:
|
||||
TP_LOCALLAB_LOC_CONTRASTPYR2;Pyramide 2:
|
||||
TP_LOCALLAB_LOC_CONTRASTPYR2LAB; Contr. par niveaux/TM/Cont.Dir.
|
||||
TP_LOCALLAB_LOC_CONTRASTPYRLAB; Filtre Gradué/Netteté bords/Flou
|
||||
TP_LOCALLAB_LOC_RESIDPYR;Image Residuelle
|
||||
TP_LOCALLAB_LOG;Codage log
|
||||
TP_LOCALLAB_LOG1FRA;Ajustements Image
|
||||
TP_LOCALLAB_LOG2FRA;Conditions de visionnage
|
||||
TP_LOCALLAB_LOGAUTO;Automatique
|
||||
TP_LOCALLAB_LOGAUTO_TOOLTIP;Presser ce bouton va amner une évaluation an evaluation de l'amplitude dynamique et du point gris "source" (Si "Automatique" Source gris activé).\nPour être autorisé à retoucher les valeurs automatiques, presser le bouton à nouveau
|
||||
TP_LOCALLAB_LOGAUTOGRAY_TOOLTIP;Calcule automatiquement la 'luminance moyenne' pour les conditons de prise de vue quand le bouton ‘Automatique’ dans Niveaux d'Exposition Relatif est pressé.
|
||||
TP_LOCALLAB_LOGAUTO_TOOLTIP;Presser ce bouton va amener une évaluation an evaluation de l'amplitude dynamique et du point gris "source" (Si "Automatique" Source gris activé).\nPour être autorisé à retoucher les valeurs automatiques, presser le bouton à nouveau
|
||||
TP_LOCALLAB_LOGBASE_TOOLTIP;Défaut = 2.\nValeurs inférieures à 2 réduisent l'action de l'algorithme, les ombres sont plus sombres, les hautes lumières plus brillantes.\nValeurs supérieures à 2 changent l'action de l'algorithme, les ombres sont plus grises, les hautes lumières lavées
|
||||
TP_LOCALLAB_LOGBLACKWHEV_TOOLTIP;Valeurs estimées de la plage Dynamique - Noir Ev et Blanc Ev
|
||||
TP_LOCALLAB_LOGCATAD_TOOLTIP;L'adaptation chromatique vous permet d'interpreter une couleur en se référant à son environnement spatio-temporel.\nUtile lorsque la balance des blancs est loin de D50.\nAdapte les couleurs à l'illuminant du périphérque de sortie.
|
||||
TP_LOCALLAB_LOGCOLORFL;Niveau de couleurs (M)
|
||||
TP_LOCALLAB_LOGCOLORF_TOOLTIP;Taux de perception de la teinte en relation au gris.\nIndicateur qu'un stimulus apparaît plus ou moins coloré.
|
||||
TP_LOCALLAB_LOGCONQL;Contraste (Q)
|
||||
TP_LOCALLAB_LOGCONTL;Contraste (J)
|
||||
TP_LOCALLAB_LOGCONTL_TOOLTIP;Contraste (J) CIECAM16 prend en compte l'accroissement de la perception colorée avec la luminance.
|
||||
TP_LOCALLAB_LOGCONTQ_TOOLTIP;Contraste (Q) CIECAM16 prend en compte l'accroissement de la perception colorée avec la brillance.
|
||||
TP_LOCALLAB_LOGDETAIL_TOOLTIP;Agit principalment sur les hautes fréquences.
|
||||
TP_LOCALLAB_LOGENCOD_TOOLTIP;Autorise 'Tone Mapping' avec codage Logarithmique (ACES).\nUtile pour images ous-exposées, ou avec une plage dynamique élévée.\n\nDeux étapes dans le processus : 1) Calculer Plage Dynamique 2) Adaptation par utilisateur
|
||||
TP_LOCALLAB_LOGEXP;Tous les outils
|
||||
TP_LOCALLAB_LOGFRA;Point gris source
|
||||
TP_LOCALLAB_LOGFRAME_TOOLTIP;Calcule ou utilise le niveau d'Exposition de l'image tôt dans le processus:\n Noir Ev, Blanc Ev et Point gris source.\n Prend en compte la compensation d'exposition principale.
|
||||
TP_LOCALLAB_LOGIMAGE_TOOLTIP;Prend en compte les variables Ciecam (principalement Contraste 'J' et Saturation 's', et aussi 'avancé' Contraste 'Q' , Brillance 'Q', Luminosité (J), Niveau de couleurs (M)).
|
||||
TP_LOCALLAB_LOGLIGHTL;Luminosité (J)
|
||||
TP_LOCALLAB_LOGLIGHTL_TOOLTIP;Proche de luminosité (L*a*b*), prend en compte l'accroissement de la perception colorée.
|
||||
TP_LOCALLAB_LOGLIGHTQ;Brillance (Q)
|
||||
TP_LOCALLAB_LOGLIGHTQ_TOOLTIP;Taux de perception de lumière émanant d'un stimulus.\nIndicateur qu'un stimulus apparaît être plus ou moins brillant, clair.
|
||||
TP_LOCALLAB_LOGLIN;Logarithme mode
|
||||
TP_LOCALLAB_LOGPFRA;Niveaux d'Exposition relatif
|
||||
TP_LOCALLAB_LOGREPART;Force
|
||||
TP_LOCALLAB_LOGSATURL_TOOLTIP;Saturation (s) CIECAM16 correspond à la couleur d'un stimulus en relation avec sa propre brillance.\nAgit principalement sur les tons moyens et hauts.
|
||||
TP_LOCALLAB_LOGSCENE_TOOLTIP;Correspond aux conditions de prise de vue.
|
||||
TP_LOCALLAB_LOGSURSOUR_TOOLTIP;Change les tons et couleurs en prenant en compte les conditions de prise de vue.\n\n<b>Moyen</b>: Environnement lumineux moyen (standard). L'image ne change pas.\n\n<b>Tamisé</b>: Environnement tamisé. L'iamge va devenir un peu plus claire.
|
||||
TP_LOCALLAB_LOGSRCGREY_TOOLTIP;Estime la valeur du point gris de l'image, tôt dans le processus
|
||||
TP_LOCALLAB_LOGTARGGREY_TOOLTIP;Vous pouvez changer cette valeur pour l'adapter à votre goût.
|
||||
TP_LOCALLAB_LOG_TOOLNAME;Codage log - 0
|
||||
TP_LOCALLAB_LUM;Courbes LL - CC
|
||||
TP_LOCALLAB_LOGVIEWING_TOOLTIP;Correspond au medium sur lequel l'image finale sera vue (moniteur, TV, projecteur, imprimante,..), ainsi que son environnement.
|
||||
TP_LOCALLAB_LUM;LL - CC
|
||||
TP_LOCALLAB_LUMADARKEST;Plus Sombre
|
||||
TP_LOCALLAB_LUMASK;Maqsue Luminance arrière plan
|
||||
TP_LOCALLAB_LUMASK;Masque Luminance arrière plan
|
||||
TP_LOCALLAB_LUMASK_TOOLTIP;Ajuste le gris de l'arrière plan du masque dans Montrer Masque (Masque et modifications)
|
||||
TP_LOCALLAB_LUMAWHITESEST;Plus clair
|
||||
TP_LOCALLAB_LUMONLY;Luminance seulement
|
||||
TP_LOCALLAB_MASKCOM;Masque couleur Commun
|
||||
TP_LOCALLAB_MASKCOM_TOOLTIP;Ces masques travaillent comme les autres outils, ils prennet en compte Etendue.\nIls sont différents des autres masques qui complètent un outil (Couleur et Lumière, Exposition...)
|
||||
TP_LOCALLAB_MASKDDECAY;Force des transitions
|
||||
TP_LOCALLAB_MASKDECAY_TOOLTIP;Gère le taux des tranistions des niveaux gris dans le masque.\n Transition = 1 linéaire, Transition > 1 transitions paraboliques rapides, Transitions < 1 transitions progressives
|
||||
TP_LOCALLAB_MASFRAME;Masque et Fusion
|
||||
TP_LOCALLAB_MASFRAME_TOOLTIP;For all masks.\nTake into account deltaE image to avoid retouching the selection area when sliders gamma mask, slope mask, chroma mask and curves contrast , levels contrasts, and mask blur, structure(if enabled tool) are used.\nDisabled in Inverse
|
||||
TP_LOCALLAB_MASK;Masque
|
||||
TP_LOCALLAB_MASK2;Courbe de Contraste
|
||||
TP_LOCALLAB_MASKCOL;Masque Courbes
|
||||
TP_LOCALLAB_MASKCURVE_TOOLTIP;Si la courbe est au sommet, le masque est compétement noir aucune transformation n'est réalisée par le masque sur l'image.\nQuand vous descendez la courbe, progressivement le masque va se colorer et s'éclaicir, l'image change de plus en plus.\n\nIl est recommendé (pas obligatoire) de positionner le sommet des courbes curves sur la ligne de transition grise qui représnte les références (chroma, luma, couleur).
|
||||
TP_LOCALLAB_MASKLCTHRMID;Zones grises de-bruite lumina
|
||||
TP_LOCALLAB_MASKLCTHRMIDCH;Zones grises de-bruite chroma
|
||||
TP_LOCALLAB_MASKLC_TOOLTIP;Vous autorise à cibler le de-bruite en se basant sur les informations du masque dans L(L) ou LC(H) (Masque et Modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n si le masque est très sombre - sous le seuil 'sombre' - de-bruite sera accru si renforce > 1.\n si le masque est clair - au-dessus du seuil 'clair' - de-bruite sera progressivement réduit.\n entre les deux, de-bruite sera maintenu aux réglages sans masques.
|
||||
TP_LOCALLAB_MASKLCTHR;Seuil luminance zones claires
|
||||
TP_LOCALLAB_MASKLCTHRLOW;Seuil luminance zones sombres
|
||||
TP_LOCALLAB_MASKLNOISELOW;Renf. de-bruite sombres/claires
|
||||
TP_LOCALLAB_MASKH;Courbe teinte
|
||||
TP_LOCALLAB_MASKRECOTHRES;Seuil de Récupération
|
||||
TP_LOCALLAB_MASKDE_TOOLTIP;Utilisé pour diriger l'action de de-bruite basé sur les informations des courbes masques L(L) ou LC(H) (Masque et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Si le masque est en dessous du seuil sombre le De-bruite sera appliqué progressivement.\n Si le masque est au-dessus du seuil 'clair', le De-bruite sera appliqué progressivement.\n Entre les deux, les réglages sans De-bruite seront maintenus, sauf si vous agissez sur les curseurs "Zones grise dé-bruite luminance" or "Zones grise de-bruite chrominance".
|
||||
TP_LOCALLAB_MASKGF_TOOLTIP;Utilisé pour diriger l'action de Filtre Guidé basé sur les informations des courbes masques L(L) ou LC(H) (Masque et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Si le masque est en dessous du seuil sombre le Filtre Guidé sera appliqué progressivement.\n Si le masque est au-dessus du seuil 'clair', le Filtre Guidé sera appliqué progressivement.\n Entre les deux, les réglages sans Filtre Guidé seront maintenus.
|
||||
TP_LOCALLAB_MASKRECOL_TOOLTIP;Utilisé pour moduler l'action des réglages de Couleur et Lumières en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Couleurs et Lumières \n Entre ces 2 valeurs, les valeurs de Couleurs et Lumières seront appliquées
|
||||
TP_LOCALLAB_MASKREEXP_TOOLTIP;Utilisé pour moduler l'action des réglages de Compression dynamique et Exposition en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Compression dynamique et Exposition \n Entre ces 2 valeurs, les valeurs de Compression dynamique et Exposition seront appliquées
|
||||
TP_LOCALLAB_MASKRESH_TOOLTIP;Utilisé pour moduler l'action des réglages de Ombres et Lumières en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Ombres et Lumières \n Entre ces 2 valeurs, les valeurs de Ombres et Lumières seront appliquées
|
||||
TP_LOCALLAB_MASKRESCB_TOOLTIP;Utilisé pour moduler l'action des réglages de CBDL (Luminance) en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par CBDL \n Entre ces 2 valeurs, les valeurs de CBDL seront appliquées
|
||||
TP_LOCALLAB_MASKRESRETI_TOOLTIP;Utilisé pour moduler l'action des réglages de Retinex (Luminance) en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Retinex \n Entre ces 2 valeurs, les valeurs de Retinex seront appliquées
|
||||
TP_LOCALLAB_MASKRESTM_TOOLTIP;Utilisé pour moduler l'action des réglages de Compression tonale en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Compression tonale \n Entre ces 2 valeurs, les valeurs de Compression tonale seront appliquées
|
||||
TP_LOCALLAB_MASKRESVIB_TOOLTIP;Utilisé pour moduler l'action des réglages de Vibrance - Chaud et froid en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Vibrance - Chaud et froid \n Entre ces 2 valeurs, les valeurs de Vibrance - Chaud et froid seront appliquées
|
||||
TP_LOCALLAB_MASKRESWAV_TOOLTIP;Utilisé pour moduler l'action des réglages de Contraste local et ondelettes en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Contraste local et ondelettes \n Entre ces 2 valeurs, les valeurs de Contraste local et Ondelettes seront appliquées
|
||||
TP_LOCALLAB_MASKRELOG_TOOLTIP;Utilisé pour moduler l'action des réglages de Codage Log en se basant sur les informations contenues dans les courbes des masques L(L) ou LC(H) (Masques et modifications).\n Les masques L(L) ou LC(H) doivent être activés pour utiliser cette fonction.\n Les zones ‘sombres’ et ‘claires’ en dessous du seuil sombre et au dessus du seuil clair seront restaurés progressivement à leurs valeurs originales avant d'avoir été modifiées par Codage Log - peut être utilisé pour récupérer les hautes lumières de 'Couleur propagation' \n Entre ces 2 valeurs, les valeurs de Codage Log seront appliquées
|
||||
TP_LOCALLAB_MASKHIGTHRESC_TOOLTIP;Limite des tons clairs au-dessus de laquelle Couleur et Lumière sera restauré progressivement à leurs valeurs avant d'être modifiés par Couleur et Lumières .\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’, 'masque flouter', ‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKHIGTHRESS_TOOLTIP;Limite des tons clairs au-dessus de laquelle Ombres et Lumière sera restauré progressivement à leurs valeurs avant d'être modifiés par Ombres et Lumières .\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKHIGTHRESCB_TOOLTIP;Limite des tons clairs au-dessus de laquelle CBDL (luminance) sera restauré progressivement à leurs valeurs avant d'être modifiés par CBDL.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKHIGTHRESRETI_TOOLTIP;Limite des tons clairs au-dessus de laquelle Retinex (luminance) sera restauré progressivement à leurs valeurs avant d'être modifiés par Retinex.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKHIGTHRESTM_TOOLTIP;Limite des tons clairs au-dessus de laquelle Compression tonale sera restauré progressivement à leurs valeurs avant d'être modifiés par Compression tonale.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Maqsue luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKHIGTHRESVIB_TOOLTIP;Limite des tons clairs au-dessus de laquelle Vibrance - Chaud Froid sera restauré progressivement à leurs valeurs avant d'être modifiés par Vibrance - Chaud Froid.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKHIGTHRESWAV_TOOLTIP;Limite des tons clairs au-dessus de laquelle Contraste local - Ondelettes sera restauré progressivement à leurs valeurs avant d'être modifiés par Contraste local - Ondelettes.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKHIGTHRESE_TOOLTIP;Limite des tons clairs au-dessus de laquelle Compression dynamique et Exposition sera restauré progressivement à leurs valeurs avant d'être modifiés par Compression dynamique et Exposition.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKHIGTHRESL_TOOLTIP;Limite des tons clairs au-dessus de laquelle Codage Log sera restauré progressivement à leurs valeurs avant d'être modifiés par Codage Log.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKHIGTHRESL_TOOLTIP;Limite des tons clairs au-dessus de laquelle Codage Log sera restauré progressivement à leurs valeurs avant d'être modifiés par Codage Log.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKHIGTHRESD_TOOLTIP;Limite des tons clairs au-dessus de laquelle de-bruite sera appliquée progressivement.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’,‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées.\n Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKHIGTHRES_TOOLTIP;Limite des tons clairs au-dessus de laquelle Filtre Guidé sera appliquée progressivement.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’,‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées.\n Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRESC_TOOLTIP;Limite des tons sombres au-dessous de laquelle Couleur et Lumière sera restauré progressivement à leurs valeurs avant d'être modifiés par Couleur et Lumières .\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’, 'masque flouter', ‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRESS_TOOLTIP;Limite des tons sombres au-dessous de laquelle Ombres et Lumière sera restauré progressivement à leurs valeurs avant d'être modifiés par Ombres et Lumières .\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRESCB_TOOLTIP;Limite des tons sombres au-dessous de laquelle CBDL (luminance) sera restauré progressivement à leurs valeurs avant d'être modifiés par CBDL.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRESRETI_TOOLTIP;Limite des tons sombres au-dessous de laquelle Retinex (luminance) sera restauré progressivement à leurs valeurs avant d'être modifiés par Retinex.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRESTM_TOOLTIP;Limite des tons sombres au-dessous de laquelle Compression tonale sera restauré progressivement à leurs valeurs avant d'être modifiés par Compression tonale.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRESVIB_TOOLTIP;Limite des tons sombres au-dessous de laquelle Vibrance - Chaud Froid sera restauré progressivement à leurs valeurs avant d'être modifiés par Vibrance - Chaud Froid.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRESWAV_TOOLTIP;Limite des tons sombres au-dessous de laquelle Contraste local - Ondelettes sera restauré progressivement à leurs valeurs avant d'être modifiés par Contraste local - Ondelettes.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRESE_TOOLTIP;Limite des tons sombres au-dessous de laquelle Compression dynamique et Exposition sera restauré progressivement à leurs valeurs avant d'être modifiés par Compression dynamique et Exposition.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRESL_TOOLTIP;Limite des tons sombres au-dessous de laquelle Codage Log sera restauré progressivement à leurs valeurs avant d'être modifiés par Codage Log.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRESL_TOOLTIP;Limite des tons sombres au-dessous de laquelle Codage Log sera restauré progressivement à leurs valeurs avant d'être modifiés par Codage Log.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris:‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’.\n Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées. Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRESD_TOOLTIP;Limite des tons sombres au-dessous de laquelle de-bruite sera appliquée progressivement.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’,‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées.\n Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKLOWTHRES_TOOLTIP;Limite des tons sombres au-dessous de laquelle Filtre Guidé sera appliquée progressivement.\n Vous pouvez utiliser certains des outils de ‘Masques et modifications’ pour changer les niveaux de gris: ‘masque structure’,‘rayon adoucir’, ‘Gamma et pente’, ‘courbe de Contraste’, ‘Niveau contraste local ondelettes’.Utiliser une ‘ancre de vérification couleur’ sur le masque pour voir quelle zones seront affectées.\n Soyez attentifs à ce que dans 'Réglages' Masque luminance arrière plan = 0
|
||||
TP_LOCALLAB_MASKUSABLE;Masque activé (Masque & modifications)
|
||||
TP_LOCALLAB_MASKUNUSABLE;Masque désactivé (Masque & modifications)
|
||||
TP_LOCALLAB_MASK_TOOLTIP;Vous pouvez activer plusieurs masques pour un simple outil, ceci nécessite d'activer un autre outil (mais sans utilser l'outil : curseurs à 0,...)où est le masque que vous souhaitez activer.\n\nVous pouvez aussi dupliquer le RT-spot et le placer juste à côté de l'autre,les variations de références autorisent un travail fin sur les images.
|
||||
TP_LOCALLAB_MED;Medium
|
||||
TP_LOCALLAB_MEDIAN;Median Bas
|
||||
@ -2106,7 +2181,7 @@ TP_LOCALLAB_MERTHR;Difference
|
||||
TP_LOCALLAB_MERTWE;Exclusion
|
||||
TP_LOCALLAB_MERTWO;Soustrait
|
||||
TP_LOCALLAB_METHOD_TOOLTIP;'Enhanced + chroma denoise' significantly increases processing times.\nBut reduce artifacts.
|
||||
TP_LOCALLAB_MLABEL;Récupère les données Min=%1 Max=%2 (Clip - décalage)
|
||||
TP_LOCALLAB_MLABEL;Réc. données Min=%1 Max=%2
|
||||
TP_LOCALLAB_MLABEL_TOOLTIP;'Doit être' près de min=0 max=32768 (log mode) mais d'autres valeurs sont possibles.\nVous pouvez agir sur les données récupérées (CLIP) et décalage pour normaliser.\n\nRécupère les données image sans mélange.
|
||||
TP_LOCALLAB_MODE_EXPERT;Avancé
|
||||
TP_LOCALLAB_MODE_NORMAL;Standard
|
||||
@ -2117,15 +2192,24 @@ TP_LOCALLAB_MRTHR;Image Originale
|
||||
TP_LOCALLAB_MRTWO;Short Curves 'L' Mask
|
||||
TP_LOCALLAB_MULTIPL_TOOLTIP;Autorise la retouche des tons sur une large plage : -18EV +4EV. Le remier curseur agit sur -18EV and -6EV. Le dernier curseur agit sur les tons au-dessus de 4EV
|
||||
TP_LOCALLAB_NEIGH;Rayon
|
||||
TP_LOCALLAB_NLDENOISE_TOOLTIP;"Récupération des détails" agit sur un Laplacien pour privilégier l'action de denoise sur les aplats plutôt que sur les structures.
|
||||
TP_LOCALLAB_NLDENOISENLPAT_TOOLTIP;Agir sur ce curseur pour adapter le niveau de débruitage à la taille des objets à traiter.
|
||||
TP_LOCALLAB_NLDENOISENLRAD_TOOLTIP;Plus la valeur sera importante, plus le débruitage sera intense.\nMais cela a une forte incidence sur les temps de traitement.
|
||||
TP_LOCALLAB_NLFRAME_TOOLTIP;"Débruitage par morceaux" réalise une moyenne de la totalité des valeurs des pixels contenus dans l'image, pondérées en fonction de leur similarité avec le résultat attendu (pixel cible).\nL'algoritme permet d’amoindrir la perte de détails au sein de l'image.\nSeul le bruit de luminance est pris en compte, le bruit de chrominance est traité de manière plus performante par le couple ondelettes / Fourier (DCT).\nPeut être utilisé en conjonction avec 'ondelettes' ou isolé.\nLa taille du RT-Spot doit être supérieure à 150x150 pixels (sortie TIF/JPG).
|
||||
TP_LOCALLAB_NLFRA;Débruitage par morceaux - Luminance
|
||||
TP_LOCALLAB_NLLUM;Force
|
||||
TP_LOCALLAB_NLDET;Récupération des détails
|
||||
TP_LOCALLAB_NLPAT;Taille maximum du morceau
|
||||
TP_LOCALLAB_NLRAD;Taille maximum du rayon
|
||||
TP_LOCALLAB_NOISE_TOOLTIP;Ajoute du bruit de luminance
|
||||
TP_LOCALLAB_NOISECHROCOARSE;Chroma gros (Ond)
|
||||
TP_LOCALLAB_NOISECHROC_TOOLTIP;Si supérieur à zéro, algorithme haute qualité est activé.\nGros est sélectionné si curseur >=0.2
|
||||
TP_LOCALLAB_NOISECHRODETAIL;Récupération des détails Chroma (DCT ƒ)
|
||||
TP_LOCALLAB_NOISECHRODETAIL;Récup. détails Chroma(DCT)
|
||||
TP_LOCALLAB_NOISECHROFINE;Chroma fin (Ond)
|
||||
TP_LOCALLAB_NOISEDETAIL_TOOLTIP;Désactivé si curseur = 100
|
||||
TP_LOCALLAB_NOISELEQUAL;Egalisateurs balnc-noir
|
||||
TP_LOCALLAB_NOISELEQUAL;Egalisateurs blanc-noir
|
||||
TP_LOCALLAB_NOISELUMCOARSE;Luminance gros (ond)
|
||||
TP_LOCALLAB_NOISELUMDETAIL;Récupération Luminance fin(DCT ƒ)
|
||||
TP_LOCALLAB_NOISELUMDETAIL;Récup. Luminance détail(DCT)
|
||||
TP_LOCALLAB_NOISELUMFINE;Luminance fin 1 (ond)
|
||||
TP_LOCALLAB_NOISELUMFINETWO;Luminance fin 2 (ond)
|
||||
TP_LOCALLAB_NOISELUMFINEZERO;Luminance fin 0 (ond)
|
||||
@ -2136,7 +2220,7 @@ TP_LOCALLAB_OFFSETWAV;Décalage
|
||||
TP_LOCALLAB_OPACOL;Opacité
|
||||
TP_LOCALLAB_ORIGLC;Fusion seulement avec image originale
|
||||
TP_LOCALLAB_ORRETILAP_TOOLTIP;Agit sur un deuxième seuil Laplacien, pour prendre en compte ΔE pour différencier l'action nottament avec l'arrière plan (différent de Etendue)
|
||||
TP_LOCALLAB_ORRETISTREN_TOOLTIP;Aagit sur un seuil Laplacien, plus grande est l'action, plus les différences de contraste seront réduites
|
||||
TP_LOCALLAB_ORRETISTREN_TOOLTIP;Agit sur un seuil Laplacien, plus grande est l'action, plus les différences de contraste seront réduites
|
||||
TP_LOCALLAB_PASTELS2;Vibrance
|
||||
TP_LOCALLAB_PDE;Atténuation de Contraste - Compression dynamique
|
||||
TP_LOCALLAB_PDEFRA;Contraste atténuation ƒ
|
||||
@ -2147,8 +2231,12 @@ TP_LOCALLAB_PREVSHOW;Montrer tous les réglages
|
||||
TP_LOCALLAB_PROXI;ΔE Affaiblissement
|
||||
TP_LOCALLAB_QUALCURV_METHOD;Types de Courbes
|
||||
TP_LOCALLAB_QUAL_METHOD;Qualité globale
|
||||
TP_LOCALLAB_QUACONSER;Conservatif
|
||||
TP_LOCALLAB_QUAAGRES;Aggressif
|
||||
TP_LOCALLAB_QUANONEWAV;Débruit. par morceaux-luminance seulement
|
||||
TP_LOCALLAB_QUANONEALL;Rien
|
||||
TP_LOCALLAB_RADIUS;Rayon
|
||||
TP_LOCALLAB_RADIUS_TOOLTIP;Above Radius 30 Use Fast Fourier Transform
|
||||
TP_LOCALLAB_RADIUS_TOOLTIP;Au-dessus de Rayon 30 Utilise 'Fast Fourier Transform'
|
||||
TP_LOCALLAB_RADMASKCOL;Rayon adoucir
|
||||
TP_LOCALLAB_RECT;Rectangle
|
||||
TP_LOCALLAB_RECURS;Réferences Récursives
|
||||
@ -2166,7 +2254,7 @@ TP_LOCALLAB_RESIDHI;Hautes lumières
|
||||
TP_LOCALLAB_RESIDHITHR;Hautes lumières seuil
|
||||
TP_LOCALLAB_RESIDSHA;Ombres
|
||||
TP_LOCALLAB_RESIDSHATHR;Ombres seuil
|
||||
TP_LOCALLAB_RETI;De-brume - Retinex Fort contraste
|
||||
TP_LOCALLAB_RETI;De-brume - Retinex
|
||||
TP_LOCALLAB_RETIFRA;Retinex
|
||||
TP_LOCALLAB_RETIM;Original Retinex
|
||||
TP_LOCALLAB_RETITOOLFRA;Retinex Outils
|
||||
@ -2206,7 +2294,7 @@ TP_LOCALLAB_SH1;Ombres Lumières
|
||||
TP_LOCALLAB_SH2;Egaliseur
|
||||
TP_LOCALLAB_SHADEX;Ombres
|
||||
TP_LOCALLAB_SHADEXCOMP;Compression ombres & profondeur tonale
|
||||
TP_LOCALLAB_SHADHIGH;Ombres/Lumières - Egaliseur tonal
|
||||
TP_LOCALLAB_SHADHIGH;Ombres/Lumières&Egaliseur
|
||||
TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP;Peut être utilisé - ou en complement - du module Exposition dans les cas difficiles.\nUtiliser réduction du bruit Denoise peut être nécessaire : éclaicir les ombres.\n\nPeut être utilisé comme un filtre gradué (augmenter Etendue)
|
||||
TP_LOCALLAB_SHAMASKCOL;Ombres
|
||||
TP_LOCALLAB_SHADMASK_TOOLTIP;Relève les ombres du masque de la même manière que l'algorithme "ombres/lumières"
|
||||
@ -2240,9 +2328,10 @@ TP_LOCALLAB_SHOWMASKTYP3;Flouter & Bruit + De-bruite
|
||||
TP_LOCALLAB_SHOWMASKTYP_TOOLTIP;Masque et modifications peuvent être choisis.\nFlouter et bruit: dans ce cas il n'est pas utilisé pour 'Réduction du bruit'.\nRéduction du bruit : dans ce cas il n'est pas utilisé pour 'flouter et bruit'.\n\nFlouter et bruit + Réduction du bruit : le masque est partagé, faire attention à 'montrer modifications' et 'Etendue'
|
||||
TP_LOCALLAB_SHOWMNONE;Montrer image modifiée
|
||||
TP_LOCALLAB_SHOWMODIF;Montrer modifications sans masque
|
||||
TP_LOCALLAB_SHOWMODIF2;Montrer modifications
|
||||
TP_LOCALLAB_SHOWMODIFMASK;Montrer modifications avec masque
|
||||
TP_LOCALLAB_SHOWNORMAL;Normalise luminance (non)
|
||||
TP_LOCALLAB_SHOWPLUS;Masque et modifications - Adoucir-flouter & De-bruite
|
||||
TP_LOCALLAB_SHOWPLUS;Masque et modifications
|
||||
TP_LOCALLAB_SHOWPOISSON;Poisson (pde ƒ)
|
||||
TP_LOCALLAB_SHOWR;Masque et modifications
|
||||
TP_LOCALLAB_SHOWREF;Prévisualisation ΔE
|
||||
@ -2259,7 +2348,7 @@ TP_LOCALLAB_SIM;Simple
|
||||
TP_LOCALLAB_SLOMASKCOL;Pente (slope)
|
||||
TP_LOCALLAB_SLOMASK_TOOLTIP;Gamma et Pente (Slope) autorise une transformation du masque en douceur et sans artefacts en modifiant progressivement "L" pour éviter les discontinuité.
|
||||
TP_LOCALLAB_SLOSH;Pente
|
||||
TP_LOCALLAB_SOFT;Lumière douce - Original Retinex
|
||||
TP_LOCALLAB_SOFT;Lumière douce/Orig. Retinex
|
||||
TP_LOCALLAB_SOFTM;Lumière douce (soft light)
|
||||
TP_LOCALLAB_SOFTMETHOD_TOOLTIP;Applique un mélange Lumière douce. Effectue une émulation de "dodge and burn" en utilisant l'algorithme original de retinex.
|
||||
TP_LOCALLAB_SOFTRADIUSCOL;Rayon adoucir
|
||||
@ -2268,6 +2357,7 @@ TP_LOCALLAB_SOFTRETI;Reduire artefact ΔE
|
||||
TP_LOCALLAB_SOFTRETI_TOOLTIP;Prend en compte ΔE pour améliorer Transmission map
|
||||
TP_LOCALLAB_SOFT_TOOLNAME;Lumière douce & Original Retinex - 6
|
||||
TP_LOCALLAB_SOURCE_GRAY;Valeur
|
||||
TP_LOCALLAB_SOURCE_ABS;Luminance absolue
|
||||
TP_LOCALLAB_SPECCASE; Cas spécifiques
|
||||
TP_LOCALLAB_SPECIAL;Usage Special des courbes RGB
|
||||
TP_LOCALLAB_SPECIAL_TOOLTIP;Seulement pour cette courbe RGB, désactive (ou réduit les effecs) de Etendue, masque...par exemple, si vous voulez rendre un effet "négatif".
|
||||
@ -2298,10 +2388,10 @@ TP_LOCALLAB_THRES;Seuil structure
|
||||
TP_LOCALLAB_THRESDELTAE;Seuil ΔE-Etendue
|
||||
TP_LOCALLAB_THRESRETI;Seuil
|
||||
TP_LOCALLAB_THRESWAV;Balance Seuil
|
||||
TP_LOCALLAB_TLABEL;TM Datas Min=%1 Max=%2 Mean=%3 Sigma=%4 (Seuil)
|
||||
TP_LOCALLAB_TLABEL;TM Min=%1 Max=%2 Mea=%3 Sig=%4
|
||||
TP_LOCALLAB_TLABEL2;TM Effectif Tm=%1 TM=%2
|
||||
TP_LOCALLAB_TLABEL_TOOLTIP;Transmission map result.\nMin and Max are used by Variance.\nTm=Min TM=Max of Transmission Map.\nYou can act on Threshold to normalize
|
||||
TP_LOCALLAB_TM;Compression tonale - Texture
|
||||
TP_LOCALLAB_TM;Compression tonale
|
||||
TP_LOCALLAB_TM_MASK;Utilise transmission map
|
||||
TP_LOCALLAB_TONEMAPESTOP_TOOLTIP;Ce paramètre affecte la sensibilité aux bords.\n Plus grand il est, plus la luminosité change peut être considéré comme un bord.\n Si réglé à zéro 'compression tonale' va avoir un effet similaire à masque flou.
|
||||
TP_LOCALLAB_TONEMAPGAM_TOOLTIP;Gamma déplace l'action de 'compression tonale' des ombres vers les lumières.
|
||||
@ -2317,7 +2407,7 @@ TP_LOCALLAB_TRANSIT;Transition - Gradient
|
||||
TP_LOCALLAB_TRANSITGRAD;Transition différentiation XY
|
||||
TP_LOCALLAB_TRANSITGRAD_TOOLTIP;Change la transition des abscisses vers les ordonnées
|
||||
TP_LOCALLAB_TRANSITVALUE;Transition valeur
|
||||
TP_LOCALLAB_TRANSITWEAK;Transition affaiblissement (linéaire-log)
|
||||
TP_LOCALLAB_TRANSITWEAK;Transition affaiblissement (lin-log)
|
||||
TP_LOCALLAB_TRANSITWEAK_TOOLTIP;Ajuste l'affaiblissement de la transition : change le processus d'affaiblissement - 1 linéaire - 2 parabolique - 3 cubique - ^25.\nPeut être utilisé en conjonction avec de très faibles valeurs de transition pour traiter/réduire les défauts (CBDL, Ondelettes, Couleur et lumière)
|
||||
TP_LOCALLAB_TRANSIT_TOOLTIP;Ajuste la progressions de la transition enttre les zones affectées ou non affectées, comme un pourcentage du "rayon"
|
||||
TP_LOCALLAB_TRANSMISSIONGAIN;Transmission gain
|
||||
@ -2336,9 +2426,9 @@ TP_LOCALLAB_SHARP_TOOLNAME;Netteté - 8
|
||||
TP_LOCALLAB_LC_TOOLNAME;Constraste local & Ondelettes (Défauts) - 7
|
||||
TP_LOCALLAB_CBDL_TOOLNAME;Contraste par Niveau détail - 2
|
||||
TP_LOCALLAB_LOG_TOOLNAME;Codage log - 0
|
||||
TP_LOCALLAB_MASKCOM_TOOLNAME;Masque Commun Couleur - 13
|
||||
TP_LOCALLAB_MASKCOM_TOOLNAME;Masque Commun Couleur - 12
|
||||
TP_LOCALLAB_VIS_TOOLTIP;<b>Click</b> pour montrer/cacher le Spot sélectionné.\n<b>Ctrl</b>+<b>click</b> pour montrer/cacher tous les Spot.
|
||||
TP_LOCALLAB_WAMASKCOL;Ψ Niveau Ondelettes
|
||||
TP_LOCALLAB_WAMASKCOL;Niveau Ondelettes
|
||||
TP_LOCALLAB_WARM;Chaud - Froid & Artefacts de couleur
|
||||
TP_LOCALLAB_WARM_TOOLTIP;Ce curseur utilise l'algorithme Ciecam et agit comme une Balance des blancs, il prut réchauffer ou refroidir cool la zone concernée.\nIl peut aussi dans certains réduire les artefacts colorés.
|
||||
TP_LOCALLAB_WASDEN_TOOLTIP;De-bruite luminance pour les 3 premiers niveaux (fin).\nLa limite droite de la courbe correspond à gros : niveau 3 et au delà.
|
||||
@ -2375,18 +2465,18 @@ TP_LOCALLAB_WAVCOMPRE_TOOLTIP;Réalise un 'Tone-mapping' ou une réduction du co
|
||||
TP_LOCALLAB_WAVCOMP_TOOLTIP;Réalise un contrast local en fonction de la direction de la décomposition en ondelettes : horizontal, vertical, diagonal
|
||||
TP_LOCALLAB_WAVCON;Contraste par niveau
|
||||
TP_LOCALLAB_WAVCONTF_TOOLTIP;Similaire à Contrast By Detail Levels : en abscisse niveaux.
|
||||
TP_LOCALLAB_WAVDEN;de-bruite luminance par niveau (0 1 2 + 3 et plus)
|
||||
TP_LOCALLAB_WAVE;Ψ Ondelette
|
||||
TP_LOCALLAB_WAVDEN;de-bruite lum. par niveau
|
||||
TP_LOCALLAB_WAVE;Ondelette
|
||||
TP_LOCALLAB_WAVEDG;Contrast Local
|
||||
TP_LOCALLAB_WAVEEDG_TOOLTIP;Améliore la netteté prenant en compte la notion de "ondelettes bords".\nNécessite au moins que les 4 premiers niveaux sont utilisables
|
||||
TP_LOCALLAB_WAVGRAD_TOOLTIP;Filtre gradué pour Contraste local "luminance"
|
||||
TP_LOCALLAB_WAVHIGH;Ψ Ondelette haut
|
||||
TP_LOCALLAB_WAVLEV;Flouter par niveau
|
||||
TP_LOCALLAB_WAVLOW;Ψ Ondelette bas
|
||||
TP_LOCALLAB_WAVMASK;Ψ Niveau contraste local
|
||||
TP_LOCALLAB_WAVHIGH;Ondelette haut
|
||||
TP_LOCALLAB_WAVLEV;Flou par niveau
|
||||
TP_LOCALLAB_WAVLOW;Ondelette bas
|
||||
TP_LOCALLAB_WAVMASK;Contr. local (par niveau)
|
||||
TP_LOCALLAB_WAVEMASK_LEVEL_TOOLTIP;Amplitude des niveaux d'ondelettes utilisés par “Local contrast”
|
||||
TP_LOCALLAB_WAVMASK_TOOLTIP;Autorise un travail fin sur les masques niveaux de contraste (structure)
|
||||
TP_LOCALLAB_WAVMED;Ψ Ondelette normal
|
||||
TP_LOCALLAB_WAVMED;Ondelette normal
|
||||
TP_LOCALLAB_WEDIANHI;Median Haut
|
||||
TP_LOCALLAB_WHITE_EV;Blanc Ev
|
||||
TP_METADATA_EDIT;Appliquer les modifications
|
||||
@ -2514,7 +2604,7 @@ TP_RESIZE_APPLIESTO;S'applique à:
|
||||
TP_RESIZE_CROPPEDAREA;La zone recadrée
|
||||
TP_RESIZE_FITBOX;Boîte englobante
|
||||
TP_RESIZE_FULLIMAGE;L'image entière
|
||||
TP_RESIZE_H;H:
|
||||
TP_RESIZE_H;H
|
||||
TP_RESIZE_HEIGHT;Hauteur
|
||||
TP_RESIZE_LABEL;Redimensionnement
|
||||
TP_RESIZE_LANCZOS;Lanczos
|
||||
@ -2526,7 +2616,7 @@ TP_RESIZE_W;L:
|
||||
TP_RESIZE_WIDTH;Largeur
|
||||
TP_RETINEX_CONTEDIT_HSL;Égaliseur d'histogramme TSV
|
||||
TP_RETINEX_CONTEDIT_LAB;Égaliseur d'histogramme L*a*b*
|
||||
TP_RETINEX_CONTEDIT_LH;Égaliseur de teinte
|
||||
TP_RETINEX_CONTEDIT_LH;Égaliseur teinte:
|
||||
TP_RETINEX_CONTEDIT_MAP;Égaliseur
|
||||
TP_RETINEX_CURVEEDITOR_CD;L=f(L)
|
||||
TP_RETINEX_CURVEEDITOR_CD_TOOLTIP;Luminance en fonction de la luminance L=f(L)\nCorrige les données raw pour réduire halos et artéfacts.
|
||||
@ -2538,7 +2628,7 @@ TP_RETINEX_EQUAL;Égaliseur
|
||||
TP_RETINEX_FREEGAMMA;Gamma manuel
|
||||
TP_RETINEX_GAIN;Gain
|
||||
TP_RETINEX_GAINOFFS;Gain et Décalage (brillance)
|
||||
TP_RETINEX_GAINTRANSMISSION;Gain sur Transmission
|
||||
TP_RETINEX_GAINTRANSMISSION;Gain Transmission:
|
||||
TP_RETINEX_GAINTRANSMISSION_TOOLTIP;Amplifie ou réduit le canal transmission pour atteindre la luminance souhaitée.\nAbscisses: transmission ; min = 0, max = valeurs.\nOrdonnées: gain.
|
||||
TP_RETINEX_GAMMA;Gamma
|
||||
TP_RETINEX_GAMMA_FREE;Manuel
|
||||
@ -2591,7 +2681,7 @@ TP_RETINEX_TLABEL;CT Min=%1 Max=%2 Moyen=%3 Sigma=%4
|
||||
TP_RETINEX_TLABEL2;CT Tm=%1 TM=%2
|
||||
TP_RETINEX_TLABEL_TOOLTIP;Résultat du calcul de transmission.\nMin et Max sont utilisés par Variance.\nMoyen et Sigma.\nTm=Min TM=Niveau maximum de transmission.
|
||||
TP_RETINEX_TRANF;Transmission
|
||||
TP_RETINEX_TRANSMISSION;Modulation du canal 'transmission'
|
||||
TP_RETINEX_TRANSMISSION;Modulation 'transmission'
|
||||
TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission en fonction de la transmission.\nAbscisses: transmission des valeurs négatives (min), moyennes, et positives (max).\nOrdonnées: amplification ou réduction.
|
||||
TP_RETINEX_UNIFORM;Uniforme
|
||||
TP_RETINEX_VARIANCE;Contraste
|
||||
@ -2719,7 +2809,7 @@ TP_WAVELET_COMPCONT;Contraste
|
||||
TP_WAVELET_COMPGAMMA;Compression gamma
|
||||
TP_WAVELET_COMPGAMMA_TOOLTIP;Ajuster le gamma de l'image résiduelle vous permet d'équiilibrer les données de l'histogramme.
|
||||
TP_WAVELET_COMPTM;Compression tonale
|
||||
TP_WAVELET_CONTEDIT;Courbe de contraste 'Après'
|
||||
TP_WAVELET_CONTEDIT;Courbe contraste 'Après'
|
||||
TP_WAVELET_CONTR;Gamut
|
||||
TP_WAVELET_CONTRA;Contraste
|
||||
TP_WAVELET_CONTRAST_MINUS;Contraste -
|
||||
@ -2741,6 +2831,7 @@ TP_WAVELET_DAUB6;D6 - standard plus
|
||||
TP_WAVELET_DAUB10;D10 - moyen
|
||||
TP_WAVELET_DAUB14;D14 - haut
|
||||
TP_WAVELET_DAUB_TOOLTIP;Change les coéf. de Daubechies:\nD4 = Standard,\nD14 = Souvent les meilleurs performances, demande 10% de temps de traitement supplémentaire.\n\nAffecte la détection des bords ainsi que la qualité générale des premiers niveaux. Cependant la qualité n'est pas strcitement à ces coéficients et peut varier en fonction des images et des usages.
|
||||
TP_WAVELET_DENOISEHUE;Egalisateur teinte
|
||||
TP_WAVELET_DONE;Vertical
|
||||
TP_WAVELET_DTHR;Diagonal
|
||||
TP_WAVELET_DTWO;Horizontal
|
||||
@ -2806,7 +2897,7 @@ TP_WAVELET_NPTYPE;Pixels voisins
|
||||
TP_WAVELET_NPTYPE_TOOLTIP;Cet algorithme utilise la proximité d'un pixel et huit de ses voisins. Si moins de différence, les bords sont renforcés.
|
||||
TP_WAVELET_OPACITY;Opacité Bleu-Jaune
|
||||
TP_WAVELET_OPACITYW;Courbe de contraste d/v-h
|
||||
TP_WAVELET_OPACITYWL;Contraste local final
|
||||
TP_WAVELET_OPACITYWL;Contraste local
|
||||
TP_WAVELET_OPACITYWL_TOOLTIP;Modifie le contraste local final à la fin du traitement par ondelettes.\n\nLe côté gauche représente les plus faibles contrastes locaaux, progressant jusqu'aux plus grands contrastes locaux vers la droite.
|
||||
TP_WAVELET_PASTEL;Chroma des Pastels
|
||||
TP_WAVELET_PROC;Procédé
|
||||
|
@ -12,8 +12,8 @@ MultiUser=true
|
||||
|
||||
[File Browser]
|
||||
# Image filename extensions to be looked for, and their corresponding search state (0/1 -> skip/include)
|
||||
ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;
|
||||
ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;ori;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;0;1;1;1;1;1;1;1;1;1;1;1;
|
||||
|
||||
[Output]
|
||||
PathTemplate=%p1/converted/%f
|
||||
|
@ -13,8 +13,8 @@ UseSystemTheme=false
|
||||
|
||||
[File Browser]
|
||||
# Image filename extensions to be looked for, and their corresponding search state (0/1 -> skip/include)
|
||||
ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;
|
||||
ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;ori;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;0;1;1;1;1;1;1;1;1;1;1;1;
|
||||
|
||||
[Output]
|
||||
PathTemplate=%p1/converted/%f
|
||||
|
@ -14,8 +14,8 @@ UseSystemTheme=false
|
||||
|
||||
[File Browser]
|
||||
# Image filename extensions to be looked for, and their corresponding search state (0/1 -> skip/include)
|
||||
ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;1;1;1;1;1;1;1;1;1;1;
|
||||
ParseExtensions=3fr;arw;arq;cr2;cr3;crf;crw;dcr;dng;fff;iiq;jpg;jpeg;kdc;mef;mos;mrw;nef;nrw;orf;ori;pef;png;raf;raw;rw2;rwl;rwz;sr2;srf;srw;tif;tiff;x3f;
|
||||
ParseExtensionsEnabled=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;1;0;1;1;1;1;1;1;1;1;1;1;1;
|
||||
|
||||
[Output]
|
||||
PathTemplate=%p1/converted/%f
|
||||
|
38
rtdata/profiles/Film Negative.pp3
Normal file
@ -0,0 +1,38 @@
|
||||
[Exposure]
|
||||
Auto=false
|
||||
Compensation=0
|
||||
HistogramMatching=false
|
||||
CurveFromHistogramMatching=false
|
||||
ClampOOG=false
|
||||
CurveMode=Standard
|
||||
CurveMode2=Standard
|
||||
Curve=1;0;0;0.88544601940051371;1;
|
||||
Curve2=1;0;0;0.0397505754145333;0.020171771436200074;0.54669745433149319;0.69419974733677647;1;1;
|
||||
|
||||
[HLRecovery]
|
||||
Enabled=false
|
||||
Method=Blend
|
||||
|
||||
[Crop]
|
||||
FixedRatio=false
|
||||
|
||||
[Color Management]
|
||||
InputProfile=(camera)
|
||||
ToneCurve=false
|
||||
ApplyLookTable=false
|
||||
ApplyHueSatMap=false
|
||||
WorkingProfile=Rec2020
|
||||
WorkingTRC=none
|
||||
|
||||
[RAW Bayer]
|
||||
Method=rcd
|
||||
|
||||
[Film Negative]
|
||||
Enabled=true
|
||||
RedRatio=1.360
|
||||
GreenExponent=1.5
|
||||
BlueRatio=0.86
|
||||
ColorSpace=1
|
||||
RefInput=0;0;0;
|
||||
RefOutput=0;0;0;
|
||||
BackCompat=0
|
@ -8,6 +8,7 @@ GenericName[fr]=Éditeur d'images raw
|
||||
GenericName[pl]=Edytor zdjęć raw
|
||||
Comment=An advanced raw photo development program
|
||||
Comment[cs]=Program pro konverzi a zpracování digitálních raw fotografií
|
||||
Comment[de]=Programm zur Konvertierung und Verarbeitung digitaler RAW-Fotos
|
||||
Comment[fr]=Logiciel de conversion et de traitement de photos numériques de format raw (but de capteur)
|
||||
Comment[pl]=Zaawansowany program do wywoływania zdjęć typu raw
|
||||
Icon=rawtherapee
|
||||
|
1398
rtdata/themes/RawTherapee - Legacy-GTK3-20_.css
Normal file
@ -1,9 +1,8 @@
|
||||
/*
|
||||
This file is part of RawTherapee.
|
||||
|
||||
Copyright (c) 2015-2017 DrSlony
|
||||
Copyright (c) 2016-2019 Hombre
|
||||
Copyright (c) 2016-2019 TooWaBoo
|
||||
Copyright (c) 2015-2020 RawTherapee
|
||||
Contributions by DrSlony, Hombre, TooWaBoo, Thanatomanic
|
||||
|
||||
RawTherapee is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -20,26 +19,24 @@
|
||||
*/
|
||||
|
||||
/***************************/
|
||||
/**/ @import "size.css"; /**/
|
||||
/**/ @import "size.css"; /**/ /* TODO: Remove this weird dependency */
|
||||
/***************************/
|
||||
|
||||
/* text-shadow causes a serious performance degradation in rendering the UI,
|
||||
* at least in comboboxes with many entries (i.e. Profiled Lens Correction).
|
||||
*/
|
||||
|
||||
/** Set style defaults **/
|
||||
* {
|
||||
color: #AAAAAA;
|
||||
text-shadow: none;
|
||||
color: #BBBBBB;
|
||||
text-shadow: none; /* Keep at none, or suffer serious performance issues */
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
*:disabled {
|
||||
color: #666666;
|
||||
opacity: 0.7;
|
||||
color: rgba(255,255,255,0.25);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.view:selected:not(check):not(radio) {
|
||||
color: #262626;
|
||||
background-color: #AAAAAA
|
||||
background-color: #AAAAAA;
|
||||
}
|
||||
|
||||
/* The Places and Dir browser panels */
|
||||
@ -53,7 +50,6 @@ textview.view, treeview.view {
|
||||
/* The headers of these panels */
|
||||
.view .button {
|
||||
background-color: #363636;
|
||||
/*padding: 0.1666666666666666em;*/
|
||||
}
|
||||
|
||||
window > box {
|
||||
@ -64,17 +60,15 @@ window.background {
|
||||
}
|
||||
|
||||
/*** Window decoration *********************************************************/
|
||||
@define-color winHeaderbar rgb(50,50,50);
|
||||
|
||||
.csd:not(.popup):not(tooltip) > decoration {
|
||||
background-color: #484848;
|
||||
background-image: none;
|
||||
box-shadow: 0 0.25em 0.75em 0.083333333333333333em rgba(0, 0, 0, 0.5), 0 0 0 0.083333333333333333em #242424;
|
||||
}
|
||||
headerbar {
|
||||
background-color: shade(@winHeaderbar,1.12);
|
||||
background-color: shade(rgb(50,50,50),1.12);
|
||||
box-shadow: inset 0 0.083333333333333333em rgba(200,200,200,.13);
|
||||
background-image: linear-gradient(shade(@winHeaderbar,1.14), shade(@winHeaderbar,.86));
|
||||
background-image: linear-gradient(shade(rgb(50,50,50),1.14), shade(rgb(50,50,50),.86));
|
||||
border-bottom-color: #242424;
|
||||
}
|
||||
dialog > box {
|
||||
@ -90,7 +84,6 @@ window.csd:not(.fullscreen) #MainNotebook > header.top {
|
||||
.maximized > headerbar {
|
||||
border-radius: 0;
|
||||
}
|
||||
/**/
|
||||
|
||||
/*** End Window decoration *****************************************************/
|
||||
|
||||
@ -128,33 +121,20 @@ label {
|
||||
|
||||
/* Affects all frames except in the toolbox */
|
||||
frame {
|
||||
border-width: 0;
|
||||
border-color: #303030;
|
||||
border-radius: 0;
|
||||
border-style: solid;
|
||||
/*border-style: none none none solid;*/
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-color: rgba(0,0,0,0.);
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
|
||||
/* Create space between frame contents and frame border */
|
||||
frame border {
|
||||
border-width: 0.083333333333333333em;
|
||||
padding: 0.3333333333333333em;
|
||||
border: 1px solid #262626;
|
||||
border-radius: 0.3333333333333333em;
|
||||
background-color: #383838;
|
||||
margin: 0;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
padding: 0.083333333333333333em;
|
||||
}
|
||||
|
||||
frame > label {
|
||||
margin: 0 0 0 0.3333333333333333em;
|
||||
color: #D8D8D8;
|
||||
padding: 0.416666666666666666em 0;
|
||||
padding: 0.416666666666666666em 0.25em;
|
||||
}
|
||||
|
||||
/* affects selection list*/
|
||||
@ -199,7 +179,7 @@ popover separator:not(:only-child) {
|
||||
paned.horizontal > separator {
|
||||
margin: 0 0.16666666666666666em;
|
||||
}
|
||||
/* Double line separator */
|
||||
|
||||
paned.vertical > separator {
|
||||
margin: 0.25em 0;
|
||||
}
|
||||
@ -419,19 +399,19 @@ button.flat {
|
||||
}
|
||||
|
||||
button.flat:checked {
|
||||
background-image: linear-gradient(#343434, #2E2E2E, #292929);
|
||||
background-image: linear-gradient(#545454, #4E4E34, #494949);
|
||||
}
|
||||
|
||||
checkbutton > check {
|
||||
background-image: linear-gradient(#343434, #2E2E2E, #292929);
|
||||
background-image: linear-gradient(#545454, #4E4E4E, #494949);
|
||||
}
|
||||
|
||||
radiobutton > radio {
|
||||
background-image: linear-gradient(#343434, #2E2E2E, #292929);
|
||||
background-image: linear-gradient(#545454, #4E4E4E, #494949);
|
||||
}
|
||||
|
||||
button.flat:hover, checkbutton:hover > check, radiobutton:hover > radio {
|
||||
background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3));
|
||||
background-image: linear-gradient(shade(#545454,1.3), shade(#4E4E4E,1.3), shade(#494949,1.3));
|
||||
}
|
||||
|
||||
button.popupbutton-arrow {
|
||||
@ -476,10 +456,10 @@ scale slider {
|
||||
padding: 0.583333333333333333em;
|
||||
border-radius: 1.166666666666666666em;
|
||||
border-width: 0.083333333333333333em;
|
||||
background-image: linear-gradient(#343434, #2E2E2E, #292929);
|
||||
background-image: linear-gradient(#444444, #3E3E3E, #393939);
|
||||
}
|
||||
scale slider:hover {
|
||||
background-image: linear-gradient(#444444, #3E3E3E, #393939);
|
||||
background-image: linear-gradient(#545454, #4E4E4E, #494949);
|
||||
}
|
||||
scale:disabled slider {
|
||||
background-image: none;
|
||||
@ -493,7 +473,7 @@ scale trough {
|
||||
padding: 0 0.583333333333333333em;
|
||||
border-width: 0.083333333333333333em;
|
||||
border-radius: 0.333333333333333333em;
|
||||
background-color: #2A2A2A;
|
||||
background-color: rgba(0,0,0,0.15);
|
||||
}
|
||||
scale:disabled trough {
|
||||
background-color: #444;
|
||||
@ -574,7 +554,7 @@ button.text-button.toggle:hover:checked {
|
||||
|
||||
.drawingarea:selected {
|
||||
background-color: #565656;
|
||||
border-radius: 0.8333333333333333em;
|
||||
border-radius: 1.8333333333333333em;
|
||||
}
|
||||
|
||||
image {
|
||||
@ -631,7 +611,7 @@ button.Right {
|
||||
/* [1.23[-][+]] */
|
||||
entry, spinbutton {
|
||||
min-height: 0.8333333333333333em;
|
||||
background-color: #262626;
|
||||
background-color: rgba(0,0,0,0.075);
|
||||
border-radius: 0.2em;
|
||||
}
|
||||
|
||||
@ -720,151 +700,150 @@ flowboxchild:selected {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Vertical version of slider. */
|
||||
#histScale {
|
||||
min-height: 4em;
|
||||
min-width: 0.4166666666666666em;
|
||||
margin: 0.5833333333333333em 0 0 0;
|
||||
}
|
||||
#histScale trough {
|
||||
padding: 0.583333333333333333em 0;
|
||||
}
|
||||
#histScale trough highlight {
|
||||
margin: -0.583333333333333333em 0;
|
||||
padding: 0.1em 0 0 0.1em;
|
||||
}
|
||||
#histScale.fine-tune trough highlight {
|
||||
padding: 0.5em 0 0 0.5em;
|
||||
}
|
||||
|
||||
/* Copied from button.flat style. */
|
||||
button.radio#histButton {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
button.radio#histButton:checked {
|
||||
background-image: linear-gradient(#343434, #2E2E2E, #292929);
|
||||
}
|
||||
|
||||
button.radio#histButton:hover {
|
||||
background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3));
|
||||
}
|
||||
|
||||
/*** end ***************************************************************************************/
|
||||
|
||||
/*** Modules ***********************************************************************************/
|
||||
#EditorModules > box {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#MyExpander {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#MyExpander.withScrollbar {
|
||||
margin-right: 0.25em;
|
||||
|
||||
#MyExpander.withScrollbar { /* This margin is always added */
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
#MyExpander.withScrollbar #MyExpander { /* No margin for nested expanders */
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
/* Borders around tools and subtools */
|
||||
#MyExpander {
|
||||
border-top: 0.0833333333333333em solid rgba(0,0,0,0.3);
|
||||
}
|
||||
#MyExpander:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
#MyExpander:nth-last-child(2),
|
||||
#MyExpander #MyExpander:nth-last-child(1) {
|
||||
border-bottom: 0.0833333333333333em solid rgba(0,0,0,0.3);
|
||||
}
|
||||
#MyExpander #MyExpander:nth-last-child(2) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
|
||||
/* Tool background */
|
||||
#ExpanderBox > box, #ExpanderBox > grid {
|
||||
background-color: #363636;
|
||||
border-width: 0.0833333333333333em;
|
||||
border-style: solid;
|
||||
border-radius: 0.3333333333333333em;
|
||||
border-color: #252525;
|
||||
margin: 0;
|
||||
padding: 0.25em;
|
||||
#ExpanderBox > box,
|
||||
#ExpanderBox > grid {
|
||||
background-color: rgba(255,255,255,0.075);
|
||||
padding: 0.3em 0.5em 0.6em 0.5em;
|
||||
border-top: 0.0833333333333333em solid rgba(255,255,255,0.1);
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#ExpanderBox drawingarea {
|
||||
background-color: #363636;
|
||||
/* Not all combinations below are used, but this makes sure
|
||||
also some of the more exotic box and frame layouts are
|
||||
treated properly. */
|
||||
#ExpanderBox frame > box,
|
||||
#ExpanderBox frame frame > box,
|
||||
#ExpanderBox2 frame > box,
|
||||
#ExpanderBox2 frame frame > box,
|
||||
#ExpanderBox3 frame > box,
|
||||
#ExpanderBox3 frame frame > box,
|
||||
#ExpanderBox frame > grid,
|
||||
#ExpanderBox frame frame > grid,
|
||||
#ExpanderBox2 frame > grid,
|
||||
#ExpanderBox2 frame frame > grid,
|
||||
#ExpanderBox3 frame > grid,
|
||||
#ExpanderBox3 frame frame > grid {
|
||||
padding: 0 0.5em 0.5em 0.5em;
|
||||
}
|
||||
|
||||
#LocallabToolPanel frame,
|
||||
#ExpanderBox frame,
|
||||
#ExpanderBox2 frame,
|
||||
#ExpanderBox3 frame {
|
||||
padding: 0.1666666666666666em 0 0 0;
|
||||
border-style: none;
|
||||
}
|
||||
#ExpanderBox frame > border {
|
||||
background-color: #3B3B3B;
|
||||
border-style: solid;
|
||||
border-width: 0.0833333333333333em;
|
||||
border-radius: 0.3333333333333333em;
|
||||
border-color: #313131;
|
||||
margin: 0.25em;
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
#LocallabToolPanel frame > label, #LocallabToolPanel frame frame > label,
|
||||
#ExpanderBox frame > label, #ExpanderBox frame frame > label,
|
||||
#ExpanderBox2 frame > label, #ExpanderBox2 frame frame > label,
|
||||
#ExpanderBox3 frame > label, #ExpanderBox3 frame frame > label {
|
||||
margin-left: 7pt;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#LocallabToolPanel frame > box, #LocallabToolPanel frame frame > box, #LocallabToolPanel frame > grid, #LocallabToolPanel frame frame > grid,
|
||||
#ExpanderBox frame > box, #ExpanderBox frame frame > box, #ExpanderBox frame > grid, #ExpanderBox frame frame > grid,
|
||||
#ExpanderBox2 frame > box, #ExpanderBox2 frame frame > box, #ExpanderBox2 frame > grid, #ExpanderBox2 frame frame > grid,
|
||||
#ExpanderBox3 frame > box, #ExpanderBox3 frame frame > box, #ExpanderBox3 frame > grid, #ExpanderBox3 frame frame > grid {
|
||||
margin: 0.1666666666666666em;
|
||||
}
|
||||
|
||||
#LocallabToolPanel > box > checkbutton, #LocallabToolPanel > box > box, #LocallabToolPanel > grid > checkbutton, #LocallabToolPanel > box > grid, #LocallabToolPanel > grid > grid, #LocallabToolPanel frame > box > grid, #LocallabToolPanel frame > grid > grid, #LocallabToolPanel frame > grid > box,
|
||||
#ExpanderBox > box > checkbutton, #ExpanderBox > box > box, #ExpanderBox > grid > checkbutton, #ExpanderBox > box > grid, #ExpanderBox > grid > grid, #ExpanderBox frame > box > grid, #ExpanderBox frame > grid > grid, #ExpanderBox frame > grid > box,
|
||||
#ExpanderBox2 > box > checkbutton, #ExpanderBox2 > box > box, #ExpanderBox2 > grid > checkbutton, #ExpanderBox2 > box > grid, #ExpanderBox2 > grid > grid, #ExpanderBox2 frame > box > grid, #ExpanderBox2 frame > grid > grid, #ExpanderBox2 frame > grid > box,
|
||||
#ExpanderBox3 > box > checkbutton, #ExpanderBox3 > box > box, #ExpanderBox3 > grid > checkbutton, #ExpanderBox3 > box > grid, #ExpanderBox3 > grid > grid, #ExpanderBox3 frame > box > grid, #ExpanderBox3 frame > grid > grid, #ExpanderBox3 frame > grid > box {
|
||||
margin-top: 0.1666666666666666em;
|
||||
}
|
||||
|
||||
#ExpanderBox frame drawingarea {
|
||||
background-color: #3B3B3B;
|
||||
}
|
||||
|
||||
#ExpanderBox frame frame > border {
|
||||
background-color: #414141;
|
||||
border: 0.0833333333333333em solid #373737;
|
||||
border-radius: 0.3333333333333333em;
|
||||
margin: 0.25em;
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
#ExpanderBox frame frame drawingarea {
|
||||
background-color: #414141;
|
||||
/* Necessary hack for extra margin in Wavelets and some other locations */
|
||||
#ExpanderBox box > box,
|
||||
#ExpanderBox2 box > box {
|
||||
margin: 0.16666666666666em 0;
|
||||
}
|
||||
|
||||
/* Sub-tool (MyExpander) background */
|
||||
#LocallabToolPanel > box, #LocallabToolPanel > grid,
|
||||
#ExpanderBox2 > box, #ExpanderBox2 > grid {
|
||||
background-color: #3B3B3B;
|
||||
border: 0.0833333333333333em solid #2A2A2A;
|
||||
border-radius: 0.3333333333333333em;
|
||||
#LocallabToolPanel > box,
|
||||
#LocallabToolPanel > grid,
|
||||
#ExpanderBox2 > box,
|
||||
#ExpanderBox2 > grid {
|
||||
background-color: rgba(255,255,255,0.075);
|
||||
margin: 0;
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
#LocallabToolPanel drawingarea,
|
||||
#ExpanderBox2 drawingarea {
|
||||
background-color: #3B3B3B;
|
||||
}
|
||||
|
||||
#LocallabToolPanel frame > border,
|
||||
#ExpanderBox2 frame > border {
|
||||
background-color: #414141;
|
||||
border: 0.0833333333333333em solid #373737;
|
||||
border-radius: 0.3333333333333333em;
|
||||
margin: 0.25em;
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
#LocallabToolPanel frame drawingarea,
|
||||
#ExpanderBox2 frame drawingarea {
|
||||
background-color: #414141;
|
||||
}
|
||||
|
||||
#LocallabToolPanel frame frame > border,
|
||||
#ExpanderBox2 frame frame > border {
|
||||
background-color: #474747;
|
||||
border: 0.0833333333333333em solid #3D3D3D;
|
||||
border-radius: 0.3333333333333333em;
|
||||
margin: 0.25em;
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
#LocallabToolPanel frame frame drawingarea,
|
||||
#ExpanderBox2 frame frame drawingarea {
|
||||
background-color: #474747;
|
||||
}
|
||||
|
||||
#MyExpanderTitle > box {
|
||||
margin: 0.1666666666666666em 0;
|
||||
padding: 0.1666666666666666em 0;
|
||||
padding: 0.25em 0.5em 0.5em 0.25em;
|
||||
border-top: 0.0833333333333333em solid rgba(255,255,255,0.1);
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#MyExpanderTitle label {
|
||||
color: #CCCCCC;
|
||||
color: #AAAAAA;
|
||||
padding: 0;
|
||||
margin: 0 0.25em 0 0.25em;
|
||||
font-size: 1.1em;
|
||||
margin: 0;
|
||||
font-size: 1.1em; /* TODO: Does not work? */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#MyExpander.Fold > #MyExpanderTitle label,
|
||||
#MyExpander.OnOff.enabledTool > #MyExpanderTitle label {
|
||||
color: #DDDDDD;
|
||||
}
|
||||
|
||||
#MyExpanderTitle:hover {
|
||||
background-color: #202020;
|
||||
}
|
||||
#MyExpanderTitle eventbox:hover image {
|
||||
background-color: #202020;
|
||||
border-radius: 0.25em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#MyExpanderTitle:hover label {
|
||||
color: #D8D8D8;
|
||||
}
|
||||
|
||||
/* Alignment of tool headers is controlled by the image */
|
||||
#MyExpander.Fold > #MyExpanderTitle box > image,
|
||||
#MyExpander.OnOff > #MyExpanderTitle #MyExpanderStatus image {
|
||||
padding: 0.3em;
|
||||
margin: 0.25em 0.25em 0.25em 0;
|
||||
}
|
||||
|
||||
#LocallabToolPanel separator, #ExpanderBox2 separator, #ExpanderBox3 separator {
|
||||
color: #292929;
|
||||
}
|
||||
@ -873,6 +852,7 @@ flowboxchild:selected {
|
||||
#MainNotebook grid label, #MainNotebook grid image {
|
||||
padding: 0.0833333333333333em;
|
||||
}
|
||||
/*** end ***************************************************************************************/
|
||||
|
||||
/* File Browser right side tabs - Toolbox, Inspector, Fast Export, Filter */
|
||||
notebook {
|
||||
@ -888,7 +868,7 @@ notebook header {
|
||||
border-style: none;
|
||||
border-color: #262626;
|
||||
border-radius: 0;
|
||||
padding: 0.1666666666666666em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@ -932,14 +912,12 @@ notebook header.left {
|
||||
}
|
||||
|
||||
notebook.frame {
|
||||
/* OK */
|
||||
border-radius: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/* Pad notebooks, makes the other borders look nicer */
|
||||
notebook stack {
|
||||
/* OK */
|
||||
background-color: #484848;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
@ -952,12 +930,14 @@ paned box, paned grid {
|
||||
}
|
||||
|
||||
paned > separator {
|
||||
border-width: 0.0833333333333333em 0.0833333333333333em 0 0;
|
||||
border-style: solid;
|
||||
border-color: #404040;
|
||||
background: rgba(0,0,0,0.075);
|
||||
border: none;
|
||||
min-width: 0.25em;
|
||||
min-height: 0.25em;
|
||||
padding: 0;
|
||||
margin: 0.3333333333333333em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
fontchooser scrolledwindow,
|
||||
#PlacesPaned scrolledwindow,
|
||||
#HistoryPanel scrolledwindow,
|
||||
@ -991,21 +971,17 @@ fontchooser scrolledwindow,
|
||||
}
|
||||
|
||||
#MainNotebook header {
|
||||
/* OK */
|
||||
background-color: #2A2A2A;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#MainNotebook tabs {
|
||||
/* OK */
|
||||
background-color: #2A2A2A;
|
||||
}
|
||||
#MainNotebook tab:hover {
|
||||
/* OK */
|
||||
background-color: #505050;
|
||||
}
|
||||
#MainNotebook tab:active {
|
||||
/* OK */
|
||||
border-color: #989898;
|
||||
}
|
||||
#MainNotebook tab:checked {
|
||||
@ -1017,18 +993,16 @@ fontchooser scrolledwindow,
|
||||
}
|
||||
#RightNotebook > stack > scrolledwindow frame,
|
||||
#BatchQueueButtonsMainContainer frame,
|
||||
#MyExpander frame,
|
||||
dialog frame {
|
||||
margin: 0;
|
||||
padding: 0.19em 0.583333333333333333em;
|
||||
padding: 0;
|
||||
}
|
||||
#RightNotebook > stack > scrolledwindow frame > border,
|
||||
#BatchQueueButtonsMainContainer > frame > border,
|
||||
#MyExpander frame > border,
|
||||
dialog frame > border {
|
||||
padding: 0 0.333333333333333333em 0.333333333333333333em;
|
||||
padding: 0;
|
||||
border-width: 0.083333333333333333em;
|
||||
margin: 0 -0.583333333333333333em;
|
||||
margin: 0;
|
||||
}
|
||||
#RightNotebook > stack > scrolledwindow frame > label:not(.dummy),
|
||||
#BatchQueueButtonsMainContainer frame > label:not(.dummy),
|
||||
@ -1068,21 +1042,18 @@ dialog frame > label:not(.dummy) {
|
||||
min-width: 25em;
|
||||
}
|
||||
|
||||
#ToolPanelNotebook header {
|
||||
background-color: #383838;
|
||||
border-color: #262626;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
#ToolPanelNotebook viewport {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#ToolPanelNotebook header tabs {
|
||||
padding: 0.0833333333333333em;
|
||||
background-color: #2A2A2A;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#ToolPanelNotebook header tab {
|
||||
padding: 0.25em;
|
||||
margin: 0;
|
||||
padding: 0.3333333333333333em;
|
||||
}
|
||||
|
||||
/* All tool panels have a frame except for Meta which unlike the rest is a notebook itself.
|
||||
@ -1204,44 +1175,31 @@ dialog frame > label:not(.dummy) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#RightNotebook #HistoryPanel {
|
||||
min-width: 17.5em;
|
||||
margin-top: 0.333333333333333333em;
|
||||
}
|
||||
|
||||
#RightNotebook scrolledwindow {
|
||||
padding: 0;
|
||||
}
|
||||
#HistoryPanel {
|
||||
margin-top: 0.25em;
|
||||
}
|
||||
#HistoryPanel > border {
|
||||
margin-top: 1.75em;
|
||||
}
|
||||
#HistoryPanel > label {
|
||||
margin: 0 0 -1.5em 0;
|
||||
padding: 0 0 0 0.083333333333333333em;
|
||||
}
|
||||
#Snapshots {
|
||||
margin-top: 0.166666666666666666em;
|
||||
}
|
||||
#Snapshots > border {
|
||||
min-height: calc(6em + 36px);
|
||||
|
||||
#Navigator border,
|
||||
#HistoryPanel border,
|
||||
#Snapshots border {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#Navigator > label,
|
||||
#HistoryPanel > label,
|
||||
#Snapshots > label {
|
||||
margin-bottom: -4px;
|
||||
margin: 0;
|
||||
padding: 0 0 0.25em 0;
|
||||
}
|
||||
|
||||
#Snapshots scrolledwindow + box {
|
||||
margin: -8px 0 -4px ;
|
||||
margin: -8px 0 -4px;
|
||||
border-top-width: 0.083333333333333333em;
|
||||
}
|
||||
#Navigator {
|
||||
padding-top: 0.25em;
|
||||
padding-bottom: 0.25em;
|
||||
}
|
||||
#Navigator label {
|
||||
|
||||
#Navigator box label {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin: 0.083333333333333333em 0;
|
||||
}
|
||||
|
||||
/*** PartialPaste ******************************************************************************/
|
||||
|
@ -318,12 +318,12 @@ fontchooser scrolledwindow,
|
||||
/*** end ***************************************************************************************/
|
||||
|
||||
/*** Navigator *********************************************************************************/
|
||||
#Navigator {
|
||||
#Navigator box {
|
||||
padding-top: 0.75em;
|
||||
padding-bottom: 0.25em;
|
||||
background-color: @bg-dark-grey;
|
||||
}
|
||||
#Navigator label {
|
||||
#Navigator box label {
|
||||
padding: 0;
|
||||
margin: 0.083333333333333333em 0 0;
|
||||
}
|
||||
@ -454,6 +454,47 @@ filechooser placessidebar list row:selected {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Vertical version of slider. */
|
||||
#histScale {
|
||||
min-height: 4em;
|
||||
min-width: 1.833333333333333333em;
|
||||
margin: -0.333333333333333333em 0;
|
||||
}
|
||||
#histScale trough {
|
||||
padding: 0.583333333333333333em 0;
|
||||
}
|
||||
#histScale highlight {
|
||||
background-image: linear-gradient(to right, shade (@accent-color2,1.22), shade(@accent-color2,.88));
|
||||
margin: -0.583333333333333333em 0;
|
||||
padding: 0.333333333333333333em 0 0 0.333333333333333333em;
|
||||
}
|
||||
#histScale slider {
|
||||
}
|
||||
#histScale.fine-tune highlight {
|
||||
padding: 0.5em 0 0 0.5em;
|
||||
}
|
||||
|
||||
/* Copied from button.flat style. */
|
||||
button.radio#histButton {
|
||||
border: 0.083333333333333333em solid transparent;
|
||||
box-shadow: none;
|
||||
background-image: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
button.radio#histButton:hover {
|
||||
border-color: @bg-button-border;
|
||||
box-shadow: inset 0 0.083333333333333333em rgba(242, 242, 242, 0.1);
|
||||
background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3));
|
||||
background-color: @bg-button-hover;
|
||||
}
|
||||
button.radio#histButton:active,
|
||||
button.radio#histButton:checked {
|
||||
border-color: @bg-button-border;
|
||||
box-shadow: inset 0 0.1em rgba(242, 242, 242, 0.08);
|
||||
background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3));
|
||||
background-color: @bg-button-active;
|
||||
}
|
||||
|
||||
/*** end ***************************************************************************************/
|
||||
|
||||
/*** Separator *********************************************************************************/
|
||||
@ -1182,6 +1223,7 @@ window.csd:not(.fullscreen) #MainNotebook > header.top {
|
||||
color: @headline-big;
|
||||
padding: 0;
|
||||
margin: 0.083333333333333333em 0.25em 0 0.166666666666666666em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#MyExpanderTitle:hover label {
|
||||
|
1032
rtdata/themes/size - Legacy.css
Normal file
@ -313,38 +313,6 @@ window.csd:not(.fullscreen) #MainNotebook > header.top {
|
||||
margin: 0.083333333333333333em 0 0.166666666666666666em 0;
|
||||
}
|
||||
|
||||
#ToolPanelNotebook > stack > scrolledwindow > viewport.frame {
|
||||
padding: 0 0.25em;
|
||||
}
|
||||
|
||||
#MyExpander {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#ExpanderBox > box, #ExpanderBox > grid {
|
||||
border-width: 0.083333333333333333em;
|
||||
border-radius: 0.416666666666666666em;
|
||||
margin: 0;
|
||||
padding: 0.5em 0.333333333333333333em;
|
||||
}
|
||||
|
||||
/* Sub-tool (MyExpander) */
|
||||
#ExpanderBox2 > box, #ExpanderBox2 > grid {
|
||||
border-width: 0.083333333333333333em;
|
||||
border-radius: 0.416666666666666666em;
|
||||
margin: 0 0.19em;
|
||||
padding: 0.333333333333333333em;
|
||||
}
|
||||
|
||||
#MyExpanderTitle > box {
|
||||
margin: 0;
|
||||
padding: 0.25em 0;
|
||||
}
|
||||
|
||||
#MyExpanderTitle label {
|
||||
padding: 0;
|
||||
margin: 0.083333333333333333em 0.25em 0 0.166666666666666666em;
|
||||
}
|
||||
/*** end ***************************************************************************************/
|
||||
|
||||
/*** Context & popups menus *****************************************************************************/
|
||||
@ -366,8 +334,8 @@ menu > arrow.top:hover,
|
||||
menu > arrow.bottom,
|
||||
menu > arrow.bottom:hover {
|
||||
border: none;
|
||||
padding: 0.5em;
|
||||
min-height: 1.5em;
|
||||
padding: 0.25em;
|
||||
min-height: 1em;
|
||||
}
|
||||
|
||||
menuitem {
|
||||
|
@ -60,6 +60,10 @@ link_directories(
|
||||
"${RSVG_LIBRARY_DIRS}"
|
||||
)
|
||||
|
||||
if(OpenMP_FOUND)
|
||||
include_directories(${OpenMP_CXX_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
set(CAMCONSTSFILE "camconst.json")
|
||||
|
||||
set(RTENGINESOURCEFILES
|
||||
@ -97,7 +101,6 @@ set(RTENGINESOURCEFILES
|
||||
fast_demo.cc
|
||||
ffmanager.cc
|
||||
filmnegativeproc.cc
|
||||
filmnegativethumb.cc
|
||||
flatcurves.cc
|
||||
FTblockDN.cc
|
||||
gamutwarning.cc
|
||||
@ -228,4 +231,8 @@ target_link_libraries(rtengine
|
||||
${EXIV2_LIBRARIES}
|
||||
)
|
||||
|
||||
if(OpenMP_FOUND)
|
||||
target_link_libraries(rtengine ${OpenMP_CXX_LIBRARIES})
|
||||
endif()
|
||||
|
||||
install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
|
@ -4,6 +4,7 @@
|
||||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
#include "rt_algo.h"
|
||||
#include "sleef.h"
|
||||
|
||||
#define DIAGONALS 5
|
||||
@ -42,21 +43,13 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl
|
||||
|
||||
//s is preconditionment of r. Without, direct to r.
|
||||
float *s = r;
|
||||
double rs = 0.0; // use double precision for large summations
|
||||
|
||||
if(Preconditioner != nullptr) {
|
||||
s = new float[n];
|
||||
|
||||
Preconditioner(s, r, Pass);
|
||||
}
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for reduction(+:rs) // removed schedule(dynamic,10)
|
||||
#endif
|
||||
|
||||
for(int ii = 0; ii < n; ii++) {
|
||||
rs += static_cast<double>(r[ii]) * static_cast<double>(s[ii]);
|
||||
}
|
||||
double rs = rtengine::accumulateProduct(r, s, n);
|
||||
|
||||
//Search direction d.
|
||||
float *d = (buffer + n + 32);
|
||||
@ -77,16 +70,9 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl
|
||||
|
||||
for(iterate = 0; iterate < MaximumIterates; iterate++) {
|
||||
//Get step size alpha, store ax while at it.
|
||||
double ab = 0.0; // use double precision for large summations
|
||||
Ax(ax, d, Pass);
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for reduction(+:ab)
|
||||
#endif
|
||||
|
||||
for(int ii = 0; ii < n; ii++) {
|
||||
ab += static_cast<double>(d[ii]) * static_cast<double>(ax[ii]);
|
||||
}
|
||||
|
||||
double ab = rtengine::accumulateProduct(d, ax, n);
|
||||
if(ab == 0.0) {
|
||||
break; //So unlikely. It means perfectly converged or singular, stop either way.
|
||||
}
|
||||
@ -118,22 +104,7 @@ float *SparseConjugateGradient(void Ax(float *Product, float *x, void *Pass), fl
|
||||
|
||||
//Get beta.
|
||||
ab = rs;
|
||||
rs = 0.0f;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
{
|
||||
#ifdef _OPENMP
|
||||
#pragma omp for reduction(+:rs)
|
||||
#endif
|
||||
|
||||
for(int ii = 0; ii < n; ii++) {
|
||||
rs += static_cast<double>(r[ii]) * static_cast<double>(s[ii]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rs = rtengine::accumulateProduct(r, s, n);
|
||||
ab = rs / ab;
|
||||
abf = ab;
|
||||
//Update search direction p.
|
||||
|
@ -436,6 +436,7 @@ void ImProcFunctions::Median_Denoise(float **src, float **dst, float upperBound,
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ImProcFunctions::Tile_calc(int tilesize, int overlap, int kall, int imwidth, int imheight, int &numtiles_W, int &numtiles_H, int &tilewidth, int &tileheight, int &tileWskip, int &tileHskip)
|
||||
|
||||
{
|
||||
@ -2377,6 +2378,7 @@ bool ImProcFunctions::WaveletDenoiseAll_BiShrinkL(wavelet_decomposition& Wavelet
|
||||
bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(wavelet_decomposition& WaveletCoeffs_L, wavelet_decomposition& WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels)
|
||||
{
|
||||
int maxlvl = WaveletCoeffs_L.maxlevel();
|
||||
printf("Ftblockdn ab bishrink\n");
|
||||
|
||||
if (local == 1) {
|
||||
maxlvl = 6; //for local denoise
|
||||
@ -2458,6 +2460,7 @@ bool ImProcFunctions::WaveletDenoiseAll_BiShrinkAB(wavelet_decomposition& Wavele
|
||||
float* const* WavCoeffs_ab = WaveletCoeffs_ab.level_coeffs(lvl);
|
||||
|
||||
if (lvl == maxlvl - 1) {
|
||||
//printf("Shrink ab bis\n");
|
||||
ShrinkAllAB(WaveletCoeffs_L, WaveletCoeffs_ab, buffer, lvl, dir, noisevarchrom, noisevar_ab, useNoiseCCurve, autoch, denoiseMethodRgb, madL[lvl], nullptr, 0, madab[lvl], true);
|
||||
} else {
|
||||
//simple wavelet shrinkage
|
||||
@ -2617,7 +2620,6 @@ bool ImProcFunctions::WaveletDenoiseAllAB(wavelet_decomposition& WaveletCoeffs_L
|
||||
float *noisevarchrom, float madL[8][3], float *variC, int local, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, int denoiseNestedLevels)//mod JD
|
||||
|
||||
{
|
||||
|
||||
int maxlvl = WaveletCoeffs_L.maxlevel();
|
||||
|
||||
if (local == 1) {
|
||||
|
@ -110,7 +110,7 @@ public:
|
||||
/// The user have to handle it itself, even if some method can (re)initialize it
|
||||
bool dirty;
|
||||
|
||||
LUT(int s, int flags = LUT_CLIP_BELOW | LUT_CLIP_ABOVE, bool initZero = false)
|
||||
explicit LUT(int s, int flags = LUT_CLIP_BELOW | LUT_CLIP_ABOVE, bool initZero = false)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
|
||||
@ -141,7 +141,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
LUT(const std::vector<T>& input, int flags = LUT_CLIP_BELOW | LUT_CLIP_ABOVE) :
|
||||
explicit LUT(const std::vector<T>& input, int flags = LUT_CLIP_BELOW | LUT_CLIP_ABOVE) :
|
||||
maxs(input.size() - 2),
|
||||
maxsf(maxs),
|
||||
data(new T[input.size() + 3]), // Add a few extra elements so [](vfloat) won't access out-of-bounds memory.
|
||||
@ -362,11 +362,11 @@ public:
|
||||
// of [values[0][0] ... values[3][0]] and the second [values[0][1] ... values[3][1]].
|
||||
__m128i temp0 = _mm_unpacklo_epi32(values[0], values[1]);
|
||||
__m128i temp1 = _mm_unpacklo_epi32(values[2], values[3]);
|
||||
vfloat lower = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1));
|
||||
vfloat upper = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1));
|
||||
vfloat lowerVal = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1));
|
||||
vfloat upperVal = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1));
|
||||
|
||||
vfloat diff = vmaxf(ZEROV, indexv) - _mm_cvtepi32_ps(indexes);
|
||||
return vintpf(diff, upper, lower);
|
||||
return vintpf(diff, upperVal, lowerVal);
|
||||
}
|
||||
|
||||
// NOTE: This version requires LUTs which clip at upper and lower bounds
|
||||
@ -394,11 +394,11 @@ public:
|
||||
// of [values[0][0] ... values[3][0]] and the second [values[0][1] ... values[3][1]].
|
||||
__m128i temp0 = _mm_unpacklo_epi32(values[0], values[1]);
|
||||
__m128i temp1 = _mm_unpacklo_epi32(values[2], values[3]);
|
||||
vfloat lower = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1));
|
||||
vfloat upper = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1));
|
||||
vfloat lowerVal = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1));
|
||||
vfloat upperVal = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1));
|
||||
|
||||
vfloat diff = vclampf(indexv, ZEROV, sizev) - _mm_cvtepi32_ps(indexes); // this automagically uses ZEROV in case indexv is NaN
|
||||
return vintpf(diff, upper, lower);
|
||||
return vintpf(diff, upperVal, lowerVal);
|
||||
}
|
||||
|
||||
// NOTE: This version requires LUTs which do not clip at upper and lower bounds
|
||||
@ -425,11 +425,11 @@ public:
|
||||
// of [values[0][0] ... values[3][0]] and the second [values[0][1] ... values[3][1]].
|
||||
__m128i temp0 = _mm_unpacklo_epi32(values[0], values[1]);
|
||||
__m128i temp1 = _mm_unpacklo_epi32(values[2], values[3]);
|
||||
vfloat lower = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1));
|
||||
vfloat upper = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1));
|
||||
vfloat lowerVal = _mm_castsi128_ps(_mm_unpacklo_epi64(temp0, temp1));
|
||||
vfloat upperVal = _mm_castsi128_ps(_mm_unpackhi_epi64(temp0, temp1));
|
||||
|
||||
vfloat diff = indexv - _mm_cvtepi32_ps(indexes);
|
||||
return vintpf(diff, upper, lower);
|
||||
return vintpf(diff, upperVal, lowerVal);
|
||||
}
|
||||
|
||||
// vectorized LUT access with integer indices. Clips at lower and upper bounds
|
||||
|
@ -64,8 +64,7 @@ constexpr unsigned int ARRAY2D_BYREFERENCE = 2;
|
||||
|
||||
|
||||
template<typename T>
|
||||
class array2D :
|
||||
public rtengine::NonCopyable
|
||||
class array2D
|
||||
{
|
||||
|
||||
private:
|
||||
@ -125,6 +124,45 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// creator type 3
|
||||
array2D(int w, int h, int startx, int starty, T ** source, unsigned int flags = 0) : width(w)
|
||||
{
|
||||
rows.resize(h);
|
||||
if (!(flags & ARRAY2D_BYREFERENCE)) {
|
||||
buffer.resize(h * width);
|
||||
T* start = buffer.data();
|
||||
for (ssize_t i = 0; i < h; ++i) {
|
||||
rows[i] = start + i * width;
|
||||
for (ssize_t j = 0; j < width; ++j) {
|
||||
rows[i][j] = source[i + starty][j + startx];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (ssize_t i = 0; i < h; ++i) {
|
||||
rows[i] = source[i + starty] + startx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
array2D(const array2D& other) :
|
||||
width(other.width),
|
||||
buffer(other.buffer)
|
||||
{
|
||||
initRows(other.rows.size());
|
||||
}
|
||||
|
||||
array2D& operator =(const array2D& other)
|
||||
{
|
||||
if (this != &other) {
|
||||
free();
|
||||
width = other.width;
|
||||
buffer = other.buffer;
|
||||
initRows(other.rows.size());
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void fill(const T val, bool multiThread = false)
|
||||
{
|
||||
const ssize_t height = rows.size();
|
||||
@ -140,18 +178,19 @@ public:
|
||||
{
|
||||
buffer.clear();
|
||||
rows.clear();
|
||||
width = 0;
|
||||
}
|
||||
|
||||
// use with indices
|
||||
T * operator[](int index)
|
||||
{
|
||||
assert((index >= 0) && (index < rows.size()));
|
||||
assert((index >= 0) && (std::size_t(index) < rows.size()));
|
||||
return rows[index];
|
||||
}
|
||||
|
||||
const T * operator[](int index) const
|
||||
{
|
||||
assert((index >= 0) && (index < rows.size()));
|
||||
assert((index >= 0) && (std::size_t(index) < rows.size()));
|
||||
return rows[index];
|
||||
}
|
||||
|
||||
@ -192,6 +231,24 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
array2D<T>& operator+=(const array2D<T>& rhs)
|
||||
{
|
||||
if (rhs.getWidth() == this->getWidth() && rhs.getHeight() == this->getHeight()) {
|
||||
for (int i = 0; i < getHeight(); ++i) {
|
||||
#ifdef _OPENMP
|
||||
#pragma omp simd
|
||||
#endif
|
||||
|
||||
for (int j = 0; j < getWidth(); ++j) {
|
||||
rows[i][j] += rhs[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
int getWidth() const
|
||||
{
|
||||
return width;
|
||||
|
@ -1656,7 +1656,7 @@ static int fact(const int n)
|
||||
// original RANSAC works on linear optimization problems. Our model is nonlinear. We
|
||||
// take advantage of the fact that lines interesting for our model are vantage lines
|
||||
// that meet in one vantage point for each subset of lines (vertical/horizontal).
|
||||
// Stragegy: we construct a model by (random) sampling within the subset of lines and
|
||||
// Strategy: we construct a model by (random) sampling within the subset of lines and
|
||||
// calculate the vantage point. Then we check the "distance" of all other lines to the
|
||||
// vantage point. The model that gives highest number of lines combined with the highest
|
||||
// total weight and lowest overall "distance" wins.
|
||||
@ -1754,7 +1754,7 @@ static void ransac(const dt_iop_ashift_line_t *lines, int *index_set, int *inout
|
||||
const float *L3 = lines[index_set[n]].L;
|
||||
|
||||
// we take the absolute value of the dot product of V and L as a measure
|
||||
// of the "distance" between point and line. Note that this is not the real euclidian
|
||||
// of the "distance" between point and line. Note that this is not the real euclidean
|
||||
// distance but - with the given normalization - just a pragmatically selected number
|
||||
// that goes to zero if V lies on L and increases the more V and L are apart
|
||||
const float d = fabs(vec3scalar(V, L3));
|
||||
|
@ -21,7 +21,7 @@
|
||||
* Changes versus the original code:
|
||||
* do not include "lsd.h" (not needed)
|
||||
* make all interface functions static
|
||||
* comment out unsused interface functions
|
||||
* comment out unused interface functions
|
||||
* catch (unlikely) division by zero near line 2035
|
||||
* rename rad1 and rad2 to radius1 and radius2 in reduce_region_radius()
|
||||
* to avoid naming conflict in windows build
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
virtual void onDestroy() = 0;
|
||||
};
|
||||
|
||||
Cache(unsigned long _size, Hook* _hook = nullptr) :
|
||||
explicit Cache(unsigned long _size, Hook* _hook = nullptr) :
|
||||
store_size(_size),
|
||||
hook(_hook)
|
||||
{
|
||||
|
@ -400,6 +400,13 @@ Camera constants:
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{ // Quality C, initial data by @agriggio, white frame samples provided by @noirsabb in #5862, color charts not processed yet
|
||||
"make_model" : "CANON EOS-1D X MARK III",
|
||||
"raw_crop": [ 72, 38, 5496, 3670 ],
|
||||
"masked_areas" : [ 40, 10, 5534, 70 ],
|
||||
"ranges" : { "white" : 16382 }
|
||||
},
|
||||
|
||||
{ // Quality A
|
||||
"make_model": "Canon EOS 5D Mark III",
|
||||
@ -519,8 +526,8 @@ Camera constants:
|
||||
}
|
||||
},
|
||||
|
||||
{ // Quality B, some missing scaling factors are safely guessed
|
||||
"make_model": "Canon EOS 6D Mark II",
|
||||
{ // Quality B, some missing scaling factors are safely guessed; assuming the RP is the same as the 6DII because they share sensors
|
||||
"make_model": [ "Canon EOS 6D Mark II", "Canon EOS RP" ],
|
||||
"dcraw_matrix": [ 6875,-970,-932,-4691,12459,2501,-874,1953,5809 ], // DNG v_9.12 D65
|
||||
"raw_crop": [ 120, 44, 6264, 4180 ], // fullraw size 6384x4224 useful 120,44,6264x4180
|
||||
// "raw_crop": [ 128, 52, 6248, 4168 ], // official jpeg crop 120+12,44+12,6240x4160
|
||||
@ -866,8 +873,8 @@ Camera constants:
|
||||
}
|
||||
},
|
||||
|
||||
{ // Quality A, only one scaling factor missing and guessed safely, EOS 700D not tested but available samples look same as 650D
|
||||
"make_model": [ "Canon EOS 650D", "Canon EOS Rebel T4i", "Canon EOS Kiss X6i", "Canon EOS 700D", "Canon EOS Rebel T5i", "Canon EOS Kiss X7i" ],
|
||||
{ // Quality A, only one scaling factor missing and guessed safely, EOS 700D not tested but available samples look same as 650D, EOS 100D shares sensor and came out the same time as the 700D
|
||||
"make_model": [ "Canon EOS 650D", "Canon EOS Rebel T4i", "Canon EOS Kiss X6i", "Canon EOS 700D", "Canon EOS Rebel T5i", "Canon EOS Kiss X7i", "Canon EOS 100D", "Canon EOS Rebel SL1", "Canon EOS Kiss X7" ],
|
||||
"dcraw_matrix": [ 6602,-841,-939,-4472,12458,2247,-975,2039,6148 ],
|
||||
"ranges": {
|
||||
"white": [
|
||||
@ -1014,6 +1021,14 @@ Camera constants:
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{ // Quality C, samples provided by falket #5495
|
||||
"make_model": [ "Canon EOS 2000D", "Canon EOS Rebel T7", "Canon EOS Kiss X90" ],
|
||||
// raw_crop is handled by dcraw
|
||||
// "dcraw_matrix": [ 8532, -701, -1167, -4095, 11879, 2508, -797, 2424, 7010 ], // Adobe DNG v.10.3
|
||||
"dcraw_matrix": [ 8300, -2110, -1120, -4917, 12694, 2482, -938, 2141, 5666 ], // Adobe DNG v.10.3 (v2)
|
||||
"ranges": { "white": 15300 } // typical value, very non-linear behavior near clipping
|
||||
},
|
||||
|
||||
// Canon MILC (mirrorless interchangeable-lens camera)
|
||||
|
||||
@ -1293,8 +1308,8 @@ Camera constants:
|
||||
},
|
||||
|
||||
{ // Quality C
|
||||
"make_model": "FUJIFILM GFX 100",
|
||||
"dcraw_matrix" : [16212, -8423, -1583, -4336, 12583, 1937, -195, 726, 6199], // taken from ART
|
||||
"make_model": [ "FUJIFILM GFX 100", "FUJIFILM GFX100S" ],
|
||||
"dcraw_matrix" : [ 16212, -8423, -1583, -4336, 12583, 1937, -195, 726, 6199 ], // taken from ART
|
||||
"raw_crop": [ 0, 2, 11664, 8734 ]
|
||||
},
|
||||
|
||||
@ -1408,6 +1423,11 @@ Camera constants:
|
||||
"ranges": { "white": 16100 }
|
||||
},
|
||||
|
||||
{ // Quality C
|
||||
"make_model": "FUJIFILM X-E4",
|
||||
"raw_crop": [ 0, 5, 6252, 4126 ]
|
||||
},
|
||||
|
||||
{ // Quality B, samples provided by Daniel Catalina #5824
|
||||
"make_model": "FUJIFILM X-T2",
|
||||
"dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65
|
||||
@ -1420,7 +1440,7 @@ Camera constants:
|
||||
"make_model": "FUJIFILM X-PRO2",
|
||||
"dcraw_matrix": [ 11434,-4948,-1210,-3746,12042,1903,-666,1479,5235 ], // DNG_v9.4 D65
|
||||
"raw_crop": [ 0, 5, 6032, 4026 ], // see X-T2
|
||||
"ranges": { "white": [ 16105, 16270, 16082 ] } // These values are the lowest pixel values >16000 for all ISOs. LENR has a negligble effect.
|
||||
"ranges": { "white": [ 16105, 16270, 16082 ] } // These values are the lowest pixel values >16000 for all ISOs. LENR has a negligible effect.
|
||||
// No aperture scaling data provided, but likely negligible
|
||||
},
|
||||
|
||||
@ -1433,7 +1453,7 @@ Camera constants:
|
||||
},
|
||||
|
||||
{ // Quality B
|
||||
"make_model": [ "FUJIFILM X-T30", "FUJIFILM X100V", "FUJIFILM X-T4" ],
|
||||
"make_model": [ "FUJIFILM X-T30", "FUJIFILM X100V", "FUJIFILM X-T4", "FUJIFILM X-S10" ],
|
||||
"dcraw_matrix": [ 13426,-6334,-1177,-4244,12136,2371,-580,1303,5980 ], // DNG_v11, standard_v2 d65
|
||||
"raw_crop": [ 0, 5, 6252, 4176]
|
||||
},
|
||||
@ -1477,6 +1497,11 @@ Camera constants:
|
||||
"raw_crop": [ 0, 0, 0, -18 ] // 18 rows at bottom are garbage
|
||||
},
|
||||
|
||||
{ // Quality C, only raw crop
|
||||
"make_model": "Leica SL2-S",
|
||||
"raw_crop": [ 0, 2, 6024, 4042 ] // 2 rows at top and 4 rows at bottom are black
|
||||
},
|
||||
|
||||
{ // Quality B, Matrix from ART
|
||||
"make_model" : "LEICA V-LUX 5",
|
||||
"dcraw_matrix" : [9803, -4185, -992, -4066, 12578, 1628, -838, 1824, 5288]
|
||||
@ -1595,6 +1620,22 @@ Camera constants:
|
||||
} // No significant influence of ISO
|
||||
// No aperture scaling reported
|
||||
},
|
||||
|
||||
{ // Quality B, samples provided by arvindpgh (#6066)
|
||||
// Sensor shows some non-uniformity, need other sample to verify
|
||||
// There seems to be some aperture scaling, but insufficient data to accurately determine
|
||||
"make_model": "Nikon COOLPIX P950",
|
||||
"dcraw_matrix": [ 13307,-5641,-1290,-2048,10581,1689,-64,1222,5176 ], // ColorMatrix2 from Adobe DNG Converter 13.1
|
||||
"ranges": {
|
||||
"black": 200,
|
||||
"white": [
|
||||
{ "iso": [ 100 ], "levels": [ 3994, 4093, 3963 ] }, // LENR can be quite aggressive at higher ISO
|
||||
{ "iso": [ 200 ], "levels": [ 3993, 4092, 3962 ] },
|
||||
{ "iso": [ 400 ], "levels": [ 3992, 4091, 3961 ] },
|
||||
{ "iso": [ 800, 1600, 3200, 6400 ], "levels": [ 3996, 4095, 3965 ] }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
{ // Quality B, no LENR samples
|
||||
"make_model": "Nikon D5",
|
||||
|
@ -843,7 +843,7 @@ inline void crxFillBuffer(CrxBitstream* bitStrm)
|
||||
#endif
|
||||
|
||||
if (bitStrm->curBufSize < 1) { // nothing read
|
||||
throw std::exception();
|
||||
throw std::runtime_error("Unexpected end of file in CRX bitstream");
|
||||
}
|
||||
|
||||
bitStrm->mdatSize -= bitStrm->curBufSize;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
|
||||
*
|
||||
* Changes in Ciecam02 with Ciecam16 Jacques Desmis jdesmis@gmail.com 12/2020
|
||||
* RawTherapee is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
@ -48,7 +48,7 @@ void Ciecam02::curvecolorfloat (float satind, float satval, float &sres, float p
|
||||
}
|
||||
}
|
||||
|
||||
void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf & outCurve)
|
||||
void Ciecam02::curveJfloat (float br, float contr, float thr, const LUTu & histogram, LUTf & outCurve)
|
||||
{
|
||||
|
||||
// check if brightness curve is needed
|
||||
@ -97,7 +97,6 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf
|
||||
outCurve.makeIdentity (32767.f);
|
||||
}
|
||||
|
||||
|
||||
if (contr > 0.00001f || contr < -0.00001f) {
|
||||
|
||||
// compute mean luminance of the image with the curve applied
|
||||
@ -110,6 +109,9 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf
|
||||
}
|
||||
|
||||
avg /= sum;
|
||||
float thrmin = (thr - contr / 250.0f);
|
||||
float thrmax = (thr + contr / 250.0f);
|
||||
|
||||
std::vector<double> contrastcurvePoints (9);
|
||||
|
||||
contrastcurvePoints[0] = double (DCT_NURBS);
|
||||
@ -117,11 +119,11 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf
|
||||
contrastcurvePoints[1] = 0.f; // black point. Value in [0 ; 1] range
|
||||
contrastcurvePoints[2] = 0.f; // black point. Value in [0 ; 1] range
|
||||
|
||||
contrastcurvePoints[3] = avg - avg * (0.6f - contr / 250.0f); // toe point
|
||||
contrastcurvePoints[4] = avg - avg * (0.6f + contr / 250.0f); // value at toe point
|
||||
contrastcurvePoints[3] = avg - avg * thrmin; // toe point
|
||||
contrastcurvePoints[4] = avg - avg * thrmax;// value at toe point
|
||||
|
||||
contrastcurvePoints[5] = avg + (1 - avg) * (0.6f - contr / 250.0f); // shoulder point
|
||||
contrastcurvePoints[6] = avg + (1 - avg) * (0.6f + contr / 250.0f); // value at shoulder point
|
||||
contrastcurvePoints[5] = avg + (1.f - avg) * thrmin; // shoulder point
|
||||
contrastcurvePoints[6] = avg + (1.f - avg) * thrmax; // value at shoulder point
|
||||
|
||||
contrastcurvePoints[7] = 1.f; // white point
|
||||
contrastcurvePoints[8] = 1.f; // value at white point
|
||||
@ -182,26 +184,30 @@ float Ciecam02::calculate_fl_from_la_ciecam02float ( float la )
|
||||
return (0.2f * k * la5) + (0.1f * (1.0f - k) * (1.0f - k) * std::cbrt (la5));
|
||||
}
|
||||
|
||||
float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb )
|
||||
float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int c16)
|
||||
{
|
||||
float r, g, b;
|
||||
float rc, gc, bc;
|
||||
float rp, gp, bp;
|
||||
float rpa, gpa, bpa;
|
||||
// gamu = 1;
|
||||
xyz_to_cat02float ( r, g, b, x, y, z);
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16);
|
||||
|
||||
rc = r * (((y * d) / r) + (1.0f - d));
|
||||
gc = g * (((y * d) / g) + (1.0f - d));
|
||||
bc = b * (((y * d) / b) + (1.0f - d));
|
||||
|
||||
cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc);
|
||||
|
||||
// if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk
|
||||
rp = MAXR (rp, 0.0f);
|
||||
gp = MAXR (gp, 0.0f);
|
||||
bp = MAXR (bp, 0.0f);
|
||||
// }
|
||||
if(c16 == 1) {
|
||||
cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, c16);
|
||||
rp = MAXR (rp, 0.0f);
|
||||
gp = MAXR (gp, 0.0f);
|
||||
bp = MAXR (bp, 0.0f);
|
||||
} else {
|
||||
rp = MAXR (rc, 0.0f);
|
||||
gp = MAXR (gc, 0.0f);
|
||||
bp = MAXR (bc, 0.0f);
|
||||
}
|
||||
|
||||
rpa = nonlinear_adaptationfloat ( rp, fl );
|
||||
gpa = nonlinear_adaptationfloat ( gp, fl );
|
||||
@ -210,97 +216,121 @@ float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, f
|
||||
return ((2.0f * rpa) + gpa + ((1.0f / 20.0f) * bpa) - 0.305f) * nbb;
|
||||
}
|
||||
|
||||
void Ciecam02::xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z)
|
||||
void Ciecam02::xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int c16)
|
||||
{
|
||||
// gamu = 1;
|
||||
//
|
||||
// if (gamu == 0) {
|
||||
// r = ( 0.7328f * x) + (0.4296f * y) - (0.1624f * z);
|
||||
// g = (-0.7036f * x) + (1.6975f * y) + (0.0061f * z);
|
||||
// b = ( 0.0030f * x) + (0.0136f * y) + (0.9834f * z);
|
||||
// } else if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk
|
||||
//original cat02
|
||||
//r = ( 0.7328 * x) + (0.4296 * y) - (0.1624 * z);
|
||||
//g = (-0.7036 * x) + (1.6975 * y) + (0.0061 * z);
|
||||
//b = ( 0.0000 * x) + (0.0000 * y) + (1.0000 * z);
|
||||
r = ( 1.007245f * x) + (0.011136f * y) - (0.018381f * z); //Changjun Li
|
||||
g = (-0.318061f * x) + (1.314589f * y) + (0.003471f * z);
|
||||
b = ( 0.0000f * x) + (0.0000f * y) + (1.0000f * z);
|
||||
// }
|
||||
if(c16 == 1) {//cat02
|
||||
r = ( 1.007245f * x) + (0.011136f * y) - (0.018381f * z); //Changjun Li
|
||||
g = (-0.318061f * x) + (1.314589f * y) + (0.003471f * z);
|
||||
b = ( 0.0000f * x) + (0.0000f * y) + (1.0000f * z);
|
||||
} else {//cat16
|
||||
r = ( 0.401288f * x) + (0.650173f * y) - (0.051461f * z); //cat16
|
||||
g = (-0.250268f * x) + (1.204414f * y) + (0.045854f * z);
|
||||
b = ( -0.002079f * x) + (0.048952f * y) + (0.953127f * z);
|
||||
}
|
||||
|
||||
}
|
||||
#ifdef __SSE2__
|
||||
void Ciecam02::xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z )
|
||||
void Ciecam02::xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z, int c16)
|
||||
{
|
||||
//gamut correction M.H.Brill S.Susstrunk
|
||||
r = ( F2V (1.007245f) * x) + (F2V (0.011136f) * y) - (F2V (0.018381f) * z); //Changjun Li
|
||||
g = (F2V (-0.318061f) * x) + (F2V (1.314589f) * y) + (F2V (0.003471f) * z);
|
||||
b = z;
|
||||
if(c16 == 1) {
|
||||
r = ( F2V (1.007245f) * x) + (F2V (0.011136f) * y) - (F2V (0.018381f) * z); //Changjun Li
|
||||
g = (F2V (-0.318061f) * x) + (F2V (1.314589f) * y) + (F2V (0.003471f) * z);
|
||||
b = z;
|
||||
} else {
|
||||
//cat16
|
||||
r = ( F2V (0.401288f) * x) + (F2V (0.650173f) * y) - (F2V (0.051461f) * z); //Changjun Li
|
||||
g = -(F2V (0.250268f) * x) + (F2V (1.204414f) * y) + (F2V (0.045854f) * z);
|
||||
b = -(F2V(0.002079f) * x) + (F2V(0.048952f) * y) + (F2V(0.953127f) * z);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void Ciecam02::cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b)
|
||||
void Ciecam02::cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16)
|
||||
{
|
||||
// gamu = 1;
|
||||
//
|
||||
// if (gamu == 0) {
|
||||
// x = ( 1.096124f * r) - (0.278869f * g) + (0.182745f * b);
|
||||
// y = ( 0.454369f * r) + (0.473533f * g) + (0.072098f * b);
|
||||
// z = (-0.009628f * r) - (0.005698f * g) + (1.015326f * b);
|
||||
// } else if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk
|
||||
//original cat02
|
||||
//x = ( 1.0978566 * r) - (0.277843 * g) + (0.179987 * b);
|
||||
//y = ( 0.455053 * r) + (0.473938 * g) + (0.0710096* b);
|
||||
//z = ( 0.000000 * r) - (0.000000 * g) + (1.000000 * b);
|
||||
x = ( 0.99015849f * r) - (0.00838772f * g) + (0.018229217f * b); //Changjun Li
|
||||
y = ( 0.239565979f * r) + (0.758664642f * g) + (0.001770137f * b);
|
||||
z = ( 0.000000f * r) - (0.000000f * g) + (1.000000f * b);
|
||||
// }
|
||||
if(c16 == 1) {
|
||||
x = ( 0.99015849f * r) - (0.00838772f * g) + (0.018229217f * b); //Changjun Li
|
||||
y = ( 0.239565979f * r) + (0.758664642f * g) + (0.001770137f * b);
|
||||
z = ( 0.000000f * r) - (0.000000f * g) + (1.000000f * b);
|
||||
} else {//cat16
|
||||
x = ( 1.86206786f * r) - (1.01125463f * g) + (0.14918677f * b); //Cat16
|
||||
y = ( 0.38752654f * r) + (0.62144744f * g) + (-0.00897398f * b);
|
||||
z = ( -0.0158415f * r) - (0.03412294f * g) + (1.04996444f * b);
|
||||
}
|
||||
|
||||
}
|
||||
#ifdef __SSE2__
|
||||
void Ciecam02::cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b )
|
||||
void Ciecam02::cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16 )
|
||||
{
|
||||
//gamut correction M.H.Brill S.Susstrunk
|
||||
x = ( F2V (0.99015849f) * r) - (F2V (0.00838772f) * g) + (F2V (0.018229217f) * b); //Changjun Li
|
||||
y = ( F2V (0.239565979f) * r) + (F2V (0.758664642f) * g) + (F2V (0.001770137f) * b);
|
||||
z = b;
|
||||
if(c16 == 1) {//cat02
|
||||
x = ( F2V (0.99015849f) * r) - (F2V (0.00838772f) * g) + (F2V (0.018229217f) * b); //Changjun Li
|
||||
y = ( F2V (0.239565979f) * r) + (F2V (0.758664642f) * g) + (F2V (0.001770137f) * b);
|
||||
z = b;
|
||||
} else {
|
||||
//cat16
|
||||
x = ( F2V (1.86206786f) * r) - (F2V (1.01125463f) * g) + (F2V (0.14918677f) * b);
|
||||
y = ( F2V (0.38752654f) * r) + (F2V (0.621447744f) * g) - (F2V (0.00897398f) * b);
|
||||
z = -(F2V(0.0158415f) * r) - (F2V(0.03412294f) * g) + (F2V(1.04996444f) * b);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void Ciecam02::hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b )
|
||||
void Ciecam02::hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16)
|
||||
{
|
||||
x = (1.910197f * r) - (1.112124f * g) + (0.201908f * b);
|
||||
y = (0.370950f * r) + (0.629054f * g) - (0.000008f * b);
|
||||
z = b;
|
||||
x = (1.910197f * r) - (1.112124f * g) + (0.201908f * b);
|
||||
y = (0.370950f * r) + (0.629054f * g) - (0.000008f * b);
|
||||
z = b;
|
||||
}
|
||||
#ifdef __SSE2__
|
||||
void Ciecam02::hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b )
|
||||
void Ciecam02::hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16)
|
||||
{
|
||||
x = (F2V (1.910197f) * r) - (F2V (1.112124f) * g) + (F2V (0.201908f) * b);
|
||||
y = (F2V (0.370950f) * r) + (F2V (0.629054f) * g) - (F2V (0.000008f) * b);
|
||||
z = b;
|
||||
x = (F2V (1.910197f) * r) - (F2V (1.112124f) * g) + (F2V (0.201908f) * b);
|
||||
y = (F2V (0.370950f) * r) + (F2V (0.629054f) * g) - (F2V (0.000008f) * b);
|
||||
z = b;
|
||||
}
|
||||
#endif
|
||||
|
||||
void Ciecam02::cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b)
|
||||
void Ciecam02::cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b, int c16)
|
||||
{
|
||||
// gamu = 1;
|
||||
//
|
||||
// if (gamu == 0) {
|
||||
// original cat02
|
||||
// rh = ( 0.7409792f * r) + (0.2180250f * g) + (0.0410058f * b);
|
||||
// gh = ( 0.2853532f * r) + (0.6242014f * g) + (0.0904454f * b);
|
||||
// bh = (-0.0096280f * r) - (0.0056980f * g) + (1.0153260f * b);
|
||||
// } else if (gamu == 1) { //Changjun Li
|
||||
rh = ( 0.550930835f * r) + (0.519435987f * g) - ( 0.070356303f * b);
|
||||
gh = ( 0.055954056f * r) + (0.89973132f * g) + (0.044315524f * b);
|
||||
bh = (0.0f * r) - (0.0f * g) + (1.0f * b);
|
||||
// }
|
||||
if(c16 == 1) {//cat02
|
||||
rh = ( 0.550930835f * r) + (0.519435987f * g) - ( 0.070356303f * b);
|
||||
gh = ( 0.055954056f * r) + (0.89973132f * g) + (0.044315524f * b);
|
||||
bh = (0.0f * r) - (0.0f * g) + (1.0f * b);
|
||||
} else {//cat16
|
||||
rh = ( 1.f * r) + (0.f * g) + ( 0.f * b);
|
||||
gh = ( 0.f * r) + (1.f * g) + (0.f * b);
|
||||
bh = (0.0f * r) + (0.0f * g) + (1.0f * b);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef __SSE2__
|
||||
void Ciecam02::cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b)
|
||||
void Ciecam02::cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b, int c16)
|
||||
{
|
||||
if(c16 == 1) {
|
||||
//Changjun Li
|
||||
rh = ( F2V (0.550930835f) * r) + (F2V (0.519435987f) * g) - ( F2V (0.070356303f) * b);
|
||||
gh = ( F2V (0.055954056f) * r) + (F2V (0.89973132f) * g) + (F2V (0.044315524f) * b);
|
||||
bh = b;
|
||||
rh = ( F2V (0.550930835f) * r) + (F2V (0.519435987f) * g) - ( F2V (0.070356303f) * b);
|
||||
gh = ( F2V (0.055954056f) * r) + (F2V (0.89973132f) * g) + (F2V (0.044315524f) * b);
|
||||
bh = b;
|
||||
} else {//cat16
|
||||
rh = ( F2V (1.f) * r) + (F2V (0.f) * g) + ( F2V (0.f) * b);
|
||||
gh = ( F2V (0.f) * r) + (F2V (1.f) * g) + (F2V (0.f) * b);
|
||||
bh = b;
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -399,7 +429,7 @@ void Ciecam02::calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, v
|
||||
#endif
|
||||
|
||||
void Ciecam02::initcam1float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb,
|
||||
float &cz, float &aw, float &wh, float &pfl, float &fl, float c)
|
||||
float &cz, float &aw, float &wh, float &pfl, float &fl, float c, int c16)
|
||||
{
|
||||
n = yb / yw;
|
||||
|
||||
@ -412,13 +442,13 @@ void Ciecam02::initcam1float (float yb, float pilotd, float f, float la, float x
|
||||
fl = calculate_fl_from_la_ciecam02float ( la );
|
||||
nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f );
|
||||
cz = 1.48f + sqrt ( n );
|
||||
aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb);
|
||||
aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, c16);
|
||||
wh = ( 4.0f / c ) * ( aw + 4.0f ) * pow_F ( fl, 0.25f );
|
||||
pfl = pow_F ( fl, 0.25f );
|
||||
}
|
||||
|
||||
void Ciecam02::initcam2float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb,
|
||||
float &cz, float &aw, float &fl)
|
||||
float &cz, float &aw, float &fl, int c16)
|
||||
{
|
||||
n = yb / yw;
|
||||
|
||||
@ -432,12 +462,12 @@ void Ciecam02::initcam2float (float yb, float pilotd, float f, float la, float x
|
||||
fl = calculate_fl_from_la_ciecam02float ( la );
|
||||
nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f );
|
||||
cz = 1.48f + sqrt ( n );
|
||||
aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb);
|
||||
aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, c16);
|
||||
}
|
||||
|
||||
void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q, float &M, float &s, float aw, float fl, float wh,
|
||||
float x, float y, float z, float xw, float yw, float zw,
|
||||
float c, float nc, float pow1, float nbb, float ncb, float pfl, float cz, float d)
|
||||
float c, float nc, float pow1, float nbb, float ncb, float pfl, float cz, float d, int c16)
|
||||
|
||||
{
|
||||
float r, g, b;
|
||||
@ -448,20 +478,23 @@ void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q
|
||||
float a, ca, cb;
|
||||
float e, t;
|
||||
float myh;
|
||||
// gamu = 1;
|
||||
xyz_to_cat02float ( r, g, b, x, y, z);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw);
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16);
|
||||
rc = r * (((yw * d) / rw) + (1.f - d));
|
||||
gc = g * (((yw * d) / gw) + (1.f - d));
|
||||
bc = b * (((yw * d) / bw) + (1.f - d));
|
||||
|
||||
cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc);
|
||||
cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, c16);
|
||||
|
||||
// if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk
|
||||
rp = MAXR (rp, 0.0f);
|
||||
gp = MAXR (gp, 0.0f);
|
||||
bp = MAXR (bp, 0.0f);
|
||||
// }
|
||||
if(c16 == 1) {//cat02
|
||||
rp = MAXR (rp, 0.0f);
|
||||
gp = MAXR (gp, 0.0f);
|
||||
bp = MAXR (bp, 0.0f);
|
||||
} else {//cat16
|
||||
rp = MAXR (rc, 0.0f);
|
||||
gp = MAXR (gc, 0.0f);
|
||||
bp = MAXR (bc, 0.0f);
|
||||
}
|
||||
|
||||
rpa = nonlinear_adaptationfloat ( rp, fl );
|
||||
gpa = nonlinear_adaptationfloat ( gp, fl );
|
||||
@ -478,9 +511,7 @@ void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q
|
||||
|
||||
a = ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb;
|
||||
|
||||
// if (gamu == 1) {
|
||||
a = MAXR (a, 0.0f); //gamut correction M.H.Brill S.Susstrunk
|
||||
// }
|
||||
|
||||
J = pow_F ( a / aw, c * cz * 0.5f);
|
||||
|
||||
@ -499,7 +530,7 @@ void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q
|
||||
#ifdef __SSE2__
|
||||
void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh,
|
||||
vfloat x, vfloat y, vfloat z, vfloat xw, vfloat yw, vfloat zw,
|
||||
vfloat c, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d)
|
||||
vfloat c, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d, int c16)
|
||||
|
||||
{
|
||||
vfloat r, g, b;
|
||||
@ -510,18 +541,26 @@ void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloa
|
||||
vfloat a, ca, cb;
|
||||
vfloat e, t;
|
||||
|
||||
xyz_to_cat02float ( r, g, b, x, y, z);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw);
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16);
|
||||
vfloat onev = F2V (1.f);
|
||||
rc = r * (((yw * d) / rw) + (onev - d));
|
||||
gc = g * (((yw * d) / gw) + (onev - d));
|
||||
bc = b * (((yw * d) / bw) + (onev - d));
|
||||
|
||||
cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc);
|
||||
cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, c16);
|
||||
|
||||
//gamut correction M.H.Brill S.Susstrunk
|
||||
rp = vmaxf (rp, ZEROV);
|
||||
gp = vmaxf (gp, ZEROV);
|
||||
bp = vmaxf (bp, ZEROV);
|
||||
if(c16 == 1) {//cat02
|
||||
rp = vmaxf (rp, ZEROV);
|
||||
gp = vmaxf (gp, ZEROV);
|
||||
bp = vmaxf (bp, ZEROV);
|
||||
} else {//cat16
|
||||
rp = vmaxf (rc, ZEROV);
|
||||
gp = vmaxf (gc, ZEROV);
|
||||
bp = vmaxf (bc, ZEROV);
|
||||
}
|
||||
|
||||
rpa = nonlinear_adaptationfloat ( rp, fl );
|
||||
gpa = nonlinear_adaptationfloat ( gp, fl );
|
||||
bpa = nonlinear_adaptationfloat ( bp, fl );
|
||||
@ -556,7 +595,7 @@ void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloa
|
||||
|
||||
void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, float fl,
|
||||
float x, float y, float z, float xw, float yw, float zw,
|
||||
float c, float nc, float pow1, float nbb, float ncb, float cz, float d)
|
||||
float c, float nc, float pow1, float nbb, float ncb, float cz, float d, int c16)
|
||||
|
||||
{
|
||||
float r, g, b;
|
||||
@ -567,20 +606,24 @@ void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, f
|
||||
float a, ca, cb;
|
||||
float e, t;
|
||||
float myh;
|
||||
// int gamu = 1;
|
||||
xyz_to_cat02float ( r, g, b, x, y, z);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw);
|
||||
xyz_to_cat02float ( r, g, b, x, y, z, c16);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16);
|
||||
rc = r * (((yw * d) / rw) + (1.f - d));
|
||||
gc = g * (((yw * d) / gw) + (1.f - d));
|
||||
bc = b * (((yw * d) / bw) + (1.f - d));
|
||||
|
||||
cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc);
|
||||
cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, c16);
|
||||
|
||||
if(c16 == 1) {//cat02
|
||||
rp = MAXR (rp, 0.0f);
|
||||
gp = MAXR (gp, 0.0f);
|
||||
bp = MAXR (bp, 0.0f);
|
||||
} else {//cat16
|
||||
rp = MAXR (rc, 0.0f);
|
||||
gp = MAXR (gc, 0.0f);
|
||||
bp = MAXR (bc, 0.0f);
|
||||
}
|
||||
|
||||
// if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk
|
||||
rp = MAXR (rp, 0.0f);
|
||||
gp = MAXR (gp, 0.0f);
|
||||
bp = MAXR (bp, 0.0f);
|
||||
// }
|
||||
|
||||
#ifdef __SSE2__
|
||||
vfloat pv = _mm_setr_ps(rp, gp, bp, 1.f);
|
||||
@ -606,9 +649,7 @@ void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, f
|
||||
|
||||
a = ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb;
|
||||
|
||||
// if (gamu == 1) {
|
||||
a = MAXR (a, 0.0f); //gamut correction M.H.Brill S.Susstrunk
|
||||
// }
|
||||
|
||||
J = pow_F ( a / aw, c * cz * 0.5f);
|
||||
|
||||
@ -623,7 +664,7 @@ void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, f
|
||||
|
||||
void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, float C, float h,
|
||||
float xw, float yw, float zw,
|
||||
float c, float nc, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw)
|
||||
float c, float nc, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw, int c16)
|
||||
{
|
||||
float r, g, b;
|
||||
float rc, gc, bc;
|
||||
@ -632,8 +673,7 @@ void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, fl
|
||||
float rw, gw, bw;
|
||||
float a, ca, cb;
|
||||
float e, t;
|
||||
// gamu = 1;
|
||||
xyz_to_cat02float(rw, gw, bw, xw, yw, zw);
|
||||
xyz_to_cat02float(rw, gw, bw, xw, yw, zw, c16);
|
||||
e = ((961.53846f) * nc * ncb) * (xcosf(h * rtengine::RT_PI_F_180 + 2.0f) + 3.8f);
|
||||
|
||||
#ifdef __SSE2__
|
||||
@ -662,20 +702,27 @@ void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, fl
|
||||
gp = inverse_nonlinear_adaptationfloat(gpa, fl);
|
||||
bp = inverse_nonlinear_adaptationfloat(bpa, fl);
|
||||
#endif
|
||||
hpe_to_xyzfloat(x, y, z, rp, gp, bp);
|
||||
xyz_to_cat02float(rc, gc, bc, x, y, z);
|
||||
|
||||
r = rc / (((yw * d) / rw) + (1.0f - d));
|
||||
g = gc / (((yw * d) / gw) + (1.0f - d));
|
||||
b = bc / (((yw * d) / bw) + (1.0f - d));
|
||||
if(c16 == 1) {//cat02
|
||||
hpe_to_xyzfloat(x, y, z, rp, gp, bp, c16);
|
||||
xyz_to_cat02float(rc, gc, bc, x, y, z, c16);
|
||||
|
||||
cat02_to_xyzfloat(x, y, z, r, g, b);
|
||||
r = rc / (((yw * d) / rw) + (1.0f - d));
|
||||
g = gc / (((yw * d) / gw) + (1.0f - d));
|
||||
b = bc / (((yw * d) / bw) + (1.0f - d));
|
||||
} else {//cat16
|
||||
r = rp / (((yw * d) / rw) + (1.0f - d));
|
||||
g = gp / (((yw * d) / gw) + (1.0f - d));
|
||||
b = bp / (((yw * d) / bw) + (1.0f - d));
|
||||
}
|
||||
|
||||
cat02_to_xyzfloat(x, y, z, r, g, b, c16);
|
||||
}
|
||||
|
||||
#ifdef __SSE2__
|
||||
void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat C, vfloat h,
|
||||
vfloat xw, vfloat yw, vfloat zw,
|
||||
vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz)
|
||||
vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz, int c16)
|
||||
{
|
||||
vfloat r, g, b;
|
||||
vfloat rc, gc, bc;
|
||||
@ -684,7 +731,7 @@ void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J
|
||||
vfloat rw, gw, bw;
|
||||
vfloat a, ca, cb;
|
||||
vfloat e, t;
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw);
|
||||
xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, c16);
|
||||
e = ((F2V (961.53846f)) * nc * ncb) * (xcosf ( ((h * F2V (rtengine::RT_PI)) / F2V (180.0f)) + F2V (2.0f) ) + F2V (3.8f));
|
||||
a = pow_F ( J / F2V (100.0f), reccmcz ) * aw;
|
||||
t = pow_F ( F2V (10.f) * C / (vsqrtf ( J ) * pow1), F2V (1.1111111f) );
|
||||
@ -696,14 +743,20 @@ void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J
|
||||
gp = inverse_nonlinear_adaptationfloat ( gpa, fl );
|
||||
bp = inverse_nonlinear_adaptationfloat ( bpa, fl );
|
||||
|
||||
hpe_to_xyzfloat ( x, y, z, rp, gp, bp );
|
||||
xyz_to_cat02float ( rc, gc, bc, x, y, z );
|
||||
if(c16 == 1) {//cat02
|
||||
hpe_to_xyzfloat ( x, y, z, rp, gp, bp, c16);
|
||||
xyz_to_cat02float ( rc, gc, bc, x, y, z, c16 );
|
||||
|
||||
r = rc / (((yw * d) / rw) + (F2V (1.0f) - d));
|
||||
g = gc / (((yw * d) / gw) + (F2V (1.0f) - d));
|
||||
b = bc / (((yw * d) / bw) + (F2V (1.0f) - d));
|
||||
r = rc / (((yw * d) / rw) + (F2V (1.0f) - d));
|
||||
g = gc / (((yw * d) / gw) + (F2V (1.0f) - d));
|
||||
b = bc / (((yw * d) / bw) + (F2V (1.0f) - d));
|
||||
} else {//cat16
|
||||
r = rp / (((yw * d) / rw) + (F2V (1.0f) - d));
|
||||
g = gp / (((yw * d) / gw) + (F2V (1.0f) - d));
|
||||
b = bp / (((yw * d) / bw) + (F2V (1.0f) - d));
|
||||
}
|
||||
|
||||
cat02_to_xyzfloat ( x, y, z, r, g, b );
|
||||
cat02_to_xyzfloat ( x, y, z, r, g, b, c16 );
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -761,6 +814,4 @@ vfloat Ciecam02::inverse_nonlinear_adaptationfloat ( vfloat c, vfloat fl )
|
||||
return (F2V (100.0f) / fl) * pow_F ( (F2V (27.13f) * c) / (F2V (400.0f) - c), F2V (2.38095238f) );
|
||||
}
|
||||
#endif
|
||||
//end CIECAM Billy Bigg
|
||||
|
||||
}
|
||||
|
@ -33,17 +33,17 @@ namespace rtengine
|
||||
{
|
||||
|
||||
class Ciecam02
|
||||
{
|
||||
{//also used with Ciecam16
|
||||
private:
|
||||
static float d_factorfloat ( float f, float la );
|
||||
static float calculate_fl_from_la_ciecam02float ( float la );
|
||||
static float achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb);
|
||||
static void xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z);
|
||||
static void cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b);
|
||||
static float achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int c16);
|
||||
static void xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int c16);
|
||||
static void cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b, int c16);
|
||||
|
||||
#ifdef __SSE2__
|
||||
static void xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z );
|
||||
static void cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b );
|
||||
static void xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z, int c16);
|
||||
static void cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b, int c16);
|
||||
static vfloat nonlinear_adaptationfloat ( vfloat c, vfloat fl );
|
||||
#endif
|
||||
|
||||
@ -52,20 +52,20 @@ private:
|
||||
static float inverse_nonlinear_adaptationfloat ( float c, float fl );
|
||||
static void calculate_abfloat ( float &aa, float &bb, float h, float e, float t, float nbb, float a );
|
||||
static void Aab_to_rgbfloat ( float &r, float &g, float &b, float A, float aa, float bb, float nbb );
|
||||
static void hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b );
|
||||
static void cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b);
|
||||
static void hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16);
|
||||
static void cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int c16);
|
||||
#ifdef __SSE2__
|
||||
static vfloat inverse_nonlinear_adaptationfloat ( vfloat c, vfloat fl );
|
||||
static void calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a );
|
||||
static void Aab_to_rgbfloat ( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb );
|
||||
static void hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b );
|
||||
static void cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b );
|
||||
static void hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16);
|
||||
static void cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b, int c16);
|
||||
#endif
|
||||
|
||||
public:
|
||||
Ciecam02 () {}
|
||||
static void curvecolorfloat (float satind, float satval, float &sres, float parsat);
|
||||
static void curveJfloat (float br, float contr, const LUTu & histogram, LUTf & outCurve ) ;
|
||||
static void curveJfloat (float br, float contr, float thr, const LUTu & histogram, LUTf & outCurve ) ;
|
||||
|
||||
/**
|
||||
* Inverse transform from CIECAM02 JCh to XYZ.
|
||||
@ -73,40 +73,40 @@ public:
|
||||
static void jch2xyz_ciecam02float ( float &x, float &y, float &z,
|
||||
float J, float C, float h,
|
||||
float xw, float yw, float zw,
|
||||
float c, float nc, float n, float nbb, float ncb, float fl, float cz, float d, float aw );
|
||||
float c, float nc, float n, float nbb, float ncb, float fl, float cz, float d, float aw, int c16);
|
||||
#ifdef __SSE2__
|
||||
static void jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z,
|
||||
vfloat J, vfloat C, vfloat h,
|
||||
vfloat xw, vfloat yw, vfloat zw,
|
||||
vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz );
|
||||
vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz, int c16 );
|
||||
#endif
|
||||
/**
|
||||
* Forward transform from XYZ to CIECAM02 JCh.
|
||||
*/
|
||||
static void initcam1float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb,
|
||||
float &cz, float &aw, float &wh, float &pfl, float &fl, float c);
|
||||
float &cz, float &aw, float &wh, float &pfl, float &fl, float c, int c16);
|
||||
|
||||
static void initcam2float (float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb,
|
||||
float &cz, float &aw, float &fl);
|
||||
float &cz, float &aw, float &fl, int c16);
|
||||
|
||||
static void xyz2jch_ciecam02float ( float &J, float &C, float &h,
|
||||
float aw, float fl,
|
||||
float x, float y, float z,
|
||||
float xw, float yw, float zw,
|
||||
float c, float nc, float n, float nbb, float ncb, float cz, float d );
|
||||
float c, float nc, float n, float nbb, float ncb, float cz, float d, int c16);
|
||||
|
||||
static void xyz2jchqms_ciecam02float ( float &J, float &C, float &h,
|
||||
float &Q, float &M, float &s, float aw, float fl, float wh,
|
||||
float x, float y, float z,
|
||||
float xw, float yw, float zw,
|
||||
float c, float nc, float n, float nbb, float ncb, float pfl, float cz, float d );
|
||||
float c, float nc, float n, float nbb, float ncb, float pfl, float cz, float d, int c16);
|
||||
|
||||
#ifdef __SSE2__
|
||||
static void xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h,
|
||||
vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh,
|
||||
vfloat x, vfloat y, vfloat z,
|
||||
vfloat xw, vfloat yw, vfloat zw,
|
||||
vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d );
|
||||
vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d, int c16);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1015,23 +1015,6 @@ void Color::xyz2r (float x, float y, float z, float &r, const double rgb_xyz[3][
|
||||
r = ((rgb_xyz[0][0] * x + rgb_xyz[0][1] * y + rgb_xyz[0][2] * z)) ;
|
||||
}
|
||||
|
||||
// same for float
|
||||
void Color::xyz2rgb (float x, float y, float z, float &r, float &g, float &b, const float rgb_xyz[3][3])
|
||||
{
|
||||
r = ((rgb_xyz[0][0] * x + rgb_xyz[0][1] * y + rgb_xyz[0][2] * z)) ;
|
||||
g = ((rgb_xyz[1][0] * x + rgb_xyz[1][1] * y + rgb_xyz[1][2] * z)) ;
|
||||
b = ((rgb_xyz[2][0] * x + rgb_xyz[2][1] * y + rgb_xyz[2][2] * z)) ;
|
||||
}
|
||||
|
||||
#ifdef __SSE2__
|
||||
void Color::xyz2rgb (vfloat x, vfloat y, vfloat z, vfloat &r, vfloat &g, vfloat &b, const vfloat rgb_xyz[3][3])
|
||||
{
|
||||
r = ((rgb_xyz[0][0] * x + rgb_xyz[0][1] * y + rgb_xyz[0][2] * z)) ;
|
||||
g = ((rgb_xyz[1][0] * x + rgb_xyz[1][1] * y + rgb_xyz[1][2] * z)) ;
|
||||
b = ((rgb_xyz[2][0] * x + rgb_xyz[2][1] * y + rgb_xyz[2][2] * z)) ;
|
||||
}
|
||||
#endif // __SSE2__
|
||||
|
||||
#ifdef __SSE2__
|
||||
void Color::trcGammaBW (float &r, float &g, float &b, float gammabwr, float gammabwg, float gammabwb)
|
||||
{
|
||||
@ -1570,6 +1553,9 @@ void Color::calcGamma (double pwr, double ts, GammaValues &gamma)
|
||||
gamma[4] = g[4];
|
||||
gamma[5] = g[5];
|
||||
gamma[6] = 0.;
|
||||
// if (rtengine::settings->verbose) {
|
||||
// printf("g0=%f g1=%f g2=%f g3=%f g4=%f g5=%f\n", g[0], g[1], g[2], g[3], g[4], g[5]);
|
||||
// }
|
||||
}
|
||||
void Color::gammaf2lut (LUTf &gammacurve, float gamma, float start, float slope, float divisor, float factor)
|
||||
{
|
||||
@ -1646,19 +1632,6 @@ void Color::gammanf2lut (LUTf &gammacurve, float gamma, float divisor, float fac
|
||||
#endif
|
||||
}
|
||||
|
||||
void Color::Lab2XYZ(float L, float a, float b, float &x, float &y, float &z)
|
||||
{
|
||||
float LL = L / 327.68f;
|
||||
float aa = a / 327.68f;
|
||||
float bb = b / 327.68f;
|
||||
float fy = (c1By116 * LL) + c16By116; // (L+16)/116
|
||||
float fx = (0.002f * aa) + fy;
|
||||
float fz = fy - (0.005f * bb);
|
||||
x = 65535.0f * f2xyz(fx) * D50x;
|
||||
z = 65535.0f * f2xyz(fz) * D50z;
|
||||
y = (LL > epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / kappa;
|
||||
}
|
||||
|
||||
float Color::L2Y(float L)
|
||||
{
|
||||
const float LL = L / 327.68f;
|
||||
@ -1676,27 +1649,6 @@ void Color::L2XYZ(float L, float &x, float &y, float &z) // for black & white
|
||||
y = (LL > epskap) ? 65535.0f * fy * fy * fy : 65535.0f * LL / kappa;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __SSE2__
|
||||
void Color::Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, vfloat &z)
|
||||
{
|
||||
vfloat c327d68 = F2V(327.68f);
|
||||
L /= c327d68;
|
||||
a /= c327d68;
|
||||
b /= c327d68;
|
||||
vfloat fy = F2V(c1By116) * L + F2V(c16By116);
|
||||
vfloat fx = F2V(0.002f) * a + fy;
|
||||
vfloat fz = fy - (F2V(0.005f) * b);
|
||||
vfloat c65535 = F2V(65535.f);
|
||||
x = c65535 * f2xyz(fx) * F2V(D50x);
|
||||
z = c65535 * f2xyz(fz) * F2V(D50z);
|
||||
vfloat res1 = fy * fy * fy;
|
||||
vfloat res2 = L / F2V(kappa);
|
||||
y = vself(vmaskf_gt(L, F2V(epskap)), res1, res2);
|
||||
y *= c65535;
|
||||
}
|
||||
#endif // __SSE2__
|
||||
|
||||
inline float Color::computeXYZ2Lab(float f)
|
||||
{
|
||||
if (f < 0.f) {
|
||||
@ -2231,7 +2183,6 @@ void Color::gamutLchonly (float HH, float &Lprov1, float &Chprov1, float &R, flo
|
||||
const float ClipLevel = 65535.0f;
|
||||
bool inGamut;
|
||||
float2 sincosval = xsincosf(HH);
|
||||
|
||||
do {
|
||||
inGamut = true;
|
||||
|
||||
@ -2399,7 +2350,8 @@ void Color::gamutLchonly (float HH, float2 sincosval, float &Lprov1, float &Chpr
|
||||
}
|
||||
}
|
||||
|
||||
Chprov1 *= higherCoef; // decrease the chromaticity value
|
||||
Chprov1 *= higherCoef; // decrease the chromaticity value
|
||||
|
||||
|
||||
if (Chprov1 <= 3.0f) {
|
||||
Lprov1 += lowerCoef;
|
||||
|
@ -206,6 +206,11 @@ public:
|
||||
return static_cast<double>(r) * workingspace[1][0] + static_cast<double>(g) * workingspace[1][1] + static_cast<double>(b) * workingspace[1][2];
|
||||
}
|
||||
|
||||
static float rgbLuminance(float r, float g, float b, const float workingspace[3])
|
||||
{
|
||||
return r * workingspace[0] + g * workingspace[1] + b * workingspace[2];
|
||||
}
|
||||
|
||||
#ifdef __SSE2__
|
||||
static vfloat rgbLuminance(vfloat r, vfloat g, vfloat b, const vfloat workingspace[3])
|
||||
{
|
||||
@ -570,9 +575,20 @@ public:
|
||||
*/
|
||||
static void xyz2rgb (float x, float y, float z, float &r, float &g, float &b, const double rgb_xyz[3][3]);
|
||||
static void xyz2r (float x, float y, float z, float &r, const double rgb_xyz[3][3]);
|
||||
static void xyz2rgb (float x, float y, float z, float &r, float &g, float &b, const float rgb_xyz[3][3]);
|
||||
static inline void xyz2rgb (float x, float y, float z, float &r, float &g, float &b, const float rgb_xyz[3][3])
|
||||
{
|
||||
r = ((rgb_xyz[0][0] * x + rgb_xyz[0][1] * y + rgb_xyz[0][2] * z)) ;
|
||||
g = ((rgb_xyz[1][0] * x + rgb_xyz[1][1] * y + rgb_xyz[1][2] * z)) ;
|
||||
b = ((rgb_xyz[2][0] * x + rgb_xyz[2][1] * y + rgb_xyz[2][2] * z)) ;
|
||||
}
|
||||
|
||||
#ifdef __SSE2__
|
||||
static void xyz2rgb (vfloat x, vfloat y, vfloat z, vfloat &r, vfloat &g, vfloat &b, const vfloat rgb_xyz[3][3]);
|
||||
static inline void xyz2rgb (vfloat x, vfloat y, vfloat z, vfloat &r, vfloat &g, vfloat &b, const vfloat rgb_xyz[3][3])
|
||||
{
|
||||
r = ((rgb_xyz[0][0] * x + rgb_xyz[0][1] * y + rgb_xyz[0][2] * z)) ;
|
||||
g = ((rgb_xyz[1][0] * x + rgb_xyz[1][1] * y + rgb_xyz[1][2] * z)) ;
|
||||
b = ((rgb_xyz[2][0] * x + rgb_xyz[2][1] * y + rgb_xyz[2][2] * z)) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@ -603,12 +619,40 @@ public:
|
||||
* @param y Y coordinate [0 ; 65535] ; can be negative! (return value)
|
||||
* @param z Z coordinate [0 ; 65535] ; can be negative! (return value)
|
||||
*/
|
||||
static void Lab2XYZ(float L, float a, float b, float &x, float &y, float &z);
|
||||
static inline void Lab2XYZ(float L, float a, float b, float &x, float &y, float &z)
|
||||
{
|
||||
float LL = L / 327.68f;
|
||||
float aa = a / 327.68f;
|
||||
float bb = b / 327.68f;
|
||||
float fy = (c1By116 * LL) + c16By116; // (L+16)/116
|
||||
float fx = (0.002f * aa) + fy;
|
||||
float fz = fy - (0.005f * bb);
|
||||
x = 65535.f * f2xyz(fx) * D50x;
|
||||
z = 65535.f * f2xyz(fz) * D50z;
|
||||
y = (LL > epskapf) ? 65535.f * fy * fy * fy : 65535.f * LL / kappaf;
|
||||
}
|
||||
|
||||
static void L2XYZ(float L, float &x, float &y, float &z);
|
||||
static float L2Y(float L);
|
||||
|
||||
#ifdef __SSE2__
|
||||
static void Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, vfloat &z);
|
||||
static inline void Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, vfloat &z)
|
||||
{
|
||||
vfloat c327d68 = F2V(327.68f);
|
||||
L /= c327d68;
|
||||
a /= c327d68;
|
||||
b /= c327d68;
|
||||
vfloat fy = F2V(c1By116) * L + F2V(c16By116);
|
||||
vfloat fx = F2V(0.002f) * a + fy;
|
||||
vfloat fz = fy - (F2V(0.005f) * b);
|
||||
vfloat c65535 = F2V(65535.f);
|
||||
x = c65535 * f2xyz(fx) * F2V(D50x);
|
||||
z = c65535 * f2xyz(fz) * F2V(D50z);
|
||||
vfloat res1 = fy * fy * fy;
|
||||
vfloat res2 = L / F2V(kappa);
|
||||
y = vself(vmaskf_gt(L, F2V(epskap)), res1, res2);
|
||||
y *= c65535;
|
||||
}
|
||||
#endif // __SSE2__
|
||||
|
||||
/**
|
||||
|
@ -3460,11 +3460,12 @@ void PerceptualToneCurve::BatchApply(const size_t start, const size_t end, float
|
||||
Color::Prophotoxyz(r, g, b, x, y, z);
|
||||
|
||||
float J, C, h;
|
||||
int c16 = 1;
|
||||
Ciecam02::xyz2jch_ciecam02float(J, C, h,
|
||||
aw, fl,
|
||||
x * 0.0015259022f, y * 0.0015259022f, z * 0.0015259022f,
|
||||
xw, yw, zw,
|
||||
c, nc, pow1, nbb, ncb, cz, d);
|
||||
c, nc, pow1, nbb, ncb, cz, d, c16);
|
||||
|
||||
|
||||
if (!isfinite(J) || !isfinite(C) || !isfinite(h)) {
|
||||
@ -3579,11 +3580,10 @@ void PerceptualToneCurve::BatchApply(const size_t start, const size_t end, float
|
||||
}
|
||||
|
||||
C *= cmul;
|
||||
|
||||
Ciecam02::jch2xyz_ciecam02float(x, y, z,
|
||||
J, C, h,
|
||||
xw, yw, zw,
|
||||
c, nc, pow1, nbb, ncb, fl, cz, d, aw);
|
||||
c, nc, pow1, nbb, ncb, fl, cz, d, aw, c16);
|
||||
|
||||
if (!isfinite(x) || !isfinite(y) || !isfinite(z)) {
|
||||
// can happen for colours on the rim of being outside gamut, that worked without chroma scaling but not with. Then we return only the curve's result.
|
||||
@ -3698,9 +3698,9 @@ void PerceptualToneCurve::init()
|
||||
f = 1.00f;
|
||||
c = 0.69f;
|
||||
nc = 1.00f;
|
||||
|
||||
int c16 = 1;//with cat02 for compatibility
|
||||
Ciecam02::initcam1float(yb, 1.f, f, la, xw, yw, zw, n, d, nbb, ncb,
|
||||
cz, aw, wh, pfl, fl, c);
|
||||
cz, aw, wh, pfl, fl, c, c16);
|
||||
pow1 = pow_F(1.64f - pow_F(0.29f, n), 0.73f);
|
||||
|
||||
{
|
||||
|
@ -1399,7 +1399,7 @@ void CLASS nikon_load_raw()
|
||||
|
||||
void CLASS nikon_yuv_load_raw()
|
||||
{
|
||||
int row, col, yuv[4], rgb[3], b, c;
|
||||
int row, col, yuv[4] = {}, rgb[3], b, c;
|
||||
UINT64 bitbuf=0;
|
||||
|
||||
for (row=0; row < raw_height; row++)
|
||||
@ -5620,7 +5620,7 @@ nf: order = 0x4949;
|
||||
if (tag == 2 && strstr(make,"NIKON") && !iso_speed)
|
||||
iso_speed = (get2(),get2());
|
||||
if ((tag == 0x25 || tag == 0x28) && strstr(make,"NIKON") && !iso_speed) { // Nikon ISOInfo Tags/ISO & ISO2
|
||||
uchar iso[1];
|
||||
uchar iso[1] = {};
|
||||
fread (iso, 1, 1, ifp);
|
||||
iso_speed = 100 * pow(2,(float)iso[0]/12.0-5);
|
||||
}
|
||||
@ -9568,7 +9568,7 @@ void CLASS identify()
|
||||
apply_tiff();
|
||||
if (!strcmp(model, "X-T3")) {
|
||||
height = raw_height - 2;
|
||||
} else if (!strcmp(model, "GFX 100")) {
|
||||
} else if (!strcmp(model, "GFX 100") || !strcmp(model, "GFX100S")) {
|
||||
load_flags = 0;
|
||||
}
|
||||
if (!load_raw) {
|
||||
@ -10045,7 +10045,7 @@ canon_a5:
|
||||
} else if (!strncmp(model, "X-A3", 4) || !strncmp(model, "X-A5", 4)) {
|
||||
width = raw_width = 6016;
|
||||
height = raw_height = 4014;
|
||||
} else if (!strcmp(model, "X-Pro3") || !strcmp(model, "X-T3") || !strcmp(model, "X-T30") || !strcmp(model, "X-T4") || !strcmp(model, "X100V")) {
|
||||
} else if (!strcmp(model, "X-Pro3") || !strcmp(model, "X-T3") || !strcmp(model, "X-T30") || !strcmp(model, "X-T4") || !strcmp(model, "X100V") || !strcmp(model, "X-S10")) {
|
||||
width = raw_width = 6384;
|
||||
height = raw_height = 4182;
|
||||
}
|
||||
@ -10108,7 +10108,6 @@ konica_400z:
|
||||
}
|
||||
} else if (!strcmp(model,"*ist D")) {
|
||||
load_raw = &CLASS unpacked_load_raw;
|
||||
data_error = -1;
|
||||
} else if (!strcmp(model,"*ist DS")) {
|
||||
height -= 2;
|
||||
} else if (!strcmp(make,"Samsung") && raw_width == 4704) {
|
||||
|
@ -646,7 +646,8 @@ void Crop::update(int todo)
|
||||
parent->adnListener->noiseChanged(0.f, 0.f);
|
||||
}
|
||||
|
||||
if (todo & M_LINDENOISE) {
|
||||
if (todo & (M_INIT | M_LINDENOISE | M_HDR)) {
|
||||
|
||||
if (skip == 1 && denoiseParams.enabled) {
|
||||
|
||||
float nresi, highresi;
|
||||
@ -669,8 +670,16 @@ void Crop::update(int todo)
|
||||
}
|
||||
}
|
||||
|
||||
if (params.filmNegative.enabled && params.filmNegative.colorSpace == FilmNegativeParams::ColorSpace::INPUT) {
|
||||
parent->ipf.filmNegativeProcess(baseCrop, baseCrop, params.filmNegative);
|
||||
}
|
||||
|
||||
parent->imgsrc->convertColorSpace(origCrop, params.icm, parent->currWB);
|
||||
|
||||
if (params.filmNegative.enabled && params.filmNegative.colorSpace != FilmNegativeParams::ColorSpace::INPUT) {
|
||||
parent->ipf.filmNegativeProcess(baseCrop, baseCrop, params.filmNegative);
|
||||
}
|
||||
|
||||
delete [] min_r;
|
||||
delete [] min_b;
|
||||
delete [] lumL;
|
||||
@ -802,12 +811,335 @@ void Crop::update(int todo)
|
||||
|
||||
}
|
||||
|
||||
|
||||
if ((todo & (M_AUTOEXP | M_RGBCURVE)) && params.locallab.enabled && !params.locallab.spots.empty()) {
|
||||
|
||||
//I made a little change here. Rather than have luminanceCurve (and others) use in/out lab images, we can do more if we copy right here.
|
||||
parent->ipf.rgb2lab(*baseCrop, *laboCrop, params.icm.workingProfile);
|
||||
|
||||
|
||||
labnCrop->CopyFrom(laboCrop);
|
||||
|
||||
const std::unique_ptr<LabImage> reservCrop(new LabImage(*laboCrop, true));
|
||||
const std::unique_ptr<LabImage> lastorigCrop(new LabImage(*laboCrop, true));
|
||||
std::unique_ptr<LabImage> savenormtmCrop;
|
||||
std::unique_ptr<LabImage> savenormretiCrop;
|
||||
auto& lllocalcurve2 = parent->lllocalcurve;
|
||||
auto& cllocalcurve2 = parent->cllocalcurve;
|
||||
auto& lclocalcurve2 = parent->lclocalcurve;
|
||||
auto& cclocalcurve2 = parent->cclocalcurve;
|
||||
auto& rgblocalcurve2 = parent->rgblocalcurve;
|
||||
auto& exlocalcurve2 = parent->exlocalcurve;
|
||||
auto& lmasklocalcurve2 = parent->lmasklocalcurve;
|
||||
auto& lmaskexplocalcurve2 = parent->lmaskexplocalcurve;
|
||||
auto& lmaskSHlocalcurve2 = parent->lmaskSHlocalcurve;
|
||||
auto& lmaskviblocalcurve2 = parent->lmaskviblocalcurve;
|
||||
auto& lmasktmlocalcurve2 = parent->lmasktmlocalcurve;
|
||||
auto& lmaskretilocalcurve2 = parent->lmaskretilocalcurve;
|
||||
auto& lmaskcblocalcurve2 = parent->lmaskcblocalcurve;
|
||||
auto& lmaskbllocalcurve2 = parent->lmaskbllocalcurve;
|
||||
auto& lmasklclocalcurve2 = parent->lmasklclocalcurve;
|
||||
auto& lmaskloglocalcurve2 = parent->lmaskloglocalcurve;
|
||||
auto& hltonecurveloc2 = parent->hltonecurveloc;
|
||||
auto& shtonecurveloc2 = parent->shtonecurveloc;
|
||||
auto& tonecurveloc2 = parent->tonecurveloc;
|
||||
auto& lightCurveloc2 = parent->lightCurveloc;
|
||||
auto& locRETgainCurve = parent->locRETgainCurve;
|
||||
auto& locRETtransCurve = parent->locRETtransCurve;
|
||||
auto& loclhCurve = parent->loclhCurve;
|
||||
auto& lochhCurve = parent->lochhCurve;
|
||||
auto& locchCurve = parent->locchCurve;
|
||||
auto& locccmasCurve = parent->locccmasCurve;
|
||||
auto& locllmasCurve = parent->locllmasCurve;
|
||||
auto& lochhmasCurve = parent->lochhmasCurve;
|
||||
auto& lochhhmasCurve = parent->lochhhmasCurve;
|
||||
auto& locccmasexpCurve = parent->locccmasexpCurve;
|
||||
auto& locllmasexpCurve = parent->locllmasexpCurve;
|
||||
auto& lochhmasexpCurve = parent->lochhmasexpCurve;
|
||||
auto& locccmasSHCurve = parent->locccmasSHCurve;
|
||||
auto& locllmasSHCurve = parent->locllmasSHCurve;
|
||||
auto& lochhmasSHCurve = parent->lochhmasSHCurve;
|
||||
auto& locccmasvibCurve = parent->locccmasvibCurve;
|
||||
auto& locllmasvibCurve = parent->locllmasvibCurve;
|
||||
auto& lochhmasvibCurve = parent->lochhmasvibCurve;
|
||||
auto& locccmaslcCurve = parent->locccmaslcCurve;
|
||||
auto& locllmaslcCurve = parent->locllmaslcCurve;
|
||||
auto& lochhmaslcCurve = parent->lochhmaslcCurve;
|
||||
auto& locccmascbCurve = parent->locccmascbCurve;
|
||||
auto& locllmascbCurve = parent->locllmascbCurve;
|
||||
auto& lochhmascbCurve = parent->lochhmascbCurve;
|
||||
auto& locccmasretiCurve = parent->locccmasretiCurve;
|
||||
auto& locllmasretiCurve = parent->locllmasretiCurve;
|
||||
auto& lochhmasretiCurve = parent->lochhmasretiCurve;
|
||||
auto& locccmastmCurve = parent->locccmastmCurve;
|
||||
auto& locllmastmCurve = parent->locllmastmCurve;
|
||||
auto& lochhmastmCurve = parent->lochhmastmCurve;
|
||||
auto& locccmasblCurve = parent->locccmasblCurve;
|
||||
auto& locllmasblCurve = parent->locllmasblCurve;
|
||||
auto& lochhmasblCurve = parent->lochhmasblCurve;
|
||||
auto& locccmaslogCurve = parent->locccmaslogCurve;
|
||||
auto& locllmaslogCurve = parent->locllmaslogCurve;
|
||||
auto& lochhmaslogCurve = parent->lochhmaslogCurve;
|
||||
|
||||
auto& locccmas_Curve = parent->locccmas_Curve;
|
||||
auto& locllmas_Curve = parent->locllmas_Curve;
|
||||
auto& lochhmas_Curve = parent->lochhmas_Curve;
|
||||
auto& lochhhmas_Curve = parent->lochhhmas_Curve;
|
||||
auto& locwavCurve = parent->locwavCurve;
|
||||
auto& loclmasCurveblwav = parent->loclmasCurveblwav;
|
||||
auto& loclmasCurvecolwav = parent->loclmasCurvecolwav;
|
||||
auto& loclevwavCurve = parent->loclevwavCurve;
|
||||
auto& locconwavCurve = parent->locconwavCurve;
|
||||
auto& loccompwavCurve = parent->loccompwavCurve;
|
||||
auto& loccomprewavCurve = parent->loccomprewavCurve;
|
||||
auto& locedgwavCurve = parent->locedgwavCurve;
|
||||
auto& locwavCurvehue = parent->locwavCurvehue;
|
||||
auto& locwavCurveden = parent->locwavCurveden;
|
||||
auto& lmasklocal_curve2 = parent->lmasklocal_curve;
|
||||
auto& loclmasCurve_wav = parent->loclmasCurve_wav;
|
||||
|
||||
for (int sp = 0; sp < (int)params.locallab.spots.size(); sp++) {
|
||||
locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve);
|
||||
locRETtransCurve.Set(params.locallab.spots.at(sp).localTtranscurve);
|
||||
const bool LHutili = loclhCurve.Set(params.locallab.spots.at(sp).LHcurve);
|
||||
const bool HHutili = lochhCurve.Set(params.locallab.spots.at(sp).HHcurve);
|
||||
const bool CHutili = locchCurve.Set(params.locallab.spots.at(sp).CHcurve);
|
||||
const bool lcmasutili = locccmasCurve.Set(params.locallab.spots.at(sp).CCmaskcurve);
|
||||
const bool llmasutili = locllmasCurve.Set(params.locallab.spots.at(sp).LLmaskcurve);
|
||||
const bool lhmasutili = lochhmasCurve.Set(params.locallab.spots.at(sp).HHmaskcurve);
|
||||
const bool lhhmasutili = lochhhmasCurve.Set(params.locallab.spots.at(sp).HHhmaskcurve);
|
||||
const bool lcmasexputili = locccmasexpCurve.Set(params.locallab.spots.at(sp).CCmaskexpcurve);
|
||||
const bool llmasexputili = locllmasexpCurve.Set(params.locallab.spots.at(sp).LLmaskexpcurve);
|
||||
const bool lhmasexputili = lochhmasexpCurve.Set(params.locallab.spots.at(sp).HHmaskexpcurve);
|
||||
const bool lcmasSHutili = locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve);
|
||||
const bool llmasSHutili = locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve);
|
||||
const bool lhmasSHutili = lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve);
|
||||
const bool lcmasvibutili = locccmasvibCurve.Set(params.locallab.spots.at(sp).CCmaskvibcurve);
|
||||
const bool llmasvibutili = locllmasvibCurve.Set(params.locallab.spots.at(sp).LLmaskvibcurve);
|
||||
const bool lhmasvibutili = lochhmasvibCurve.Set(params.locallab.spots.at(sp).HHmaskvibcurve);
|
||||
const bool lcmascbutili = locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve);
|
||||
const bool llmascbutili = locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve);
|
||||
const bool lhmascbutili = lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve);
|
||||
const bool lcmasretiutili = locccmasretiCurve.Set(params.locallab.spots.at(sp).CCmaskreticurve);
|
||||
const bool llmasretiutili = locllmasretiCurve.Set(params.locallab.spots.at(sp).LLmaskreticurve);
|
||||
const bool lhmasretiutili = lochhmasretiCurve.Set(params.locallab.spots.at(sp).HHmaskreticurve);
|
||||
const bool lcmastmutili = locccmastmCurve.Set(params.locallab.spots.at(sp).CCmasktmcurve);
|
||||
const bool llmastmutili = locllmastmCurve.Set(params.locallab.spots.at(sp).LLmasktmcurve);
|
||||
const bool lhmastmutili = lochhmastmCurve.Set(params.locallab.spots.at(sp).HHmasktmcurve);
|
||||
const bool lcmasblutili = locccmasblCurve.Set(params.locallab.spots.at(sp).CCmaskblcurve);
|
||||
const bool llmasblutili = locllmasblCurve.Set(params.locallab.spots.at(sp).LLmaskblcurve);
|
||||
const bool lhmasblutili = lochhmasblCurve.Set(params.locallab.spots.at(sp).HHmaskblcurve);
|
||||
const bool lcmaslogutili = locccmaslogCurve.Set(params.locallab.spots.at(sp).CCmaskcurveL);
|
||||
const bool llmaslogutili = locllmaslogCurve.Set(params.locallab.spots.at(sp).LLmaskcurveL);
|
||||
const bool lhmaslogutili = lochhmaslogCurve.Set(params.locallab.spots.at(sp).HHmaskcurveL);
|
||||
|
||||
const bool lcmas_utili = locccmas_Curve.Set(params.locallab.spots.at(sp).CCmask_curve);
|
||||
const bool llmas_utili = locllmas_Curve.Set(params.locallab.spots.at(sp).LLmask_curve);
|
||||
const bool lhmas_utili = lochhmas_Curve.Set(params.locallab.spots.at(sp).HHmask_curve);
|
||||
const bool lhhmas_utili = lochhhmas_Curve.Set(params.locallab.spots.at(sp).HHhmask_curve);
|
||||
const bool lmasutili_wav = loclmasCurve_wav.Set(params.locallab.spots.at(sp).LLmask_curvewav);
|
||||
const bool lmasutiliblwav = loclmasCurveblwav.Set(params.locallab.spots.at(sp).LLmaskblcurvewav);
|
||||
const bool lmasutilicolwav = loclmasCurvecolwav.Set(params.locallab.spots.at(sp).LLmaskcolcurvewav);
|
||||
const bool lcmaslcutili = locccmaslcCurve.Set(params.locallab.spots.at(sp).CCmasklccurve);
|
||||
const bool llmaslcutili = locllmaslcCurve.Set(params.locallab.spots.at(sp).LLmasklccurve);
|
||||
const bool lhmaslcutili = lochhmaslcCurve.Set(params.locallab.spots.at(sp).HHmasklccurve);
|
||||
const bool locwavutili = locwavCurve.Set(params.locallab.spots.at(sp).locwavcurve);
|
||||
const bool locwavhueutili = locwavCurvehue.Set(params.locallab.spots.at(sp).locwavcurvehue);
|
||||
const bool locwavdenutili = locwavCurveden.Set(params.locallab.spots.at(sp).locwavcurveden);
|
||||
const bool loclevwavutili = loclevwavCurve.Set(params.locallab.spots.at(sp).loclevwavcurve);
|
||||
const bool locconwavutili = locconwavCurve.Set(params.locallab.spots.at(sp).locconwavcurve);
|
||||
const bool loccompwavutili = loccompwavCurve.Set(params.locallab.spots.at(sp).loccompwavcurve);
|
||||
const bool loccomprewavutili = loccomprewavCurve.Set(params.locallab.spots.at(sp).loccomprewavcurve);
|
||||
const bool locedgwavutili = locedgwavCurve.Set(params.locallab.spots.at(sp).locedgwavcurve);
|
||||
const bool locallutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).llcurve, lllocalcurve2, skip);
|
||||
const bool localclutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).clcurve, cllocalcurve2, skip);
|
||||
const bool locallcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).lccurve, lclocalcurve2, skip);
|
||||
const bool localrgbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).rgbcurve, rgblocalcurve2, skip);
|
||||
const bool localcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).cccurve, cclocalcurve2, skip);
|
||||
const bool localexutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).excurve, exlocalcurve2, skip);
|
||||
const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve2, skip);
|
||||
const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve2, skip);
|
||||
const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve2, skip);
|
||||
const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve2, skip);
|
||||
const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve2, skip);
|
||||
const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve2, skip);
|
||||
const bool localmaskcbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcbcurve, lmaskcblocalcurve2, skip);
|
||||
const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve2, skip);
|
||||
const bool localmaskblutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskblcurve, lmaskbllocalcurve2, skip);
|
||||
const bool localmasklogutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskcurveL, lmaskloglocalcurve2, skip);
|
||||
const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmask_curve, lmasklocal_curve2, skip);
|
||||
|
||||
double ecomp = params.locallab.spots.at(sp).expcomp;
|
||||
double black = params.locallab.spots.at(sp).black;
|
||||
double hlcompr = params.locallab.spots.at(sp).hlcompr;
|
||||
double hlcomprthresh = params.locallab.spots.at(sp).hlcomprthresh;
|
||||
double shcompr = params.locallab.spots.at(sp).shcompr;
|
||||
double br = params.locallab.spots.at(sp).lightness;
|
||||
if(black < 0. && params.locallab.spots.at(sp).expMethod == "pde" ) {
|
||||
black *= 1.5;
|
||||
}
|
||||
|
||||
double cont = params.locallab.spots.at(sp).contrast;
|
||||
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
|
||||
huerefblu = parent->huerefblurs[sp];
|
||||
chromarefblu = parent->chromarefblurs[sp];
|
||||
lumarefblu = parent->lumarefblurs[sp];
|
||||
huere = parent->huerefs[sp];
|
||||
chromare = parent->chromarefs[sp];
|
||||
lumare = parent->lumarefs[sp];
|
||||
sobelre = parent->sobelrefs[sp];
|
||||
const float avge = parent->avgs[sp];
|
||||
float meantme = parent->meantms[sp];
|
||||
float stdtme = parent->stdtms[sp];
|
||||
float meanretie = parent->meanretis[sp];
|
||||
float stdretie = parent->stdretis[sp];
|
||||
|
||||
float minCD;
|
||||
float maxCD;
|
||||
float mini;
|
||||
float maxi;
|
||||
float Tmean;
|
||||
float Tsigma;
|
||||
float Tmin;
|
||||
float Tmax;
|
||||
int lastsav;
|
||||
CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumare,
|
||||
hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, avge,
|
||||
skip);
|
||||
// Locallab mask are only shown for selected spot
|
||||
if (sp == params.locallab.selspot) {
|
||||
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), savenormtmCrop.get(), savenormretiCrop.get(), lastorigCrop.get(), cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve2,locallutili,
|
||||
cllocalcurve2, localclutili,
|
||||
lclocalcurve2, locallcutili,
|
||||
loclhCurve, lochhCurve, locchCurve,
|
||||
lmasklocalcurve2, localmaskutili,
|
||||
lmaskexplocalcurve2, localmaskexputili,
|
||||
lmaskSHlocalcurve2, localmaskSHutili,
|
||||
lmaskviblocalcurve2, localmaskvibutili,
|
||||
lmasktmlocalcurve2, localmasktmutili,
|
||||
lmaskretilocalcurve2, localmaskretiutili,
|
||||
lmaskcblocalcurve2, localmaskcbutili,
|
||||
lmaskbllocalcurve2, localmaskblutili,
|
||||
lmasklclocalcurve2, localmasklcutili,
|
||||
lmaskloglocalcurve2, localmasklogutili,
|
||||
lmasklocal_curve2, localmask_utili,
|
||||
|
||||
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
|
||||
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
|
||||
locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili,
|
||||
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
|
||||
locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili,
|
||||
locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili,
|
||||
locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili,
|
||||
locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili,
|
||||
locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili,
|
||||
|
||||
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
|
||||
lochhhmas_Curve, lhhmas_utili,
|
||||
loclmasCurveblwav,lmasutiliblwav,
|
||||
loclmasCurvecolwav,lmasutilicolwav,
|
||||
locwavCurve, locwavutili,
|
||||
loclevwavCurve, loclevwavutili,
|
||||
locconwavCurve, locconwavutili,
|
||||
loccompwavCurve, loccompwavutili,
|
||||
loccomprewavCurve, loccomprewavutili,
|
||||
locwavCurvehue, locwavhueutili,
|
||||
locwavCurveden, locwavdenutili,
|
||||
locedgwavCurve, locedgwavutili,
|
||||
loclmasCurve_wav,lmasutili_wav,
|
||||
LHutili, HHutili, CHutili, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2,
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav,
|
||||
parent->previewDeltaE, parent->locallColorMask, parent->locallColorMaskinv, parent->locallExpMask, parent->locallExpMaskinv, parent->locallSHMask, parent->locallSHMaskinv, parent->locallvibMask, parent->localllcMask, parent->locallsharMask, parent->locallcbMask, parent->locallretiMask, parent->locallsoftMask, parent->localltmMask, parent->locallblMask,
|
||||
parent->localllogMask, parent->locall_Mask, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantme, stdtme, meanretie, stdretie);
|
||||
if(parent->previewDeltaE || parent->locallColorMask == 5 || parent->locallvibMask == 4 || parent->locallExpMask == 5 || parent->locallSHMask == 4 || parent->localllcMask == 4 || parent->localltmMask == 4 || parent->localllogMask == 4 || parent->locallsoftMask == 6 || parent->localllcMask == 4) {
|
||||
params.blackwhite.enabled = false;
|
||||
params.colorToning.enabled = false;
|
||||
params.rgbCurves.enabled = false;
|
||||
params.chmixer.enabled = false;
|
||||
params.hsvequalizer.enabled = false;
|
||||
params.filmSimulation.enabled = false;
|
||||
params.toneCurve.black = 0.f;
|
||||
params.toneCurve.saturation = 0.f;
|
||||
params.toneCurve.brightness= 0.f;
|
||||
params.toneCurve.contrast = 0.f;
|
||||
params.toneCurve.hlcompr = 0.f;
|
||||
//these 3 are "before" LA
|
||||
//params.toneCurve.expcomp = 0;
|
||||
//params.toneCurve.curve = { 0 };
|
||||
//params.toneCurve.curve2 = { 0 };
|
||||
params.colorappearance.enabled = false;
|
||||
params.vibrance.enabled = false;
|
||||
params.labCurve.enabled = false;
|
||||
params.wavelet.enabled = false;
|
||||
params.epd.enabled = false;
|
||||
params.softlight.enabled = false;
|
||||
}
|
||||
} else {
|
||||
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), savenormtmCrop.get(), savenormretiCrop.get(), lastorigCrop.get(), cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve2,locallutili,
|
||||
cllocalcurve2, localclutili,
|
||||
lclocalcurve2, locallcutili,
|
||||
loclhCurve, lochhCurve, locchCurve,
|
||||
lmasklocalcurve2, localmaskutili,
|
||||
lmaskexplocalcurve2, localmaskexputili,
|
||||
lmaskSHlocalcurve2, localmaskSHutili,
|
||||
lmaskviblocalcurve2, localmaskvibutili,
|
||||
lmasktmlocalcurve2, localmasktmutili,
|
||||
lmaskretilocalcurve2, localmaskretiutili,
|
||||
lmaskcblocalcurve2, localmaskcbutili,
|
||||
lmaskbllocalcurve2, localmaskblutili,
|
||||
lmasklclocalcurve2, localmasklcutili,
|
||||
lmaskloglocalcurve2, localmasklogutili,
|
||||
lmasklocal_curve2, localmask_utili,
|
||||
|
||||
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili,lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
|
||||
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
|
||||
locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili,
|
||||
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
|
||||
locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili,
|
||||
locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili,
|
||||
locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili,
|
||||
locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili,
|
||||
locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili,
|
||||
|
||||
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
|
||||
lochhhmas_Curve, lhhmas_utili,
|
||||
|
||||
loclmasCurveblwav,lmasutiliblwav,
|
||||
loclmasCurvecolwav,lmasutilicolwav,
|
||||
locwavCurve, locwavutili,
|
||||
loclevwavCurve, loclevwavutili,
|
||||
locconwavCurve, locconwavutili,
|
||||
loccompwavCurve, loccompwavutili,
|
||||
loccomprewavCurve, loccomprewavutili,
|
||||
locwavCurvehue, locwavhueutili,
|
||||
locwavCurveden, locwavdenutili,
|
||||
locedgwavCurve, locedgwavutili,
|
||||
loclmasCurve_wav,lmasutili_wav,
|
||||
LHutili, HHutili, CHutili, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2,
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantme, stdtme, meanretie, stdretie);
|
||||
}
|
||||
if (sp + 1u < params.locallab.spots.size()) {
|
||||
// do not copy for last spot as it is not needed anymore
|
||||
lastorigCrop->CopyFrom(labnCrop);
|
||||
}
|
||||
|
||||
if (skip <= 2) {
|
||||
Glib::usleep(settings->cropsleep); //wait to avoid crash when crop 100% and move window
|
||||
}
|
||||
}
|
||||
parent->ipf.lab2rgb(*labnCrop, *baseCrop, params.icm.workingProfile);
|
||||
}
|
||||
|
||||
if (todo & M_RGBCURVE) {
|
||||
Imagefloat *workingCrop = baseCrop;
|
||||
/*
|
||||
if (params.icm.workingTRC == "Custom") { //exec TRC IN free
|
||||
const Glib::ustring profile = params.icm.workingProfile;
|
||||
|
||||
if (profile == "sRGB" || profile == "Adobe RGB" || profile == "ProPhoto" || profile == "WideGamut" || profile == "BruceRGB" || profile == "Beta RGB" || profile == "BestRGB" || profile == "Rec2020" || profile == "ACESp0" || profile == "ACESp1") {
|
||||
const int cw = baseCrop->getWidth();
|
||||
const int ch = baseCrop->getHeight();
|
||||
@ -834,292 +1166,11 @@ void Crop::update(int todo)
|
||||
}
|
||||
}
|
||||
|
||||
/*xref=000;yref=000;
|
||||
if (colortest && cropw>115 && croph>115)
|
||||
for(int j=1;j<5;j++){
|
||||
xref+=j*30;yref+=j*30;
|
||||
if (settings->verbose) {
|
||||
printf("after rgbProc RGB Xr%i Yr%i Skip=%d R=%f G=%f B=%f \n",xref,yref,skip,
|
||||
baseCrop->r[(int)(xref/skip)][(int)(yref/skip)]/256,
|
||||
baseCrop->g[(int)(xref/skip)][(int)(yref/skip)]/256,
|
||||
baseCrop->b[(int)(xref/skip)][(int)(yref/skip)]/256);
|
||||
printf("after rgbProc Lab Xr%i Yr%i Skip=%d l=%f a=%f b=%f \n",xref,yref,skip,
|
||||
laboCrop->L[(int)(xref/skip)][(int)(yref/skip)]/327,
|
||||
laboCrop->a[(int)(xref/skip)][(int)(yref/skip)]/327,
|
||||
laboCrop->b[(int)(xref/skip)][(int)(yref/skip)]/327);
|
||||
}
|
||||
}*/
|
||||
|
||||
// apply luminance operations
|
||||
if (todo & (M_LUMINANCE + M_COLOR)) { //
|
||||
//I made a little change here. Rather than have luminanceCurve (and others) use in/out lab images, we can do more if we copy right here.
|
||||
labnCrop->CopyFrom(laboCrop);
|
||||
|
||||
if (params.locallab.enabled && !params.locallab.spots.empty()) {
|
||||
const std::unique_ptr<LabImage> reservCrop(new LabImage(*laboCrop, true));
|
||||
const std::unique_ptr<LabImage> lastorigCrop(new LabImage(*laboCrop, true));
|
||||
auto& lllocalcurve2 = parent->lllocalcurve;
|
||||
auto& cllocalcurve2 = parent->cllocalcurve;
|
||||
auto& lclocalcurve2 = parent->lclocalcurve;
|
||||
auto& cclocalcurve2 = parent->cclocalcurve;
|
||||
auto& rgblocalcurve2 = parent->rgblocalcurve;
|
||||
auto& exlocalcurve2 = parent->exlocalcurve;
|
||||
auto& lmasklocalcurve2 = parent->lmasklocalcurve;
|
||||
auto& lmaskexplocalcurve2 = parent->lmaskexplocalcurve;
|
||||
auto& lmaskSHlocalcurve2 = parent->lmaskSHlocalcurve;
|
||||
auto& lmaskviblocalcurve2 = parent->lmaskviblocalcurve;
|
||||
auto& lmasktmlocalcurve2 = parent->lmasktmlocalcurve;
|
||||
auto& lmaskretilocalcurve2 = parent->lmaskretilocalcurve;
|
||||
auto& lmaskcblocalcurve2 = parent->lmaskcblocalcurve;
|
||||
auto& lmaskbllocalcurve2 = parent->lmaskbllocalcurve;
|
||||
auto& lmasklclocalcurve2 = parent->lmasklclocalcurve;
|
||||
auto& hltonecurveloc2 = parent->hltonecurveloc;
|
||||
auto& shtonecurveloc2 = parent->shtonecurveloc;
|
||||
auto& tonecurveloc2 = parent->tonecurveloc;
|
||||
auto& lightCurveloc2 = parent->lightCurveloc;
|
||||
auto& locRETgainCurve = parent->locRETgainCurve;
|
||||
auto& locRETtransCurve = parent->locRETtransCurve;
|
||||
auto& loclhCurve = parent->loclhCurve;
|
||||
auto& lochhCurve = parent->lochhCurve;
|
||||
auto& locchCurve = parent->locchCurve;
|
||||
auto& locccmasCurve = parent->locccmasCurve;
|
||||
auto& locllmasCurve = parent->locllmasCurve;
|
||||
auto& lochhmasCurve = parent->lochhmasCurve;
|
||||
auto& lochhhmasCurve = parent->lochhhmasCurve;
|
||||
auto& locccmasexpCurve = parent->locccmasexpCurve;
|
||||
auto& locllmasexpCurve = parent->locllmasexpCurve;
|
||||
auto& lochhmasexpCurve = parent->lochhmasexpCurve;
|
||||
auto& locccmasSHCurve = parent->locccmasSHCurve;
|
||||
auto& locllmasSHCurve = parent->locllmasSHCurve;
|
||||
auto& lochhmasSHCurve = parent->lochhmasSHCurve;
|
||||
auto& locccmasvibCurve = parent->locccmasvibCurve;
|
||||
auto& locllmasvibCurve = parent->locllmasvibCurve;
|
||||
auto& lochhmasvibCurve = parent->lochhmasvibCurve;
|
||||
auto& locccmaslcCurve = parent->locccmaslcCurve;
|
||||
auto& locllmaslcCurve = parent->locllmaslcCurve;
|
||||
auto& lochhmaslcCurve = parent->lochhmaslcCurve;
|
||||
auto& locccmascbCurve = parent->locccmascbCurve;
|
||||
auto& locllmascbCurve = parent->locllmascbCurve;
|
||||
auto& lochhmascbCurve = parent->lochhmascbCurve;
|
||||
auto& locccmasretiCurve = parent->locccmasretiCurve;
|
||||
auto& locllmasretiCurve = parent->locllmasretiCurve;
|
||||
auto& lochhmasretiCurve = parent->lochhmasretiCurve;
|
||||
auto& locccmastmCurve = parent->locccmastmCurve;
|
||||
auto& locllmastmCurve = parent->locllmastmCurve;
|
||||
auto& lochhmastmCurve = parent->lochhmastmCurve;
|
||||
auto& locccmasblCurve = parent->locccmasblCurve;
|
||||
auto& locllmasblCurve = parent->locllmasblCurve;
|
||||
auto& lochhmasblCurve = parent->lochhmasblCurve;
|
||||
auto& locccmas_Curve = parent->locccmas_Curve;
|
||||
auto& locllmas_Curve = parent->locllmas_Curve;
|
||||
auto& lochhmas_Curve = parent->lochhmas_Curve;
|
||||
auto& lochhhmas_Curve = parent->lochhhmas_Curve;
|
||||
auto& locwavCurve = parent->locwavCurve;
|
||||
auto& loclmasCurveblwav = parent->loclmasCurveblwav;
|
||||
auto& loclmasCurvecolwav = parent->loclmasCurvecolwav;
|
||||
auto& loclevwavCurve = parent->loclevwavCurve;
|
||||
auto& locconwavCurve = parent->locconwavCurve;
|
||||
auto& loccompwavCurve = parent->loccompwavCurve;
|
||||
auto& loccomprewavCurve = parent->loccomprewavCurve;
|
||||
auto& locedgwavCurve = parent->locedgwavCurve;
|
||||
auto& locwavCurveden = parent->locwavCurveden;
|
||||
auto& lmasklocal_curve2 = parent->lmasklocal_curve;
|
||||
auto& loclmasCurve_wav = parent->loclmasCurve_wav;
|
||||
|
||||
for (int sp = 0; sp < (int)params.locallab.spots.size(); sp++) {
|
||||
locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve);
|
||||
locRETtransCurve.Set(params.locallab.spots.at(sp).localTtranscurve);
|
||||
const bool LHutili = loclhCurve.Set(params.locallab.spots.at(sp).LHcurve);
|
||||
const bool HHutili = lochhCurve.Set(params.locallab.spots.at(sp).HHcurve);
|
||||
const bool CHutili = locchCurve.Set(params.locallab.spots.at(sp).CHcurve);
|
||||
const bool lcmasutili = locccmasCurve.Set(params.locallab.spots.at(sp).CCmaskcurve);
|
||||
const bool llmasutili = locllmasCurve.Set(params.locallab.spots.at(sp).LLmaskcurve);
|
||||
const bool lhmasutili = lochhmasCurve.Set(params.locallab.spots.at(sp).HHmaskcurve);
|
||||
const bool lhhmasutili = lochhhmasCurve.Set(params.locallab.spots.at(sp).HHhmaskcurve);
|
||||
const bool lcmasexputili = locccmasexpCurve.Set(params.locallab.spots.at(sp).CCmaskexpcurve);
|
||||
const bool llmasexputili = locllmasexpCurve.Set(params.locallab.spots.at(sp).LLmaskexpcurve);
|
||||
const bool lhmasexputili = lochhmasexpCurve.Set(params.locallab.spots.at(sp).HHmaskexpcurve);
|
||||
const bool lcmasSHutili = locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve);
|
||||
const bool llmasSHutili = locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve);
|
||||
const bool lhmasSHutili = lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve);
|
||||
const bool lcmasvibutili = locccmasvibCurve.Set(params.locallab.spots.at(sp).CCmaskvibcurve);
|
||||
const bool llmasvibutili = locllmasvibCurve.Set(params.locallab.spots.at(sp).LLmaskvibcurve);
|
||||
const bool lhmasvibutili = lochhmasvibCurve.Set(params.locallab.spots.at(sp).HHmaskvibcurve);
|
||||
const bool lcmascbutili = locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve);
|
||||
const bool llmascbutili = locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve);
|
||||
const bool lhmascbutili = lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve);
|
||||
const bool lcmasretiutili = locccmasretiCurve.Set(params.locallab.spots.at(sp).CCmaskreticurve);
|
||||
const bool llmasretiutili = locllmasretiCurve.Set(params.locallab.spots.at(sp).LLmaskreticurve);
|
||||
const bool lhmasretiutili = lochhmasretiCurve.Set(params.locallab.spots.at(sp).HHmaskreticurve);
|
||||
const bool lcmastmutili = locccmastmCurve.Set(params.locallab.spots.at(sp).CCmasktmcurve);
|
||||
const bool llmastmutili = locllmastmCurve.Set(params.locallab.spots.at(sp).LLmasktmcurve);
|
||||
const bool lhmastmutili = lochhmastmCurve.Set(params.locallab.spots.at(sp).HHmasktmcurve);
|
||||
const bool lcmasblutili = locccmasblCurve.Set(params.locallab.spots.at(sp).CCmaskblcurve);
|
||||
const bool llmasblutili = locllmasblCurve.Set(params.locallab.spots.at(sp).LLmaskblcurve);
|
||||
const bool lhmasblutili = lochhmasblCurve.Set(params.locallab.spots.at(sp).HHmaskblcurve);
|
||||
const bool lcmas_utili = locccmas_Curve.Set(params.locallab.spots.at(sp).CCmask_curve);
|
||||
const bool llmas_utili = locllmas_Curve.Set(params.locallab.spots.at(sp).LLmask_curve);
|
||||
const bool lhmas_utili = lochhmas_Curve.Set(params.locallab.spots.at(sp).HHmask_curve);
|
||||
const bool lhhmas_utili = lochhhmas_Curve.Set(params.locallab.spots.at(sp).HHhmask_curve);
|
||||
const bool lmasutili_wav = loclmasCurve_wav.Set(params.locallab.spots.at(sp).LLmask_curvewav);
|
||||
const bool lmasutiliblwav = loclmasCurveblwav.Set(params.locallab.spots.at(sp).LLmaskblcurvewav);
|
||||
const bool lmasutilicolwav = loclmasCurvecolwav.Set(params.locallab.spots.at(sp).LLmaskcolcurvewav);
|
||||
const bool lcmaslcutili = locccmaslcCurve.Set(params.locallab.spots.at(sp).CCmasklccurve);
|
||||
const bool llmaslcutili = locllmaslcCurve.Set(params.locallab.spots.at(sp).LLmasklccurve);
|
||||
const bool lhmaslcutili = lochhmaslcCurve.Set(params.locallab.spots.at(sp).HHmasklccurve);
|
||||
const bool locwavutili = locwavCurve.Set(params.locallab.spots.at(sp).locwavcurve);
|
||||
const bool locwavdenutili = locwavCurveden.Set(params.locallab.spots.at(sp).locwavcurveden);
|
||||
const bool loclevwavutili = loclevwavCurve.Set(params.locallab.spots.at(sp).loclevwavcurve);
|
||||
const bool locconwavutili = locconwavCurve.Set(params.locallab.spots.at(sp).locconwavcurve);
|
||||
const bool loccompwavutili = loccompwavCurve.Set(params.locallab.spots.at(sp).loccompwavcurve);
|
||||
const bool loccomprewavutili = loccomprewavCurve.Set(params.locallab.spots.at(sp).loccomprewavcurve);
|
||||
const bool locedgwavutili = locedgwavCurve.Set(params.locallab.spots.at(sp).locedgwavcurve);
|
||||
const bool locallutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).llcurve, lllocalcurve2, skip);
|
||||
const bool localclutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).clcurve, cllocalcurve2, skip);
|
||||
const bool locallcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).lccurve, lclocalcurve2, skip);
|
||||
const bool localrgbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).rgbcurve, rgblocalcurve2, skip);
|
||||
const bool localcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).cccurve, cclocalcurve2, skip);
|
||||
const bool localexutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).excurve, exlocalcurve2, skip);
|
||||
const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve2, skip);
|
||||
const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve2, skip);
|
||||
const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve2, skip);
|
||||
const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve2, skip);
|
||||
const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve2, skip);
|
||||
const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve2, skip);
|
||||
const bool localmaskcbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcbcurve, lmaskcblocalcurve2, skip);
|
||||
const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve2, skip);
|
||||
const bool localmaskblutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskblcurve, lmaskbllocalcurve2, skip);
|
||||
const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmask_curve, lmasklocal_curve2, skip);
|
||||
|
||||
double ecomp = params.locallab.spots.at(sp).expcomp;
|
||||
double black = params.locallab.spots.at(sp).black;
|
||||
double hlcompr = params.locallab.spots.at(sp).hlcompr;
|
||||
double hlcomprthresh = params.locallab.spots.at(sp).hlcomprthresh;
|
||||
double shcompr = params.locallab.spots.at(sp).shcompr;
|
||||
double br = params.locallab.spots.at(sp).lightness;
|
||||
if(black < 0. && params.locallab.spots.at(sp).expMethod == "pde" ) {
|
||||
black *= 1.5;
|
||||
}
|
||||
|
||||
double cont = params.locallab.spots.at(sp).contrast;
|
||||
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
|
||||
huerefblu = parent->huerefblurs[sp];
|
||||
chromarefblu = parent->chromarefblurs[sp];
|
||||
lumarefblu = parent->lumarefblurs[sp];
|
||||
huere = parent->huerefs[sp];
|
||||
chromare = parent->chromarefs[sp];
|
||||
lumare = parent->lumarefs[sp];
|
||||
sobelre = parent->sobelrefs[sp];
|
||||
const float avge = parent->avgs[sp];
|
||||
|
||||
float minCD;
|
||||
float maxCD;
|
||||
float mini;
|
||||
float maxi;
|
||||
float Tmean;
|
||||
float Tsigma;
|
||||
float Tmin;
|
||||
float Tmax;
|
||||
int lastsav;
|
||||
CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumare,
|
||||
hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2, avge,
|
||||
skip);
|
||||
// Locallab mask are only shown for selected spot
|
||||
if (sp == params.locallab.selspot) {
|
||||
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), lastorigCrop.get(), cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve2,locallutili,
|
||||
cllocalcurve2, localclutili,
|
||||
lclocalcurve2, locallcutili,
|
||||
loclhCurve, lochhCurve, locchCurve,
|
||||
lmasklocalcurve2, localmaskutili,
|
||||
lmaskexplocalcurve2, localmaskexputili,
|
||||
lmaskSHlocalcurve2, localmaskSHutili,
|
||||
lmaskviblocalcurve2, localmaskvibutili,
|
||||
lmasktmlocalcurve2, localmasktmutili,
|
||||
lmaskretilocalcurve2, localmaskretiutili,
|
||||
lmaskcblocalcurve2, localmaskcbutili,
|
||||
lmaskbllocalcurve2, localmaskblutili,
|
||||
lmasklclocalcurve2, localmasklcutili,
|
||||
lmasklocal_curve2, localmask_utili,
|
||||
|
||||
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
|
||||
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
|
||||
locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili,
|
||||
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
|
||||
locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili,
|
||||
locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili,
|
||||
locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili,
|
||||
locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili,
|
||||
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
|
||||
lochhhmas_Curve, lhhmas_utili,
|
||||
loclmasCurveblwav,lmasutiliblwav,
|
||||
loclmasCurvecolwav,lmasutilicolwav,
|
||||
locwavCurve, locwavutili,
|
||||
loclevwavCurve, loclevwavutili,
|
||||
locconwavCurve, locconwavutili,
|
||||
loccompwavCurve, loccompwavutili,
|
||||
loccomprewavCurve, loccomprewavutili,
|
||||
locwavCurveden, locwavdenutili,
|
||||
locedgwavCurve, locedgwavutili,
|
||||
loclmasCurve_wav,lmasutili_wav,
|
||||
LHutili, HHutili, CHutili, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2,
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav,
|
||||
parent->previewDeltaE, parent->locallColorMask, parent->locallColorMaskinv, parent->locallExpMask, parent->locallExpMaskinv, parent->locallSHMask, parent->locallSHMaskinv, parent->locallvibMask, parent->localllcMask, parent->locallsharMask, parent->locallcbMask, parent->locallretiMask, parent->locallsoftMask, parent->localltmMask, parent->locallblMask,
|
||||
parent->locall_Mask, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax);
|
||||
} else {
|
||||
parent->ipf.Lab_Local(1, sp, (float**)shbuffer, labnCrop, labnCrop, reservCrop.get(), lastorigCrop.get(), cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve2,locallutili,
|
||||
cllocalcurve2, localclutili,
|
||||
lclocalcurve2, locallcutili,
|
||||
loclhCurve, lochhCurve, locchCurve,
|
||||
lmasklocalcurve2, localmaskutili,
|
||||
lmaskexplocalcurve2, localmaskexputili,
|
||||
lmaskSHlocalcurve2, localmaskSHutili,
|
||||
lmaskviblocalcurve2, localmaskvibutili,
|
||||
lmasktmlocalcurve2, localmasktmutili,
|
||||
lmaskretilocalcurve2, localmaskretiutili,
|
||||
lmaskcblocalcurve2, localmaskcbutili,
|
||||
lmaskbllocalcurve2, localmaskblutili,
|
||||
lmasklclocalcurve2, localmasklcutili,
|
||||
lmasklocal_curve2, localmask_utili,
|
||||
|
||||
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili,lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
|
||||
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
|
||||
locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili,
|
||||
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
|
||||
locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili,
|
||||
locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili,
|
||||
locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili,
|
||||
locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili,
|
||||
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
|
||||
lochhhmas_Curve, lhhmas_utili,
|
||||
|
||||
loclmasCurveblwav,lmasutiliblwav,
|
||||
loclmasCurvecolwav,lmasutilicolwav,
|
||||
locwavCurve, locwavutili,
|
||||
loclevwavCurve, loclevwavutili,
|
||||
locconwavCurve, locconwavutili,
|
||||
loccompwavCurve, loccompwavutili,
|
||||
loccomprewavCurve, loccomprewavutili,
|
||||
locwavCurveden, locwavdenutili,
|
||||
locedgwavCurve, locedgwavutili,
|
||||
loclmasCurve_wav,lmasutili_wav,
|
||||
LHutili, HHutili, CHutili, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2,
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax);
|
||||
}
|
||||
|
||||
if (sp + 1u < params.locallab.spots.size()) {
|
||||
// do not copy for last spot as it is not needed anymore
|
||||
lastorigCrop->CopyFrom(labnCrop);
|
||||
}
|
||||
|
||||
if (skip <= 2) {
|
||||
Glib::usleep(settings->cropsleep); //wait to avoid crash when crop 100% and move window
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool utili = parent->utili;
|
||||
bool autili = parent->autili;
|
||||
bool butili = parent->butili;
|
||||
@ -1128,6 +1179,16 @@ void Crop::update(int todo)
|
||||
bool cclutili = parent->cclutili;
|
||||
|
||||
LUTu dummy;
|
||||
if (params.colorToning.enabled && params.colorToning.method == "LabGrid") {
|
||||
parent->ipf.colorToningLabGrid(labnCrop, 0,labnCrop->W , 0, labnCrop->H, false);
|
||||
}
|
||||
|
||||
parent->ipf.shadowsHighlights(labnCrop, params.sh.enabled, params.sh.lab,params.sh.highlights ,params.sh.shadows, params.sh.radius, skip, params.sh.htonalwidth, params.sh.stonalwidth);
|
||||
|
||||
if (params.localContrast.enabled) {
|
||||
// Alberto's local contrast
|
||||
parent->ipf.localContrast(labnCrop, labnCrop->L, params.localContrast, false, skip);
|
||||
}
|
||||
parent->ipf.chromiLuminanceCurve(this, 1, labnCrop, labnCrop, parent->chroma_acurve, parent->chroma_bcurve, parent->satcurve, parent->lhskcurve, parent->clcurve, parent->lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy);
|
||||
parent->ipf.vibrance(labnCrop, params.vibrance, params.toneCurve.hrenabled, params.icm.workingProfile);
|
||||
parent->ipf.labColorCorrectionRegions(labnCrop);
|
||||
|
@ -972,11 +972,11 @@ inline void RawImageSource::dcb_initTileLimits(int &colMin, int &rowMin, int &co
|
||||
}
|
||||
|
||||
if( y0 + TILESIZE + TILEBORDER >= H - border) {
|
||||
rowMax = TILEBORDER + H - border - y0;
|
||||
rowMax = std::min(TILEBORDER + H - border - y0, rowMax);
|
||||
}
|
||||
|
||||
if( x0 + TILESIZE + TILEBORDER >= W - border) {
|
||||
colMax = TILEBORDER + W - border - x0;
|
||||
colMax = std::min(TILEBORDER + W - border - x0, colMax);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ using namespace rtengine::procparams;
|
||||
namespace
|
||||
{
|
||||
|
||||
const int ISO_MAX = 512000;
|
||||
const int ISO_MAX = 819200;
|
||||
const double FNUMBER_MAX = 100.0;
|
||||
const double FOCALLEN_MAX = 10000.0;
|
||||
const double SHUTTERSPEED_MAX = 1000.0;
|
||||
|
@ -1,237 +0,0 @@
|
||||
/*
|
||||
* This file is part of RawTherapee.
|
||||
*
|
||||
* Copyright (c) 2019 Alberto Romei <aldrop8@gmail.com>
|
||||
*
|
||||
* RawTherapee is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* RawTherapee is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <cmath>
|
||||
|
||||
#include "colortemp.h"
|
||||
#include "LUT.h"
|
||||
#include "rtengine.h"
|
||||
#include "rtthumbnail.h"
|
||||
#include "opthelper.h"
|
||||
#include "sleef.h"
|
||||
#include "rt_algo.h"
|
||||
#include "settings.h"
|
||||
#include "procparams.h"
|
||||
#define BENCHMARK
|
||||
#include "StopWatch.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
using rtengine::Imagefloat;
|
||||
using rtengine::findMinMaxPercentile;
|
||||
|
||||
|
||||
void calcMedians(
|
||||
const Imagefloat* baseImg,
|
||||
const int x1, const int y1,
|
||||
const int x2, const int y2,
|
||||
float &rmed, float &gmed, float &bmed
|
||||
)
|
||||
{
|
||||
// Channel vectors to calculate medians
|
||||
std::vector<float> rv, gv, bv;
|
||||
|
||||
const int sz = std::max(0, (y2 - y1) * (x2 - x1));
|
||||
rv.reserve(sz);
|
||||
gv.reserve(sz);
|
||||
bv.reserve(sz);
|
||||
|
||||
for (int i = y1; i < y2; i++) {
|
||||
for (int j = x1; j < x2; j++) {
|
||||
rv.push_back(baseImg->r(i, j));
|
||||
gv.push_back(baseImg->g(i, j));
|
||||
bv.push_back(baseImg->b(i, j));
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate channel medians from whole image
|
||||
findMinMaxPercentile(rv.data(), rv.size(), 0.5f, rmed, 0.5f, rmed, true);
|
||||
findMinMaxPercentile(gv.data(), gv.size(), 0.5f, gmed, 0.5f, gmed, true);
|
||||
findMinMaxPercentile(bv.data(), bv.size(), 0.5f, bmed, 0.5f, bmed, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void rtengine::Thumbnail::processFilmNegative(
|
||||
const procparams::ProcParams ¶ms,
|
||||
const Imagefloat* baseImg,
|
||||
const int rwidth, const int rheight
|
||||
)
|
||||
{
|
||||
|
||||
// Channel exponents
|
||||
const float rexp = -params.filmNegative.redRatio * params.filmNegative.greenExp;
|
||||
const float gexp = -params.filmNegative.greenExp;
|
||||
const float bexp = -params.filmNegative.blueRatio * params.filmNegative.greenExp;
|
||||
|
||||
// Calculate output multipliers
|
||||
float rmult, gmult, bmult;
|
||||
|
||||
const float MAX_OUT_VALUE = 65000.f;
|
||||
|
||||
// For backwards compatibility with profiles saved by RT 5.7
|
||||
const bool oldChannelScaling = params.filmNegative.redBase == -1.f;
|
||||
|
||||
// If the film base values are not set in params, estimate multipliers from each channel's median value.
|
||||
if (params.filmNegative.redBase <= 0.f) {
|
||||
|
||||
// Channel medians
|
||||
float rmed, gmed, bmed;
|
||||
|
||||
if (oldChannelScaling) {
|
||||
// If using the old method, calculate nedians on the whole image
|
||||
calcMedians(baseImg, 0, 0, rwidth, rheight, rmed, gmed, bmed);
|
||||
} else {
|
||||
// The new method cuts out a 20% border from medians calculation.
|
||||
const int bW = rwidth * 20 / 100;
|
||||
const int bH = rheight * 20 / 100;
|
||||
calcMedians(baseImg, bW, bH, rwidth - bW, rheight - bH, rmed, gmed, bmed);
|
||||
}
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("Thumbnail input channel medians: %g %g %g\n", rmed, gmed, bmed);
|
||||
}
|
||||
|
||||
// Calculate output medians
|
||||
rmed = powf(rmed, rexp);
|
||||
gmed = powf(gmed, gexp);
|
||||
bmed = powf(bmed, bexp);
|
||||
|
||||
// Calculate output multipliers so that the median value is 1/24 of the output range.
|
||||
rmult = (MAX_OUT_VALUE / 24.f) / rmed;
|
||||
gmult = (MAX_OUT_VALUE / 24.f) / gmed;
|
||||
bmult = (MAX_OUT_VALUE / 24.f) / bmed;
|
||||
|
||||
} else {
|
||||
|
||||
// Read film-base values from params
|
||||
float rbase = params.filmNegative.redBase;
|
||||
float gbase = params.filmNegative.greenBase;
|
||||
float bbase = params.filmNegative.blueBase;
|
||||
|
||||
// Reconstruct scale_mul coefficients from thumbnail metadata:
|
||||
// redMultiplier / camwbRed is pre_mul[0]
|
||||
// pre_mul[0] * scaleGain is scale_mul[0]
|
||||
// Apply channel scaling to raw (unscaled) input base values, to
|
||||
// match with actual (scaled) data in baseImg
|
||||
rbase *= (redMultiplier / camwbRed) * scaleGain;
|
||||
gbase *= (greenMultiplier / camwbGreen) * scaleGain;
|
||||
bbase *= (blueMultiplier / camwbBlue) * scaleGain;
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("Thumbnail input film base values: %g %g %g\n", rbase, gbase, bbase);
|
||||
}
|
||||
|
||||
// Apply exponents to get output film base values
|
||||
rbase = powf(rbase, rexp);
|
||||
gbase = powf(gbase, gexp);
|
||||
bbase = powf(bbase, bexp);
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("Thumbnail output film base values: %g %g %g\n", rbase, gbase, bbase);
|
||||
}
|
||||
|
||||
// Calculate multipliers so that film base value is 1/512th of the output range.
|
||||
rmult = (MAX_OUT_VALUE / 512.f) / rbase;
|
||||
gmult = (MAX_OUT_VALUE / 512.f) / gbase;
|
||||
bmult = (MAX_OUT_VALUE / 512.f) / bbase;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (oldChannelScaling) {
|
||||
// Need to calculate channel averages, to fake the same conditions
|
||||
// found in rawimagesource, where get_ColorsCoeff is called with
|
||||
// forceAutoWB=true.
|
||||
float rsum = 0.f, gsum = 0.f, bsum = 0.f;
|
||||
|
||||
for (int i = 0; i < rheight; i++) {
|
||||
for (int j = 0; j < rwidth; j++) {
|
||||
rsum += baseImg->r(i, j);
|
||||
gsum += baseImg->g(i, j);
|
||||
bsum += baseImg->b(i, j);
|
||||
}
|
||||
}
|
||||
|
||||
const float ravg = rsum / (rheight * rwidth);
|
||||
const float gavg = gsum / (rheight * rwidth);
|
||||
const float bavg = bsum / (rheight * rwidth);
|
||||
|
||||
// Shifting current WB multipliers, based on channel averages.
|
||||
rmult /= gavg / ravg;
|
||||
// gmult /= gAvg / gAvg; green chosen as reference channel
|
||||
bmult /= gavg / bavg;
|
||||
|
||||
} else {
|
||||
|
||||
// Get and un-apply multipliers to adapt the thumbnail to a known fixed WB setting,
|
||||
// as in the main image processing.
|
||||
|
||||
double r, g, b;
|
||||
ColorTemp(3500., 1., 1., "Custom").getMultipliers(r, g, b);
|
||||
//iColorMatrix is cam_rgb
|
||||
const double rm = camwbRed / (iColorMatrix[0][0] * r + iColorMatrix[0][1] * g + iColorMatrix[0][2] * b);
|
||||
const double gm = camwbGreen / (iColorMatrix[1][0] * r + iColorMatrix[1][1] * g + iColorMatrix[1][2] * b);
|
||||
const double bm = camwbBlue / (iColorMatrix[2][0] * r + iColorMatrix[2][1] * g + iColorMatrix[2][2] * b);
|
||||
|
||||
// Normalize max WB multiplier to 1.f
|
||||
const double m = max(rm, gm, bm);
|
||||
rmult /= rm / m;
|
||||
gmult /= gm / m;
|
||||
bmult /= bm / m;
|
||||
}
|
||||
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("Thumbnail computed multipliers: %g %g %g\n", static_cast<double>(rmult), static_cast<double>(gmult), static_cast<double>(bmult));
|
||||
}
|
||||
|
||||
|
||||
#ifdef __SSE2__
|
||||
const vfloat clipv = F2V(MAXVALF);
|
||||
const vfloat rexpv = F2V(rexp);
|
||||
const vfloat gexpv = F2V(gexp);
|
||||
const vfloat bexpv = F2V(bexp);
|
||||
const vfloat rmultv = F2V(rmult);
|
||||
const vfloat gmultv = F2V(gmult);
|
||||
const vfloat bmultv = F2V(bmult);
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < rheight; i++) {
|
||||
float *rline = baseImg->r(i);
|
||||
float *gline = baseImg->g(i);
|
||||
float *bline = baseImg->b(i);
|
||||
int j = 0;
|
||||
#ifdef __SSE2__
|
||||
|
||||
for (; j < rwidth - 3; j += 4) {
|
||||
STVFU(rline[j], vminf(rmultv * pow_F(LVFU(rline[j]), rexpv), clipv));
|
||||
STVFU(gline[j], vminf(gmultv * pow_F(LVFU(gline[j]), gexpv), clipv));
|
||||
STVFU(bline[j], vminf(bmultv * pow_F(LVFU(bline[j]), bexpv), clipv));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
for (; j < rwidth; ++j) {
|
||||
rline[j] = CLIP(rmult * pow_F(rline[j], rexp));
|
||||
gline[j] = CLIP(gmult * pow_F(gline[j], gexp));
|
||||
bline[j] = CLIP(bmult * pow_F(bline[j], bexp));
|
||||
}
|
||||
}
|
||||
}
|
@ -25,7 +25,7 @@ int bitDiff (int value1, int value2)
|
||||
int decBits = 0;
|
||||
|
||||
if ( value2 < value1 )
|
||||
while (decBits <= 12 && (value2 << ++decBits) < value1)
|
||||
while (decBits <= 14 && (value2 << ++decBits) < value1)
|
||||
;
|
||||
|
||||
return decBits;
|
||||
@ -42,7 +42,7 @@ void CLASS init_fuji_compr (struct fuji_compressed_params* info)
|
||||
derror();
|
||||
}
|
||||
|
||||
info->q_table = (char *) malloc (32768);
|
||||
info->q_table = (char *) malloc (2 << fuji_bits);
|
||||
merror (info->q_table, "init_fuji_compr()");
|
||||
|
||||
if (fuji_raw_type == 16) {
|
||||
@ -83,19 +83,23 @@ void CLASS init_fuji_compr (struct fuji_compressed_params* info)
|
||||
}
|
||||
|
||||
// populting gradients
|
||||
if (info->q_point[4] == 0x3FFF) {
|
||||
info->total_values = 0x4000;
|
||||
info->raw_bits = 14;
|
||||
info->max_bits = 56;
|
||||
info->maxDiff = 256;
|
||||
} else if (info->q_point[4] == 0xFFF) {
|
||||
info->total_values = 4096;
|
||||
info->raw_bits = 12;
|
||||
info->max_bits = 48;
|
||||
info->maxDiff = 64;
|
||||
} else {
|
||||
derror();
|
||||
}
|
||||
//if (info->q_point[4] == 0x3FFF) {
|
||||
// info->total_values = 0x4000;
|
||||
// info->raw_bits = 14;
|
||||
// info->max_bits = 56;
|
||||
// info->maxDiff = 256;
|
||||
//} else if (info->q_point[4] == 0xFFF) {
|
||||
// info->total_values = 4096;
|
||||
// info->raw_bits = 12;
|
||||
// info->max_bits = 48;
|
||||
// info->maxDiff = 64;
|
||||
//} else {
|
||||
// derror();
|
||||
//}
|
||||
info->total_values = (1 << fuji_bits);
|
||||
info->raw_bits = fuji_bits;
|
||||
info->max_bits = 4 * info->raw_bits;
|
||||
info->maxDiff = info->total_values >> 6;
|
||||
}
|
||||
|
||||
#define FUJI_BUF_SIZE 0x10000u
|
||||
@ -1017,7 +1021,7 @@ void CLASS parse_fuji_compressed_header()
|
||||
|| h_total_lines > 0x800
|
||||
|| h_total_lines == 0
|
||||
|| h_total_lines != h_raw_height / 6
|
||||
|| (h_raw_bits != 12 && h_raw_bits != 14)
|
||||
|| (h_raw_bits != 12 && h_raw_bits != 14 && h_raw_bits != 16)
|
||||
|| (h_raw_type != 16 && h_raw_type != 0)) {
|
||||
xtransCompressed = false;
|
||||
return;
|
||||
|
@ -3,6 +3,11 @@
|
||||
// this code was taken from http://shibatch.sourceforge.net/
|
||||
// Many thanks to the author: Naoki Shibata
|
||||
//
|
||||
// Copyright Naoki Shibata and contributors 2010 - 2021.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file sleef_LICENSE.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
////////////////////////////////////////////////////////////////
|
||||
#ifndef __AVX__
|
||||
#error Please specify -mavx.
|
||||
|
@ -3,6 +3,11 @@
|
||||
// this code was taken from http://shibatch.sourceforge.net/
|
||||
// Many thanks to the author of original version: Naoki Shibata
|
||||
//
|
||||
// Copyright Naoki Shibata and contributors 2010 - 2021.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file sleef_LICENSE.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// This version contains modifications made by Ingo Weyrich
|
||||
//
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
@ -32,6 +32,14 @@
|
||||
#include "opthelper.h"
|
||||
#include "rawimagesource.h"
|
||||
#include "rt_math.h"
|
||||
//#define BENCHMARK
|
||||
//#include "StopWatch.h"
|
||||
#include "guidedfilter.h"
|
||||
#include "settings.h"
|
||||
#include "gauss.h"
|
||||
#include "rescale.h"
|
||||
#include "iccstore.h"
|
||||
#include "color.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -287,9 +295,13 @@ void boxblur_resamp(const float* const* src, float** dst, float** temp, int H, i
|
||||
|
||||
namespace rtengine
|
||||
{
|
||||
extern const Settings *settings;
|
||||
using namespace procparams;
|
||||
const ProcParams params;
|
||||
|
||||
void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue)
|
||||
{
|
||||
void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue, int blur)
|
||||
{
|
||||
// BENCHFUN
|
||||
double progress = 0.0;
|
||||
|
||||
if (plistener) {
|
||||
@ -306,7 +318,7 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
constexpr float threshpct = 0.25f;
|
||||
constexpr float maxpct = 0.95f;
|
||||
constexpr float epsilon = 0.00001f;
|
||||
//%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
//for blend algorithm:
|
||||
constexpr float blendthresh = 1.0;
|
||||
// Transform matrixes rgb>lab and back
|
||||
@ -412,11 +424,6 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
return;
|
||||
}
|
||||
|
||||
if (plistener) {
|
||||
progress += 0.05;
|
||||
plistener->setProgress(progress);
|
||||
}
|
||||
|
||||
constexpr int blurBorder = 256;
|
||||
minx = std::max(0, minx - blurBorder);
|
||||
miny = std::max(0, miny - blurBorder);
|
||||
@ -430,21 +437,8 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
array2D<float> temp(bufferWidth, blurHeight); // allocate temporary buffer
|
||||
|
||||
// blur RGB channels
|
||||
|
||||
boxblur2(red, channelblur[0], temp, miny, minx, blurHeight, blurWidth, bufferWidth, 4);
|
||||
|
||||
if (plistener) {
|
||||
progress += 0.07;
|
||||
plistener->setProgress(progress);
|
||||
}
|
||||
|
||||
boxblur2(green, channelblur[1], temp, miny, minx, blurHeight, blurWidth, bufferWidth, 4);
|
||||
|
||||
if (plistener) {
|
||||
progress += 0.07;
|
||||
plistener->setProgress(progress);
|
||||
}
|
||||
|
||||
boxblur2(blue, channelblur[2], temp, miny, minx, blurHeight, blurWidth, bufferWidth, 4);
|
||||
|
||||
if (plistener) {
|
||||
@ -458,7 +452,7 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
#endif
|
||||
for (int i = 0; i < blurHeight; ++i) {
|
||||
for (int j = 0; j < blurWidth; ++j) {
|
||||
channelblur[0][i][j] = fabsf(channelblur[0][i][j] - red[i + miny][j + minx]) + fabsf(channelblur[1][i][j] - green[i + miny][j + minx]) + fabsf(channelblur[2][i][j] - blue[i + miny][j + minx]);
|
||||
channelblur[0][i][j] = std::fabs(channelblur[0][i][j] - red[i + miny][j + minx]) + std::fabs(channelblur[1][i][j] - green[i + miny][j + minx]) + std::fabs(channelblur[2][i][j] - blue[i + miny][j + minx]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -517,7 +511,7 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
}
|
||||
|
||||
array2D<float> hilite_full4(bufferWidth, blurHeight);
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
//blur highlight data
|
||||
boxblur2(hilite_full[3], hilite_full4, temp, 0, 0, blurHeight, blurWidth, bufferWidth, 1);
|
||||
|
||||
@ -554,9 +548,7 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
|
||||
multi_array2D<float, 4> hilite(hfw + 1, hfh + 1, ARRAY2D_CLEAR_DATA, 48);
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
// blur and resample highlight data; range=size of blur, pitch=sample spacing
|
||||
|
||||
array2D<float> temp2(blurWidth / pitch + (blurWidth % pitch == 0 ? 0 : 1), blurHeight);
|
||||
|
||||
for (int m = 0; m < 4; ++m) {
|
||||
@ -639,11 +631,11 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
}
|
||||
|
||||
if (hilite[3][2][j] <= epsilon) {
|
||||
hilite_dir[0 + c][0][j] = hilite_dir0[c][j][2];
|
||||
hilite_dir[0 + c][0][j] = hilite_dir0[c][j][2];
|
||||
}
|
||||
|
||||
if (hilite[3][3][j] <= epsilon) {
|
||||
hilite_dir[0 + c][1][j] = hilite_dir0[c][j][3];
|
||||
hilite_dir[0 + c][1][j] = hilite_dir0[c][j][3];
|
||||
}
|
||||
|
||||
if (hilite[3][hfh - 3][j] <= epsilon) {
|
||||
@ -926,8 +918,43 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
hilite[c].free();
|
||||
}
|
||||
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
// now reconstruct clipped channels using color ratios
|
||||
//using code from ART - thanks to Alberto Griggio
|
||||
const int W2 = blur > 0 ? blurWidth / 2.f + 0.5f : 0;
|
||||
const int H2 = blur > 0 ? blurHeight / 2.f + 0.5f : 0;
|
||||
array2D<float> mask(W2, H2, ARRAY2D_CLEAR_DATA);
|
||||
array2D<float> rbuf(W2, H2);
|
||||
array2D<float> gbuf(W2, H2);
|
||||
array2D<float> bbuf(W2, H2);
|
||||
array2D<float> guide(W2, H2);
|
||||
|
||||
if (blur > 0) {
|
||||
array2D<float> rbuffer(blurWidth, blurHeight, minx, miny, red, ARRAY2D_BYREFERENCE);
|
||||
rescaleNearest(rbuffer, rbuf, true);
|
||||
array2D<float> gbuffer(blurWidth, blurHeight, minx, miny, green, ARRAY2D_BYREFERENCE);
|
||||
rescaleNearest(gbuffer, gbuf, true);
|
||||
array2D<float> bbuffer(blurWidth, blurHeight, minx, miny, blue, ARRAY2D_BYREFERENCE);
|
||||
rescaleNearest(bbuffer, bbuf, true);
|
||||
|
||||
LUTf gamma(65536);
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for
|
||||
#endif
|
||||
for (int i = 0; i < 65536; ++i) {
|
||||
gamma[i] = pow_F(i / 65535.f, 2.2f);
|
||||
}
|
||||
|
||||
const float xyzcam[3] = {static_cast<float>(imatrices.xyz_cam[1][0]), static_cast<float>(imatrices.xyz_cam[1][1]), static_cast<float>(imatrices.xyz_cam[1][2])};
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for
|
||||
#endif
|
||||
for (int y = 0; y < H2; ++y) {
|
||||
for (int x = 0; x < W2; ++x) {
|
||||
guide[y][x] = gamma[Color::rgbLuminance(rbuf[y][x], gbuf[y][x], bbuf[y][x], xyzcam)];
|
||||
}
|
||||
}
|
||||
}
|
||||
//end adding code ART
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic,16)
|
||||
@ -1008,21 +1035,20 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
// Copy converted pixel back
|
||||
if (pixel[0] > blendpt) {
|
||||
const float rfrac = LIM01(medFactor[0] * (pixel[0] - blendpt));
|
||||
rgb_blend[0] = rfrac * rgb[0] + (1.f - rfrac) * pixel[0];
|
||||
rgb_blend[0] = intp(rfrac, rgb[0], pixel[0]);
|
||||
}
|
||||
|
||||
if (pixel[1] > blendpt) {
|
||||
const float gfrac = LIM01(medFactor[1] * (pixel[1] - blendpt));
|
||||
rgb_blend[1] = gfrac * rgb[1] + (1.f - gfrac) * pixel[1];
|
||||
rgb_blend[1] = intp(gfrac, rgb[1], pixel[1]);
|
||||
}
|
||||
|
||||
if (pixel[2] > blendpt) {
|
||||
const float bfrac = LIM01(medFactor[2] * (pixel[2] - blendpt));
|
||||
rgb_blend[2] = bfrac * rgb[2] + (1.f - bfrac) * pixel[2];
|
||||
rgb_blend[2] = intp(bfrac, rgb[2], pixel[2]);
|
||||
}
|
||||
|
||||
//end of HLRecovery_blend estimation
|
||||
//%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
//there are clipped highlights
|
||||
//first, determine weighted average of unclipped extensions (weighting is by 'hue' proximity)
|
||||
@ -1048,7 +1074,7 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
}
|
||||
|
||||
for (int dir = 0; dir < 2; ++dir) {
|
||||
const float Yhi2 = 1.f / ( hilite_dir[dir * 4 + 0][i1][j1] + hilite_dir[dir * 4 + 1][i1][j1] + hilite_dir[dir * 4 + 2][i1][j1]);
|
||||
const float Yhi2 = 1.f / (hilite_dir[dir * 4 + 0][i1][j1] + hilite_dir[dir * 4 + 1][i1][j1] + hilite_dir[dir * 4 + 2][i1][j1]);
|
||||
|
||||
if (Yhi2 < 2.f) {
|
||||
const float dirwt = 1.f / ((1.f + 65535.f * (SQR(rgb_blend[0] - hilite_dir[dir * 4 + 0][i1][j1] * Yhi2) +
|
||||
@ -1078,14 +1104,18 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
continue;
|
||||
}
|
||||
|
||||
//using code from ART - thanks to Alberto Griggio
|
||||
float maskval = 1.f;
|
||||
const int yy = i + miny;
|
||||
const int xx = j + minx;
|
||||
|
||||
//now correct clipped channels
|
||||
if (pixel[0] > max_f[0] && pixel[1] > max_f[1] && pixel[2] > max_f[2]) {
|
||||
//all channels clipped
|
||||
|
||||
const float mult = whitept / (0.299f * clipfix[0] + 0.587f * clipfix[1] + 0.114f * clipfix[2]);
|
||||
red[i + miny][j + minx] = clipfix[0] * mult;
|
||||
green[i + miny][j + minx] = clipfix[1] * mult;
|
||||
blue[i + miny][j + minx] = clipfix[2] * mult;
|
||||
red[yy][xx] = clipfix[0] * mult;
|
||||
green[yy][xx] = clipfix[1] * mult;
|
||||
blue[yy][xx] = clipfix[2] * mult;
|
||||
} else {//some channels clipped
|
||||
const float notclipped[3] = {
|
||||
pixel[0] <= max_f[0] ? 1.f : 0.f,
|
||||
@ -1094,29 +1124,98 @@ void RawImageSource::HLRecovery_inpaint(float** red, float** green, float** blue
|
||||
};
|
||||
|
||||
if (notclipped[0] == 0.f) { //red clipped
|
||||
red[i + miny][j + minx] = max(pixel[0], clipfix[0] * ((notclipped[1] * pixel[1] + notclipped[2] * pixel[2]) /
|
||||
red[yy][xx] = max(pixel[0], clipfix[0] * ((notclipped[1] * pixel[1] + notclipped[2] * pixel[2]) /
|
||||
(notclipped[1] * clipfix[1] + notclipped[2] * clipfix[2] + epsilon)));
|
||||
}
|
||||
|
||||
if (notclipped[1] == 0.f) { //green clipped
|
||||
green[i + miny][j + minx] = max(pixel[1], clipfix[1] * ((notclipped[2] * pixel[2] + notclipped[0] * pixel[0]) /
|
||||
green[yy][xx] = max(pixel[1], clipfix[1] * ((notclipped[2] * pixel[2] + notclipped[0] * pixel[0]) /
|
||||
(notclipped[2] * clipfix[2] + notclipped[0] * clipfix[0] + epsilon)));
|
||||
}
|
||||
|
||||
if (notclipped[2] == 0.f) { //blue clipped
|
||||
blue[i + miny][j + minx] = max(pixel[2], clipfix[2] * ((notclipped[0] * pixel[0] + notclipped[1] * pixel[1]) /
|
||||
blue[yy][xx] = max(pixel[2], clipfix[2] * ((notclipped[0] * pixel[0] + notclipped[1] * pixel[1]) /
|
||||
(notclipped[0] * clipfix[0] + notclipped[1] * clipfix[1] + epsilon)));
|
||||
}
|
||||
|
||||
maskval = 1.f - (notclipped[0] + notclipped[1] + notclipped[2]) / 5.f;
|
||||
}
|
||||
|
||||
Y = 0.299f * red[i + miny][j + minx] + 0.587f * green[i + miny][j + minx] + 0.114f * blue[i + miny][j + minx];
|
||||
Y = 0.299f * red[yy][xx] + 0.587f * green[yy][xx] + 0.114f * blue[yy][xx];
|
||||
|
||||
if (Y > whitept) {
|
||||
const float mult = whitept / Y;
|
||||
red[yy][xx] *= mult;
|
||||
green[yy][xx] *= mult;
|
||||
blue[yy][xx] *= mult;
|
||||
}
|
||||
|
||||
red[i + miny][j + minx] *= mult;
|
||||
green[i + miny][j + minx] *= mult;
|
||||
blue[i + miny][j + minx] *= mult;
|
||||
if (blur > 0) {
|
||||
const int ii = i / 2;
|
||||
const int jj = j / 2;
|
||||
rbuf[ii][jj] = red[yy][xx];
|
||||
gbuf[ii][jj] = green[yy][xx];
|
||||
bbuf[ii][jj] = blue[yy][xx];
|
||||
mask[ii][jj] = maskval;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (blur > 0) {
|
||||
if (plistener) {
|
||||
progress += 0.05;
|
||||
plistener->setProgress(progress);
|
||||
}
|
||||
blur = rtengine::LIM(blur - 1, 0, 3);
|
||||
|
||||
constexpr float vals[4][3] = {{4.0f, 0.3f, 0.3f},
|
||||
// {3.5f, 0.5f, 0.2f},
|
||||
{3.0f, 1.0f, 0.1f},
|
||||
{3.0f, 2.0f, 0.01f},
|
||||
{2.0f, 3.0f, 0.001f}
|
||||
};
|
||||
|
||||
const float rad1 = vals[blur][0];
|
||||
const float rad2 = vals[blur][1];
|
||||
const float th = vals[blur][2];
|
||||
|
||||
guidedFilter(guide, mask, mask, rad1, th, true, 1);
|
||||
if (plistener) {
|
||||
progress += 0.03;
|
||||
plistener->setProgress(progress);
|
||||
}
|
||||
if (blur > 0) { //no use of 2nd guidedFilter if Blur = 0 (slider to 1)..speed-up and very small differences.
|
||||
guidedFilter(guide, rbuf, rbuf, rad2, 0.01f * 65535.f, true, 1);
|
||||
if (plistener) {
|
||||
progress += 0.03;
|
||||
plistener->setProgress(progress);
|
||||
}
|
||||
guidedFilter(guide, gbuf, gbuf, rad2, 0.01f * 65535.f, true, 1);
|
||||
if (plistener) {
|
||||
progress += 0.03;
|
||||
plistener->setProgress(progress);
|
||||
}
|
||||
guidedFilter(guide, bbuf, bbuf, rad2, 0.01f * 65535.f, true, 1);
|
||||
if (plistener) {
|
||||
progress += 0.03;
|
||||
plistener->setProgress(progress);
|
||||
}
|
||||
}
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic,16)
|
||||
#endif
|
||||
for (int y = 0; y < blurHeight; ++y) {
|
||||
const float fy = y * 0.5f;
|
||||
const int yy = y / 2;
|
||||
for (int x = 0; x < blurWidth; ++x) {
|
||||
const int xx = x / 2;
|
||||
const float m = mask[yy][xx];
|
||||
if (m > 0.f) {
|
||||
const float fx = x * 0.5f;
|
||||
red[y + miny][x + minx] = intp(m, getBilinearValue(rbuf, fx, fy), red[y + miny][x + minx]);
|
||||
green[y + miny][x + minx] = intp(m, getBilinearValue(gbuf, fx, fy), green[y + miny][x + minx]);
|
||||
blue[y + miny][x + minx] = intp(m, getBilinearValue(bbuf, fx, fy), blue[y + miny][x + minx]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -278,8 +278,8 @@ void RawImageSource::getAutoMatchedToneCurve(const ColorManagementParams &cp, st
|
||||
std::unique_ptr<IImage8> source;
|
||||
{
|
||||
eSensorType sensor_type;
|
||||
int w, h;
|
||||
const std::unique_ptr<Thumbnail> thumb(Thumbnail::loadQuickFromRaw(getFileName(), sensor_type, w, h, 1, false, true, true));
|
||||
int w = 0, h = 0;
|
||||
std::unique_ptr<Thumbnail> thumb(Thumbnail::loadQuickFromRaw(getFileName(), rml, sensor_type, w, h, 1, false, true, true));
|
||||
if (!thumb) {
|
||||
if (settings->verbose) {
|
||||
std::cout << "histogram matching: no thumbnail found, generating a neutral curve" << std::endl;
|
||||
|
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "iccjpeg.h"
|
||||
#include <cstdlib> /* define malloc() */
|
||||
#include <new>
|
||||
|
||||
|
||||
/*
|
||||
@ -155,12 +155,9 @@ marker_is_icc (jpeg_saved_marker_ptr marker)
|
||||
* If TRUE is returned, *icc_data_ptr is set to point to the
|
||||
* returned data, and *icc_data_len is set to its length.
|
||||
*
|
||||
* IMPORTANT: the data at **icc_data_ptr has been allocated with malloc()
|
||||
* and must be freed by the caller with free() when the caller no longer
|
||||
* needs it. (Alternatively, we could write this routine to use the
|
||||
* IJG library's memory allocator, so that the data would be freed implicitly
|
||||
* at jpeg_finish_decompress() time. But it seems likely that many apps
|
||||
* will prefer to have the data stick around after decompression finishes.)
|
||||
* IMPORTANT: the data at **icc_data_ptr has been allocated with new
|
||||
* and must be freed by the caller with delete[] when the caller no longer
|
||||
* needs it.
|
||||
*
|
||||
* NOTE: if the file contains invalid ICC APP2 markers, we just silently
|
||||
* return FALSE. You might want to issue an error message instead.
|
||||
@ -235,7 +232,7 @@ read_icc_profile (j_decompress_ptr cinfo,
|
||||
}
|
||||
|
||||
/* Allocate space for assembled data */
|
||||
icc_data = (JOCTET *) malloc(total_length * sizeof(JOCTET));
|
||||
icc_data = new (std::nothrow) JOCTET[total_length];
|
||||
|
||||
if (icc_data == nullptr) {
|
||||
return FALSE; /* oops, out of memory */
|
||||
|
@ -220,7 +220,7 @@ public:
|
||||
#endif
|
||||
return ptrs[row][col];
|
||||
}
|
||||
const T operator() (size_t row, size_t col) const
|
||||
const T& operator() (size_t row, size_t col) const
|
||||
{
|
||||
#if CHECK_BOUNDS
|
||||
assert (row < height_ && col < width_);
|
||||
@ -1274,7 +1274,7 @@ public:
|
||||
#endif
|
||||
return ptr[3 * (row * width + col)];
|
||||
}
|
||||
const T operator() (size_t row, size_t col) const
|
||||
const T& operator() (size_t row, size_t col) const
|
||||
{
|
||||
#if CHECK_BOUNDS
|
||||
assert (row < height_ && col < width_);
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <fcntl.h>
|
||||
#include <libiptcdata/iptc-jpeg.h>
|
||||
#include <memory>
|
||||
#include "rt_math.h"
|
||||
#include "procparams.h"
|
||||
#include "utils.h"
|
||||
@ -125,7 +127,6 @@ ImageIO::ImageIO() :
|
||||
embProfile(nullptr),
|
||||
profileLength(0),
|
||||
loadedProfileData(nullptr),
|
||||
loadedProfileDataJpg(false),
|
||||
loadedProfileLength(0),
|
||||
sampleFormat(IIOSF_UNKNOWN),
|
||||
sampleArrangement(IIOSA_UNKNOWN)
|
||||
@ -442,7 +443,6 @@ int ImageIO::loadJPEGFromMemory (const char* buffer, int bufsize)
|
||||
jpeg_read_header(&cinfo, TRUE);
|
||||
|
||||
deleteLoadedProfileData();
|
||||
loadedProfileDataJpg = true;
|
||||
bool hasprofile = read_icc_profile (&cinfo, (JOCTET**)&loadedProfileData, (unsigned int*)&loadedProfileLength);
|
||||
|
||||
if (hasprofile) {
|
||||
@ -527,7 +527,6 @@ int ImageIO::loadJPEG (const Glib::ustring &fname)
|
||||
cinfo.out_color_space = JCS_RGB;
|
||||
|
||||
deleteLoadedProfileData();
|
||||
loadedProfileDataJpg = true;
|
||||
bool hasprofile = read_icc_profile (&cinfo, (JOCTET**)&loadedProfileData, (unsigned int*)&loadedProfileLength);
|
||||
|
||||
if (hasprofile) {
|
||||
@ -603,14 +602,17 @@ int ImageIO::getTIFFSampleFormat (const Glib::ustring &fname, IIOSampleFormat &s
|
||||
return IMIO_VARIANTNOTSUPPORTED;
|
||||
}
|
||||
|
||||
if (!TIFFGetField(in, TIFFTAG_SAMPLEFORMAT, &sampleformat))
|
||||
if (!TIFFGetField(in, TIFFTAG_SAMPLEFORMAT, &sampleformat)) {
|
||||
/*
|
||||
* WARNING: This is a dirty hack!
|
||||
* We assume that files which doesn't contain the TIFFTAG_SAMPLEFORMAT tag
|
||||
* (which is the case with uncompressed TIFFs produced by RT!) are RGB files,
|
||||
* but that may be not true. --- Hombre
|
||||
*/
|
||||
{
|
||||
sampleformat = SAMPLEFORMAT_UINT;
|
||||
} else if (sampleformat == SAMPLEFORMAT_VOID) {
|
||||
// according to https://www.awaresystems.be/imaging/tiff/tifftags/sampleformat.html
|
||||
// we assume SAMPLEFORMAT_UINT if SAMPLEFORMAT_VOID is set
|
||||
sampleformat = SAMPLEFORMAT_UINT;
|
||||
}
|
||||
|
||||
@ -718,6 +720,8 @@ int ImageIO::loadTIFF (const Glib::ustring &fname)
|
||||
if (!hasTag) {
|
||||
// These are needed
|
||||
TIFFClose(in);
|
||||
fprintf(stderr, "Error 1 loading %s\n", fname.c_str());
|
||||
fflush(stderr);
|
||||
return IMIO_VARIANTNOTSUPPORTED;
|
||||
}
|
||||
|
||||
@ -726,6 +730,8 @@ int ImageIO::loadTIFF (const Glib::ustring &fname)
|
||||
|
||||
if (config != PLANARCONFIG_CONTIG) {
|
||||
TIFFClose(in);
|
||||
fprintf(stderr, "Error 2 loading %s\n", fname.c_str());
|
||||
fflush(stderr);
|
||||
return IMIO_VARIANTNOTSUPPORTED;
|
||||
}
|
||||
|
||||
@ -773,7 +779,6 @@ int ImageIO::loadTIFF (const Glib::ustring &fname)
|
||||
|
||||
char* profdata;
|
||||
deleteLoadedProfileData();
|
||||
loadedProfileDataJpg = false;
|
||||
|
||||
if (TIFFGetField(in, TIFFTAG_ICCPROFILE, &loadedProfileLength, &profdata)) {
|
||||
embProfile = cmsOpenProfileFromMem (profdata, loadedProfileLength);
|
||||
@ -785,32 +790,33 @@ int ImageIO::loadTIFF (const Glib::ustring &fname)
|
||||
|
||||
allocate (width, height);
|
||||
|
||||
unsigned char* linebuffer = new unsigned char[TIFFScanlineSize(in) * (samplesperpixel == 1 ? 3 : 1)];
|
||||
std::unique_ptr<unsigned char[]> linebuffer(new unsigned char[TIFFScanlineSize(in) * (samplesperpixel == 1 ? 3 : 1)]);
|
||||
|
||||
for (int row = 0; row < height; row++) {
|
||||
if (TIFFReadScanline(in, linebuffer, row, 0) < 0) {
|
||||
if (TIFFReadScanline(in, linebuffer.get(), row, 0) < 0) {
|
||||
TIFFClose(in);
|
||||
delete [] linebuffer;
|
||||
fprintf(stderr, "Error 3 loading %s\n", fname.c_str());
|
||||
fflush(stderr);
|
||||
return IMIO_READERROR;
|
||||
}
|
||||
|
||||
if (samplesperpixel > 3) {
|
||||
for (int i = 0; i < width; i++) {
|
||||
memcpy (linebuffer + i * 3 * bitspersample / 8, linebuffer + i * samplesperpixel * bitspersample / 8, 3 * bitspersample / 8);
|
||||
memcpy(linebuffer.get() + i * 3 * bitspersample / 8, linebuffer.get() + i * samplesperpixel * bitspersample / 8, 3 * bitspersample / 8);
|
||||
}
|
||||
}
|
||||
else if (samplesperpixel == 1) {
|
||||
const size_t bytes = bitspersample / 8;
|
||||
for (int i = width - 1; i >= 0; --i) {
|
||||
const unsigned char* const src = linebuffer + i * bytes;
|
||||
unsigned char* const dest = linebuffer + i * 3 * bytes;
|
||||
const unsigned char* const src = linebuffer.get() + i * bytes;
|
||||
unsigned char* const dest = linebuffer.get() + i * 3 * bytes;
|
||||
memcpy(dest + 2 * bytes, src, bytes);
|
||||
memcpy(dest + 1 * bytes, src, bytes);
|
||||
memcpy(dest + 0 * bytes, src, bytes);
|
||||
}
|
||||
}
|
||||
|
||||
setScanline (row, linebuffer, bitspersample);
|
||||
setScanline (row, linebuffer.get(), bitspersample);
|
||||
|
||||
if (pl && !(row % 100)) {
|
||||
pl->setProgress ((double)(row + 1) / height);
|
||||
@ -818,7 +824,6 @@ int ImageIO::loadTIFF (const Glib::ustring &fname)
|
||||
}
|
||||
|
||||
TIFFClose(in);
|
||||
delete [] linebuffer;
|
||||
|
||||
if (pl) {
|
||||
pl->setProgressStr ("PROGRESSBAR_READY");
|
||||
@ -1371,11 +1376,7 @@ MyMutex& ImageIO::mutex ()
|
||||
void ImageIO::deleteLoadedProfileData( )
|
||||
{
|
||||
if(loadedProfileData) {
|
||||
if(loadedProfileDataJpg) {
|
||||
free(loadedProfileData);
|
||||
} else {
|
||||
delete[] loadedProfileData;
|
||||
}
|
||||
delete[] loadedProfileData;
|
||||
}
|
||||
|
||||
loadedProfileData = nullptr;
|
||||
|
@ -80,7 +80,6 @@ protected:
|
||||
std::string profileData;
|
||||
int profileLength;
|
||||
char* loadedProfileData;
|
||||
bool loadedProfileDataJpg;
|
||||
int loadedProfileLength;
|
||||
MyMutex imutex;
|
||||
IIOSampleFormat sampleFormat;
|
||||
|
@ -92,16 +92,12 @@ public:
|
||||
~ImageSource () override {}
|
||||
virtual int load (const Glib::ustring &fname) = 0;
|
||||
virtual void preprocess (const procparams::RAWParams &raw, const procparams::LensProfParams &lensProf, const procparams::CoarseTransformParams& coarse, bool prepareDenoise = true) {};
|
||||
virtual void filmNegativeProcess (const procparams::FilmNegativeParams ¶ms, std::array<float, 3>& filmBaseValues) {};
|
||||
virtual bool getFilmNegativeExponents (Coord2D spotA, Coord2D spotB, int tran, const procparams::FilmNegativeParams& currentParams, std::array<float, 3>& newExps) { return false; };
|
||||
virtual bool getRawSpotValues (Coord2D spot, int spotSize, int tran, const procparams::FilmNegativeParams ¶ms, std::array<float, 3>& rawValues) { return false; };
|
||||
virtual void demosaic (const procparams::RAWParams &raw, bool autoContrast, double &contrastThreshold, bool cache = false) {};
|
||||
virtual void retinex (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &deh, const procparams::ToneCurveParams& Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {};
|
||||
virtual void retinexPrepareCurves (const procparams::RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {};
|
||||
virtual void retinexPrepareBuffers (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) {};
|
||||
virtual void flush () = 0;
|
||||
virtual void HLRecovery_Global (const procparams::ToneCurveParams &hrp) {};
|
||||
virtual void HLRecovery_inpaint (float** red, float** green, float** blue) {};
|
||||
|
||||
virtual bool isRGBSourceModified () const = 0; // tracks whether cached rgb output of demosaic has been modified
|
||||
|
||||
@ -110,6 +106,7 @@ public:
|
||||
virtual int getFrameCount () = 0;
|
||||
virtual int getFlatFieldAutoClipValue () = 0;
|
||||
|
||||
virtual void getWBMults (const ColorTemp &ctemp, const procparams::RAWParams &raw, std::array<float, 4>& scale_mul, float &autoGainComp, float &rm, float &gm, float &bm) const = 0;
|
||||
|
||||
// use right after demosaicing image, add coarse transformation and put the result in the provided Imagefloat*
|
||||
virtual void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hlp, const procparams::RAWParams &raw) = 0;
|
||||
|
@ -54,7 +54,7 @@ class Crop;
|
||||
* but using this class' LUT and other precomputed parameters. The main preview area is displaying a non framed Crop object,
|
||||
* while detail windows are framed Crop objects.
|
||||
*/
|
||||
class ImProcCoordinator final : public StagedImageProcessor
|
||||
class ImProcCoordinator final : public StagedImageProcessor, public HistogramObservable
|
||||
{
|
||||
|
||||
friend class Crop;
|
||||
@ -126,6 +126,16 @@ protected:
|
||||
LUTu histBlue, histBlueRaw;
|
||||
LUTu histLuma, histToneCurve, histToneCurveBW, histLCurve, histCCurve;
|
||||
LUTu histLLCurve, histLCAM, histCCAM, histClad, bcabhist, histChroma, histLRETI;
|
||||
bool hist_lrgb_dirty;
|
||||
/// Used to simulate a lazy update of the raw histogram.
|
||||
bool hist_raw_dirty;
|
||||
int vectorscopeScale;
|
||||
bool vectorscope_hc_dirty, vectorscope_hs_dirty;
|
||||
array2D<int> vectorscope_hc, vectorscope_hs;
|
||||
/// Waveform's intensity. Same as height of reference image.
|
||||
int waveformScale;
|
||||
bool waveform_dirty;
|
||||
array2D<int> waveformRed, waveformGreen, waveformBlue, waveformLuma;
|
||||
|
||||
LUTf CAMBrightCurveJ, CAMBrightCurveQ;
|
||||
|
||||
@ -195,8 +205,16 @@ protected:
|
||||
|
||||
MyMutex minit; // to gain mutually exclusive access to ... to what exactly?
|
||||
|
||||
void notifyHistogramChanged();
|
||||
void reallocAll();
|
||||
void updateLRGBHistograms();
|
||||
/// Updates L, R, G, and B histograms. Returns true unless not updated.
|
||||
bool updateLRGBHistograms();
|
||||
/// Updates the H-C vectorscope. Returns true unless not updated.
|
||||
bool updateVectorscopeHC();
|
||||
/// Updates the H-S vectorscope. Returns true unless not updated.
|
||||
bool updateVectorscopeHS();
|
||||
/// Updates all waveforms. Returns true unless not updated.
|
||||
bool updateWaveforms();
|
||||
void setScale(int prevscale);
|
||||
void updatePreviewImage (int todo, bool panningRelatedChange);
|
||||
|
||||
@ -256,6 +274,7 @@ protected:
|
||||
LUTf lmaskcblocalcurve;
|
||||
LUTf lmaskbllocalcurve;
|
||||
LUTf lmasklclocalcurve;
|
||||
LUTf lmaskloglocalcurve;
|
||||
LUTf lmasklocal_curve;
|
||||
|
||||
LocretigainCurve locRETgainCurve;
|
||||
@ -296,6 +315,9 @@ protected:
|
||||
LocLLmaskCurve locllmas_Curve;
|
||||
LocHHmaskCurve lochhmas_Curve;
|
||||
LocHHmaskCurve lochhhmas_Curve;
|
||||
LocCCmaskCurve locccmaslogCurve;
|
||||
LocLLmaskCurve locllmaslogCurve;
|
||||
LocHHmaskCurve lochhmaslogCurve;
|
||||
|
||||
LocwavCurve locwavCurve;
|
||||
LocwavCurve loclmasCurveblwav;
|
||||
@ -307,6 +329,7 @@ protected:
|
||||
LocwavCurve locwavCurveden;
|
||||
LocwavCurve locedgwavCurve;
|
||||
LocwavCurve loclmasCurve_wav;
|
||||
LocwavCurve locwavCurvehue;
|
||||
|
||||
std::vector<float> huerefs;
|
||||
std::vector<float> huerefblurs;
|
||||
@ -316,6 +339,10 @@ protected:
|
||||
std::vector<float> lumarefs;
|
||||
std::vector<float> sobelrefs;
|
||||
std::vector<float> avgs;
|
||||
std::vector<float> meantms;
|
||||
std::vector<float> stdtms;
|
||||
std::vector<float> meanretis;
|
||||
std::vector<float> stdretis;
|
||||
bool lastspotdup;
|
||||
bool previewDeltaE;
|
||||
int locallColorMask;
|
||||
@ -332,6 +359,7 @@ protected:
|
||||
int localltmMask;
|
||||
int locallblMask;
|
||||
int locallsharMask;
|
||||
int localllogMask;
|
||||
int locall_Mask;
|
||||
|
||||
public:
|
||||
@ -384,8 +412,7 @@ public:
|
||||
bool getAutoWB (double& temp, double& green, double equal, double tempBias) override;
|
||||
void getCamWB (double& temp, double& green) override;
|
||||
void getSpotWB (int x, int y, int rectSize, double& temp, double& green) override;
|
||||
bool getFilmNegativeExponents(int xA, int yA, int xB, int yB, std::array<float, 3>& newExps) override;
|
||||
bool getRawSpotValues(int x, int y, int spotSize, std::array<float, 3>& rawValues) override;
|
||||
bool getFilmNegativeSpot(int x, int y, int spotSize, FilmNegativeParams::RGB &refInput, FilmNegativeParams::RGB &refOutput) override;
|
||||
void getAutoCrop (double ratio, int &x, int &y, int &w, int &h) override;
|
||||
bool getHighQualComputed() override;
|
||||
void setHighQualComputed() override;
|
||||
@ -403,7 +430,7 @@ public:
|
||||
updaterThreadStart.unlock();
|
||||
}
|
||||
|
||||
void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int locall_Mask) override
|
||||
void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int localllogMask, int locall_Mask) override
|
||||
{
|
||||
this->previewDeltaE = previewDeltaE;
|
||||
this->locallColorMask = locallColorMask;
|
||||
@ -420,6 +447,7 @@ public:
|
||||
this->locallsharMask = locallsharMask;
|
||||
this->localllcMask = localllcMask;
|
||||
this->locallcbMask = locallcbMask;
|
||||
this->localllogMask = localllogMask;
|
||||
this->locall_Mask = locall_Mask;
|
||||
}
|
||||
|
||||
@ -449,7 +477,13 @@ public:
|
||||
}
|
||||
void setHistogramListener (HistogramListener *h) override
|
||||
{
|
||||
if (hListener) {
|
||||
hListener->setObservable(nullptr);
|
||||
}
|
||||
hListener = h;
|
||||
if (h) {
|
||||
h->setObservable(this);
|
||||
}
|
||||
}
|
||||
void setAutoCamListener (AutoCamListener* acl) override
|
||||
{
|
||||
@ -550,6 +584,11 @@ public:
|
||||
|
||||
} denoiseInfoStore;
|
||||
|
||||
void requestUpdateHistogram() override;
|
||||
void requestUpdateHistogramRaw() override;
|
||||
void requestUpdateVectorscopeHC() override;
|
||||
void requestUpdateVectorscopeHS() override;
|
||||
void requestUpdateWaveform() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -51,6 +51,9 @@
|
||||
|
||||
#include "../rtgui/editcallbacks.h"
|
||||
|
||||
#pragma GCC diagnostic warning "-Wextra"
|
||||
#pragma GCC diagnostic warning "-Wdouble-promotion"
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace rtengine;
|
||||
@ -952,12 +955,19 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
|
||||
|
||||
float cz, wh, pfl;
|
||||
Ciecam02::initcam1float (yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c);
|
||||
int c16 = 1;
|
||||
if (params->colorappearance.modelmethod == "02") {
|
||||
c16 = 1;
|
||||
}else if (params->colorappearance.modelmethod == "16") {
|
||||
c16 = 16;
|
||||
}
|
||||
|
||||
Ciecam02::initcam1float (yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c, c16);
|
||||
//printf ("wh=%f \n", wh);
|
||||
|
||||
const float pow1 = pow_F(1.64f - pow_F(0.29f, n), 0.73f);
|
||||
float nj, nbbj, ncbj, czj, awj, flj;
|
||||
Ciecam02::initcam2float (yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj);
|
||||
Ciecam02::initcam2float (yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj, c16);
|
||||
#ifdef __SSE2__
|
||||
const float reccmcz = 1.f / (c2 * czj);
|
||||
#endif
|
||||
@ -981,7 +991,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
}
|
||||
|
||||
if (CAMBrightCurveJ.dirty) {
|
||||
Ciecam02::curveJfloat(params->colorappearance.jlight, params->colorappearance.contrast, hist16J, CAMBrightCurveJ); //lightness and contrast J
|
||||
Ciecam02::curveJfloat(params->colorappearance.jlight, params->colorappearance.contrast, 0.6f, hist16J, CAMBrightCurveJ); //lightness and contrast J
|
||||
CAMBrightCurveJ /= 327.68f;
|
||||
CAMBrightCurveJ.dirty = false;
|
||||
}
|
||||
@ -993,7 +1003,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
}
|
||||
|
||||
if (CAMBrightCurveQ.dirty) {
|
||||
Ciecam02::curveJfloat(params->colorappearance.qbright, params->colorappearance.qcontrast, hist16Q, CAMBrightCurveQ); //brightness and contrast Q
|
||||
Ciecam02::curveJfloat(params->colorappearance.qbright, params->colorappearance.qcontrast, 0.6f, hist16Q, CAMBrightCurveQ); //brightness and contrast Q
|
||||
// CAMBrightCurveQ /= coefQ;
|
||||
CAMBrightCurveQ.dirty = false;
|
||||
}
|
||||
@ -1048,7 +1058,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Q, M, s, F2V(aw), F2V(fl), F2V(wh),
|
||||
x, y, z,
|
||||
F2V(xw1), F2V(yw1), F2V(zw1),
|
||||
F2V(c), F2V(nc), F2V(pow1), F2V(nbb), F2V(ncb), F2V(pfl), F2V(cz), F2V(d));
|
||||
F2V(c), F2V(nc), F2V(pow1), F2V(nbb), F2V(ncb), F2V(pfl), F2V(cz), F2V(d), c16);
|
||||
STVF(Jbuffer[k], J);
|
||||
STVF(Cbuffer[k], C);
|
||||
STVF(hbuffer[k], h);
|
||||
@ -1072,7 +1082,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Q, M, s, aw, fl, wh,
|
||||
x, y, z,
|
||||
xw1, yw1, zw1,
|
||||
c, nc, pow1, nbb, ncb, pfl, cz, d);
|
||||
c, nc, pow1, nbb, ncb, pfl, cz, d, c16);
|
||||
Jbuffer[k] = J;
|
||||
Cbuffer[k] = C;
|
||||
hbuffer[k] = h;
|
||||
@ -1110,7 +1120,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Q, M, s, aw, fl, wh,
|
||||
x, y, z,
|
||||
xw1, yw1, zw1,
|
||||
c, nc, pow1, nbb, ncb, pfl, cz, d);
|
||||
c, nc, pow1, nbb, ncb, pfl, cz, d, c16);
|
||||
#endif
|
||||
float Jpro, Cpro, hpro, Qpro, Mpro, spro;
|
||||
Jpro = J;
|
||||
@ -1521,7 +1531,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Ciecam02::jch2xyz_ciecam02float(xx, yy, zz,
|
||||
J, C, h,
|
||||
xw2, yw2, zw2,
|
||||
c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj);
|
||||
c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj, c16);
|
||||
float x, y, z;
|
||||
x = xx * 655.35f;
|
||||
y = yy * 655.35f;
|
||||
@ -1573,7 +1583,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Ciecam02::jch2xyz_ciecam02float(x, y, z,
|
||||
LVF(Jbuffer[k]), LVF(Cbuffer[k]), LVF(hbuffer[k]),
|
||||
F2V(xw2), F2V(yw2), F2V(zw2),
|
||||
F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz));
|
||||
F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz), c16);
|
||||
STVF(xbuffer[k], x * c655d35);
|
||||
STVF(ybuffer[k], y * c655d35);
|
||||
STVF(zbuffer[k], z * c655d35);
|
||||
@ -1830,7 +1840,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Ciecam02::jch2xyz_ciecam02float(xx, yy, zz,
|
||||
ncie->J_p[i][j], ncie_C_p, ncie->h_p[i][j],
|
||||
xw2, yw2, zw2,
|
||||
c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj);
|
||||
c2, nc2, pow1n, nbbj, ncbj, flj, czj, dj, awj, c16);
|
||||
float x = (float)xx * 655.35f;
|
||||
float y = (float)yy * 655.35f;
|
||||
float z = (float)zz * 655.35f;
|
||||
@ -1878,7 +1888,7 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
|
||||
Ciecam02::jch2xyz_ciecam02float(x, y, z,
|
||||
LVF(Jbuffer[k]), LVF(Cbuffer[k]), LVF(hbuffer[k]),
|
||||
F2V(xw2), F2V(yw2), F2V(zw2),
|
||||
F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz));
|
||||
F2V(nc2), F2V(pow1n), F2V(nbbj), F2V(ncbj), F2V(flj), F2V(dj), F2V(awj), F2V(reccmcz), c16);
|
||||
x *= c655d35;
|
||||
y *= c655d35;
|
||||
z *= c655d35;
|
||||
@ -2221,41 +2231,11 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
}
|
||||
|
||||
bool hasColorToning = params->colorToning.enabled && bool (ctOpacityCurve) && bool (ctColorCurve) && params->colorToning.method != "LabGrid";
|
||||
bool hasColorToningLabGrid = params->colorToning.enabled && params->colorToning.method == "LabGrid";
|
||||
// bool hasColorToningLabGrid = params->colorToning.enabled && params->colorToning.method == "LabGrid";
|
||||
// float satLimit = float(params->colorToning.satProtectionThreshold)/100.f*0.7f+0.3f;
|
||||
// float satLimitOpacity = 1.f-(float(params->colorToning.saturatedOpacity)/100.f);
|
||||
float strProtect = pow_F((float (params->colorToning.strength) / 100.f), 0.4f);
|
||||
|
||||
/*
|
||||
// Debug output - Color LUTf points
|
||||
if (ctColorCurve) {
|
||||
printf("\nColor curve:");
|
||||
for (size_t i=0; i<501; i++) {
|
||||
if (i==0 || i==250 || i==500)
|
||||
printf("\n(%.1f)[", float(i)/500.f);
|
||||
printf("%.3f ", ctColorCurve.lutHueCurve[float(i)]);
|
||||
if (i==0 || i==250 || i==500)
|
||||
printf("]\n");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
// Debug output - Opacity LUTf points
|
||||
if (ctOpacityCurve) {
|
||||
printf("\nOpacity curve:");
|
||||
for (size_t i=0; i<501; i++) {
|
||||
if (i==0 || i==250 || i==500)
|
||||
printf("\n(%.1f)[", float(i)/500.f);
|
||||
printf("%.3f ", ctOpacityCurve.lutOpacityCurve[float(i)]);
|
||||
if (i==0 || i==250 || i==500)
|
||||
printf("]\n");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
*/
|
||||
|
||||
float RedLow = params->colorToning.redlow / 100.0;
|
||||
float GreenLow = params->colorToning.greenlow / 100.0;
|
||||
float BlueLow = params->colorToning.bluelow / 100.0;
|
||||
@ -2798,7 +2778,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
|
||||
//colortoning with shift color XYZ or Lch
|
||||
else if (params->colorToning.method == "Lab" && opautili) {
|
||||
int algm = 0;
|
||||
int algo = 0;
|
||||
bool twocol = true;//true=500 color false=2 color
|
||||
int metchrom = 0;
|
||||
|
||||
@ -2832,19 +2812,19 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
}
|
||||
|
||||
if (params->colorToning.method == "Lab") {
|
||||
algm = 1;
|
||||
algo = 1;
|
||||
} else if (params->colorToning.method == "Lch") {
|
||||
algm = 2; //in case of
|
||||
algo = 2; //in case of
|
||||
}
|
||||
|
||||
if (algm <= 2) {
|
||||
if (algo <= 2) {
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
|
||||
float r = rtemp[ti * TS + tj];
|
||||
float g = gtemp[ti * TS + tj];
|
||||
float b = btemp[ti * TS + tj];
|
||||
float ro, go, bo;
|
||||
labtoning(r, g, b, ro, go, bo, algm, metchrom, twoc, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, iplow, iphigh, wp, wip);
|
||||
labtoning(r, g, b, ro, go, bo, algo, metchrom, twoc, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, iplow, iphigh, wp, wip);
|
||||
setUnlessOOG(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], ro, go, bo);
|
||||
}
|
||||
}
|
||||
@ -3204,9 +3184,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
Color::RGB2Lab(&rtemp[ti * TS], >emp[ti * TS], &btemp[ti * TS], &(lab->L[i][jstart]), &(lab->a[i][jstart]), &(lab->b[i][jstart]), toxyz, tW - jstart);
|
||||
}
|
||||
|
||||
if (hasColorToningLabGrid) {
|
||||
colorToningLabGrid(lab, jstart, tW, istart, tH, false);
|
||||
}
|
||||
// if (hasColorToningLabGrid) {
|
||||
// colorToningLabGrid(lab, jstart, tW, istart, tH, false);
|
||||
// }
|
||||
} else { // black & white
|
||||
// Auto channel mixer needs whole image, so we now copy to tmpImage and close the tiled processing
|
||||
for (int i = istart, ti = 0; i < tH; i++, ti++) {
|
||||
@ -3459,7 +3439,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
|
||||
//colortoning with shift color Lab
|
||||
else if (params->colorToning.method == "Lab" && opautili) {
|
||||
int algm = 0;
|
||||
int algo = 0;
|
||||
bool twocol = true;
|
||||
int metchrom = 0;
|
||||
|
||||
@ -3494,12 +3474,12 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
}
|
||||
|
||||
if (params->colorToning.method == "Lab") {
|
||||
algm = 1;
|
||||
algo = 1;
|
||||
} else if (params->colorToning.method == "Lch") {
|
||||
algm = 2; //in case of
|
||||
algo = 2; //in case of
|
||||
}
|
||||
|
||||
if (algm <= 2) {
|
||||
if (algo <= 2) {
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic, 5)
|
||||
#endif
|
||||
@ -3510,7 +3490,7 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
float g = tmpImage->g(i, j);
|
||||
float b = tmpImage->b(i, j);
|
||||
float ro, bo, go;
|
||||
labtoning(r, g, b, ro, go, bo, algm, metchrom, twoc, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, iplow, iphigh, wp, wip);
|
||||
labtoning(r, g, b, ro, go, bo, algo, metchrom, twoc, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, clToningcurve, cl2Toningcurve, iplow, iphigh, wp, wip);
|
||||
setUnlessOOG(tmpImage->r(i, j), tmpImage->g(i, j), tmpImage->b(i, j), ro, go, bo);
|
||||
}
|
||||
}
|
||||
@ -3585,9 +3565,9 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
for (int i = 0; i < tH; i++) {
|
||||
Color::RGB2Lab(tmpImage->r(i), tmpImage->g(i), tmpImage->b(i), lab->L[i], lab->a[i], lab->b[i], toxyz, tW);
|
||||
|
||||
if (hasColorToningLabGrid) {
|
||||
colorToningLabGrid(lab, 0, tW, i, i + 1, false);
|
||||
}
|
||||
// if (hasColorToningLabGrid) {
|
||||
// colorToningLabGrid(lab, 0, tW, i, i + 1, false);
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@ -3610,12 +3590,13 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
|
||||
}
|
||||
|
||||
// shadowsHighlights(lab);
|
||||
shadowsHighlights(lab, params->sh.enabled, params->sh.lab,params->sh.highlights ,params->sh.shadows, params->sh.radius, scale, params->sh.htonalwidth, params->sh.stonalwidth);
|
||||
|
||||
// shadowsHighlights(lab, params->sh.enabled, params->sh.lab,params->sh.highlights ,params->sh.shadows, params->sh.radius, scale, params->sh.htonalwidth, params->sh.stonalwidth);
|
||||
/*
|
||||
if (params->localContrast.enabled) {
|
||||
// Alberto's local contrast
|
||||
localContrast(lab, lab->L, params->localContrast, false, scale);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
@ -4304,36 +4285,17 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW
|
||||
const bool avoidColorShift = (params->labCurve.avoidcolorshift || (params->colorappearance.gamut && params->colorappearance.enabled)) && !bwToning ;
|
||||
const float protectRed = (float)settings->protectred;
|
||||
const double protectRedH = settings->protectredh;
|
||||
float protect_red, protect_redh;
|
||||
protect_red = protectRed;//default=60 chroma: one can put more or less if necessary...in 'option' 40...160
|
||||
const float protect_red = rtengine::LIM<float>(protectRed, 20.f, 180.f); //default=60 chroma: one can put more or less if necessary...in 'option' 40...160
|
||||
|
||||
if (protect_red < 20.0f) {
|
||||
protect_red = 20.0; // avoid too low value
|
||||
}
|
||||
// default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1.0
|
||||
// avoid divide by 0 and negatives values
|
||||
// avoid too big values
|
||||
const float protect_redh = rtengine::LIM<float>(protectRedH, 0.1f, 1.f);
|
||||
|
||||
if (protect_red > 180.0f) {
|
||||
protect_red = 180.0; // avoid too high value
|
||||
}
|
||||
|
||||
protect_redh = float (protectRedH); //default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1.0
|
||||
|
||||
if (protect_redh < 0.1f) {
|
||||
protect_redh = 0.1f; //avoid divide by 0 and negatives values
|
||||
}
|
||||
|
||||
if (protect_redh > 1.0f) {
|
||||
protect_redh = 1.0f; //avoid too big values
|
||||
}
|
||||
|
||||
float protect_redhcur = protectRedH;//default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1
|
||||
|
||||
if (protect_redhcur < 0.1f) {
|
||||
protect_redhcur = 0.1f; //avoid divide by 0 and negatives values:minimal protection for transition
|
||||
}
|
||||
|
||||
if (protect_redhcur > 3.5f) {
|
||||
protect_redhcur = 3.5f; //avoid too big values
|
||||
}
|
||||
// default=0.4 rad : one can put more or less if necessary...in 'option' 0.2 ..1
|
||||
// avoid divide by 0 and negatives values:minimal protection for transition
|
||||
// avoid too big values
|
||||
const float protect_redhcurg = rtengine::LIM<float>(protectRedH, 0.1f, 3.5f);
|
||||
|
||||
//increase saturation after denoise : ...approximation
|
||||
float factnoise = 1.f;
|
||||
@ -4593,21 +4555,21 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW
|
||||
}
|
||||
|
||||
if (!bwToning) {
|
||||
float factorskin, factorsat, factorskinext;
|
||||
float factorskinc, factorsatc, factorskinextc;
|
||||
|
||||
if (chromapro > 1.f) {
|
||||
float scale = scaleConst;//reduction in normal zone
|
||||
float scaleext = 1.f;//reduction in transition zone
|
||||
Color::scalered(rstprotection, chromapro, 0.0, HH, protect_redh, scale, scaleext); //1.0
|
||||
float interm = (chromapro - 1.f);
|
||||
factorskin = 1.f + (interm * scale);
|
||||
factorskinext = 1.f + (interm * scaleext);
|
||||
factorskinc = 1.f + (interm * scale);
|
||||
factorskinextc = 1.f + (interm * scaleext);
|
||||
} else {
|
||||
factorskin = chromapro ; // +(chromapro)*scale;
|
||||
factorskinext = chromapro ;// +(chromapro)*scaleext;
|
||||
factorskinc = chromapro ; // +(chromapro)*scale;
|
||||
factorskinextc = chromapro ;// +(chromapro)*scaleext;
|
||||
}
|
||||
|
||||
factorsat = chromapro * factnoise;
|
||||
factorsatc = chromapro * factnoise;
|
||||
|
||||
//simulate very approximative gamut f(L) : with pyramid transition
|
||||
float dred /*=55.f*/;//C red value limit
|
||||
@ -4627,9 +4589,9 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW
|
||||
// end pyramid
|
||||
|
||||
// Test if chroma is in the normal range first
|
||||
Color::transitred(HH, Chprov1, dred, factorskin, protect_red, factorskinext, protect_redh, factorsat, factorsat);
|
||||
atmp *= factorsat;
|
||||
btmp *= factorsat;
|
||||
Color::transitred(HH, Chprov1, dred, factorskinc, protect_red, factorskinextc, protect_redh, factorsatc, factorsatc);
|
||||
atmp *= factorsatc;
|
||||
btmp *= factorsatc;
|
||||
|
||||
if (editPipette && editID == EUID_Lab_CLCurve) {
|
||||
editWhatever->v(i, j) = LIM01<float> (LL / 100.f); // Lab C=f(L) pipette
|
||||
@ -4768,7 +4730,7 @@ void ImProcFunctions::chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW
|
||||
const float xx = 0.25f; //soft : between 0.2 and 0.4
|
||||
float skdeltaHH;
|
||||
|
||||
skdeltaHH = protect_redhcur; //transition hue
|
||||
skdeltaHH = protect_redhcurg; //transition hue
|
||||
|
||||
float skbeg = -0.05f; //begin hue skin
|
||||
float skend = 1.60f; //end hue skin
|
||||
@ -5169,9 +5131,9 @@ void ImProcFunctions::EPDToneMaplocal(int sp, LabImage *lab, LabImage *tmp1, uns
|
||||
float *L = lab->L[0];
|
||||
float *a = lab->a[0];
|
||||
float *b = lab->b[0];
|
||||
unsigned int i, N = lab->W * lab->H;
|
||||
std::size_t N = static_cast<size_t>(lab->W) * static_cast<size_t>(lab->H);
|
||||
int WW = lab->W ;
|
||||
// int HH = lab->H ;
|
||||
|
||||
EdgePreservingDecomposition epd(lab->W, lab->H);
|
||||
|
||||
//Due to the taking of logarithms, L must be nonnegative. Further, scale to 0 to 1 using nominal range of L, 0 to 15 bit.
|
||||
@ -5181,7 +5143,7 @@ void ImProcFunctions::EPDToneMaplocal(int sp, LabImage *lab, LabImage *tmp1, uns
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for reduction(max:maxL) reduction(min:minL) schedule(dynamic,16)
|
||||
#endif
|
||||
for (i = 0; i < N; i++) {
|
||||
for (std::size_t i = 0; i < N; i++) {
|
||||
minL = rtengine::min(minL, L[i]);
|
||||
maxL = rtengine::max(maxL, L[i]);
|
||||
}
|
||||
@ -5193,14 +5155,14 @@ void ImProcFunctions::EPDToneMaplocal(int sp, LabImage *lab, LabImage *tmp1, uns
|
||||
if (maxL == 0.f) { // avoid division by zero
|
||||
maxL = 1.f;
|
||||
}
|
||||
|
||||
|
||||
const float mult = gamm / maxL;
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for
|
||||
#endif
|
||||
for (i = 0; i < N; i++)
|
||||
for (std::size_t i = 0; i < N; i++)
|
||||
{
|
||||
L[i] = (L[i] - minL) / maxL;
|
||||
L[i] *= gamm;
|
||||
L[i] = (L[i] - minL) * mult;
|
||||
}
|
||||
|
||||
//Some interpretations.
|
||||
@ -5660,14 +5622,8 @@ double ImProcFunctions::getAutoDistor(const Glib::ustring &fname, int thumb_size
|
||||
rawGray = raw->getGrayscaleHistEQ(width);
|
||||
|
||||
if (!thumbGray || !rawGray) {
|
||||
if (thumbGray) {
|
||||
delete thumbGray;
|
||||
}
|
||||
|
||||
if (rawGray) {
|
||||
delete rawGray;
|
||||
}
|
||||
|
||||
delete[] thumbGray;
|
||||
delete[] rawGray;
|
||||
delete thumb;
|
||||
delete raw;
|
||||
return 0.0;
|
||||
@ -5680,8 +5636,8 @@ double ImProcFunctions::getAutoDistor(const Glib::ustring &fname, int thumb_size
|
||||
calcDistortion(thumbGray, rawGray, width, h_thumb, 4, dist_amount);
|
||||
}
|
||||
|
||||
delete thumbGray;
|
||||
delete rawGray;
|
||||
delete[] thumbGray;
|
||||
delete[] rawGray;
|
||||
delete thumb;
|
||||
delete raw;
|
||||
return dist_amount;
|
||||
@ -5716,6 +5672,116 @@ void ImProcFunctions::rgb2lab(const Imagefloat &src, LabImage &dst, const Glib::
|
||||
}
|
||||
}
|
||||
|
||||
void ImProcFunctions::rgb2lab(const Image8 &src, int x, int y, int w, int h, float L[], float a[], float b[], const procparams::ColorManagementParams &icm, bool consider_histogram_settings) const
|
||||
{ // Adapted from ImProcFunctions::lab2rgb
|
||||
const int src_width = src.getWidth();
|
||||
const int src_height = src.getHeight();
|
||||
|
||||
if (x < 0) {
|
||||
x = 0;
|
||||
}
|
||||
|
||||
if (y < 0) {
|
||||
y = 0;
|
||||
}
|
||||
|
||||
if (x + w > src_width) {
|
||||
w = src_width - x;
|
||||
}
|
||||
|
||||
if (y + h > src_height) {
|
||||
h = src_height - y;
|
||||
}
|
||||
|
||||
Glib::ustring profile;
|
||||
|
||||
cmsHPROFILE oprof = nullptr;
|
||||
|
||||
if (settings->HistogramWorking && consider_histogram_settings) {
|
||||
profile = icm.workingProfile;
|
||||
} else {
|
||||
profile = icm.outputProfile;
|
||||
|
||||
if (icm.outputProfile.empty() || icm.outputProfile == ColorManagementParams::NoICMString) {
|
||||
profile = "sRGB";
|
||||
}
|
||||
oprof = ICCStore::getInstance()->getProfile(profile);
|
||||
}
|
||||
|
||||
if (oprof) {
|
||||
cmsUInt32Number flags = cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; // NOCACHE is important for thread safety
|
||||
|
||||
if (icm.outputBPC) {
|
||||
flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
|
||||
}
|
||||
|
||||
lcmsMutex->lock();
|
||||
cmsHPROFILE LabIProf = cmsCreateLab4Profile(nullptr);
|
||||
cmsHTRANSFORM hTransform = cmsCreateTransform (oprof, TYPE_RGB_8, LabIProf, TYPE_Lab_FLT, icm.outputIntent, flags);
|
||||
cmsCloseProfile(LabIProf);
|
||||
lcmsMutex->unlock();
|
||||
|
||||
// cmsDoTransform is relatively expensive
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
{
|
||||
AlignedBuffer<float> oBuf(3 * w);
|
||||
float *outbuffer = oBuf.data;
|
||||
int condition = y + h;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp for schedule(dynamic,16)
|
||||
#endif
|
||||
|
||||
for (int i = y; i < condition; i++) {
|
||||
const int ix = 3 * (x + i * src_width);
|
||||
int iy = 0;
|
||||
float* rL = L + (i - y) * w;
|
||||
float* ra = a + (i - y) * w;
|
||||
float* rb = b + (i - y) * w;
|
||||
|
||||
cmsDoTransform (hTransform, src.data + ix, outbuffer, w);
|
||||
|
||||
for (int j = 0; j < w; j++) {
|
||||
rL[j] = outbuffer[iy++] * 327.68f;
|
||||
ra[j] = outbuffer[iy++] * 327.68f;
|
||||
rb[j] = outbuffer[iy++] * 327.68f;
|
||||
}
|
||||
}
|
||||
} // End of parallelization
|
||||
|
||||
cmsDeleteTransform(hTransform);
|
||||
} else {
|
||||
TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix(profile);
|
||||
const float wp[3][3] = {
|
||||
{static_cast<float>(wprof[0][0]), static_cast<float>(wprof[0][1]), static_cast<float>(wprof[0][2])},
|
||||
{static_cast<float>(wprof[1][0]), static_cast<float>(wprof[1][1]), static_cast<float>(wprof[1][2])},
|
||||
{static_cast<float>(wprof[2][0]), static_cast<float>(wprof[2][1]), static_cast<float>(wprof[2][2])}
|
||||
};
|
||||
|
||||
const int x2 = x + w;
|
||||
const int y2 = y + h;
|
||||
constexpr float rgb_factor = 65355.f / 255.f;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic,16) if (multiThread)
|
||||
#endif
|
||||
|
||||
for (int i = y; i < y2; i++) {
|
||||
int offset = (i - y) * w;
|
||||
for (int j = x; j < x2; j++) {
|
||||
float X, Y, Z;
|
||||
// lab2rgb uses gamma2curve, which is gammatab_srgb.
|
||||
const auto& igamma = Color::igammatab_srgb;
|
||||
Color::rgbxyz(igamma[rgb_factor * src.r(i, j)], igamma[rgb_factor * src.g(i, j)], igamma[rgb_factor * src.b(i, j)], X, Y, Z, wp);
|
||||
Color::XYZ2Lab(X, Y, Z, L[offset], a[offset], b[offset]);
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ImProcFunctions::lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace)
|
||||
{
|
||||
TMatrix wiprof = ICCStore::getInstance()->workingSpaceInverseMatrix(workingSpace);
|
||||
@ -5796,7 +5862,7 @@ void ImProcFunctions::colorToningLabGrid(LabImage *lab, int xstart, int xend, in
|
||||
float b_base = params->colorToning.labgridBLow / scaling;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for if (multiThread)
|
||||
#pragma omp parallel for if (MultiThread)
|
||||
#endif
|
||||
|
||||
for (int y = ystart; y < yend; ++y) {
|
||||
|
@ -87,6 +87,7 @@ struct DehazeParams;
|
||||
struct FattalToneMappingParams;
|
||||
struct ColorManagementParams;
|
||||
struct DirPyrDenoiseParams;
|
||||
struct FilmNegativeParams;
|
||||
struct LocalContrastParams;
|
||||
struct LocallabParams;
|
||||
struct SharpeningParams;
|
||||
@ -134,13 +135,18 @@ public:
|
||||
TYPE_7X7,
|
||||
TYPE_9X9
|
||||
};
|
||||
enum class BlurType {
|
||||
OFF,
|
||||
BOX,
|
||||
GAUSS
|
||||
};
|
||||
|
||||
double lumimul[3];
|
||||
|
||||
explicit ImProcFunctions(const procparams::ProcParams* iparams, bool imultiThread = true)
|
||||
: monitorTransform(nullptr), params(iparams), scale(1), multiThread(imultiThread), lumimul{} {}
|
||||
~ImProcFunctions();
|
||||
bool needsLuminanceOnly()
|
||||
bool needsLuminanceOnly() const
|
||||
{
|
||||
return !(needsCA() || needsDistortion() || needsRotation() || needsPerspective() || needsLCP() || needsLensfun()) && (needsVignetting() || needsPCVignetting() || needsGradient());
|
||||
}
|
||||
@ -148,6 +154,12 @@ public:
|
||||
|
||||
bool needsTransform(int oW, int oH, int rawRotationDeg, const FramesMetaData *metadata) const;
|
||||
bool needsPCVignetting() const;
|
||||
|
||||
bool filmNegativeProcess(rtengine::Imagefloat *input, rtengine::Imagefloat *output, procparams::FilmNegativeParams &fnp,
|
||||
const procparams::RAWParams &rawParams, const rtengine::ImageSource* imgsrc, const rtengine::ColorTemp &currWB);
|
||||
|
||||
void filmNegativeProcess(rtengine::Imagefloat *input, rtengine::Imagefloat *output, const procparams::FilmNegativeParams ¶ms);
|
||||
|
||||
float calcGradientFactor (const struct grad_params& gp, int x, int y);
|
||||
void firstAnalysis(const Imagefloat* const working, const procparams::ProcParams ¶ms, LUTu & vhist16);
|
||||
void updateColorProfiles(const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck);
|
||||
@ -174,7 +186,7 @@ public:
|
||||
void moyeqt(Imagefloat* working, float &moyS, float &eqty);
|
||||
|
||||
void luminanceCurve(LabImage* lold, LabImage* lnew, const LUTf &curve);
|
||||
void ciecamloc_02float(int sp, LabImage* lab);
|
||||
void ciecamloc_02float(int sp, LabImage* lab, int call);
|
||||
|
||||
void ciecam_02float(CieImage* ncie, float adap, int pW, int pwb, LabImage* lab, const procparams::ProcParams* params,
|
||||
const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3,
|
||||
@ -237,15 +249,21 @@ public:
|
||||
const LocwavCurve & loclmasCurvecolwav, bool lmasutilicolwav, int level_bl, int level_hl, int level_br, int level_hr,
|
||||
int shortcu, bool delt, const float hueref, const float chromaref, const float lumaref,
|
||||
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, bool fftt, float blu_ma, float cont_ma, int indic);
|
||||
|
||||
|
||||
void avoidcolshi(const struct local_params& lp, int sp, LabImage * original, LabImage *transformed, int cy, int cx, int sk);
|
||||
|
||||
void deltaEforMask(float **rdE, int bfw, int bfh, LabImage* bufcolorig, const float hueref, const float chromaref, const float lumaref,
|
||||
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, float balance, float balanceh);
|
||||
void discrete_laplacian_threshold(float * data_out, const float * data_in, size_t nx, size_t ny, float t);
|
||||
void laplacian(const array2D<float> &src, array2D<float> &dst, int bfw, int bfh, float threshold, float ceiling, float factor, bool multiThread);
|
||||
void detail_mask(const array2D<float> &src, array2D<float> &mask, int bfw, int bfh, float scaling, float threshold, float ceiling, float factor, BlurType blur_type, float blur, bool multithread);
|
||||
void NLMeans(float **img, int strength, int detail_thresh, int patch, int radius, float gam, int bfw, int bfh, float scale, bool multithread);
|
||||
|
||||
void rex_poisson_dct(float * data, size_t nx, size_t ny, double m);
|
||||
void mean_dt(const float * data, size_t size, double& mean_p, double& dt_p);
|
||||
float *cos_table(size_t size);
|
||||
|
||||
void normalize_mean_dt(float *data, const float *ref, size_t size, float mod, float sigm);
|
||||
void normalize_mean_dt(float *data, const float *ref, size_t size, float mod, float sigm, float mdef, float sdef, float mdef2, float sdef2);
|
||||
void retinex_pde(const float *datain, float * dataout, int bfw, int bfh, float thresh, float multy, float *dE, int show, int dEenable, int normalize);
|
||||
void exposure_pde(float *dataor, float *datain, float * dataout, int bfw, int bfh, float thresh, float mod);
|
||||
void fftw_convol_blur(float *input, float *output, int bfw, int bfh, float radius, int fftkern, int algo);
|
||||
@ -256,16 +274,16 @@ public:
|
||||
const LocCCmaskCurve & locccmasretiCurve, bool lcmasretiutili, const LocLLmaskCurve & locllmasretiCurve, bool llmasretiutili, const LocHHmaskCurve & lochhmasretiCurve, bool lhmasretiutili,
|
||||
int llretiMask, bool retiMasktmap, bool retiMask, float rad, float lap, bool pde, float gamm, float slop, float chro, float blend,
|
||||
const LUTf & lmaskretilocalcurve, bool localmaskretiutili,
|
||||
LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, bool multiThread,
|
||||
LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, LabImage * bufmaskorigreti, bool multiThread,
|
||||
bool delt, const float hueref, const float chromaref, const float lumaref,
|
||||
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, float balance, float balanceh, float lumask);
|
||||
|
||||
//3 functions from Alberto Griggio, adapted J.Desmis 2019
|
||||
void filmGrain(Imagefloat *rgb, int isogr, int strengr, int scalegr, int bfw, int bfh);
|
||||
void log_encode(Imagefloat *rgb, const struct local_params & lp, bool multiThread, int bfw, int bfh);
|
||||
void getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, float *blackev, float *whiteev, bool *Autogr, int fw, int fh, float xsta, float xend, float ysta, float yend, int SCALE);
|
||||
void filmGrain(Imagefloat *rgb, int isogr, int strengr, int scalegr,float divgr, int bfw, int bfh);
|
||||
void log_encode(Imagefloat *rgb, struct local_params & lp, bool multiThread, int bfw, int bfh);
|
||||
void getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, float *blackev, float *whiteev, bool *Autogr, float *sourceab, int fw, int fh, float xsta, float xend, float ysta, float yend, int SCALE);
|
||||
|
||||
void MSRLocal(int call, int sp, bool fftw, int lum, float** reducDE, LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, float** luminance, const float* const *originalLuminance,
|
||||
void MSRLocal(int call, int sp, bool fftw, int lum, float** reducDE, LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, LabImage * bufmaskorigreti, float** luminance, const float* const *originalLuminance,
|
||||
const int width, const int height, int bfwr, int bfhr, const procparams::LocallabParams &loc, const int skip, const LocretigainCurve &locRETgainCcurve, const LocretitransCurve &locRETtransCcurve,
|
||||
const int chrome, const int scall, const float krad, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax,
|
||||
const LocCCmaskCurve & locccmasretiCurve, bool lcmasretiutili, const LocLLmaskCurve & locllmasretiCurve, bool llmasretiutili, const LocHHmaskCurve & lochhmasretiCurve, bool lhmasretiutili, int llretiMask,
|
||||
@ -274,11 +292,12 @@ public:
|
||||
bool delt, const float hueref, const float chromaref, const float lumaref,
|
||||
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, float balance, float balanceh, float lumask);
|
||||
|
||||
void mean_sig (const float* const * const savenormL, float &meanf, float &stdf, int xStart, int xEnd, int yStart, int yEnd) const;
|
||||
|
||||
void calc_ref(int sp, LabImage* original, LabImage* transformed, int cx, int cy, int oW, int oH, int sk, double &huerefblur, double &chromarefblur, double &lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, float &avg, const LocwavCurve & locwavCurveden, bool locwavdenutili);
|
||||
void copy_ref(LabImage* spotbuffer, LabImage* original, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp, double &huerefspot, double &chromarefspot, double &lumarefspot);
|
||||
void paste_ref(LabImage* spotbuffer, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp);
|
||||
void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, LabImage* lastorig, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve& locRETgainCcurve, const LocretitransCurve &locRETtransCcurve,
|
||||
void Lab_Local(int call, int sp, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, LabImage * savenormtm, LabImage * savenormreti, LabImage* lastorig, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve& locRETgainCcurve, const LocretitransCurve &locRETtransCcurve,
|
||||
const LUTf& lllocalcurve, bool locallutili,
|
||||
const LUTf& cllocalcurve, bool localclutili,
|
||||
const LUTf& lclocalcurve, bool locallcutili,
|
||||
@ -292,9 +311,10 @@ public:
|
||||
const LUTf& lmaskcblocalcurve, bool localmaskcbutili,
|
||||
const LUTf& lmaskbllocalcurve, bool localmaskblutili,
|
||||
const LUTf& lmasklclocalcurve, bool localmasklcutili,
|
||||
const LUTf& lmaskloglocalcurve, bool localmasklogutili,
|
||||
const LUTf& lmasklocal_curve, bool localmask_utili,
|
||||
|
||||
const LocCCmaskCurve& locccmasCurve, bool lcmasutili, const LocLLmaskCurve& locllmasCurve, bool llmasutili, const LocHHmaskCurve& lochhmasCurve, bool lhmasutili, const LocHHmaskCurve& lochhhmasCurve, bool lhhmasutili,
|
||||
const LocCCmaskCurve& locccmasCurve, bool lcmasutili, const LocLLmaskCurve& locllmasCurve, bool llmasutili, const LocHHmaskCurve& lochhmasCurve, bool lhmasutili, const LocHHmaskCurve& llochhhmasCurve, bool lhhmasutili,
|
||||
const LocCCmaskCurve& locccmasexpCurve, bool lcmasexputili, const LocLLmaskCurve& locllmasexpCurve, bool llmasexputili, const LocHHmaskCurve& lochhmasexpCurve, bool lhmasexputili,
|
||||
const LocCCmaskCurve& locccmasSHCurve, bool lcmasSHutili, const LocLLmaskCurve& locllmasSHCurve, bool llmasSHutili, const LocHHmaskCurve& lochhmasSHCurve, bool lhmasSHutili,
|
||||
const LocCCmaskCurve& locccmasvibCurve, bool lcmasvibutili, const LocLLmaskCurve& locllmasvibCurve, bool llmasvibutili, const LocHHmaskCurve& lochhmasvibCurve, bool lhmasvibutili,
|
||||
@ -303,6 +323,7 @@ public:
|
||||
const LocCCmaskCurve& locccmastmCurve, bool lcmastmutili, const LocLLmaskCurve& locllmastmCurve, bool llmastmutili, const LocHHmaskCurve& lochhmastmCurve, bool lhmastmutili,
|
||||
const LocCCmaskCurve& locccmasblCurve, bool lcmasblutili, const LocLLmaskCurve& locllmasblCurve, bool llmasblutili, const LocHHmaskCurve& lochhmasblCurve, bool lhmasblutili,
|
||||
const LocCCmaskCurve& locccmaslcCurve, bool lcmaslcutili, const LocLLmaskCurve& locllmaslcCurve, bool llmaslcutili, const LocHHmaskCurve& lochhmaslcCurve, bool lhmaslcutili,
|
||||
const LocCCmaskCurve& locccmaslogCurve, bool lcmaslogutili, const LocLLmaskCurve& locllmaslogCurve, bool llmaslogutili, const LocHHmaskCurve& lochhmaslogCurve, bool lhmaslogutili,
|
||||
const LocCCmaskCurve& locccmas_Curve, bool lcmas_utili, const LocLLmaskCurve& locllmas_Curve, bool llmas_utili, const LocHHmaskCurve& lochhmas_Curve, bool lhmas_utili,
|
||||
const LocHHmaskCurve& lochhhmas_Curve, bool lhhmas_utili,
|
||||
|
||||
@ -313,19 +334,21 @@ public:
|
||||
const LocwavCurve& locconwavCurve, bool locconwavutili,
|
||||
const LocwavCurve& loccompwavCurve, bool loccompwavutili,
|
||||
const LocwavCurve& loccomprewavCurve, bool loccomprewavutili,
|
||||
const LocwavCurve& locwavCurvehue, bool locwavhueutili,
|
||||
const LocwavCurve& locwavCurveden, bool locwavdenutili,
|
||||
const LocwavCurve& locedgwavCurve, bool locedgwavutili,
|
||||
const LocwavCurve& loclmasCurve_wav, bool lmasutili_wav,
|
||||
bool LHutili, bool HHutili, bool CHutili, const LUTf& cclocalcurve, bool localcutili, const LUTf& rgblocalcurve, bool localrgbutili, bool localexutili, const LUTf& exlocalcurve, const LUTf& hltonecurveloc, const LUTf& shtonecurveloc, const LUTf& tonecurveloc, const LUTf& lightCurveloc,
|
||||
double& huerefblur, double &chromarefblur, double& lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int &lastsav,
|
||||
bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int ll_Mask,
|
||||
float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax);
|
||||
bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int lllogMask, int ll_Mask,
|
||||
float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax,
|
||||
float& meantm, float& stdtm, float& meanreti, float& stdreti);
|
||||
|
||||
void addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk);
|
||||
void BlurNoise_Localold(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);
|
||||
void InverseBlurNoise_Local(LabImage * originalmask, float **bufchro, const struct local_params& lp, const float hueref, const float chromaref, const float lumaref, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy, int sk);
|
||||
void InverseBlurNoise_Local(LabImage * originalmask, const struct local_params& lp, const float hueref, const float chromaref, const float lumaref, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy, int sk);
|
||||
void InverseReti_Local(const struct local_params& lp, const float hueref, const float chromaref, const float lumaref, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy, int chro, int sk);
|
||||
void BlurNoise_Local(LabImage* tmp1, LabImage * originalmask, float **bufchro, const float hueref, const float chromaref, const float lumaref, local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy, int sk);
|
||||
void BlurNoise_Local(LabImage* tmp1, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy, int sk);
|
||||
static void strcurv_data(std::string retistr, int *s_datc, int &siz);
|
||||
void blendstruc(int bfw, int bfh, LabImage* bufcolorig, float radius, float stru, array2D<float> & blend2, int sk, bool multiThread);
|
||||
|
||||
@ -335,7 +358,7 @@ public:
|
||||
const LocwavCurve & loccompwavCurve, bool loccompwavutili, bool wavcurvecomp,
|
||||
const LocwavCurve & loccomprewavCurve, bool loccomprewavutili, bool wavcurvecompre,
|
||||
const LocwavCurve & locedgwavCurve, bool locedgwavutili,
|
||||
float sigm, float offs,int & maxlvl, float fatdet, float fatanch, float chromalev, float chromablu, bool blurlc, bool blurena, bool levelena, bool comprena, bool compreena, float compress, float thres);
|
||||
float sigm, float offs,int & maxlvl, float sigmadc, float deltad, float chromalev, float chromablu, bool blurlc, bool blurena, bool levelena, bool comprena, bool compreena, float compress, float thres);
|
||||
|
||||
void wavcont(const struct local_params& lp, float ** tmp, wavelet_decomposition &wdspot, int level_bl, int maxlvl,
|
||||
const LocwavCurve & loclevwavCurve, bool loclevwavutili,
|
||||
@ -346,18 +369,20 @@ public:
|
||||
void wavcbd(wavelet_decomposition &wdspot, int level_bl, int maxlvl,
|
||||
const LocwavCurve& locconwavCurve, bool locconwavutili, float sigm, float offs, float chromalev, int sk);
|
||||
|
||||
void transit_shapedetect2(int call, int senstype, const LabImage * bufexporig, const LabImage * bufexpfin, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
|
||||
void transit_shapedetect2(int sp, float meantm, float stdtm, int call, int senstype, const LabImage * bufexporig, const LabImage * bufexpfin, LabImage * originalmask, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
|
||||
|
||||
void transit_shapedetect_retinex(int call, int senstype, LabImage * bufexporig, LabImage * bufmask, LabImage * buforigmas, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
|
||||
void transit_shapedetect_retinex(int call, int senstype, LabImage * bufexporig, LabImage * bufexpfin, LabImage * bufmask, LabImage * buforigmas, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
|
||||
void transit_shapedetect(int senstype, const LabImage *bufexporig, LabImage * originalmask, float **bufchro, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
|
||||
void exlabLocal(local_params& lp, int bfh, int bfw, int bfhr, int bfwr, LabImage* bufexporig, LabImage* lab, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve, const float hueref, const float lumaref, const float chromaref);
|
||||
void exlabLocal(local_params& lp, float strlap, int bfh, int bfw, int bfhr, int bfwr, LabImage* bufexporig, LabImage* lab, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve, const float hueref, const float lumaref, const float chromaref);
|
||||
void Exclude_Local(float **deltaso, float hueref, float chromaref, float lumaref, float sobelref, float meansobel, const struct local_params & lp, const LabImage * original, LabImage * transformed, const LabImage * rsv, const LabImage * reserv, int cx, int cy, int sk);
|
||||
|
||||
void DeNoise_Local(int call, const struct local_params& lp, LabImage* originalmask, int levred, float hueref, float lumaref, float chromaref, LabImage* original, LabImage* transformed, const LabImage &tmp1, int cx, int cy, int sk);
|
||||
void DeNoise(int call, int del, float * slidL, float * slida, float * slidb, int aut, bool noiscfactiv, const struct local_params& lp, LabImage* originalmaskbl, int levred, float huerefblur, float lumarefblur, float chromarefblur, LabImage* original, LabImage* transformed, int cx, int cy, int sk);
|
||||
void DeNoise_Local2(const struct local_params& lp, LabImage* originalmask, int levred, float hueref, float lumaref, float chromaref, LabImage* original, LabImage* transformed, const LabImage &tmp1, int cx, int cy, int sk);
|
||||
|
||||
void DeNoise(int call, float * slidL, float * slida, float * slidb, int aut, bool noiscfactiv, const struct local_params& lp, LabImage* originalmaskbl, LabImage * bufmaskblurbl, int levred, float huerefblur, float lumarefblur, float chromarefblur, LabImage* original, LabImage* transformed, int cx, int cy, int sk, const LocwavCurve& locwavCurvehue, bool locwavhueutili);
|
||||
|
||||
|
||||
void fftw_denoise(int GW, int GH, int max_numblox_W, int min_numblox_W, float **tmp1, array2D<float> *Lin, int numThreads, const struct local_params & lp, int chrom);
|
||||
void fftw_denoise(int sk, int GW, int GH, int max_numblox_W, int min_numblox_W, float **tmp1, array2D<float> *Lin, int numThreads, const struct local_params & lp, int chrom);
|
||||
|
||||
void ColorLight_Local(float moddE, float powdE, int call, LabImage * bufcolorig, LabImage * originalmask, float **buflight, float **bufchro, float **bufchroslid, float ** bufhh, float ** buflightslid, bool &LHutili, bool &HHutili, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, float sobelref, float ** blend2, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, LUTf & lightCurveloc, const local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy, int sk);
|
||||
void InverseColorLight_Local(bool tonequ, bool tonecurv, int sp, int senstype, struct local_params& lp, LabImage * originalmask, const LUTf& lightCurveloc, const LUTf& hltonecurveloc, const LUTf& shtonecurveloc, const LUTf& tonecurveloc, const LUTf& exlocalcurve, const LUTf& cclocalcurve, float adjustr, bool localcutili, const LUTf& lllocalcurve, bool locallutili, LabImage* original, LabImage* transformed, int cx, int cy, const float hueref, const float chromaref, const float lumaref, int sk);
|
||||
@ -448,6 +473,7 @@ public:
|
||||
void labColorCorrectionRegions(LabImage *lab);
|
||||
|
||||
Image8* lab2rgb(LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool consider_histogram_settings = true);
|
||||
void rgb2lab(const Image8 &src, int x, int y, int w, int h, float L[], float a[], float b[], const procparams::ColorManagementParams &icm, bool consider_histogram_settings = true) const;
|
||||
Imagefloat* lab2rgbOut(LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm);
|
||||
// CieImage *ciec;
|
||||
void workingtrc(const Imagefloat* src, Imagefloat* dst, int cw, int ch, int mul, const Glib::ustring &profile, double gampos, double slpos, cmsHTRANSFORM &transform, bool normalizeIn = true, bool normalizeOut = true, bool keepTransForm = false) const;
|
||||
|
@ -322,7 +322,7 @@ void ImProcFunctions::impulse_nrcam (CieImage* ncie, double thresh, float **buff
|
||||
hfnbrave += fabs(ncie->sh_p[i1][j1] - lpf[i1][j1]);
|
||||
}
|
||||
|
||||
impish[i][j] = (hpfabs > ((hfnbrave - hpfabs) * impthrDiv24));
|
||||
impish[i][j] = static_cast<float>(hpfabs > ((hfnbrave - hpfabs) * impthrDiv24));
|
||||
}
|
||||
|
||||
#ifdef __SSE2__
|
||||
@ -353,7 +353,7 @@ void ImProcFunctions::impulse_nrcam (CieImage* ncie, double thresh, float **buff
|
||||
hfnbrave += fabs(ncie->sh_p[i1][j1] - lpf[i1][j1]);
|
||||
}
|
||||
|
||||
impish[i][j] = (hpfabs > ((hfnbrave - hpfabs) * impthrDiv24));
|
||||
impish[i][j] = static_cast<float>(hpfabs > ((hfnbrave - hpfabs) * impthrDiv24));
|
||||
}
|
||||
|
||||
for (; j < width; j++) {
|
||||
@ -365,7 +365,7 @@ void ImProcFunctions::impulse_nrcam (CieImage* ncie, double thresh, float **buff
|
||||
hfnbrave += fabs(ncie->sh_p[i1][j1] - lpf[i1][j1]);
|
||||
}
|
||||
|
||||
impish[i][j] = (hpfabs > ((hfnbrave - hpfabs) * impthrDiv24));
|
||||
impish[i][j] = static_cast<float>(hpfabs > ((hfnbrave - hpfabs) * impthrDiv24));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -313,10 +313,6 @@ void ImProcFunctions::dehaze(Imagefloat *img, const DehazeParams &dehazeParams)
|
||||
const int H = img->getHeight();
|
||||
const float strength = LIM01(float(dehazeParams.strength) / 100.f * 0.9f);
|
||||
|
||||
if (settings->verbose) {
|
||||
std::cout << "dehaze: strength = " << strength << std::endl;
|
||||
}
|
||||
|
||||
array2D<float> dark(W, H);
|
||||
|
||||
int patchsize = max(int(5 / scale), 2);
|
||||
@ -384,14 +380,15 @@ void ImProcFunctions::dehaze(Imagefloat *img, const DehazeParams &dehazeParams)
|
||||
|
||||
const float depth = -float(dehazeParams.depth) / 100.f;
|
||||
const float t0 = max(1e-3f, std::exp(depth * maxDistance));
|
||||
const float teps = 1e-3f;
|
||||
constexpr float teps = 1.f + 1e-3f;
|
||||
|
||||
const bool luminance = dehazeParams.luminance;
|
||||
const float satBlend = dehazeParams.saturation / 100.f;
|
||||
const TMatrix ws = ICCStore::getInstance()->workingSpaceMatrix(params->icm.workingProfile);
|
||||
#ifdef __SSE2__
|
||||
const vfloat wsv[3] = {F2V(ws[1][0]), F2V(ws[1][1]),F2V(ws[1][2])};
|
||||
#endif
|
||||
const float ambientY = Color::rgbLuminance(ambient[0], ambient[1], ambient[2], ws);
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for if (multiThread)
|
||||
#endif
|
||||
@ -407,30 +404,27 @@ void ImProcFunctions::dehaze(Imagefloat *img, const DehazeParams &dehazeParams)
|
||||
const vfloat t0v = F2V(t0);
|
||||
const vfloat tepsv = F2V(teps);
|
||||
const vfloat cmaxChannelv = F2V(maxChannel);
|
||||
const vfloat satBlendv = F2V(satBlend);
|
||||
for (; x < W - 3; x += 4) {
|
||||
// ensure that the transmission is such that to avoid clipping...
|
||||
const vfloat r = LVFU(img->r(y, x));
|
||||
const vfloat g = LVFU(img->g(y, x));
|
||||
const vfloat b = LVFU(img->b(y, x));
|
||||
// ... t >= tl to avoid negative values
|
||||
const vfloat tlv = onev - vminf(r / ambient0v, vminf(g / ambient1v, b / ambient2v));
|
||||
const vfloat mtv = vmaxf(LVFU(dark[y][x]), vmaxf(tlv + tepsv, t0v));
|
||||
const vfloat tlv = tepsv - vminf(r / ambient0v, vminf(g / ambient1v, b / ambient2v));
|
||||
const vfloat mtv = vmaxf(LVFU(dark[y][x]), vmaxf(tlv, t0v));
|
||||
if (dehazeParams.showDepthMap) {
|
||||
const vfloat valv = vclampf(onev - mtv, ZEROV, onev) * cmaxChannelv;
|
||||
STVFU(img->r(y, x), valv);
|
||||
STVFU(img->g(y, x), valv);
|
||||
STVFU(img->b(y, x), valv);
|
||||
} else if (luminance) {
|
||||
} else {
|
||||
const vfloat Yv = Color::rgbLuminance(r, g, b, wsv);
|
||||
const vfloat YYv = (Yv - ambientYv) / mtv + ambientYv;
|
||||
const vfloat fv = vself(vmaskf_gt(Yv, epsYv), cmaxChannelv * YYv / Yv, cmaxChannelv);
|
||||
STVFU(img->r(y, x), r * fv);
|
||||
STVFU(img->g(y, x), g * fv);
|
||||
STVFU(img->b(y, x), b * fv);
|
||||
} else {
|
||||
STVFU(img->r(y, x), ((r - ambient0v) / mtv + ambient0v) * cmaxChannelv);
|
||||
STVFU(img->g(y, x), ((g - ambient1v) / mtv + ambient1v) * cmaxChannelv);
|
||||
STVFU(img->b(y, x), ((b - ambient2v) / mtv + ambient2v) * cmaxChannelv);
|
||||
STVFU(img->r(y, x), vintpf(satBlendv, ((r - ambient0v) / mtv + ambient0v) * cmaxChannelv, r * fv));
|
||||
STVFU(img->g(y, x), vintpf(satBlendv, ((g - ambient1v) / mtv + ambient1v) * cmaxChannelv, g * fv));
|
||||
STVFU(img->b(y, x), vintpf(satBlendv, ((b - ambient2v) / mtv + ambient2v) * cmaxChannelv, b * fv));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -440,39 +434,31 @@ void ImProcFunctions::dehaze(Imagefloat *img, const DehazeParams &dehazeParams)
|
||||
const float g = img->g(y, x);
|
||||
const float b = img->b(y, x);
|
||||
// ... t >= tl to avoid negative values
|
||||
const float tl = 1.f - min(r / ambient[0], g / ambient[1], b / ambient[2]);
|
||||
const float mt = max(dark[y][x], t0, tl + teps);
|
||||
const float tl = teps - min(r / ambient[0], g / ambient[1], b / ambient[2]);
|
||||
const float mt = max(dark[y][x], t0, tl);
|
||||
if (dehazeParams.showDepthMap) {
|
||||
img->r(y, x) = img->g(y, x) = img->b(y, x) = LIM01(1.f - mt) * maxChannel;
|
||||
} else if (luminance) {
|
||||
} else {
|
||||
const float Y = Color::rgbLuminance(img->r(y, x), img->g(y, x), img->b(y, x), ws);
|
||||
const float YY = (Y - ambientY) / mt + ambientY;
|
||||
const float f = Y > 1e-5f ? maxChannel * YY / Y : maxChannel;
|
||||
img->r(y, x) *= f;
|
||||
img->g(y, x) *= f;
|
||||
img->b(y, x) *= f;
|
||||
} else {
|
||||
img->r(y, x) = ((r - ambient[0]) / mt + ambient[0]) * maxChannel;
|
||||
img->g(y, x) = ((g - ambient[1]) / mt + ambient[1]) * maxChannel;
|
||||
img->b(y, x) = ((b - ambient[2]) / mt + ambient[2]) * maxChannel;
|
||||
img->r(y, x) = intp(satBlend, ((r - ambient[0]) / mt + ambient[0]) * maxChannel, r * f);
|
||||
img->g(y, x) = intp(satBlend, ((g - ambient[1]) / mt + ambient[1]) * maxChannel, g * f);
|
||||
img->b(y, x) = intp(satBlend, ((b - ambient[2]) / mt + ambient[2]) * maxChannel, b * f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ImProcFunctions::dehazeloc(Imagefloat *img, const DehazeParams &dehazeParams)
|
||||
{
|
||||
//J.Desmis 12 2019 - this version derived from ART, is slower than the main from maximum 10% - probably use of SSE
|
||||
//Probably Ingo could solved this problem in some times
|
||||
BENCHFUN
|
||||
|
||||
if (!dehazeParams.enabled || dehazeParams.strength == 0.0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const float maxChannel = normalize(img, multiThread);
|
||||
|
||||
const int W = img->getWidth();
|
||||
@ -480,10 +466,6 @@ void ImProcFunctions::dehazeloc(Imagefloat *img, const DehazeParams &dehazeParam
|
||||
const float strength = LIM01(float(std::abs(dehazeParams.strength)) / 100.f * 0.9f);
|
||||
const bool add_haze = dehazeParams.strength < 0;
|
||||
|
||||
if (settings->verbose) {
|
||||
std::cout << "dehaze: strength = " << strength << std::endl;
|
||||
}
|
||||
|
||||
array2D<float> dark(W, H);
|
||||
|
||||
int patchsize = max(int(5 / scale), 2);
|
||||
@ -553,10 +535,11 @@ void ImProcFunctions::dehazeloc(Imagefloat *img, const DehazeParams &dehazeParam
|
||||
}
|
||||
|
||||
const float depth = -float(dehazeParams.depth) / 100.f;
|
||||
const float teps = 1e-6f;
|
||||
constexpr float teps = 1e-6f;
|
||||
const float t0 = max(teps, std::exp(depth * maxDistance));
|
||||
|
||||
const bool luminance = dehazeParams.luminance;
|
||||
const float satBlend = dehazeParams.saturation / 100.f;
|
||||
|
||||
const TMatrix ws = ICCStore::getInstance()->workingSpaceMatrix(params->icm.workingProfile);
|
||||
|
||||
const float ambientY = Color::rgbLuminance(ambient[0], ambient[1], ambient[2], ws);
|
||||
@ -565,56 +548,43 @@ void ImProcFunctions::dehazeloc(Imagefloat *img, const DehazeParams &dehazeParam
|
||||
#endif
|
||||
|
||||
for (int y = 0; y < H; ++y) {
|
||||
int x = 0;
|
||||
for (; x < W; ++x) {
|
||||
for (int x = 0; x < W; ++x) {
|
||||
// ensure that the transmission is such that to avoid clipping...
|
||||
float rgb[3] = { img->r(y, x), img->g(y, x), img->b(y, x) };
|
||||
const float rIn = img->r(y, x);
|
||||
const float gIn = img->g(y, x);
|
||||
const float bIn = img->b(y, x);
|
||||
// ... t >= tl to avoid negative values
|
||||
float tl = 1.f - min(rgb[0] / ambient[0], rgb[1] / ambient[1], rgb[2] / ambient[2]);
|
||||
// // ... t >= tu to avoid values > 1
|
||||
// float tu = t0 - teps;
|
||||
// for (int c = 0; c < 3; ++c) {
|
||||
// if (ambient[c] < 1) {
|
||||
// tu = max(tu, (rgb[c] - ambient[c])/(1.f - ambient[c]));
|
||||
// }
|
||||
// }
|
||||
float &ir = img->r(y, x);
|
||||
float &ig = img->g(y, x);
|
||||
float &ib = img->b(y, x);
|
||||
const float mt = max(dark[y][x], t0, tl + teps);
|
||||
const float tl = 1.f + teps - min(rIn / ambient[0], gIn / ambient[1], bIn / ambient[2]);
|
||||
const float mt = max(dark[y][x], t0, tl);
|
||||
|
||||
if (dehazeParams.showDepthMap) {
|
||||
img->r(y, x) = img->g(y, x) = img->b(y, x) = LIM01(1.f - mt) * maxChannel;
|
||||
} else if (luminance) {
|
||||
float Y = Color::rgbLuminance(img->r(y, x), img->g(y, x), img->b(y, x), ws);
|
||||
float YY = (Y - ambientY) / mt + ambientY;
|
||||
|
||||
} else {
|
||||
float f = 1.f;
|
||||
const float Y = Color::rgbLuminance(rIn, gIn, bIn, ws);
|
||||
if (Y > 1e-5f) {
|
||||
float YY = (Y - ambientY) / mt + ambientY;
|
||||
if (add_haze) {
|
||||
YY = Y + Y - YY;
|
||||
}
|
||||
|
||||
float f = YY / Y;
|
||||
ir = rgb[0] * f;
|
||||
ig = rgb[1] * f;
|
||||
ib = rgb[2] * f;
|
||||
|
||||
f = YY / Y;
|
||||
}
|
||||
} else {
|
||||
float r = ((rgb[0] - ambient[0]) / mt + ambient[0]);
|
||||
float g = ((rgb[1] - ambient[1]) / mt + ambient[1]);
|
||||
float b = ((rgb[2] - ambient[2]) / mt + ambient[2]);
|
||||
const float r1 = rIn * f;
|
||||
const float g1 = gIn * f;
|
||||
const float b1 = bIn * f;
|
||||
|
||||
float r2 = ((rIn - ambient[0]) / mt + ambient[0]);
|
||||
float g2 = ((gIn - ambient[1]) / mt + ambient[1]);
|
||||
float b2 = ((bIn - ambient[2]) / mt + ambient[2]);
|
||||
|
||||
if (add_haze) {
|
||||
ir += (ir - r);
|
||||
ig += (ig - g);
|
||||
ib += (ib - b);
|
||||
} else {
|
||||
ir = r;
|
||||
ig = g;
|
||||
ib = b;
|
||||
r2 = rIn + rIn - r2;
|
||||
g2 = gIn + gIn - g2;
|
||||
b2 = bIn + bIn - b2;
|
||||
}
|
||||
|
||||
img->r(y, x) = intp(satBlend, r2, r1);
|
||||
img->g(y, x) = intp(satBlend, g2, g1);
|
||||
img->b(y, x) = intp(satBlend, b2, b1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@
|
||||
/*
|
||||
This file is part of darktable,
|
||||
copyright (c) 2010-2012 Henrik Andersson.
|
||||
adaptation to Rawtherapee 2021 Jacques Desmis jdesmis@gmail.com
|
||||
|
||||
darktable is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -88,7 +89,7 @@ const int permutation[]
|
||||
|
||||
class GrainEvaluator {
|
||||
public:
|
||||
GrainEvaluator(int offset_x, int offset_y, int full_width, int full_height, double scale):
|
||||
GrainEvaluator(int offset_x, int offset_y, int full_width, int full_height, double scale, float divgr):
|
||||
ox(offset_x),
|
||||
oy(offset_y),
|
||||
fw(full_width),
|
||||
@ -96,18 +97,18 @@ public:
|
||||
scale(scale)
|
||||
{
|
||||
simplex_noise_init();
|
||||
constexpr float mb = 100.f;
|
||||
evaluate_grain_lut(mb);
|
||||
constexpr float mb = 100.f;// * divgr;
|
||||
evaluate_grain_lut(mb, divgr);
|
||||
}
|
||||
|
||||
void operator()(int isogr, int strengr, int scalegr, Imagefloat *lab, bool multithread)
|
||||
void operator()(int isogr, int strengr, int scalegr, float divgr, Imagefloat *lab, bool multithread)
|
||||
{
|
||||
const double strength = (strengr / 100.0);
|
||||
const double octaves = 3;
|
||||
const double octaves = 3.;
|
||||
const double wd = std::min(fw, fh);
|
||||
const double zoom = (1.0 + 8 * (double(isogr) / GRAIN_SCALE_FACTOR) / 100.0) / 800.0;
|
||||
const double s = std::max(scale / 3.0, 1.0) / (double(std::max(scalegr, 1)) / 100.0);
|
||||
|
||||
// printf("s=%f \n", s);
|
||||
const int W = lab->getWidth();
|
||||
const int H = lab->getHeight();
|
||||
float **lab_L = lab->g.ptrs;
|
||||
@ -298,29 +299,38 @@ private:
|
||||
return total;
|
||||
}
|
||||
|
||||
float paper_resp(float exposure, float mb, float gp)
|
||||
{
|
||||
const float delta = GRAIN_LUT_DELTA_MAX * expf((mb / 100.0f) * logf(GRAIN_LUT_DELTA_MIN));
|
||||
float paper_resp(float exposure, float mb, float gp, float divgr)
|
||||
{
|
||||
float dived = 1.f;
|
||||
if(divgr > 1.8f) {
|
||||
dived = 1.f + (divgr - 1.8f);
|
||||
}
|
||||
const float delta = dived * GRAIN_LUT_DELTA_MAX * expf((mb / 100.0f) * logf(GRAIN_LUT_DELTA_MIN / dived));
|
||||
const float density = (1.0f + 2.0f * delta) / (1.0f + expf( (4.0f * gp * (0.5f - exposure)) / (1.0f + 2.0f * delta) )) - delta;
|
||||
return density;
|
||||
}
|
||||
|
||||
float paper_resp_inverse(float density, float mb, float gp)
|
||||
float paper_resp_inverse(float density, float mb, float gp, float divgr)
|
||||
{
|
||||
const float delta = GRAIN_LUT_DELTA_MAX * expf((mb / 100.0f) * logf(GRAIN_LUT_DELTA_MIN));
|
||||
float dived = 1.f;
|
||||
if(divgr > 1.8f) {
|
||||
dived = 1.f + (divgr - 1.8f);
|
||||
}
|
||||
const float delta = dived * GRAIN_LUT_DELTA_MAX * expf((mb / 100.0f) * logf(GRAIN_LUT_DELTA_MIN / dived));
|
||||
const float exposure = -logf((1.0f + 2.0f * delta) / (density + delta) - 1.0f) * (1.0f + 2.0f * delta) / (4.0f * gp) + 0.5f;
|
||||
return exposure;
|
||||
}
|
||||
|
||||
void evaluate_grain_lut(const float mb)
|
||||
void evaluate_grain_lut(const float mb, float divgr)
|
||||
{
|
||||
for(int i = 0; i < GRAIN_LUT_SIZE; i++)
|
||||
{
|
||||
for(int j = 0; j < GRAIN_LUT_SIZE; j++)
|
||||
{
|
||||
const float gu = (float)i / (GRAIN_LUT_SIZE - 1) - 0.5;
|
||||
const float l = (float)j / (GRAIN_LUT_SIZE - 1);
|
||||
grain_lut[j * GRAIN_LUT_SIZE + i] = 32768.f * (paper_resp(gu + paper_resp_inverse(l, mb, GRAIN_LUT_PAPER_GAMMA), mb, GRAIN_LUT_PAPER_GAMMA) - l);
|
||||
float gu = (float)i / (GRAIN_LUT_SIZE - 1) - 0.5;
|
||||
float l = (float)j / (GRAIN_LUT_SIZE - 1);
|
||||
float divg = divgr; //1.f
|
||||
grain_lut[j * GRAIN_LUT_SIZE + i] = 32768.f * (paper_resp(gu + paper_resp_inverse(l, mb, divg * GRAIN_LUT_PAPER_GAMMA, divgr), mb, divg * GRAIN_LUT_PAPER_GAMMA, divgr) - l);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -361,11 +371,14 @@ private:
|
||||
} // namespace
|
||||
|
||||
|
||||
void ImProcFunctions::filmGrain(Imagefloat *rgb, int isogr, int strengr, int scalegr, int bfw, int bfh)
|
||||
void ImProcFunctions::filmGrain(Imagefloat *rgb, int isogr, int strengr, int scalegr, float divgr, int bfw, int bfh)
|
||||
{
|
||||
if (settings->verbose) {
|
||||
printf("iso=%i strength=%i scale=%i gamma=%f\n", isogr, strengr, scalegr, divgr);
|
||||
}
|
||||
|
||||
GrainEvaluator ge(0, 0, bfw, bfh, scale);
|
||||
ge(isogr, strengr, scalegr, rgb, multiThread);
|
||||
GrainEvaluator ge(0, 0, bfw, bfh, scale, divgr);
|
||||
ge(isogr, strengr, scalegr, divgr, rgb, multiThread);
|
||||
}
|
||||
|
||||
} // namespace rtengine
|
||||
|
@ -32,8 +32,6 @@
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
extern void filmlike_clip(float *r, float *g, float *b);
|
||||
|
||||
namespace {
|
||||
|
||||
inline void copyAndClampLine(const float *src, unsigned char *dst, const int W)
|
||||
@ -46,9 +44,26 @@ inline void copyAndClampLine(const float *src, unsigned char *dst, const int W)
|
||||
|
||||
inline void copyAndClamp(const LabImage *src, unsigned char *dst, const double rgb_xyz[3][3], bool multiThread)
|
||||
{
|
||||
int W = src->W;
|
||||
int H = src->H;
|
||||
const int W = src->W;
|
||||
const int H = src->H;
|
||||
|
||||
float rgb_xyzf[3][3];
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 3; j++) {
|
||||
rgb_xyzf[i][j] = rgb_xyz[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __SSE2__
|
||||
vfloat rgb_xyzv[3][3];
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 3; j++) {
|
||||
rgb_xyzv[i][j] = F2V(rgb_xyzf[i][j]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic,16) if (multiThread)
|
||||
#endif
|
||||
@ -58,17 +73,48 @@ inline void copyAndClamp(const LabImage *src, unsigned char *dst, const double r
|
||||
float* rb = src->b[i];
|
||||
int ix = i * 3 * W;
|
||||
|
||||
float R, G, B;
|
||||
float x_, y_, z_;
|
||||
|
||||
for (int j = 0; j < W; ++j) {
|
||||
#ifdef __SSE2__
|
||||
float rbuffer[W] ALIGNED16;
|
||||
float gbuffer[W] ALIGNED16;
|
||||
float bbuffer[W] ALIGNED16;
|
||||
int j = 0;
|
||||
for (; j < W - 3; j += 4) {
|
||||
vfloat R, G, B;
|
||||
vfloat x_, y_, z_;
|
||||
Color::Lab2XYZ(LVFU(rL[j]), LVFU(ra[j]), LVFU(rb[j]), x_, y_, z_ );
|
||||
Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzv);
|
||||
STVF(rbuffer[j], Color::gamma2curve[R]);
|
||||
STVF(gbuffer[j], Color::gamma2curve[G]);
|
||||
STVF(bbuffer[j], Color::gamma2curve[B]);
|
||||
}
|
||||
for (; j < W; ++j) {
|
||||
float R, G, B;
|
||||
float x_, y_, z_;
|
||||
Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_ );
|
||||
Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyz);
|
||||
Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzf);
|
||||
rbuffer[j] = Color::gamma2curve[R];
|
||||
gbuffer[j] = Color::gamma2curve[G];
|
||||
bbuffer[j] = Color::gamma2curve[B];
|
||||
}
|
||||
|
||||
for (j = 0; j < W; ++j) {
|
||||
dst[ix++] = uint16ToUint8Rounded(rbuffer[j]);
|
||||
dst[ix++] = uint16ToUint8Rounded(gbuffer[j]);
|
||||
dst[ix++] = uint16ToUint8Rounded(bbuffer[j]);
|
||||
}
|
||||
|
||||
#else
|
||||
for (int j = 0; j < W; ++j) {
|
||||
float R, G, B;
|
||||
float x_, y_, z_;
|
||||
Color::Lab2XYZ(rL[j], ra[j], rb[j], x_, y_, z_ );
|
||||
Color::xyz2rgb(x_, y_, z_, R, G, B, rgb_xyzf);
|
||||
|
||||
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[R]);
|
||||
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[G]);
|
||||
dst[ix++] = uint16ToUint8Rounded(Color::gamma2curve[B]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,8 +197,6 @@ void ImProcFunctions::lab2monitorRgb(LabImage* lab, Image8* image)
|
||||
// otherwise divide by 327.68, convert to xyz and apply the RGB transform, before converting with gamma2curve
|
||||
Image8* ImProcFunctions::lab2rgb(LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool consider_histogram_settings)
|
||||
{
|
||||
//gamutmap(lab);
|
||||
|
||||
if (cx < 0) {
|
||||
cx = 0;
|
||||
}
|
||||
|
@ -55,6 +55,7 @@
|
||||
#define BENCHMARK
|
||||
#include "StopWatch.h"
|
||||
#include "guidedfilter.h"
|
||||
#include "boxblur.h"
|
||||
|
||||
#define clipretinex( val, minv, maxv ) (( val = (val < minv ? minv : val ) ) > maxv ? maxv : val )
|
||||
#define CLIPLOC(x) LIM(x,0.f,32767.f)
|
||||
@ -782,7 +783,7 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo
|
||||
const LocCCmaskCurve & locccmasretiCurve, bool lcmasretiutili, const LocLLmaskCurve & locllmasretiCurve, bool llmasretiutili, const LocHHmaskCurve & lochhmasretiCurve, bool lhmasretiutili,
|
||||
int llretiMask, bool retiMasktmap, bool retiMask, float rad, float lap, bool pde, float gamm, float slop, float chro, float blend,
|
||||
const LUTf & lmaskretilocalcurve, bool localmaskretiutili,
|
||||
LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, bool multiThread,
|
||||
LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, LabImage * bufmaskorigreti, bool multiThread,
|
||||
bool delt, const float hueref, const float chromaref, const float lumaref,
|
||||
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope, float balance, float balanceh, float lumask)
|
||||
{
|
||||
@ -793,11 +794,10 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo
|
||||
array2D<float> guid(W_L, H_L);
|
||||
std::unique_ptr<LabImage> bufmaskblurreti;
|
||||
bufmaskblurreti.reset(new LabImage(W_L, H_L));
|
||||
std::unique_ptr<LabImage> bufmaskorigreti;
|
||||
bufmaskorigreti.reset(new LabImage(W_L, H_L));
|
||||
// std::unique_ptr<LabImage> bufmaskorigreti;
|
||||
// bufmaskorigreti.reset(new LabImage(W_L, H_L));
|
||||
std::unique_ptr<LabImage> bufprov;
|
||||
bufprov.reset(new LabImage(W_L, H_L));
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic,16)
|
||||
#endif
|
||||
@ -964,6 +964,33 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo
|
||||
}
|
||||
}
|
||||
|
||||
if (lap > 0.f && pde) {
|
||||
array2D<float> mask;
|
||||
mask(W_L, H_L);
|
||||
float amount = LIM01(float(lap)/100.f);
|
||||
array2D<float> LL(W_L, H_L, bufreti->L, ARRAY2D_BYREFERENCE);
|
||||
ImProcFunctions::laplacian(LL, mask, W_L, H_L, 25.f, 20000.f, amount, false);
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic,16) if (multiThread)
|
||||
#endif
|
||||
for (int i = 0; i < H_L; ++i) {
|
||||
for (int j = 0; j < W_L; ++j) {
|
||||
mask[i][j] = LIM01(mask[i][j]);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
boxblur(static_cast<float**>(mask), static_cast<float**>(mask), 5 / skip, W_L, H_L, false);
|
||||
}
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic,16) if (multiThread)
|
||||
#endif
|
||||
for (int i = 0; i < H_L; ++i) {
|
||||
for (int j = 0; j < W_L; ++j) {
|
||||
bufmaskblurreti->L[i][j] += CLIPLOC(100000.f * (mask[i][j]));//increase strongly result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (delt) {
|
||||
float *rdE[H_L] ALIGNED16;
|
||||
@ -995,7 +1022,7 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if (lap > 0.f) {
|
||||
float *datain = new float[H_L * W_L];
|
||||
float *data_tmp = new float[H_L * W_L];
|
||||
@ -1030,7 +1057,7 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo
|
||||
delete [] data_tmp;
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
//blend
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
@ -1124,7 +1151,7 @@ void ImProcFunctions::maskforretinex(int sp, int before, float ** luminance, flo
|
||||
|
||||
|
||||
|
||||
void ImProcFunctions::MSRLocal(int call, int sp, bool fftw, int lum, float** reducDE, LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, float** luminance, const float* const *originalLuminance,
|
||||
void ImProcFunctions::MSRLocal(int call, int sp, bool fftw, int lum, float** reducDE, LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, LabImage * bufmaskorigreti, float** luminance, const float* const *originalLuminance,
|
||||
const int width, const int height, int bfwr, int bfhr, const procparams::LocallabParams &loc, const int skip, const LocretigainCurve &locRETgainCcurve, const LocretitransCurve &locRETtransCcurve,
|
||||
const int chrome, const int scall, const float krad, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax,
|
||||
const LocCCmaskCurve & locccmasretiCurve, bool lcmasretiutili, const LocLLmaskCurve & locllmasretiCurve, bool llmasretiutili, const LocHHmaskCurve & lochhmasretiCurve, bool lhmasretiutili, int llretiMask,
|
||||
@ -1614,7 +1641,7 @@ void ImProcFunctions::MSRLocal(int call, int sp, bool fftw, int lum, float** red
|
||||
locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili, llretiMask, retiMasktmap, retiMask,
|
||||
rad, lap, pde, gamm, slop, chro, blend,
|
||||
lmaskretilocalcurve, localmaskretiutili,
|
||||
bufreti, bufmask, buforig, buforigmas, multiThread,
|
||||
bufreti, bufmask, buforig, buforigmas, bufmaskorigreti, multiThread,
|
||||
delt, hueref, chromaref, lumaref,
|
||||
maxdE, mindE, maxdElim, mindElim, iterat, limscope, scope, balance, balanceh, lumask
|
||||
);
|
||||
|
@ -543,8 +543,8 @@ BENCHFUN
|
||||
|
||||
// calculate contrast based blend factors to reduce sharpening in regions with low contrast
|
||||
JaggedArray<float> blend(W, H);
|
||||
float contrast = params->sharpenMicro.contrast / 100.0;
|
||||
buildBlendMask(luminance, blend, W, H, contrast);
|
||||
float contrastThreshold = params->sharpenMicro.contrast / 100.0;
|
||||
buildBlendMask(luminance, blend, W, H, contrastThreshold);
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
|
@ -578,7 +578,6 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
cp.chromfi = 0.1f * waparams.chromfi;
|
||||
cp.chromco = 0.1f * waparams.chromco;
|
||||
cp.ballum = waparams.ballum;
|
||||
|
||||
cp.conres = waparams.rescon;
|
||||
cp.conresH = waparams.resconH;
|
||||
cp.radius = waparams.radius;
|
||||
@ -1041,13 +1040,13 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
}
|
||||
|
||||
|
||||
if (!exblurL && cp.contrast == 0.f && cp.blurres == 0.f && !cp.tonemap && !cp.resena && !cp.chromena && !cp.finena && !cp.edgeena && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels
|
||||
if (!exblurL && cp.contrast == 0.f && cp.blurres == 0.f && !cp.noiseena && !cp.tonemap && !cp.resena && !cp.chromena && !cp.toningena && !cp.finena && !cp.edgeena && cp.conres == 0.f && cp.conresH == 0.f && cp.val == 0 && !ref0 && params->wavelet.CLmethod == "all") { // no processing of residual L or edge=> we probably can reduce the number of levels
|
||||
while (levwavL > 0 && cp.mul[levwavL - 1] == 0.f) { // cp.mul[level] == 0.f means no changes to level
|
||||
levwavL--;
|
||||
}
|
||||
}
|
||||
|
||||
if (levwavL == 6 && cp.noiseena) {
|
||||
if (levwavL == 6 && cp.noiseena && cp.chromfi == 0.f) {
|
||||
cp.chromfi = 0.01f;
|
||||
}
|
||||
|
||||
@ -1056,6 +1055,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
levwavL = 7;
|
||||
}
|
||||
}
|
||||
bool isdenoisL = (cp.lev0n > 0.1f || cp.lev1n > 0.1f || cp.lev2n > 0.1f || cp.lev3n > 0.1f || cp.lev4n > 0.1f);
|
||||
|
||||
if (levwavL < 5 && cp.noiseena) {
|
||||
levwavL = 6; //to allow edge and denoise => I always allocate 3 (4) levels..because if user select wavelet it is to do something !!
|
||||
@ -1103,7 +1103,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
madL[lvl][dir - 1] = SQR(Mad(WavCoeffs_L[dir], Wlvl_L * Hlvl_L));
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("Luminance noise estimate (sqr) madL=%.0f lvl=%i dir=%i\n", madL[lvl][dir - 1], lvl, dir - 1);
|
||||
// printf("Luminance noise estimate (sqr) madL=%.0f lvl=%i dir=%i\n", madL[lvl][dir - 1], lvl, dir - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1160,7 +1160,6 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
} else {
|
||||
kr4 = 1.f;
|
||||
}
|
||||
|
||||
if ((cp.lev0n > 0.1f || cp.lev1n > 0.1f || cp.lev2n > 0.1f || cp.lev3n > 0.1f || cp.lev4n > 0.1f) && cp.noiseena) {
|
||||
int edge = 6;
|
||||
vari[0] = rtengine::max(0.000001f, vari[0]);
|
||||
@ -1183,30 +1182,28 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
float* noisevarhue = new float[GHL * GWL];
|
||||
int GW2L = (GWL + 1) / 2;
|
||||
|
||||
float nvlh[13] = {1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 0.7f, 0.5f}; //high value
|
||||
float nvll[13] = {0.1f, 0.15f, 0.2f, 0.25f, 0.3f, 0.35f, 0.4f, 0.45f, 0.7f, 0.8f, 1.f, 1.f, 1.f}; //low value
|
||||
constexpr float nvlh[13] = {1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 1.f, 0.7f, 0.5f}; //high value
|
||||
constexpr float nvll[13] = {0.1f, 0.15f, 0.2f, 0.25f, 0.3f, 0.35f, 0.4f, 0.45f, 0.7f, 0.8f, 1.f, 1.f, 1.f}; //low value
|
||||
|
||||
float seuillow = 3000.f;//low
|
||||
float seuilhigh = 18000.f;//high
|
||||
int i = 10 - cp.ballum;
|
||||
float ac = (nvlh[i] - nvll[i]) / (seuillow - seuilhigh);
|
||||
float bc = nvlh[i] - seuillow * ac;
|
||||
constexpr float seuillow = 3000.f;//low
|
||||
constexpr float seuilhigh = 18000.f;//high
|
||||
const int index = 10 - cp.ballum;
|
||||
const float ac = (nvlh[index] - nvll[index]) / (seuillow - seuilhigh);
|
||||
const float bc = nvlh[index] - seuillow * ac;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for
|
||||
|
||||
#endif
|
||||
|
||||
for (int ir = 0; ir < GHL; ir++)
|
||||
for (int jr = 0; jr < GWL; jr++) {
|
||||
float lN = labco->L[ir][jr];
|
||||
|
||||
if (lN < seuillow) {
|
||||
noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvlh[i];
|
||||
noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvlh[index];
|
||||
} else if (lN < seuilhigh) {
|
||||
noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = ac * lN + bc;
|
||||
} else {
|
||||
noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvll[i];
|
||||
noisevarlum[(ir >> 1)*GW2L + (jr >> 1)] = nvll[index];
|
||||
}
|
||||
}
|
||||
|
||||
@ -1227,12 +1224,12 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
|
||||
if(cp.quamet == 0) {
|
||||
if (settings->verbose) {
|
||||
printf("denoise standard\n");
|
||||
printf("denoise standard L\n");
|
||||
}
|
||||
WaveletDenoiseAllL(*Ldecomp, noisevarlum, madL, vari, edge, 1);
|
||||
} else {
|
||||
if (settings->verbose) {
|
||||
printf("denoise bishrink\n");
|
||||
printf("denoise bishrink L\n");
|
||||
}
|
||||
WaveletDenoiseAll_BiShrinkL(*Ldecomp, noisevarlum, madL, vari, edge, 1);
|
||||
|
||||
@ -1329,19 +1326,16 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
}
|
||||
}
|
||||
// }
|
||||
if (execut && exitifzero) {
|
||||
if (execut && exitifzero) {
|
||||
for (int dir = 1; dir < 4; dir++) {
|
||||
for (int level = 0; level < levref; level++) {
|
||||
int Wlvl_L = Ldecomp->level_W(level);
|
||||
int Hlvl_L = Ldecomp->level_H(level);
|
||||
float* const* WavCoeffs_L = Ldecomp->level_coeffs(level);//first decomp denoised
|
||||
float* const* WavCoeffs_L2 = Ldecomp2->level_coeffs(level);//second decomp before denoise
|
||||
int k4 = 3;
|
||||
int k5 = 3;
|
||||
if(cp.complex == 1){
|
||||
k4= 4;
|
||||
k5= 5;
|
||||
}
|
||||
const int Wlvl_L = Ldecomp->level_W(level);
|
||||
const int Hlvl_L = Ldecomp->level_H(level);
|
||||
const float* const WavCoeffs_L = Ldecomp->level_coeffs(level)[dir];//first decomp denoised
|
||||
const float* const WavCoeffs_L2 = Ldecomp2->level_coeffs(level)[dir];//second decomp before denoise
|
||||
const int k4 = cp.complex == 1 ? 4 : 3;
|
||||
const int k5 = cp.complex == 1 ? 5 : 3;
|
||||
|
||||
auto WavL0 = Ldecomp->level_coeffs(0)[dir];
|
||||
auto WavL1 = Ldecomp->level_coeffs(1)[dir];
|
||||
auto WavL2 = Ldecomp->level_coeffs(2)[dir];
|
||||
@ -1360,134 +1354,95 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
}
|
||||
|
||||
//find local contrast
|
||||
float tempmean = 0.f;
|
||||
float tempsig = 0.f;
|
||||
float tempmax = 0.f;
|
||||
if(cp.mixmet == 0){
|
||||
tempmean = mean[level];
|
||||
tempsig = sigma[level];
|
||||
tempmax = MaxP[level];
|
||||
} else if(cp.mixmet == 1){
|
||||
tempmean = 0.5f * mean[level] + 0.5f * meand[level] ;
|
||||
tempsig = 0.5f * sigma[level] + 0.5f * sigmad[level] ;
|
||||
tempmax = 0.5f * MaxP[level] + 0.5f * MaxPd[level] ;
|
||||
} else if(cp.mixmet == 2){
|
||||
tempmean = 0.3f * mean[level] + 0.7f * meand[level] ;
|
||||
tempsig = 0.3f * sigma[level] + 0.7f * sigmad[level] ;
|
||||
tempmax = 0.3f * MaxP[level] + 0.7f * MaxPd[level] ;
|
||||
} else if(cp.mixmet == 3){
|
||||
tempmean = meand[level];
|
||||
tempsig = sigmad[level];
|
||||
tempmax = MaxPd[level];
|
||||
}
|
||||
|
||||
constexpr float weights[4] = {0.f, 0.5f, 0.7f, 1.f};
|
||||
const float weightL = weights[rtengine::LIM(cp.mixmet, 0, 3)];
|
||||
const float tempmean = intp(weightL, meand[level], mean[level]);
|
||||
const float tempsig = intp(weightL, sigmad[level], sigma[level]);
|
||||
const float tempmax = intp(weightL, MaxPd[level], MaxP[level]);
|
||||
|
||||
if (MaxP[level] > 0.f && mean[level] != 0.f && sigma[level] != 0.f) { //curve
|
||||
float insigma = 0.666f; //SD
|
||||
float logmax = log(tempmax); //log Max
|
||||
constexpr float insigma = 0.666f; //SD
|
||||
const float logmax = log(tempmax); //log Max
|
||||
//cp.sigmm change the "wider" of sigma
|
||||
float rapX = (tempmean + siglh[level] * tempsig) / (tempmax); //rapport between sD / max
|
||||
float inx = log(insigma);
|
||||
float iny = log(rapX);
|
||||
float rap = inx / iny; //koef
|
||||
float asig = 0.166f / (tempsig * siglh[level]);
|
||||
float bsig = 0.5f - asig * tempmean;
|
||||
float amean = 0.5f / (tempmean);
|
||||
const float rapX = (tempmean + siglh[level] * tempsig) / tempmax; //rapport between sD / max
|
||||
const float inx = log(insigma);
|
||||
const float iny = log(rapX);
|
||||
const float rap = inx / iny; //koef
|
||||
const float asig = 0.166f / (tempsig * siglh[level]);
|
||||
const float bsig = 0.5f - asig * tempmean;
|
||||
const float amean = 1.f / tempmean;
|
||||
|
||||
//equalizer for levels 0 1 and 3... 1.33 and 0.75 arbitrary values
|
||||
float kcFactor = 1.f;
|
||||
if(cp.denmet == 1) {
|
||||
if(level == 0 || level == 3) {
|
||||
kcFactor = 1.7f;
|
||||
}
|
||||
} else if(cp.denmet == 2) {
|
||||
if(level == 0 || level == 3) {
|
||||
kcFactor = 0.3f;
|
||||
}
|
||||
} else if(cp.denmet == 3) {
|
||||
if(level == 0 || level == 1) {
|
||||
kcFactor = 1.7f;
|
||||
}
|
||||
} else if(cp.denmet == 4) {
|
||||
if(level == 0 || level == 1) {
|
||||
kcFactor = 0.3f;
|
||||
}
|
||||
}
|
||||
const float k = 1.f / (siglh[level] > 1.f ? SQR(siglh[level]) : siglh[level]);
|
||||
const float maxVal = tempmean + siglh[level] * tempsig;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic, Wlvl_L * 16) num_threads(wavNestedLevels) if (wavNestedLevels>1)
|
||||
#pragma omp parallel for schedule(dynamic, Wlvl_L * 16) num_threads(wavNestedLevels) if (wavNestedLevels>1)
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < Wlvl_L * Hlvl_L; i++) {
|
||||
float absciss;
|
||||
float tempwav = 0.f;
|
||||
if(cp.mixmet == 0){
|
||||
tempwav = WavCoeffs_L2[dir][i];
|
||||
} else if(cp.mixmet == 1){
|
||||
tempwav = 0.5f * WavCoeffs_L[dir][i] + 0.5f * WavCoeffs_L2[dir][i];
|
||||
} else if(cp.mixmet == 2){
|
||||
tempwav = 0.7f * WavCoeffs_L[dir][i] + 0.3f * WavCoeffs_L2[dir][i];
|
||||
} else if(cp.mixmet == 3){
|
||||
tempwav = WavCoeffs_L[dir][i];
|
||||
const float tempwav = std::fabs(intp(weightL, WavCoeffs_L[i], WavCoeffs_L2[i]));
|
||||
|
||||
if (tempwav >= maxVal) { //for max
|
||||
absciss = xexpf((xlogf(tempwav) - logmax) * rap);
|
||||
} else if (tempwav >= tempmean) {
|
||||
absciss = asig * tempwav + bsig;
|
||||
} else {
|
||||
absciss = 0.5f * pow_F(amean * tempwav, k);
|
||||
}
|
||||
|
||||
if (std::fabs(tempwav) >= (tempmean + siglh[level] * tempsig)) { //for max
|
||||
float valcour = xlogf(std::fabs(tempwav));
|
||||
float valc = valcour - logmax;
|
||||
float vald = valc * rap;
|
||||
absciss = xexpf(vald);
|
||||
} else if (std::fabs(tempwav) >= tempmean) {
|
||||
absciss = asig * std::fabs(tempwav) + bsig;
|
||||
} else {
|
||||
absciss = amean * std::fabs(tempwav);
|
||||
float k = siglh[level];
|
||||
if(siglh[level] > 1.f) {
|
||||
k = SQR(siglh[level]);
|
||||
}
|
||||
float abs = pow(2.f * absciss, (1.f / k));
|
||||
absciss = 0.5f * abs;
|
||||
}
|
||||
float kc = 0.f;
|
||||
if(cp.slimet == 0) {
|
||||
kc = wavlow.getVal(absciss) -1.f;
|
||||
float kc;
|
||||
if (cp.slimet == 0) {
|
||||
kc = wavlow.getVal(absciss) - 1.f;
|
||||
} else {
|
||||
kc = wavdenoise[absciss * 500.f] - 1.f;
|
||||
}
|
||||
|
||||
float kchigh = 0.f;
|
||||
kchigh = wavhigh.getVal(absciss) -1.f;
|
||||
kchigh = -SQR(kchigh);
|
||||
|
||||
float kcmed = 0.f;
|
||||
kcmed = wavmed.getVal(absciss) -1.f;
|
||||
kcmed = -SQR(kcmed);
|
||||
|
||||
if(kc < 0) {
|
||||
kc = -SQR(kc);//approximation to simulate sliders denoise
|
||||
if (kc < 0) {
|
||||
kc = -SQR(kc); //approximation to simulate sliders denoise
|
||||
}
|
||||
//equalizer for levels 0 1 and 3... 1.33 and 0.75 arbitrary values
|
||||
if(cp.denmet == 1) {
|
||||
if(level == 0 || level == 3) {
|
||||
kc *= 1.7f;
|
||||
}
|
||||
} else if(cp.denmet == 2) {
|
||||
if(level == 0 || level == 3) {
|
||||
kc *= 0.3f;
|
||||
}
|
||||
} else if(cp.denmet == 3) {
|
||||
if(level == 0 || level == 1) {
|
||||
kc *= 1.7f;
|
||||
}
|
||||
} else if(cp.denmet == 4) {
|
||||
if(level == 0 || level == 1) {
|
||||
kc *= 0.3f;
|
||||
}
|
||||
}
|
||||
|
||||
float reduceeffect = kc <= 0.f ? 1.f : 1.2f;//1.2 allows to increase denoise (not used)
|
||||
kc *= kcFactor;
|
||||
|
||||
float kinterm = 1.f + reduceeffect * kc;
|
||||
kinterm = kinterm <= 0.f ? 0.01f : kinterm;
|
||||
|
||||
float kintermhigh = 1.f + reduceeffect * kchigh;
|
||||
kintermhigh = kintermhigh <= 0.f ? 0.01f : kintermhigh;
|
||||
const float reduceeffect = kc <= 0.f ? 1.f : 1.2f; //1.2 allows to increase denoise (not used)
|
||||
|
||||
float kintermed = 1.f + reduceeffect * kcmed;
|
||||
kintermed = kintermed <= 0.f ? 0.01f : kintermed;
|
||||
|
||||
float kintermlow = kinterm;
|
||||
if(level < 4) {
|
||||
if (level < 4) {
|
||||
float kintermlow = 1.f + reduceeffect * kc;
|
||||
kintermlow = kintermlow <= 0.f ? 0.01f : kintermlow;
|
||||
WavL0[i] = WavL02[i] + (WavL0[i] - WavL02[i]) * kintermlow;
|
||||
WavL1[i] = WavL12[i] + (WavL1[i] - WavL12[i]) * kintermlow;
|
||||
WavL2[i] = WavL22[i] + (WavL2[i] - WavL22[i]) * kintermlow;
|
||||
WavL3[i] = WavL32[i] + (WavL3[i] - WavL32[i]) * kintermlow;
|
||||
}
|
||||
if(cp.complex == 1){
|
||||
if(cp.limden > 0.f) {
|
||||
if (cp.complex == 1){
|
||||
if (cp.limden > 0.f) {
|
||||
const float kcmed = -SQR(wavmed.getVal(absciss) - 1.f);
|
||||
float kintermed = 1.f + reduceeffect * kcmed;
|
||||
kintermed = kintermed <= 0.f ? 0.01f : kintermed;
|
||||
WavL0[i] = WavL02[i] + (WavL0[i] - WavL02[i]) * kintermed;
|
||||
WavL1[i] = WavL12[i] + (WavL1[i] - WavL12[i]) * kintermed;
|
||||
WavL2[i] = WavL22[i] + (WavL2[i] - WavL22[i]) * kintermed;
|
||||
WavL3[i] = WavL32[i] + (WavL3[i] - WavL32[i]) * kintermed;
|
||||
}
|
||||
const float kchigh = -SQR(wavhigh.getVal(absciss) - 1.f);
|
||||
float kintermhigh = 1.f + reduceeffect * kchigh;
|
||||
kintermhigh = kintermhigh <= 0.f ? 0.01f : kintermhigh;
|
||||
WavL4[i] = WavL42[i] + (WavL4[i] - WavL42[i]) * kintermhigh;
|
||||
WavL5[i] = WavL52[i] + (WavL5[i] - WavL52[i]) * kintermhigh;
|
||||
}
|
||||
@ -1574,7 +1529,6 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
if (noiseccb < 0.f) {
|
||||
noiseccb = 0.0001f;
|
||||
}
|
||||
|
||||
int edge = 2;
|
||||
variC[0] = SQR(noisecfr);
|
||||
variC[1] = SQR(noisecfr);
|
||||
@ -1770,7 +1724,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
if (!hhutili) { //always a or b
|
||||
int levwava = levwav;
|
||||
|
||||
if (!exblurab && cp.chrores == 0.f && cp.blurcres == 0.f && !cp.tonemap && !cp.resena && !cp.chromena && !cp.finena && !cp.edgeena&& params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels
|
||||
if (!exblurab && cp.chrores == 0.f && cp.blurcres == 0.f && !cp.noiseena && !cp.tonemap && !cp.resena && !cp.chromena && !cp.toningena && !cp.finena && !cp.edgeena && params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels
|
||||
while (levwava > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwava - 1] == 0.f)) || (cp.CHmet != 2 && (levwava == 10 || (!cp.curv || cp.mulC[levwava - 1] == 0.f))))) && (!cp.opaRG || levwava == 10 || (cp.opaRG && cp.mulopaRG[levwava - 1] == 0.f)) && ((levwava == 10 || (cp.CHSLmet == 1 && cp.mulC[levwava - 1] == 0.f)))) {
|
||||
levwava--;
|
||||
}
|
||||
@ -1784,6 +1738,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
|
||||
levwava = rtengine::min(maxlevelcrop, levwava);
|
||||
levwava = rtengine::min(maxlev2, levwava);
|
||||
levwava = rtengine::min(levwav, levwava);
|
||||
if (settings->verbose) {
|
||||
printf("Leval decomp a=%i\n", levwava);
|
||||
}
|
||||
@ -1794,11 +1749,17 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
if(levwava == 6) {
|
||||
edge = 1;
|
||||
}
|
||||
if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0 )) {
|
||||
if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0 && isdenoisL)) {
|
||||
if (settings->verbose) {
|
||||
printf("denoise standard a \n");
|
||||
}
|
||||
|
||||
WaveletDenoiseAllAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1);
|
||||
|
||||
} else if (cp.chromfi > 0.f && cp.chromco >= 2.f){
|
||||
} else if (cp.noiseena && ((cp.chromfi > 0.f && cp.chromco >= 0.f) && cp.quamet == 1 && isdenoisL)){
|
||||
if (settings->verbose) {
|
||||
printf("denoise bishrink a \n");
|
||||
}
|
||||
|
||||
WaveletDenoiseAll_BiShrinkAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1);
|
||||
WaveletDenoiseAllAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1);
|
||||
@ -1816,7 +1777,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
|
||||
int levwavb = levwav;
|
||||
|
||||
if (!exblurab && cp.chrores == 0.f && cp.blurcres == 0.f && !cp.tonemap && !cp.resena && !cp.chromena && !cp.finena && !cp.edgeena && params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels
|
||||
if (!exblurab && cp.chrores == 0.f && cp.blurcres == 0.f && !cp.noiseena && !cp.tonemap && !cp.resena && !cp.chromena && !cp.toningena && !cp.finena && !cp.edgeena && params->wavelet.CLmethod == "all" && !cp.cbena) { // no processing of residual ab => we probably can reduce the number of levels
|
||||
while (levwavb > 0 && !cp.diag && (((cp.CHmet == 2 && (cp.chro == 0.f || cp.mul[levwavb - 1] == 0.f)) || (cp.CHmet != 2 && (levwavb == 10 || (!cp.curv || cp.mulC[levwavb - 1] == 0.f))))) && (!cp.opaBY || levwavb == 10 || (cp.opaBY && cp.mulopaBY[levwavb - 1] == 0.f)) && ((levwavb == 10 || (cp.CHSLmet == 1 && cp.mulC[levwavb - 1] == 0.f)))) {
|
||||
levwavb--;
|
||||
}
|
||||
@ -1831,6 +1792,7 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
|
||||
levwavb = rtengine::min(maxlevelcrop, levwavb);
|
||||
levwavb = rtengine::min(maxlev2, levwavb);
|
||||
levwavb = rtengine::min(levwav, levwavb);
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("Leval decomp b=%i\n", levwavb);
|
||||
@ -1844,12 +1806,19 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
|
||||
if (!bdecomp->memory_allocation_failed()) {
|
||||
// if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.chromco < 2.f )) {
|
||||
if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0)) {
|
||||
|
||||
if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0 && isdenoisL)) {
|
||||
WaveletDenoiseAllAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1);
|
||||
} else if (cp.chromfi > 0.f && cp.chromco >= 2.f){
|
||||
if (settings->verbose) {
|
||||
printf("Denoise standard b\n");
|
||||
}
|
||||
} else if (cp.noiseena && ((cp.chromfi > 0.f && cp.chromco >= 0.f) && cp.quamet == 1 && isdenoisL)){
|
||||
|
||||
WaveletDenoiseAll_BiShrinkAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1);
|
||||
WaveletDenoiseAllAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1);
|
||||
if (settings->verbose) {
|
||||
printf("Denoise bishrink b\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Evaluate2(*bdecomp, meanab, meanNab, sigmaab, sigmaNab, MaxPab, MaxNab, wavNestedLevels);
|
||||
@ -1871,18 +1840,24 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
const std::unique_ptr<wavelet_decomposition> bdecomp(new wavelet_decomposition(labco->data + 2 * datalen, labco->W, labco->H, levwavab, 1, skip, rtengine::max(1, wavNestedLevels), DaubLen));
|
||||
|
||||
if (!adecomp->memory_allocation_failed() && !bdecomp->memory_allocation_failed()) {
|
||||
if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0)) {
|
||||
if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0 && isdenoisL)) {
|
||||
WaveletDenoiseAllAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1);
|
||||
} else if (cp.chromfi > 0.f && cp.chromco >= 2.f){
|
||||
if (settings->verbose) {
|
||||
printf("Denoise standard ab\n");
|
||||
}
|
||||
} else if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 1 && isdenoisL)) {
|
||||
WaveletDenoiseAll_BiShrinkAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1);
|
||||
WaveletDenoiseAllAB(*Ldecomp, *adecomp, noisevarchrom, madL, variC, edge, noisevarab_r, true, false, false, 1);
|
||||
if (settings->verbose) {
|
||||
printf("Denoise bishrink ab\n");
|
||||
}
|
||||
}
|
||||
|
||||
Evaluate2(*adecomp, meanab, meanNab, sigmaab, sigmaNab, MaxPab, MaxNab, wavNestedLevels);
|
||||
WaveletcontAllAB(labco, varhue, varchro, *adecomp, wavblcurve, waOpacityCurveW, cp, true, skip, meanab, sigmaab);
|
||||
if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0)) {
|
||||
if (cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 0 && isdenoisL)) {
|
||||
WaveletDenoiseAllAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1);
|
||||
} else if (cp.chromfi > 0.f && cp.chromco >= 2.f){
|
||||
} else if(cp.noiseena && ((cp.chromfi > 0.f || cp.chromco > 0.f) && cp.quamet == 1 && isdenoisL)) {
|
||||
WaveletDenoiseAll_BiShrinkAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1);
|
||||
WaveletDenoiseAllAB(*Ldecomp, *bdecomp, noisevarchrom, madL, variCb, edge, noisevarab_r, true, false, false, 1);
|
||||
}
|
||||
@ -1908,9 +1883,6 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
if (usechrom) {
|
||||
Ldecomp->reconstruct(labco->data, cp.strength);
|
||||
}
|
||||
// if (settings->verbose) {
|
||||
// printf("OK END\n");
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
@ -2182,20 +2154,26 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
}
|
||||
//end hue
|
||||
|
||||
// printf("LEVWAV=%i\n", levwavL);
|
||||
|
||||
if (thrend > 0.f) {
|
||||
//2 decomposition LL after guidefilter and dst before (perhaps dst no need)
|
||||
//2 decomposition LL after guidefilter and dst before (perhaps dst no need)
|
||||
const std::unique_ptr<wavelet_decomposition> LdecompLL(new wavelet_decomposition(LL[0], ww, hh, levwavL, 1, skip, rtengine::max(1, wavNestedLevels), DaubLen));
|
||||
const std::unique_ptr<wavelet_decomposition> Ldecompdst(new wavelet_decomposition(dst->L[0], ww, hh, levwavL, 1, skip, rtengine::max(1, wavNestedLevels), DaubLen));
|
||||
if (!LdecompLL->memory_allocation_failed() && !Ldecompdst->memory_allocation_failed()) {
|
||||
|
||||
Evaluate2(*LdecompLL, meang, meanNg, sigmag, sigmaNg, MaxPg, MaxNg, wavNestedLevels);
|
||||
Evaluate2(*Ldecompdst, mean, meanN, sigma, sigmaN, MaxP, MaxN, wavNestedLevels);
|
||||
float sig = 2.f;
|
||||
constexpr float sig = 2.f;
|
||||
|
||||
// original code for variable sig
|
||||
float k = sig;
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
if (sig > 1.f) {
|
||||
k = SQR(sig);
|
||||
}
|
||||
|
||||
float thr = 0.f;
|
||||
if(thrend < 0.02f) thr = 0.5f;
|
||||
else if(thrend < 0.1f) thr = 0.2f;
|
||||
if (thrend < 0.02f) thr = 0.5f;
|
||||
else if (thrend < 0.1f) thr = 0.2f;
|
||||
else thr = 0.f;
|
||||
|
||||
FlatCurve wavguid({
|
||||
@ -2205,34 +2183,29 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
|
||||
for (int dir = 1; dir < 4; dir++) {
|
||||
for (int level = 0; level < levwavL-1; level++) {
|
||||
int Wlvl_L = LdecompLL->level_W(level);
|
||||
int Hlvl_L = LdecompLL->level_H(level);
|
||||
const int Wlvl_L = LdecompLL->level_W(level);
|
||||
const int Hlvl_L = LdecompLL->level_H(level);
|
||||
float* const* WavCoeffs_L = LdecompLL->level_coeffs(level);//first decomp denoised
|
||||
float* const* WavCoeffs_L2 = Ldecompdst->level_coeffs(level);//second decomp before denoise
|
||||
if (settings->verbose) {
|
||||
printf("level=%i mean=%.0f meanden=%.0f sigma=%.0f sigmaden=%.0f Max=%.0f Maxden=%.0f\n", level, mean[level], meang[level], sigma[level], sigmag[level],MaxP[level], MaxPg[level]);
|
||||
}
|
||||
|
||||
//find local contrast
|
||||
float tempmean = 0.f;
|
||||
float tempsig = 0.f;
|
||||
float tempmax = 0.f;
|
||||
tempmean = 0.3f * mean[level] + 0.7f * meang[level] ;
|
||||
tempsig = 0.3f * sigma[level] + 0.7f * sigmag[level] ;
|
||||
tempmax = 0.3f * MaxP[level] + 0.7f * MaxPg[level] ;
|
||||
//find local contrast
|
||||
const float tempmean = 0.3f * mean[level] + 0.7f * meang[level];
|
||||
const float tempsig = 0.3f * sigma[level] + 0.7f * sigmag[level];
|
||||
const float tempmax = 0.3f * MaxP[level] + 0.7f * MaxPg[level];
|
||||
|
||||
if (MaxP[level] > 0.f && mean[level] != 0.f && sigma[level] != 0.f) { //curve
|
||||
float insigma = 0.666f; //SD
|
||||
float logmax = log(tempmax); //log Max
|
||||
//cp.sigmm change the "wider" of sigma
|
||||
float rapX = (tempmean + sig * tempsig) / (tempmax); //rapport between sD / max
|
||||
float inx = log(insigma);
|
||||
float iny = log(rapX);
|
||||
float rap = inx / iny; //koef
|
||||
float asig = 0.166f / (tempsig * sig);
|
||||
float bsig = 0.5f - asig * tempmean;
|
||||
float amean = 0.5f / (tempmean);
|
||||
|
||||
constexpr float insigma = 0.666f; //SD
|
||||
const float logmax = log(tempmax); //log Max
|
||||
const float rapX = (tempmean + sig * tempsig) / tempmax; //rapport between sD / max
|
||||
const float inx = log(insigma);
|
||||
const float iny = log(rapX);
|
||||
const float rap = inx / iny; //koef
|
||||
const float asig = 0.166f / (tempsig * sig);
|
||||
const float bsig = 0.5f - asig * tempmean;
|
||||
const float amean = 1.f / tempmean;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for schedule(dynamic, Wlvl_L * 16) num_threads(wavNestedLevels) if (wavNestedLevels>1)
|
||||
@ -2240,36 +2213,27 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
|
||||
for (int i = 0; i < Wlvl_L * Hlvl_L; i++) {
|
||||
float absciss;
|
||||
float tempwav = 0.f;
|
||||
tempwav = 0.7f * WavCoeffs_L[dir][i] + 0.3f * WavCoeffs_L2[dir][i];
|
||||
const float tempwav = std::fabs(0.7f * WavCoeffs_L[dir][i] + 0.3f * WavCoeffs_L2[dir][i]);
|
||||
|
||||
if (std::fabs(tempwav) >= (tempmean + sig * tempsig)) { //for max
|
||||
float valcour = xlogf(std::fabs(tempwav));
|
||||
float valc = valcour - logmax;
|
||||
float vald = valc * rap;
|
||||
if (tempwav >= tempmean + sig * tempsig) { //for max
|
||||
const float vald = (xlogf(tempwav) - logmax) * rap;
|
||||
absciss = xexpf(vald);
|
||||
} else if (std::fabs(tempwav) >= tempmean) {
|
||||
absciss = asig * std::fabs(tempwav) + bsig;
|
||||
} else if (tempwav >= tempmean) {
|
||||
absciss = asig * tempwav + bsig;
|
||||
} else {
|
||||
absciss = amean * std::fabs(tempwav);
|
||||
float k = sig;
|
||||
if(sig > 1.f) {
|
||||
k = SQR(sig);
|
||||
absciss = amean * tempwav;
|
||||
if (sig == 2.f) { // for sig = 2.f we can use a faster calculation because the exponent in this case is 0.25
|
||||
absciss = 0.5f * std::sqrt(std::sqrt(absciss));
|
||||
} else { // original code for variable sig
|
||||
absciss = 0.5f * pow_F(absciss, 1.f / k);
|
||||
}
|
||||
float abs = pow(2.f * absciss, (1.f / k));
|
||||
absciss = 0.5f * abs;
|
||||
}
|
||||
float kc = wavguid.getVal(absciss) -1.f;
|
||||
float kc = wavguid.getVal(absciss) - 1.f;
|
||||
kc = kc < 0.f ? -SQR(kc) : kc; // approximation to simulate sliders denoise
|
||||
|
||||
if(kc < 0) {
|
||||
kc = -SQR(kc);//approximation to simulate sliders denoise
|
||||
}
|
||||
float reduceeffect = kc <= 0.f ? 1.f : 1.2f;//1.2 allows to increase denoise (not used)
|
||||
|
||||
float kinterm = 1.f + reduceeffect * kc;
|
||||
kinterm = kinterm <= 0.f ? 0.01f : kinterm;
|
||||
float prov = WavCoeffs_L2[dir][i];//save before denoise
|
||||
WavCoeffs_L[dir][i] = prov + (WavCoeffs_L[dir][i] - prov) * kinterm;//only apply local contrast on difference between denoise and normal
|
||||
const float reduceeffect = kc <= 0.f ? 1.f : 1.2f;//1.2 allows to increase denoise (not used)
|
||||
const float kinterm = rtengine::max(1.f + reduceeffect * kc, 0.f);
|
||||
WavCoeffs_L[dir][i] = intp(kinterm, WavCoeffs_L[dir][i], WavCoeffs_L2[dir][i]); // interpolate using kinterm
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2278,7 +2242,6 @@ void ImProcFunctions::ip_wavelet(LabImage * lab, LabImage * dst, int kall, const
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//end local contrast
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for
|
||||
@ -2822,7 +2785,7 @@ void ImProcFunctions::WaveletcontAllL(LabImage * labco, float ** varhue, float *
|
||||
float eddlipinfl = 0.005f * cp.edgsens + 0.4f;
|
||||
float eddlipampl = 1.f + cp.edgampl / 50.f;
|
||||
|
||||
if (cp.detectedge) { //enabled Lipschitz control...more memory..more time...
|
||||
if (cp.detectedge && cp.val > 0) { //enabled Lipschitz control...more memory..more time...
|
||||
const std::unique_ptr<float[]> tmCBuffer(new float[H_L * W_L]);
|
||||
float *tmC[H_L];
|
||||
|
||||
@ -3740,7 +3703,7 @@ void ImProcFunctions::ContAllL(float *koeLi[12], float maxkoeLi, bool lipschitz,
|
||||
float edghig = settings->edghi;//increase or reduce "reinforce"
|
||||
float edglow = settings->edglo;//increase or reduce "reduce"
|
||||
float limrad = settings->limrad;//threshold action in function radius (rad)
|
||||
printf("edghi=%f edglo=%f limrad=%f\n", edghig, edglow, limrad);
|
||||
// printf("edghi=%f edglo=%f limrad=%f\n", edghig, edglow, limrad);
|
||||
// value *= beta;
|
||||
float edge = 1.f;
|
||||
float lim0 = limrad; //arbitrary limit for low radius and level between 2 or 3 to 30 maxi
|
||||
@ -3766,7 +3729,7 @@ void ImProcFunctions::ContAllL(float *koeLi[12], float maxkoeLi, bool lipschitz,
|
||||
float bk = al0;
|
||||
float koef = ak * level + bk; //modulate for levels : more levels high, more koef low ==> concentrated action on low levels, without or near for high levels
|
||||
float expkoef = -std::pow(std::fabs(rad - lev), koef); //reduce effect for high levels
|
||||
printf("repart=%f\n", repart);
|
||||
// printf("repart=%f\n", repart);
|
||||
|
||||
if (cp.reinforce == 3) {
|
||||
if (rad < (lim0 / 60.f) && level == 0) {
|
||||
@ -4569,6 +4532,10 @@ void ImProcFunctions::ContAllAB(LabImage * labco, int maxlvl, float ** varhue, f
|
||||
}
|
||||
|
||||
if ((useOpacity && level < 9 && mulOpacity != 0.f) && cp.toningena) { //toning
|
||||
// if (settings->verbose) {
|
||||
// printf("Toning enabled\n");
|
||||
// }
|
||||
|
||||
float mea[10];
|
||||
float effect = cp.sigmaton;
|
||||
float betaab;
|
||||
|
@ -460,7 +460,7 @@ static int _trackFeature(
|
||||
|
||||
/* Check whether window is out of bounds */
|
||||
if (*x2-hw < 0.0f || nc-(*x2+hw) < one_plus_eps ||
|
||||
*y2-hh < 0.0f || nr-(*y2+hh) < one_plus_eps)
|
||||
*y2-hh < 0.0f || nr-(*y2+hh) < one_plus_eps || std::isnan(*x2) || std::isnan(*y2))
|
||||
status = KLT_OOB;
|
||||
|
||||
/* Check whether residue is too large */
|
||||
|
@ -559,19 +559,19 @@ static structureType _readHeader(
|
||||
if (id == FEATURE_TABLE) {
|
||||
fscanf(fp, "%s", line);
|
||||
if (strcmp(line, ",") != 0) {
|
||||
KLTError("(_readFeatures) File '%s' is corrupted -- "
|
||||
KLTError("(_readFeatures) File is corrupted -- "
|
||||
"(Expected 'comma', found '%s' instead)", line);
|
||||
exit(1);
|
||||
}
|
||||
fscanf(fp, "%s", line);
|
||||
if (strcmp(line, "nFeatures") != 0) {
|
||||
KLTError("(_readFeatures) File '%s' is corrupted -- "
|
||||
KLTError("(_readFeatures) File is corrupted -- "
|
||||
"(2 Expected 'nFeatures ', found '%s' instead)", line);
|
||||
exit(1);
|
||||
}
|
||||
fscanf(fp, "%s", line);
|
||||
if (strcmp(line, "=") != 0) {
|
||||
KLTError("(_readFeatures) File '%s' is corrupted -- "
|
||||
KLTError("(_readFeatures) File is corrupted -- "
|
||||
"(2 Expected '= ', found '%s' instead)", line);
|
||||
exit(1);
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ rtengine::LCPProfile::LCPProfile(const Glib::ustring& fname) :
|
||||
XML_Parser parser = XML_ParserCreate(nullptr);
|
||||
|
||||
if (!parser) {
|
||||
throw "Couldn't allocate memory for XML parser";
|
||||
throw std::runtime_error("Couldn't allocate memory for XML parser");
|
||||
}
|
||||
|
||||
XML_SetElementHandler(parser, XmlStartHandler, XmlEndHandler);
|
||||
@ -216,7 +216,7 @@ rtengine::LCPProfile::LCPProfile(const Glib::ustring& fname) :
|
||||
|
||||
if (XML_Parse(parser, buf, bytesRead, done) == XML_STATUS_ERROR) {
|
||||
XML_ParserFree(parser);
|
||||
throw "Invalid XML in LCP file";
|
||||
throw std::runtime_error("Invalid XML in LCP file");
|
||||
}
|
||||
} while (!done);
|
||||
|
||||
|
@ -313,6 +313,9 @@ static int decode(ljp* self) {
|
||||
}
|
||||
|
||||
static int receive(ljp* self,int ssss) {
|
||||
if (ssss == 16) {
|
||||
return 1 << 15;
|
||||
}
|
||||
int i = 0;
|
||||
int v = 0;
|
||||
while (i != ssss) {
|
||||
@ -365,24 +368,29 @@ inline static int nextdiff(ljp* self, int Px) {
|
||||
cnt -= usedbits;
|
||||
int keepbitsmask = (1 << cnt)-1;
|
||||
b &= keepbitsmask;
|
||||
while (cnt < t) {
|
||||
next = *(u16*)&self->data[ix];
|
||||
int one = next&0xFF;
|
||||
int two = next>>8;
|
||||
b = (b<<16)|(one<<8)|two;
|
||||
cnt += 16;
|
||||
ix += 2;
|
||||
if (one==0xFF) {
|
||||
b >>= 8;
|
||||
cnt -= 8;
|
||||
} else if (two==0xFF) ix++;
|
||||
}
|
||||
cnt -= t;
|
||||
int diff = b >> cnt;
|
||||
int vt = 1<<(t-1);
|
||||
if (diff < vt) {
|
||||
vt = (-1 << t) + 1;
|
||||
diff += vt;
|
||||
int diff;
|
||||
if (t == 16) {
|
||||
diff = 1 << 15;
|
||||
} else {
|
||||
while (cnt < t) {
|
||||
next = *(u16*)&self->data[ix];
|
||||
int one = next&0xFF;
|
||||
int two = next>>8;
|
||||
b = (b<<16)|(one<<8)|two;
|
||||
cnt += 16;
|
||||
ix += 2;
|
||||
if (one==0xFF) {
|
||||
b >>= 8;
|
||||
cnt -= 8;
|
||||
} else if (two==0xFF) ix++;
|
||||
}
|
||||
cnt -= t;
|
||||
diff = b >> cnt;
|
||||
int vt = 1<<(t-1);
|
||||
if (diff < vt) {
|
||||
vt = (-1 << t) + 1;
|
||||
diff += vt;
|
||||
}
|
||||
}
|
||||
keepbitsmask = (1 << cnt)-1;
|
||||
self->b = b & keepbitsmask;
|
||||
@ -424,6 +432,7 @@ static int parsePred6(ljp* self) {
|
||||
diff = nextdiff(self,0);
|
||||
Px = 1 << (self->bits-1);
|
||||
left = Px + diff;
|
||||
left = (u16) (left % 65536);
|
||||
if (self->linearize)
|
||||
linear = self->linearize[left];
|
||||
else
|
||||
@ -437,6 +446,7 @@ static int parsePred6(ljp* self) {
|
||||
diff = nextdiff(self,0);
|
||||
Px = left;
|
||||
left = Px + diff;
|
||||
left = (u16) (left % 65536);
|
||||
if (self->linearize)
|
||||
linear = self->linearize[left];
|
||||
else
|
||||
@ -460,6 +470,7 @@ static int parsePred6(ljp* self) {
|
||||
diff = nextdiff(self,0);
|
||||
Px = lastrow[col]; // Use value above for first pixel in row
|
||||
left = Px + diff;
|
||||
left = (u16) (left % 65536);
|
||||
if (self->linearize) {
|
||||
if (left>self->linlen) return LJ92_ERROR_CORRUPT;
|
||||
linear = self->linearize[left];
|
||||
@ -478,6 +489,7 @@ static int parsePred6(ljp* self) {
|
||||
diff = nextdiff(self,0);
|
||||
Px = lastrow[col] + ((left - lastrow[col-1])>>1);
|
||||
left = Px + diff;
|
||||
left = (u16) (left % 65536);
|
||||
//printf("%d %d %d %d %d %x\n",col,diff,left,lastrow[col],lastrow[col-1],&lastrow[col]);
|
||||
if (self->linearize) {
|
||||
if (left>self->linlen) return LJ92_ERROR_CORRUPT;
|
||||
@ -556,6 +568,7 @@ static int parseScan(ljp* self) {
|
||||
}
|
||||
diff = nextdiff(self,Px);
|
||||
left = Px + diff;
|
||||
left = (u16) (left % 65536);
|
||||
//printf("%d %d %d\n",c,diff,left);
|
||||
int linear;
|
||||
if (self->linearize) {
|
||||
|
@ -107,13 +107,13 @@ inline int getc (IMFILE* f)
|
||||
return fgetc(f);
|
||||
}
|
||||
|
||||
inline int fread (void* dst, int es, int count, IMFILE* f)
|
||||
inline int fread (void* dst, size_t es, size_t count, IMFILE* f)
|
||||
{
|
||||
|
||||
int s = es * count;
|
||||
int avail = f->size - f->pos;
|
||||
size_t s = es * count;
|
||||
size_t avail = static_cast<size_t>(f->size) - static_cast<size_t>(f->pos);
|
||||
|
||||
if (s <= avail) {
|
||||
if (static_cast<ssize_t>(s) <= static_cast<ssize_t>(avail)) {
|
||||
memcpy (dst, f->data + f->pos, s);
|
||||
f->pos += s;
|
||||
|
||||
|
@ -773,7 +773,7 @@ enum ProcEventCode {
|
||||
EvlocallabexnoiseMethod = 747,
|
||||
Evlocallabdepth = 748,
|
||||
Evlocallabloglin = 749,
|
||||
Evlocallablumonly = 750,
|
||||
EvlocallabdehazeSaturation = 750,
|
||||
Evlocallaboffs = 751,
|
||||
EvlocallabCTtransCurve = 752,
|
||||
Evlocallabcliptm = 753,
|
||||
@ -982,7 +982,90 @@ enum ProcEventCode {
|
||||
EvlocallabquaMethod = 956,
|
||||
Evlocallabhishow = 957,
|
||||
Evlocallabinvbl = 958,
|
||||
|
||||
Evlocallabcatad = 959,
|
||||
Evlocallabciecam = 960,
|
||||
Evlocallabsourceabs = 961,
|
||||
Evlocallabtargabs = 962,
|
||||
Evlocallabsurround = 963,
|
||||
Evlocallabsaturl = 964,
|
||||
Evlocallabcontl = 965,
|
||||
EvlocallabCCmaskshapeL = 966,
|
||||
EvlocallabLLmaskshapeL = 967,
|
||||
EvlocallabHHmaskshapeL = 968,
|
||||
EvLocallabEnaLMask = 969,
|
||||
EvLocallabblendmaskL = 970,
|
||||
EvLocallabradmaskL = 971,
|
||||
EvLocallabchromaskL = 972,
|
||||
EvlocallabLmaskshapeL = 973,
|
||||
Evlocallablightl = 974,
|
||||
EvlocallabLshapeL = 975,
|
||||
Evlocallabcontq = 976,
|
||||
Evlocallabsursour = 977,
|
||||
Evlocallablightq = 978,
|
||||
Evlocallabcolorfl = 979,
|
||||
Evlocallabrepar = 980,
|
||||
EvlocallabwavCurvehue = 981,
|
||||
Evlocallablevelthr = 982,
|
||||
Evlocallablevelthrlow = 983,
|
||||
Evlocallabusemask1 = 984,
|
||||
Evlocallablnoiselow = 985,
|
||||
Evlocallabrecothres = 986,
|
||||
Evlocallablowthres = 987,
|
||||
Evlocallabhigthres = 988,
|
||||
Evlocallabrecothresd = 989,
|
||||
Evlocallablowthresd = 990,
|
||||
Evlocallabhigthresd = 991,
|
||||
Evlocallabinvmaskd = 992,
|
||||
Evlocallabinvmask = 993,
|
||||
Evlocallabdecayd = 994,
|
||||
Evlocallabrecothresc = 995,
|
||||
Evlocallablowthresc = 996,
|
||||
Evlocallabhigthresc = 997,
|
||||
Evlocallabdecayc = 998,
|
||||
Evlocallabmidthresd = 999,
|
||||
Evlocallabrecothresl = 1000,
|
||||
Evlocallablowthresl = 1001,
|
||||
Evlocallabhigthresl = 1002,
|
||||
Evlocallabdecayl = 1003,
|
||||
Evlocallabrecothrese = 1004,
|
||||
Evlocallablowthrese = 1005,
|
||||
Evlocallabhigthrese = 1006,
|
||||
Evlocallabdecaye = 1007,
|
||||
Evlocallabrecothress = 1008,
|
||||
Evlocallablowthress = 1009,
|
||||
Evlocallabhigthress = 1010,
|
||||
Evlocallabdecays = 1011,
|
||||
Evlocallabrecothresv = 1012,
|
||||
Evlocallablowthresv = 1013,
|
||||
Evlocallabhigthresv = 1014,
|
||||
Evlocallabdecayv = 1015,
|
||||
Evlocallabrecothresw = 1016,
|
||||
Evlocallablowthresw = 1017,
|
||||
Evlocallabhigthresw = 1018,
|
||||
Evlocallabdecayw = 1019,
|
||||
Evlocallabmidthresdch = 1020,
|
||||
Evlocallabrecothrest = 1021,
|
||||
Evlocallablowthrest = 1022,
|
||||
Evlocallabhigthrest = 1023,
|
||||
Evlocallabdecayt = 1024,
|
||||
Evlocallabrecothrescb = 1025,
|
||||
Evlocallablowthrescb = 1026,
|
||||
Evlocallabhigthrescb = 1027,
|
||||
Evlocallabdecaycb = 1028,
|
||||
Evlocallabrecothresr = 1029,
|
||||
Evlocallablowthresr = 1030,
|
||||
Evlocallabhigthresr = 1031,
|
||||
Evlocallabdecayr = 1032,
|
||||
Evlocallabnlstr = 1033,
|
||||
Evlocallabnldet = 1034,
|
||||
Evlocallabnlpat = 1035,
|
||||
Evlocallabnlrad = 1036,
|
||||
Evlocallabnlgam = 1037,
|
||||
Evlocallabdivgr = 1038,
|
||||
EvLocallabSpotavoidrad = 1039,
|
||||
EvLocallabSpotavoidmun = 1040,
|
||||
Evlocallabcontthres = 1041,
|
||||
Evlocallabnorm = 1042,
|
||||
NUMOFEVENTS
|
||||
};
|
||||
|
||||
|
@ -297,6 +297,7 @@ struct ToneCurveParams {
|
||||
int saturation;
|
||||
int shcompr;
|
||||
int hlcompr; // Highlight Recovery's compression
|
||||
int hlbl; // Highlight Recovery's compression
|
||||
int hlcomprthresh; // Highlight Recovery's threshold
|
||||
bool histmatching; // histogram matching
|
||||
bool fromHistMatching;
|
||||
@ -672,6 +673,9 @@ struct ColorAppearanceParams {
|
||||
TcMode curveMode;
|
||||
TcMode curveMode2;
|
||||
CtcMode curveMode3;
|
||||
Glib::ustring complexmethod;
|
||||
Glib::ustring modelmethod;
|
||||
Glib::ustring catmethod;
|
||||
|
||||
Glib::ustring surround;
|
||||
Glib::ustring surrsrc;
|
||||
@ -1005,11 +1009,13 @@ struct LocallabParams {
|
||||
double balanh;
|
||||
double colorde;
|
||||
double colorscope;
|
||||
double avoidrad;
|
||||
double transitweak;
|
||||
double transitgrad;
|
||||
bool hishow;
|
||||
bool activ;
|
||||
bool avoid;
|
||||
bool avoidmun;
|
||||
bool blwh;
|
||||
bool recurs;
|
||||
bool laplac;
|
||||
@ -1082,6 +1088,10 @@ struct LocallabParams {
|
||||
std::vector<double> Lmaskcurve;
|
||||
std::vector<double> LLmaskcolcurvewav;
|
||||
Threshold<int> csthresholdcol;
|
||||
double recothresc;
|
||||
double lowthresc;
|
||||
double higthresc;
|
||||
double decayc;
|
||||
// Exposure
|
||||
bool visiexpose;
|
||||
bool expexpose;
|
||||
@ -1099,6 +1109,7 @@ struct LocallabParams {
|
||||
double strexp;
|
||||
double angexp;
|
||||
std::vector<double> excurve;
|
||||
bool norm;
|
||||
bool inversex;
|
||||
bool enaExpMask;
|
||||
bool enaExpMaskaft;
|
||||
@ -1125,6 +1136,10 @@ struct LocallabParams {
|
||||
double fatdetail;
|
||||
double fatanchor;
|
||||
double fatlevel;
|
||||
double recothrese;
|
||||
double lowthrese;
|
||||
double higthrese;
|
||||
double decaye;
|
||||
// Shadow highlight
|
||||
bool visishadhigh;
|
||||
bool expshadhigh;
|
||||
@ -1157,6 +1172,10 @@ struct LocallabParams {
|
||||
double fatanchorSH;
|
||||
double gamSH;
|
||||
double sloSH;
|
||||
double recothress;
|
||||
double lowthress;
|
||||
double higthress;
|
||||
double decays;
|
||||
// Vibrance
|
||||
bool visivibrance;
|
||||
bool expvibrance;
|
||||
@ -1185,6 +1204,10 @@ struct LocallabParams {
|
||||
double strvibh;
|
||||
double angvib;
|
||||
std::vector<double> Lmaskvibcurve;
|
||||
double recothresv;
|
||||
double lowthresv;
|
||||
double higthresv;
|
||||
double decayv;
|
||||
// Soft Light
|
||||
bool visisoft;
|
||||
bool expsoft;
|
||||
@ -1203,15 +1226,31 @@ struct LocallabParams {
|
||||
int itera;
|
||||
int guidbl;
|
||||
int strbl;
|
||||
double recothres;
|
||||
double lowthres;
|
||||
double higthres;
|
||||
double recothresd;
|
||||
double lowthresd;
|
||||
double midthresd;
|
||||
double midthresdch;
|
||||
double higthresd;
|
||||
double decayd;
|
||||
int isogr;
|
||||
int strengr;
|
||||
int scalegr;
|
||||
double divgr;
|
||||
int epsbl;
|
||||
Glib::ustring blMethod; // blur, med, guid
|
||||
Glib::ustring chroMethod; // lum, chr, all
|
||||
Glib::ustring quamethod; // cons agre
|
||||
Glib::ustring blurMethod; // norm, inv
|
||||
Glib::ustring medMethod; // none, 33, 55, 77, 99
|
||||
bool usemask;
|
||||
bool invmaskd;
|
||||
bool invmask;
|
||||
double levelthr;
|
||||
double lnoiselow;
|
||||
double levelthrlow;
|
||||
bool activlum;
|
||||
double noiselumf;
|
||||
double noiselumf0;
|
||||
@ -1224,9 +1263,15 @@ struct LocallabParams {
|
||||
double noisechrodetail;
|
||||
int adjblur;
|
||||
int bilateral;
|
||||
int nlstr;
|
||||
int nldet;
|
||||
int nlpat;
|
||||
int nlrad;
|
||||
double nlgam;
|
||||
int sensiden;
|
||||
int detailthr;
|
||||
std::vector<double> locwavcurveden;
|
||||
std::vector<double> locwavcurvehue;
|
||||
Glib::ustring showmaskblMethodtyp;
|
||||
std::vector<double> CCmaskblcurve;
|
||||
std::vector<double> LLmaskblcurve;
|
||||
@ -1273,6 +1318,10 @@ struct LocallabParams {
|
||||
double slomasktm;
|
||||
double lapmasktm;
|
||||
std::vector<double> Lmasktmcurve;
|
||||
double recothrest;
|
||||
double lowthrest;
|
||||
double higthrest;
|
||||
double decayt;
|
||||
// Retinex
|
||||
bool visireti;
|
||||
bool expreti;
|
||||
@ -1291,7 +1340,7 @@ struct LocallabParams {
|
||||
bool inversret;
|
||||
bool equilret;
|
||||
bool loglin;
|
||||
bool lumonly;
|
||||
double dehazeSaturation;
|
||||
double softradiusret;
|
||||
std::vector<double> CCmaskreticurve;
|
||||
std::vector<double> LLmaskreticurve;
|
||||
@ -1311,6 +1360,10 @@ struct LocallabParams {
|
||||
double cliptm;
|
||||
bool fftwreti;
|
||||
std::vector<double> Lmaskreticurve;
|
||||
double recothresr;
|
||||
double lowthresr;
|
||||
double higthresr;
|
||||
double decayr;
|
||||
// Sharpening
|
||||
bool visisharp;
|
||||
bool expsharp;
|
||||
@ -1396,6 +1449,10 @@ struct LocallabParams {
|
||||
double radmasklc;
|
||||
double chromasklc;
|
||||
std::vector<double> Lmasklccurve;
|
||||
double recothresw;
|
||||
double lowthresw;
|
||||
double higthresw;
|
||||
double decayw;
|
||||
// Contrast by detail levels
|
||||
bool visicbdl;
|
||||
bool expcbdl;
|
||||
@ -1418,21 +1475,54 @@ struct LocallabParams {
|
||||
double slomaskcb;
|
||||
double lapmaskcb;
|
||||
std::vector<double> Lmaskcbcurve;
|
||||
double recothrescb;
|
||||
double lowthrescb;
|
||||
double higthrescb;
|
||||
double decaycb;
|
||||
// Log encoding
|
||||
bool visilog;
|
||||
bool explog;
|
||||
int complexlog;
|
||||
bool autocompute;
|
||||
double sourceGray;
|
||||
double sourceabs;
|
||||
double targabs;
|
||||
double targetGray;
|
||||
double catad;
|
||||
double saturl;
|
||||
double lightl;
|
||||
double lightq;
|
||||
double contl;
|
||||
double contthres;
|
||||
double contq;
|
||||
double colorfl;
|
||||
std::vector<double> LcurveL;
|
||||
bool Autogray;
|
||||
bool fullimage;
|
||||
double repar;
|
||||
bool ciecam;
|
||||
double blackEv;
|
||||
double whiteEv;
|
||||
double detail;
|
||||
int sensilog;
|
||||
Glib::ustring sursour;
|
||||
Glib::ustring surround;
|
||||
double baselog;
|
||||
double strlog;
|
||||
double anglog;
|
||||
std::vector<double> CCmaskcurveL;
|
||||
std::vector<double> LLmaskcurveL;
|
||||
std::vector<double> HHmaskcurveL;
|
||||
bool enaLMask;
|
||||
double blendmaskL;
|
||||
double radmaskL;
|
||||
double chromaskL;
|
||||
std::vector<double> LmaskcurveL;
|
||||
double recothresl;
|
||||
double lowthresl;
|
||||
double higthresl;
|
||||
double decayl;
|
||||
|
||||
// mask
|
||||
bool visimask;
|
||||
int complexmask;
|
||||
@ -1968,9 +2058,9 @@ struct SoftLightParams {
|
||||
struct DehazeParams {
|
||||
bool enabled;
|
||||
int strength;
|
||||
int saturation;
|
||||
bool showDepthMap;
|
||||
int depth;
|
||||
bool luminance;
|
||||
|
||||
DehazeParams();
|
||||
|
||||
@ -2173,10 +2263,28 @@ struct FilmNegativeParams {
|
||||
double greenExp;
|
||||
double blueRatio;
|
||||
|
||||
double redBase;
|
||||
double greenBase;
|
||||
double blueBase;
|
||||
|
||||
struct RGB {
|
||||
float r, g, b;
|
||||
|
||||
bool operator ==(const RGB& other) const;
|
||||
bool operator !=(const RGB& other) const;
|
||||
RGB operator *(const RGB& other) const;
|
||||
};
|
||||
|
||||
RGB refInput;
|
||||
RGB refOutput;
|
||||
|
||||
enum class ColorSpace {
|
||||
INPUT = 0,
|
||||
WORKING
|
||||
// TODO : add support for custom color profile
|
||||
};
|
||||
|
||||
ColorSpace colorSpace;
|
||||
|
||||
enum class BackCompat { CURRENT = 0, V1, V2 };
|
||||
BackCompat backCompat;
|
||||
|
||||
FilmNegativeParams();
|
||||
|
||||
bool operator ==(const FilmNegativeParams& other) const;
|
||||
|
@ -263,7 +263,7 @@ void cfaboxblur(const float* const * riFlatFile, float* cfablur, int boxH, int b
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
void RawImageSource::processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4])
|
||||
void RawImageSource::processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, array2D<float> &rawData, const float black[4])
|
||||
{
|
||||
// BENCHFUN
|
||||
std::unique_ptr<float[]> cfablur(new float[H * W]);
|
||||
|
@ -636,6 +636,56 @@ float calculate_scale_mul(float scale_mul[4], const float pre_mul_[4], const flo
|
||||
return gain;
|
||||
}
|
||||
|
||||
|
||||
void RawImageSource::getWBMults (const ColorTemp &ctemp, const RAWParams &raw, std::array<float, 4>& out_scale_mul, float &autoGainComp, float &rm, float &gm, float &bm) const
|
||||
{
|
||||
// compute channel multipliers
|
||||
double r, g, b;
|
||||
//float rm, gm, bm;
|
||||
|
||||
if (ctemp.getTemp() < 0) {
|
||||
// no white balance, ie revert the pre-process white balance to restore original unbalanced raw camera color
|
||||
rm = ri->get_pre_mul(0);
|
||||
gm = ri->get_pre_mul(1);
|
||||
bm = ri->get_pre_mul(2);
|
||||
} else {
|
||||
ctemp.getMultipliers (r, g, b);
|
||||
rm = imatrices.cam_rgb[0][0] * r + imatrices.cam_rgb[0][1] * g + imatrices.cam_rgb[0][2] * b;
|
||||
gm = imatrices.cam_rgb[1][0] * r + imatrices.cam_rgb[1][1] * g + imatrices.cam_rgb[1][2] * b;
|
||||
bm = imatrices.cam_rgb[2][0] * r + imatrices.cam_rgb[2][1] * g + imatrices.cam_rgb[2][2] * b;
|
||||
}
|
||||
|
||||
// adjust gain so the maximum raw value of the least scaled channel just hits max
|
||||
const float new_pre_mul[4] = { ri->get_pre_mul(0) / rm, ri->get_pre_mul(1) / gm, ri->get_pre_mul(2) / bm, ri->get_pre_mul(3) / gm };
|
||||
float new_scale_mul[4];
|
||||
|
||||
bool isMono = (ri->getSensorType() == ST_FUJI_XTRANS && raw.xtranssensor.method == RAWParams::XTransSensor::getMethodString(RAWParams::XTransSensor::Method::MONO))
|
||||
|| (ri->getSensorType() == ST_BAYER && raw.bayersensor.method == RAWParams::BayerSensor::getMethodString(RAWParams::BayerSensor::Method::MONO));
|
||||
|
||||
float c_white[4];
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
c_white[i] = (ri->get_white(i) - cblacksom[i]) / static_cast<float>(raw.expos) + cblacksom[i];
|
||||
}
|
||||
|
||||
float gain = calculate_scale_mul(new_scale_mul, new_pre_mul, c_white, cblacksom, isMono, ri->get_colors());
|
||||
rm = new_scale_mul[0] / scale_mul[0] * gain;
|
||||
gm = new_scale_mul[1] / scale_mul[1] * gain;
|
||||
bm = new_scale_mul[2] / scale_mul[2] * gain;
|
||||
//fprintf(stderr, "camera gain: %f, current wb gain: %f, diff in stops %f\n", camInitialGain, gain, log2(camInitialGain) - log2(gain));
|
||||
|
||||
const float expcomp = std::pow(2, ri->getBaselineExposure());
|
||||
rm *= expcomp;
|
||||
gm *= expcomp;
|
||||
bm *= expcomp;
|
||||
|
||||
out_scale_mul[0] = scale_mul[0];
|
||||
out_scale_mul[1] = scale_mul[1];
|
||||
out_scale_mul[2] = scale_mul[2];
|
||||
out_scale_mul[3] = scale_mul[3];
|
||||
|
||||
autoGainComp = camInitialGain / initialGain;
|
||||
}
|
||||
|
||||
void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const ToneCurveParams &hrp, const RAWParams &raw)
|
||||
{
|
||||
MyMutex::MyLock lock(getImageMutex);
|
||||
@ -2387,7 +2437,7 @@ void RawImageSource::HLRecovery_Global(const ToneCurveParams &hrp)
|
||||
printf ("Applying Highlight Recovery: Color propagation...\n");
|
||||
}
|
||||
|
||||
HLRecovery_inpaint (red, green, blue);
|
||||
HLRecovery_inpaint (red, green, blue, hrp.hlbl);
|
||||
rgbSourceModified = true;
|
||||
}
|
||||
}
|
||||
@ -2444,7 +2494,7 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw
|
||||
|
||||
|
||||
if (riFlatFile && W == riFlatFile->get_width() && H == riFlatFile->get_height()) {
|
||||
processFlatField(raw, riFlatFile, black);
|
||||
processFlatField(raw, riFlatFile, rawData, black);
|
||||
} // flatfield
|
||||
} else if (ri->get_colors() == 1) {
|
||||
// Monochrome
|
||||
@ -2466,7 +2516,7 @@ void RawImageSource::copyOriginalPixels(const RAWParams &raw, RawImage *src, Raw
|
||||
}
|
||||
}
|
||||
if (riFlatFile && W == riFlatFile->get_width() && H == riFlatFile->get_height()) {
|
||||
processFlatField(raw, riFlatFile, black);
|
||||
processFlatField(raw, riFlatFile, rawData, black);
|
||||
} // flatfield
|
||||
} else {
|
||||
// No bayer pattern
|
||||
|
@ -124,9 +124,6 @@ public:
|
||||
int load(const Glib::ustring &fname) override { return load(fname, false); }
|
||||
int load(const Glib::ustring &fname, bool firstFrameOnly);
|
||||
void preprocess (const procparams::RAWParams &raw, const procparams::LensProfParams &lensProf, const procparams::CoarseTransformParams& coarse, bool prepareDenoise = true) override;
|
||||
void filmNegativeProcess (const procparams::FilmNegativeParams ¶ms, std::array<float, 3>& filmBaseValues) override;
|
||||
bool getFilmNegativeExponents (Coord2D spotA, Coord2D spotB, int tran, const procparams::FilmNegativeParams ¤tParams, std::array<float, 3>& newExps) override;
|
||||
bool getRawSpotValues(Coord2D spot, int spotSize, int tran, const procparams::FilmNegativeParams ¶ms, std::array<float, 3>& rawValues) override;
|
||||
void demosaic (const procparams::RAWParams &raw, bool autoContrast, double &contrastThreshold, bool cache = false) override;
|
||||
void retinex (const procparams::ColorManagementParams& cmp, const procparams::RetinexParams &deh, const procparams::ToneCurveParams& Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) override;
|
||||
void retinexPrepareCurves (const procparams::RetinexParams &retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, RetinexgaintransmissionCurve &retinexgaintransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) override;
|
||||
@ -140,13 +137,14 @@ public:
|
||||
return rgbSourceModified; // tracks whether cached rgb output of demosaic has been modified
|
||||
}
|
||||
|
||||
void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, const float black[4]);
|
||||
void processFlatField(const procparams::RAWParams &raw, const RawImage *riFlatFile, array2D<float> &rawData, const float black[4]);
|
||||
void copyOriginalPixels(const procparams::RAWParams &raw, RawImage *ri, RawImage *riDark, RawImage *riFlatFile, array2D<float> &rawData );
|
||||
void scaleColors (int winx, int winy, int winw, int winh, const procparams::RAWParams &raw, array2D<float> &rawData); // raw for cblack
|
||||
void WBauto(double &tempref, double &greenref, array2D<float> &redloc, array2D<float> &greenloc, array2D<float> &blueloc, int bfw, int bfh, double &avg_rm, double &avg_gm, double &avg_bm, double &tempitc, double &greenitc, float &studgood, bool &twotimes, const procparams::WBParams & wbpar, int begx, int begy, int yEn, int xEn, int cx, int cy, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override;
|
||||
void getAutoWBMultipliersitc(double &tempref, double &greenref, double &tempitc, double &greenitc, float &studgood, int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w, double &rm, double &gm, double &bm, const procparams::WBParams & wbpar, const procparams::ColorManagementParams &cmp, const procparams::RAWParams &raw) override;
|
||||
void getrgbloc(int begx, int begy, int yEn, int xEn, int cx, int cy, int bf_h, int bf_w) override;
|
||||
|
||||
void getWBMults (const ColorTemp &ctemp, const procparams::RAWParams &raw, std::array<float, 4>& scale_mul, float &autoGainComp, float &rm, float &gm, float &bm) const override;
|
||||
void getImage (const ColorTemp &ctemp, int tran, Imagefloat* image, const PreviewProps &pp, const procparams::ToneCurveParams &hrp, const procparams::RAWParams &raw) override;
|
||||
eSensorType getSensorType () const override;
|
||||
bool isMono () const override;
|
||||
@ -197,7 +195,7 @@ public:
|
||||
static void inverse33(const double (*coeff)[3], double (*icoeff)[3]);
|
||||
|
||||
void MSR(float** luminance, float **originalLuminance, float **exLuminance, const LUTf& mapcurve, bool mapcontlutili, int width, int height, const procparams::RetinexParams &deh, const RetinextransmissionCurve & dehatransmissionCurve, const RetinexgaintransmissionCurve & dehagaintransmissionCurve, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax);
|
||||
void HLRecovery_inpaint (float** red, float** green, float** blue) override;
|
||||
void HLRecovery_inpaint (float** red, float** green, float** blue, int blur);
|
||||
static void HLRecovery_Luminance (float* rin, float* gin, float* bin, float* rout, float* gout, float* bout, int width, float maxval);
|
||||
static void HLRecovery_CIELab (float* rin, float* gin, float* bin, float* rout, float* gout, float* bout, int width, float maxval, double cam[3][3], double icam[3][3]);
|
||||
static void HLRecovery_blend (float* rin, float* gin, float* bin, int width, float maxval, float* hlmax);
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "rawimagesource.h"
|
||||
#include "rt_math.h"
|
||||
#include "../rtgui/multilangmgr.h"
|
||||
#include "opthelper.h"
|
||||
#include "StopWatch.h"
|
||||
|
||||
using namespace std;
|
||||
@ -36,7 +35,7 @@ unsigned fc(const unsigned int cfa[2][2], int r, int c) {
|
||||
namespace rtengine
|
||||
{
|
||||
|
||||
/**
|
||||
/*
|
||||
* RATIO CORRECTED DEMOSAICING
|
||||
* Luis Sanz Rodriguez (luis.sanz.rodriguez(at)gmail(dot)com)
|
||||
*
|
||||
@ -45,7 +44,12 @@ namespace rtengine
|
||||
* Original code from https://github.com/LuisSR/RCD-Demosaicing
|
||||
* Licensed under the GNU GPL version 3
|
||||
*/
|
||||
|
||||
// Tiled version by Ingo Weyrich (heckflosse67@gmx.de)
|
||||
// Luis Sanz Rodriguez significantly optimised the v 2.3 code and simplified the directional
|
||||
// coefficients in an exact, shorter and more performant formula.
|
||||
// In cooperation with Hanno Schwalm (hanno@schwalm-bremen.de) and Luis Sanz Rodriguez this has been tuned for performance.
|
||||
|
||||
void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure)
|
||||
{
|
||||
// Test for RGB cfa
|
||||
@ -61,7 +65,6 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure)
|
||||
}
|
||||
|
||||
std::unique_ptr<StopWatch> stop;
|
||||
|
||||
if (measure) {
|
||||
std::cout << "Demosaicing " << W << "x" << H << " image using rcd with " << chunkSize << " tiles per thread" << std::endl;
|
||||
stop.reset(new StopWatch("rcd demosaic"));
|
||||
@ -75,26 +78,30 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure)
|
||||
}
|
||||
|
||||
const unsigned int cfarray[2][2] = {{FC(0,0), FC(0,1)}, {FC(1,0), FC(1,1)}};
|
||||
constexpr int tileBorder = 9; // avoid tile-overlap errors
|
||||
constexpr int rcdBorder = 9;
|
||||
constexpr int tileSize = 214;
|
||||
constexpr int tileSizeN = tileSize - 2 * rcdBorder;
|
||||
constexpr int tileSize = 194;
|
||||
constexpr int tileSizeN = tileSize - 2 * tileBorder;
|
||||
const int numTh = H / (tileSizeN) + ((H % (tileSizeN)) ? 1 : 0);
|
||||
const int numTw = W / (tileSizeN) + ((W % (tileSizeN)) ? 1 : 0);
|
||||
constexpr int w1 = tileSize, w2 = 2 * tileSize, w3 = 3 * tileSize, w4 = 4 * tileSize;
|
||||
//Tolerance to avoid dividing by zero
|
||||
constexpr float eps = 1e-5f;
|
||||
constexpr float epssq = 1e-10f;
|
||||
constexpr float scale = 65536.f;
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel
|
||||
#endif
|
||||
{
|
||||
int progresscounter = 0;
|
||||
float *cfa = (float*) calloc(tileSize * tileSize, sizeof *cfa);
|
||||
float (*rgb)[tileSize * tileSize] = (float (*)[tileSize * tileSize])malloc(3 * sizeof *rgb);
|
||||
float *VH_Dir = (float*) calloc(tileSize * tileSize, sizeof *VH_Dir);
|
||||
float *PQ_Dir = (float*) calloc(tileSize * tileSize, sizeof *PQ_Dir);
|
||||
float *lpf = PQ_Dir; // reuse buffer, they don't overlap in usage
|
||||
float *const cfa = (float*) calloc(tileSize * tileSize, sizeof *cfa);
|
||||
float (*const rgb)[tileSize * tileSize] = (float (*)[tileSize * tileSize])malloc(3 * sizeof *rgb);
|
||||
float *const VH_Dir = (float*) calloc(tileSize * tileSize, sizeof *VH_Dir);
|
||||
float *const PQ_Dir = (float*) calloc(tileSize * tileSize / 2, sizeof *PQ_Dir);
|
||||
float *const lpf = PQ_Dir; // reuse buffer, they don't overlap in usage
|
||||
float *const P_CDiff_Hpf = (float*) calloc(tileSize * tileSize / 2, sizeof *P_CDiff_Hpf);
|
||||
float *const Q_CDiff_Hpf = (float*) calloc(tileSize * tileSize / 2, sizeof *Q_CDiff_Hpf);
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp for schedule(dynamic, chunkSize) collapse(2) nowait
|
||||
@ -103,12 +110,12 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure)
|
||||
for (int tc = 0; tc < numTw; ++tc) {
|
||||
const int rowStart = tr * tileSizeN;
|
||||
const int rowEnd = std::min(rowStart + tileSize, H);
|
||||
if (rowStart + rcdBorder == rowEnd - rcdBorder) {
|
||||
if (rowStart + tileBorder == rowEnd - tileBorder) {
|
||||
continue;
|
||||
}
|
||||
const int colStart = tc * tileSizeN;
|
||||
const int colEnd = std::min(colStart + tileSize, W);
|
||||
if (colStart + rcdBorder == colEnd - rcdBorder) {
|
||||
if (colStart + tileBorder == colEnd - tileBorder) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -116,90 +123,59 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure)
|
||||
const int tilecols = std::min(colEnd - colStart, tileSize);
|
||||
|
||||
for (int row = rowStart; row < rowEnd; row++) {
|
||||
int indx = (row - rowStart) * tileSize;
|
||||
int c0 = fc(cfarray, row, colStart);
|
||||
int c1 = fc(cfarray, row, colStart + 1);
|
||||
int col = colStart;
|
||||
|
||||
for (; col < colEnd - 1; col+=2, indx+=2) {
|
||||
cfa[indx] = rgb[c0][indx] = LIM01(rawData[row][col] / 65535.f);
|
||||
cfa[indx + 1] = rgb[c1][indx + 1] = LIM01(rawData[row][col + 1] / 65535.f);
|
||||
}
|
||||
if (col < colEnd) {
|
||||
cfa[indx] = rgb[c0][indx] = LIM01(rawData[row][col] / 65535.f);
|
||||
const int c0 = fc(cfarray, row, colStart);
|
||||
const int c1 = fc(cfarray, row, colStart + 1);
|
||||
for (int col = colStart, indx = (row - rowStart) * tileSize; col < colEnd; ++col, ++indx) {
|
||||
cfa[indx] = rgb[c0][indx] = rgb[c1][indx] = LIM01(rawData[row][col] / scale);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* STEP 1: Find cardinal and diagonal interpolation directions
|
||||
*/
|
||||
// Step 1: Find cardinal and diagonal interpolation directions
|
||||
float bufferV[3][tileSize - 8];
|
||||
|
||||
for (int row = 4; row < tileRows - 4; row++) {
|
||||
for (int col = 4, indx = row * tileSize + col; col < tilecols - 4; col++, indx++) {
|
||||
const float cfai = cfa[indx];
|
||||
//Calculate h/v local discrimination
|
||||
float V_Stat = max(epssq, -18.f * cfai * (cfa[indx - w1] + cfa[indx + w1] + 2.f * (cfa[indx - w2] + cfa[indx + w2]) - cfa[indx - w3] - cfa[indx + w3]) - 2.f * cfai * (cfa[indx - w4] + cfa[indx + w4] - 19.f * cfai) - cfa[indx - w1] * (70.f * cfa[indx + w1] + 12.f * cfa[indx - w2] - 24.f * cfa[indx + w2] + 38.f * cfa[indx - w3] - 16.f * cfa[indx + w3] - 12.f * cfa[indx - w4] + 6.f * cfa[indx + w4] - 46.f * cfa[indx - w1]) + cfa[indx + w1] * (24.f * cfa[indx - w2] - 12.f * cfa[indx + w2] + 16.f * cfa[indx - w3] - 38.f * cfa[indx + w3] - 6.f * cfa[indx - w4] + 12.f * cfa[indx + w4] + 46.f * cfa[indx + w1]) + cfa[indx - w2] * (14.f * cfa[indx + w2] - 12.f * cfa[indx + w3] - 2.f * cfa[indx - w4] + 2.f * cfa[indx + w4] + 11.f * cfa[indx - w2]) + cfa[indx + w2] * (-12.f * cfa[indx - w3] + 2.f * (cfa[indx - w4] - cfa[indx + w4]) + 11.f * cfa[indx + w2]) + cfa[indx - w3] * (2.f * cfa[indx + w3] - 6.f * cfa[indx - w4] + 10.f * cfa[indx - w3]) + cfa[indx + w3] * (-6.f * cfa[indx + w4] + 10.f * cfa[indx + w3]) + cfa[indx - w4] * cfa[indx - w4] + cfa[indx + w4] * cfa[indx + w4]);
|
||||
float H_Stat = max(epssq, -18.f * cfai * (cfa[indx - 1] + cfa[indx + 1] + 2.f * (cfa[indx - 2] + cfa[indx + 2]) - cfa[indx - 3] - cfa[indx + 3]) - 2.f * cfai * (cfa[indx - 4] + cfa[indx + 4] - 19.f * cfai) - cfa[indx - 1] * (70.f * cfa[indx + 1] + 12.f * cfa[indx - 2] - 24.f * cfa[indx + 2] + 38.f * cfa[indx - 3] - 16.f * cfa[indx + 3] - 12.f * cfa[indx - 4] + 6.f * cfa[indx + 4] - 46.f * cfa[indx - 1]) + cfa[indx + 1] * (24.f * cfa[indx - 2] - 12.f * cfa[indx + 2] + 16.f * cfa[indx - 3] - 38.f * cfa[indx + 3] - 6.f * cfa[indx - 4] + 12.f * cfa[indx + 4] + 46.f * cfa[indx + 1]) + cfa[indx - 2] * (14.f * cfa[indx + 2] - 12.f * cfa[indx + 3] - 2.f * cfa[indx - 4] + 2.f * cfa[indx + 4] + 11.f * cfa[indx - 2]) + cfa[indx + 2] * (-12.f * cfa[indx - 3] + 2.f * (cfa[indx - 4] - cfa[indx + 4]) + 11.f * cfa[indx + 2]) + cfa[indx - 3] * (2.f * cfa[indx + 3] - 6.f * cfa[indx - 4] + 10.f * cfa[indx - 3]) + cfa[indx + 3] * (-6.f * cfa[indx + 4] + 10.f * cfa[indx + 3]) + cfa[indx - 4] * cfa[indx - 4] + cfa[indx + 4] * cfa[indx + 4]);
|
||||
// Step 1.1: Calculate the square of the vertical and horizontal color difference high pass filter
|
||||
for (int row = 3; row < std::min(tileRows - 3, 5); ++row) {
|
||||
for (int col = 4, indx = row * tileSize + col; col < tilecols - 4; ++col, ++indx) {
|
||||
bufferV[row - 3][col - 4] = SQR((cfa[indx - w3] - cfa[indx - w1] - cfa[indx + w1] + cfa[indx + w3]) - 3.f * (cfa[indx - w2] + cfa[indx + w2]) + 6.f * cfa[indx]);
|
||||
}
|
||||
}
|
||||
|
||||
// Step 1.2: Obtain the vertical and horizontal directional discrimination strength
|
||||
float bufferH[tileSize - 6] ALIGNED16;
|
||||
float* V0 = bufferV[0];
|
||||
float* V1 = bufferV[1];
|
||||
float* V2 = bufferV[2];
|
||||
for (int row = 4; row < tileRows - 4; ++row) {
|
||||
for (int col = 3, indx = row * tileSize + col; col < tilecols - 3; ++col, ++indx) {
|
||||
bufferH[col - 3] = SQR((cfa[indx - 3] - cfa[indx - 1] - cfa[indx + 1] + cfa[indx + 3]) - 3.f * (cfa[indx - 2] + cfa[indx + 2]) + 6.f * cfa[indx]);
|
||||
}
|
||||
for (int col = 4, indx = (row + 1) * tileSize + col; col < tilecols - 4; ++col, ++indx) {
|
||||
V2[col - 4] = SQR((cfa[indx - w3] - cfa[indx - w1] - cfa[indx + w1] + cfa[indx + w3]) - 3.f * (cfa[indx - w2] + cfa[indx + w2]) + 6.f * cfa[indx]);
|
||||
}
|
||||
for (int col = 4, indx = row * tileSize + col; col < tilecols - 4; ++col, ++indx) {
|
||||
|
||||
float V_Stat = std::max(epssq, V0[col - 4] + V1[col - 4] + V2[col - 4]);
|
||||
float H_Stat = std::max(epssq, bufferH[col - 4] + bufferH[col - 3] + bufferH[col - 2]);
|
||||
|
||||
VH_Dir[indx] = V_Stat / (V_Stat + H_Stat);
|
||||
}
|
||||
// rotate pointers from row0, row1, row2 to row1, row2, row0
|
||||
std::swap(V0, V2);
|
||||
std::swap(V0, V1);
|
||||
}
|
||||
|
||||
/**
|
||||
* STEP 2: Calculate the low pass filter
|
||||
*/
|
||||
// Step 2.1: Low pass filter incorporating green, red and blue local samples from the raw data
|
||||
|
||||
for (int row = 2; row < tileRows - 2; row++) {
|
||||
for (int col = 2 + (fc(cfarray, row, 0) & 1), indx = row * tileSize + col; col < tilecols - 2; col += 2, indx += 2) {
|
||||
lpf[indx>>1] = 0.25f * cfa[indx] + 0.125f * (cfa[indx - w1] + cfa[indx + w1] + cfa[indx - 1] + cfa[indx + 1]) + 0.0625f * (cfa[indx - w1 - 1] + cfa[indx - w1 + 1] + cfa[indx + w1 - 1] + cfa[indx + w1 + 1]);
|
||||
// Step 2: Low pass filter incorporating green, red and blue local samples from the raw data
|
||||
for (int row = 2; row < tileRows - 2; ++row) {
|
||||
for (int col = 2 + (fc(cfarray, row, 0) & 1), indx = row * tileSize + col, lpindx = indx / 2; col < tilecols - 2; col += 2, indx += 2, ++lpindx) {
|
||||
lpf[lpindx] = cfa[indx] +
|
||||
0.5f * (cfa[indx - w1] + cfa[indx + w1] + cfa[indx - 1] + cfa[indx + 1]) +
|
||||
0.25f * (cfa[indx - w1 - 1] + cfa[indx - w1 + 1] + cfa[indx + w1 - 1] + cfa[indx + w1 + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* STEP 3: Populate the green channel
|
||||
*/
|
||||
// Step 3.1: Populate the green channel at blue and red CFA positions
|
||||
for (int row = 4; row < tileRows - 4; row++) {
|
||||
int col = 4 + (fc(cfarray, row, 0) & 1);
|
||||
int indx = row * tileSize + col;
|
||||
#ifdef __SSE2__
|
||||
const vfloat zd5v = F2V(0.5f);
|
||||
const vfloat zd25v = F2V(0.25f);
|
||||
const vfloat epsv = F2V(eps);
|
||||
for (; col < tilecols - 7; col += 8, indx += 8) {
|
||||
// Cardinal gradients
|
||||
const vfloat cfai = LC2VFU(cfa[indx]);
|
||||
const vfloat N_Grad = epsv + (vabsf(LC2VFU(cfa[indx - w1]) - LC2VFU(cfa[indx + w1])) + vabsf(cfai - LC2VFU(cfa[indx - w2]))) + (vabsf(LC2VFU(cfa[indx - w1]) - LC2VFU(cfa[indx - w3])) + vabsf(LC2VFU(cfa[indx - w2]) - LC2VFU(cfa[indx - w4])));
|
||||
const vfloat S_Grad = epsv + (vabsf(LC2VFU(cfa[indx - w1]) - LC2VFU(cfa[indx + w1])) + vabsf(cfai - LC2VFU(cfa[indx + w2]))) + (vabsf(LC2VFU(cfa[indx + w1]) - LC2VFU(cfa[indx + w3])) + vabsf(LC2VFU(cfa[indx + w2]) - LC2VFU(cfa[indx + w4])));
|
||||
const vfloat W_Grad = epsv + (vabsf(LC2VFU(cfa[indx - 1]) - LC2VFU(cfa[indx + 1])) + vabsf(cfai - LC2VFU(cfa[indx - 2]))) + (vabsf(LC2VFU(cfa[indx - 1]) - LC2VFU(cfa[indx - 3])) + vabsf(LC2VFU(cfa[indx - 2]) - LC2VFU(cfa[indx - 4])));
|
||||
const vfloat E_Grad = epsv + (vabsf(LC2VFU(cfa[indx - 1]) - LC2VFU(cfa[indx + 1])) + vabsf(cfai - LC2VFU(cfa[indx + 2]))) + (vabsf(LC2VFU(cfa[indx + 1]) - LC2VFU(cfa[indx + 3])) + vabsf(LC2VFU(cfa[indx + 2]) - LC2VFU(cfa[indx + 4])));
|
||||
|
||||
// Cardinal pixel estimations
|
||||
const vfloat lpfi = LVFU(lpf[indx>>1]);
|
||||
const vfloat N_Est = LC2VFU(cfa[indx - w1]) + (LC2VFU(cfa[indx - w1]) * (lpfi - LVFU(lpf[(indx - w2)>>1])) / (epsv + lpfi + LVFU(lpf[(indx - w2)>>1])));
|
||||
const vfloat S_Est = LC2VFU(cfa[indx + w1]) + (LC2VFU(cfa[indx + w1]) * (lpfi - LVFU(lpf[(indx + w2)>>1])) / (epsv + lpfi + LVFU(lpf[(indx + w2)>>1])));
|
||||
const vfloat W_Est = LC2VFU(cfa[indx - 1]) + (LC2VFU(cfa[indx - 1]) * (lpfi - LVFU(lpf[(indx - 2)>>1])) / (epsv + lpfi + LVFU(lpf[(indx - 2)>>1])));
|
||||
const vfloat E_Est = LC2VFU(cfa[indx + 1]) + (LC2VFU(cfa[indx + 1]) * (lpfi - LVFU(lpf[(indx + 2)>>1])) / (epsv + lpfi + LVFU(lpf[(indx + 2)>>1])));
|
||||
|
||||
// Vertical and horizontal estimations
|
||||
const vfloat V_Est = (S_Grad * N_Est + N_Grad * S_Est) / (N_Grad + S_Grad);
|
||||
const vfloat H_Est = (W_Grad * E_Est + E_Grad * W_Est) / (E_Grad + W_Grad);
|
||||
|
||||
// G@B and G@R interpolation
|
||||
// Refined vertical and horizontal local discrimination
|
||||
const vfloat VH_Central_Value = LC2VFU(VH_Dir[indx]);
|
||||
const vfloat VH_Neighbourhood_Value = zd25v * ((LC2VFU(VH_Dir[indx - w1 - 1]) + LC2VFU(VH_Dir[indx - w1 + 1])) + (LC2VFU(VH_Dir[indx + w1 - 1]) + LC2VFU(VH_Dir[indx + w1 + 1])));
|
||||
|
||||
#if defined(__clang__)
|
||||
const vfloat VH_Disc = vself(vmaskf_lt(vabsf(zd5v - VH_Central_Value), vabsf(zd5v - VH_Neighbourhood_Value)), VH_Neighbourhood_Value, VH_Central_Value);
|
||||
#else
|
||||
const vfloat VH_Disc = vabsf(zd5v - VH_Central_Value) < vabsf(zd5v - VH_Neighbourhood_Value) ? VH_Neighbourhood_Value : VH_Central_Value;
|
||||
#endif
|
||||
STC2VFU(rgb[1][indx], vintpf(VH_Disc, H_Est, V_Est));
|
||||
}
|
||||
#endif
|
||||
for (; col < tilecols - 4; col += 2, indx += 2) {
|
||||
// Step 3: Populate the green channel at blue and red CFA positions
|
||||
for (int row = 4; row < tileRows - 4; ++row) {
|
||||
for (int col = 4 + (fc(cfarray, row, 0) & 1), indx = row * tileSize + col, lpindx = indx / 2; col < tilecols - 4; col += 2, indx += 2, ++lpindx) {
|
||||
// Cardinal gradients
|
||||
const float cfai = cfa[indx];
|
||||
const float N_Grad = eps + (std::fabs(cfa[indx - w1] - cfa[indx + w1]) + std::fabs(cfai - cfa[indx - w2])) + (std::fabs(cfa[indx - w1] - cfa[indx - w3]) + std::fabs(cfa[indx - w2] - cfa[indx - w4]));
|
||||
@ -208,11 +184,11 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure)
|
||||
const float E_Grad = eps + (std::fabs(cfa[indx - 1] - cfa[indx + 1]) + std::fabs(cfai - cfa[indx + 2])) + (std::fabs(cfa[indx + 1] - cfa[indx + 3]) + std::fabs(cfa[indx + 2] - cfa[indx + 4]));
|
||||
|
||||
// Cardinal pixel estimations
|
||||
const float lpfi = lpf[indx>>1];
|
||||
const float N_Est = cfa[indx - w1] * (1.f + (lpfi - lpf[(indx - w2)>>1]) / (eps + lpfi + lpf[(indx - w2)>>1]));
|
||||
const float S_Est = cfa[indx + w1] * (1.f + (lpfi - lpf[(indx + w2)>>1]) / (eps + lpfi + lpf[(indx + w2)>>1]));
|
||||
const float W_Est = cfa[indx - 1] * (1.f + (lpfi - lpf[(indx - 2)>>1]) / (eps + lpfi + lpf[(indx - 2)>>1]));
|
||||
const float E_Est = cfa[indx + 1] * (1.f + (lpfi - lpf[(indx + 2)>>1]) / (eps + lpfi + lpf[(indx + 2)>>1]));
|
||||
const float lpfi = lpf[lpindx];
|
||||
const float N_Est = cfa[indx - w1] * (lpfi + lpfi) / (eps + lpfi + lpf[lpindx - w1]);
|
||||
const float S_Est = cfa[indx + w1] * (lpfi + lpfi) / (eps + lpfi + lpf[lpindx + w1]);
|
||||
const float W_Est = cfa[indx - 1] * (lpfi + lpfi) / (eps + lpfi + lpf[lpindx - 1]);
|
||||
const float E_Est = cfa[indx + 1] * (lpfi + lpfi) / (eps + lpfi + lpf[lpindx + 1]);
|
||||
|
||||
// Vertical and horizontal estimations
|
||||
const float V_Est = (S_Grad * N_Est + N_Grad * S_Est) / (N_Grad + S_Grad);
|
||||
@ -224,7 +200,7 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure)
|
||||
const float VH_Neighbourhood_Value = 0.25f * ((VH_Dir[indx - w1 - 1] + VH_Dir[indx - w1 + 1]) + (VH_Dir[indx + w1 - 1] + VH_Dir[indx + w1 + 1]));
|
||||
|
||||
const float VH_Disc = std::fabs(0.5f - VH_Central_Value) < std::fabs(0.5f - VH_Neighbourhood_Value) ? VH_Neighbourhood_Value : VH_Central_Value;
|
||||
rgb[1][indx] = VH_Disc * H_Est + (1.f - VH_Disc) * V_Est;
|
||||
rgb[1][indx] = intp(VH_Disc, H_Est, V_Est);
|
||||
}
|
||||
}
|
||||
|
||||
@ -232,25 +208,30 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure)
|
||||
* STEP 4: Populate the red and blue channels
|
||||
*/
|
||||
|
||||
// Step 4.1: Calculate P/Q diagonal local discrimination
|
||||
for (int row = rcdBorder - 4; row < tileRows - rcdBorder + 4; row++) {
|
||||
for (int col = rcdBorder - 4 + (fc(cfarray, row, rcdBorder) & 1), indx = row * tileSize + col; col < tilecols - rcdBorder + 4; col += 2, indx += 2) {
|
||||
const float cfai = cfa[indx];
|
||||
// Step 4.0: Calculate the square of the P/Q diagonals color difference high pass filter
|
||||
for (int row = 3; row < tileRows - 3; ++row) {
|
||||
for (int col = 3, indx = row * tileSize + col, indx2 = indx / 2; col < tilecols - 3; col+=2, indx+=2, indx2++ ) {
|
||||
P_CDiff_Hpf[indx2] = SQR((cfa[indx - w3 - 3] - cfa[indx - w1 - 1] - cfa[indx + w1 + 1] + cfa[indx + w3 + 3]) - 3.f * (cfa[indx - w2 - 2] + cfa[indx + w2 + 2]) + 6.f * cfa[indx]);
|
||||
Q_CDiff_Hpf[indx2] = SQR((cfa[indx - w3 + 3] - cfa[indx - w1 + 1] - cfa[indx + w1 - 1] + cfa[indx + w3 - 3]) - 3.f * (cfa[indx - w2 + 2] + cfa[indx + w2 - 2]) + 6.f * cfa[indx]);
|
||||
}
|
||||
}
|
||||
|
||||
float P_Stat = max(epssq, - 18.f * cfai * (cfa[indx - w1 - 1] + cfa[indx + w1 + 1] + 2.f * (cfa[indx - w2 - 2] + cfa[indx + w2 + 2]) - cfa[indx - w3 - 3] - cfa[indx + w3 + 3]) - 2.f * cfai * (cfa[indx - w4 - 4] + cfa[indx + w4 + 4] - 19.f * cfai) - cfa[indx - w1 - 1] * (70.f * cfa[indx + w1 + 1] - 12.f * cfa[indx - w2 - 2] + 24.f * cfa[indx + w2 + 2] - 38.f * cfa[indx - w3 - 3] + 16.f * cfa[indx + w3 + 3] + 12.f * cfa[indx - w4 - 4] - 6.f * cfa[indx + w4 + 4] + 46.f * cfa[indx - w1 - 1]) + cfa[indx + w1 + 1] * (24.f * cfa[indx - w2 - 2] - 12.f * cfa[indx + w2 + 2] + 16.f * cfa[indx - w3 - 3] - 38.f * cfa[indx + w3 + 3] - 6.f * cfa[indx - w4 - 4] + 12.f * cfa[indx + w4 + 4] + 46.f * cfa[indx + w1 + 1]) + cfa[indx - w2 - 2] * (14.f * cfa[indx + w2 + 2] - 12.f * cfa[indx + w3 + 3] - 2.f * (cfa[indx - w4 - 4] - cfa[indx + w4 + 4]) + 11.f * cfa[indx - w2 - 2]) - cfa[indx + w2 + 2] * (12.f * cfa[indx - w3 - 3] + 2.f * (cfa[indx - w4 - 4] - cfa[indx + w4 + 4]) + 11.f * cfa[indx + w2 + 2]) + cfa[indx - w3 - 3] * (2.f * cfa[indx + w3 + 3] - 6.f * cfa[indx - w4 - 4] + 10.f * cfa[indx - w3 - 3]) - cfa[indx + w3 + 3] * (6.f * cfa[indx + w4 + 4] + 10.f * cfa[indx + w3 + 3]) + cfa[indx - w4 - 4] * cfa[indx - w4 - 4] + cfa[indx + w4 + 4] * cfa[indx + w4 + 4]);
|
||||
float Q_Stat = max(epssq, - 18.f * cfai * (cfa[indx + w1 - 1] + cfa[indx - w1 + 1] + 2.f * (cfa[indx + w2 - 2] + cfa[indx - w2 + 2]) - cfa[indx + w3 - 3] - cfa[indx - w3 + 3]) - 2.f * cfai * (cfa[indx + w4 - 4] + cfa[indx - w4 + 4] - 19.f * cfai) - cfa[indx + w1 - 1] * (70.f * cfa[indx - w1 + 1] - 12.f * cfa[indx + w2 - 2] + 24.f * cfa[indx - w2 + 2] - 38.f * cfa[indx + w3 - 3] + 16.f * cfa[indx - w3 + 3] + 12.f * cfa[indx + w4 - 4] - 6.f * cfa[indx - w4 + 4] + 46.f * cfa[indx + w1 - 1]) + cfa[indx - w1 + 1] * (24.f * cfa[indx + w2 - 2] - 12.f * cfa[indx - w2 + 2] + 16.f * cfa[indx + w3 - 3] - 38.f * cfa[indx - w3 + 3] - 6.f * cfa[indx + w4 - 4] + 12.f * cfa[indx - w4 + 4] + 46.f * cfa[indx - w1 + 1]) + cfa[indx + w2 - 2] * (14.f * cfa[indx - w2 + 2] - 12.f * cfa[indx - w3 + 3] - 2.f * (cfa[indx + w4 - 4] - cfa[indx - w4 + 4]) + 11.f * cfa[indx + w2 - 2]) - cfa[indx - w2 + 2] * (12.f * cfa[indx + w3 - 3] + 2.f * (cfa[indx + w4 - 4] - cfa[indx - w4 + 4]) + 11.f * cfa[indx - w2 + 2]) + cfa[indx + w3 - 3] * (2.f * cfa[indx - w3 + 3] - 6.f * cfa[indx + w4 - 4] + 10.f * cfa[indx + w3 - 3]) - cfa[indx - w3 + 3] * (6.f * cfa[indx - w4 + 4] + 10.f * cfa[indx - w3 + 3]) + cfa[indx + w4 - 4] * cfa[indx + w4 - 4] + cfa[indx - w4 + 4] * cfa[indx - w4 + 4]);
|
||||
|
||||
PQ_Dir[indx] = P_Stat / (P_Stat + Q_Stat);
|
||||
// Step 4.1: Obtain the P/Q diagonals directional discrimination strength
|
||||
for (int row = 4; row < tileRows - 4; ++row) {
|
||||
for (int col = 4 + (fc(cfarray, row, 0) & 1), indx = row * tileSize + col, indx2 = indx / 2, indx3 = (indx - w1 - 1) / 2, indx4 = (indx + w1 - 1) / 2; col < tilecols - 4; col += 2, indx += 2, indx2++, indx3++, indx4++ ) {
|
||||
float P_Stat = std::max(epssq, P_CDiff_Hpf[indx3] + P_CDiff_Hpf[indx2] + P_CDiff_Hpf[indx4 + 1]);
|
||||
float Q_Stat = std::max(epssq, Q_CDiff_Hpf[indx3 + 1] + Q_CDiff_Hpf[indx2] + Q_CDiff_Hpf[indx4]);
|
||||
PQ_Dir[indx2] = P_Stat / (P_Stat + Q_Stat);
|
||||
}
|
||||
}
|
||||
|
||||
// Step 4.2: Populate the red and blue channels at blue and red CFA positions
|
||||
for (int row = rcdBorder - 3; row < tileRows - rcdBorder + 3; row++) {
|
||||
for (int col = rcdBorder - 3 + (fc(cfarray, row, rcdBorder - 1) & 1), indx = row * tileSize + col, c = 2 - fc(cfarray, row, col); col < tilecols - rcdBorder + 3; col += 2, indx += 2) {
|
||||
for (int row = 4; row < tileRows - 4; ++row) {
|
||||
for (int col = 4 + (fc(cfarray, row, 0) & 1), indx = row * tileSize + col, c = 2 - fc(cfarray, row, col), pqindx = indx / 2, pqindx2 = (indx - w1 - 1) / 2, pqindx3 = (indx + w1 - 1) / 2; col < tilecols - 4; col += 2, indx += 2, ++pqindx, ++pqindx2, ++pqindx3) {
|
||||
|
||||
// Refined P/Q diagonal local discrimination
|
||||
float PQ_Central_Value = PQ_Dir[indx];
|
||||
float PQ_Neighbourhood_Value = 0.25f * (PQ_Dir[indx - w1 - 1] + PQ_Dir[indx - w1 + 1] + PQ_Dir[indx + w1 - 1] + PQ_Dir[indx + w1 + 1]);
|
||||
float PQ_Central_Value = PQ_Dir[pqindx];
|
||||
float PQ_Neighbourhood_Value = 0.25f * (PQ_Dir[pqindx2] + PQ_Dir[pqindx2 + 1] + PQ_Dir[pqindx3] + PQ_Dir[pqindx3 + 1]);
|
||||
|
||||
float PQ_Disc = (std::fabs(0.5f - PQ_Central_Value) < std::fabs(0.5f - PQ_Neighbourhood_Value)) ? PQ_Neighbourhood_Value : PQ_Central_Value;
|
||||
|
||||
@ -271,16 +252,16 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure)
|
||||
float Q_Est = (NE_Grad * SW_Est + SW_Grad * NE_Est) / (NE_Grad + SW_Grad);
|
||||
|
||||
// R@B and B@R interpolation
|
||||
rgb[c][indx] = rgb[1][indx] + (1.f - PQ_Disc) * P_Est + PQ_Disc * Q_Est;
|
||||
rgb[c][indx] = rgb[1][indx] + intp(PQ_Disc, Q_Est, P_Est);
|
||||
}
|
||||
}
|
||||
|
||||
// Step 4.3: Populate the red and blue channels at green CFA positions
|
||||
for (int row = rcdBorder; row < tileRows - rcdBorder; row++) {
|
||||
for (int col = rcdBorder + (fc(cfarray, row, rcdBorder - 1) & 1), indx = row * tileSize + col; col < tilecols - rcdBorder; col += 2, indx += 2) {
|
||||
for (int row = 4; row < tileRows - 4; ++row) {
|
||||
for (int col = 4 + (fc(cfarray, row, 1) & 1), indx = row * tileSize + col; col < tilecols - 4; col += 2, indx += 2) {
|
||||
|
||||
// Refined vertical and horizontal local discrimination
|
||||
float VH_Central_Value = VH_Dir[indx];
|
||||
float VH_Central_Value = VH_Dir[indx];
|
||||
float VH_Neighbourhood_Value = 0.25f * ((VH_Dir[indx - w1 - 1] + VH_Dir[indx - w1 + 1]) + (VH_Dir[indx + w1 - 1] + VH_Dir[indx + w1 + 1]));
|
||||
|
||||
float VH_Disc = (std::fabs(0.5f - VH_Central_Value) < std::fabs(0.5f - VH_Neighbourhood_Value)) ? VH_Neighbourhood_Value : VH_Central_Value;
|
||||
@ -314,17 +295,22 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure)
|
||||
float H_Est = (E_Grad * W_Est + W_Grad * E_Est) / (E_Grad + W_Grad);
|
||||
|
||||
// R@G and B@G interpolation
|
||||
rgb[c][indx] = rgb1 + (1.f - VH_Disc) * V_Est + VH_Disc * H_Est;
|
||||
rgb[c][indx] = rgb1 + intp(VH_Disc, H_Est, V_Est);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int row = rowStart + rcdBorder; row < rowEnd - rcdBorder; ++row) {
|
||||
for (int col = colStart + rcdBorder; col < colEnd - rcdBorder; ++col) {
|
||||
// For the outermost tiles in all directions we can use a smaller border margin
|
||||
const int firstVertical = rowStart + ((tr == 0) ? rcdBorder : tileBorder);
|
||||
const int lastVertical = rowEnd - ((tr == numTh - 1) ? rcdBorder : tileBorder);
|
||||
const int firstHorizontal = colStart + ((tc == 0) ? rcdBorder : tileBorder);
|
||||
const int lastHorizontal = colEnd - ((tc == numTw - 1) ? rcdBorder : tileBorder);
|
||||
for (int row = firstVertical; row < lastVertical; ++row) {
|
||||
for (int col = firstHorizontal; col < lastHorizontal; ++col) {
|
||||
int idx = (row - rowStart) * tileSize + col - colStart ;
|
||||
red[row][col] = std::max(0.f, rgb[0][idx] * 65535.f);
|
||||
green[row][col] = std::max(0.f, rgb[1][idx] * 65535.f);
|
||||
blue[row][col] = std::max(0.f, rgb[2][idx] * 65535.f);
|
||||
red[row][col] = std::max(0.f, rgb[0][idx] * scale);
|
||||
green[row][col] = std::max(0.f, rgb[1][idx] * scale);
|
||||
blue[row][col] = std::max(0.f, rgb[2][idx] * scale);
|
||||
}
|
||||
}
|
||||
|
||||
@ -348,6 +334,8 @@ void RawImageSource::rcd_demosaic(size_t chunkSize, bool measure)
|
||||
free(rgb);
|
||||
free(VH_Dir);
|
||||
free(PQ_Dir);
|
||||
free(P_CDiff_Hpf);
|
||||
free(Q_CDiff_Hpf);
|
||||
}
|
||||
|
||||
border_interpolate(W, H, rcdBorder, rawData, red, green, blue);
|
||||
|
@ -35,23 +35,22 @@ inline float getBilinearValue(const array2D<float> &src, float x, float y)
|
||||
const int H = src.getHeight();
|
||||
|
||||
// Get integer and fractional parts of numbers
|
||||
int xi = x;
|
||||
int yi = y;
|
||||
float xf = x - xi;
|
||||
float yf = y - yi;
|
||||
int xi1 = std::min(xi + 1, W - 1);
|
||||
int yi1 = std::min(yi + 1, H - 1);
|
||||
const int xi = x;
|
||||
const int yi = y;
|
||||
const float xf = x - xi;
|
||||
const float yf = y - yi;
|
||||
const int xi1 = std::min(xi + 1, W - 1);
|
||||
const int yi1 = std::min(yi + 1, H - 1);
|
||||
|
||||
float bl = src[yi][xi];
|
||||
float br = src[yi][xi1];
|
||||
float tl = src[yi1][xi];
|
||||
float tr = src[yi1][xi1];
|
||||
const float bl = src[yi][xi];
|
||||
const float br = src[yi][xi1];
|
||||
const float tl = src[yi1][xi];
|
||||
const float tr = src[yi1][xi1];
|
||||
|
||||
// interpolate
|
||||
float b = xf * br + (1.f - xf) * bl;
|
||||
float t = xf * tr + (1.f - xf) * tl;
|
||||
float pxf = yf * t + (1.f - yf) * b;
|
||||
return pxf;
|
||||
const float b = intp(xf, br, bl);
|
||||
const float t = intp(xf, tr, tl);
|
||||
return intp(yf, t, b);
|
||||
}
|
||||
|
||||
|
||||
|
@ -479,4 +479,25 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H,
|
||||
}
|
||||
}
|
||||
|
||||
double accumulateProduct(const float* data1, const float* data2, size_t n, bool multiThread) {
|
||||
if (n == 0) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
// use two accumulators to reduce dependencies (improves speed) and increase accuracy
|
||||
double acc1 = 0.0;
|
||||
double acc2 = 0.0;
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for reduction(+:acc1,acc2) if(multiThread)
|
||||
#endif
|
||||
for (size_t i = 0; i < n - 1; i += 2) {
|
||||
acc1 += static_cast<double>(data1[i]) * static_cast<double>(data2[i]);
|
||||
acc2 += static_cast<double>(data1[i + 1]) * static_cast<double>(data2[i + 1]);
|
||||
}
|
||||
|
||||
if (n & 1) {
|
||||
acc1 += static_cast<double>(data1[n -1]) * static_cast<double>(data2[n -1]);
|
||||
}
|
||||
return acc1 + acc2;
|
||||
}
|
||||
}
|
||||
|
@ -29,4 +29,5 @@ void buildBlendMask(const float* const * luminance, float **blend, int W, int H,
|
||||
void buildGradientsMask(int W, int H, float **luminance, float **out,
|
||||
float amount, int nlevels, int detail_level,
|
||||
float alfa, float beta, bool multithread);
|
||||
double accumulateProduct(const float* data1, const float* data2, size_t n, bool multiThread = true);
|
||||
}
|
||||
|
@ -41,6 +41,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
template<typename T>
|
||||
class array2D;
|
||||
|
||||
template<typename T>
|
||||
class LUT;
|
||||
|
||||
@ -275,6 +278,8 @@ public:
|
||||
virtual void sizeChanged(int w, int h, int ow, int oh) = 0;
|
||||
};
|
||||
|
||||
class HistogramObservable;
|
||||
|
||||
/** This listener is used when the histogram of the final image has changed. */
|
||||
class HistogramListener
|
||||
{
|
||||
@ -300,8 +305,43 @@ public:
|
||||
const LUTu& histGreenRaw,
|
||||
const LUTu& histBlueRaw,
|
||||
const LUTu& histChroma,
|
||||
const LUTu& histLRETI
|
||||
const LUTu& histLRETI,
|
||||
int vectorscopeScale,
|
||||
const array2D<int>& vectorscopeHC,
|
||||
const array2D<int>& vectorscopeHS,
|
||||
int waveformScale,
|
||||
const array2D<int>& waveformRed,
|
||||
const array2D<int>& waveformGreen,
|
||||
const array2D<int>& waveformBlue,
|
||||
const array2D<int>& waveformLuma
|
||||
) = 0;
|
||||
/** Tells which observable is notifying the listener. */
|
||||
virtual void setObservable(HistogramObservable* observable) = 0;
|
||||
/** Returns if the listener wants the histogram to be updated. */
|
||||
virtual bool updateHistogram(void) const = 0;
|
||||
/** Returns if the listener wants the raw histogram to be updated. */
|
||||
virtual bool updateHistogramRaw(void) const = 0;
|
||||
/** Returns if the listener wants the H-C vectorscope to be updated. */
|
||||
virtual bool updateVectorscopeHC(void) const = 0;
|
||||
/** Returns if the listener wants the H-S vectorscope to be updated. */
|
||||
virtual bool updateVectorscopeHS(void) const = 0;
|
||||
/** Returns if the listener wants the waveform to be updated. */
|
||||
virtual bool updateWaveform(void) const = 0;
|
||||
};
|
||||
|
||||
class HistogramObservable
|
||||
{
|
||||
public:
|
||||
/** Tells the observable to update the histogram data. */
|
||||
virtual void requestUpdateHistogram() = 0;
|
||||
/** Tells the observable to update the raw histogram data. */
|
||||
virtual void requestUpdateHistogramRaw() = 0;
|
||||
/** Tells the observable to update the H-C vectorscope data. */
|
||||
virtual void requestUpdateVectorscopeHC() = 0;
|
||||
/** Tells the observable to update the H-S vectorscope data. */
|
||||
virtual void requestUpdateVectorscopeHS() = 0;
|
||||
/** Tells the observable to update the waveform data. */
|
||||
virtual void requestUpdateWaveform() = 0;
|
||||
};
|
||||
|
||||
/** This listener is used when the auto exposure has been recomputed (e.g. when the clipping ratio changed). */
|
||||
@ -372,7 +412,7 @@ public:
|
||||
virtual ~LocallabListener() = default;
|
||||
virtual void refChanged(const std::vector<locallabRef> &ref, int selspot) = 0;
|
||||
virtual void minmaxChanged(const std::vector<locallabRetiMinMax> &minmax, int selspot) = 0;
|
||||
virtual void logencodChanged(const float blackev, const float whiteev, const float sourceg, const float targetg) = 0;
|
||||
virtual void logencodChanged(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg) = 0;
|
||||
};
|
||||
|
||||
class AutoColorTonListener
|
||||
@ -443,7 +483,7 @@ class FilmNegListener
|
||||
{
|
||||
public:
|
||||
virtual ~FilmNegListener() = default;
|
||||
virtual void filmBaseValuesChanged(std::array<float, 3> rgb) = 0;
|
||||
virtual void filmRefValuesChanged(const procparams::FilmNegativeParams::RGB &refInput, const procparams::FilmNegativeParams::RGB &refOutput) = 0;
|
||||
};
|
||||
|
||||
/** This class represents a detailed part of the image (looking through a kind of window).
|
||||
@ -522,7 +562,7 @@ public:
|
||||
|
||||
virtual void updateUnLock() = 0;
|
||||
|
||||
virtual void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int locall_Mask) = 0;
|
||||
virtual void setLocallabMaskVisibility(bool previewDeltaE, int locallColorMask, int locallColorMaskinv, int locallExpMask, int locallExpMaskinv, int locallSHMask, int locallSHMaskinv, int locallvibMask, int locallsoftMask, int locallblMask, int localltmMask, int locallretiMask, int locallsharMask, int localllcMask, int locallcbMask, int localllogMask, int locall_Mask) = 0;
|
||||
|
||||
/** Creates and returns a Crop instance that acts as a window on the image
|
||||
* @param editDataProvider pointer to the EditDataProvider that communicates with the EditSubscriber
|
||||
@ -532,9 +572,8 @@ public:
|
||||
virtual bool getAutoWB (double& temp, double& green, double equal, double tempBias) = 0;
|
||||
virtual void getCamWB (double& temp, double& green) = 0;
|
||||
virtual void getSpotWB (int x, int y, int rectSize, double& temp, double& green) = 0;
|
||||
virtual bool getFilmNegativeExponents(int xA, int yA, int xB, int yB, std::array<float, 3>& newExps) = 0;
|
||||
virtual bool getRawSpotValues (int x, int y, int spotSize, std::array<float, 3>& rawValues) = 0;
|
||||
|
||||
virtual bool getFilmNegativeSpot(int x, int y, int spotSize, procparams::FilmNegativeParams::RGB &refInput, procparams::FilmNegativeParams::RGB &refOutput) = 0;
|
||||
|
||||
virtual void getAutoCrop (double ratio, int &x, int &y, int &w, int &h) = 0;
|
||||
|
||||
virtual void saveInputICCReference (const Glib::ustring& fname, bool apply_wb) = 0;
|
||||
|
@ -205,11 +205,6 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h,
|
||||
|
||||
ImageIO* img = imgSrc.getImageIO();
|
||||
|
||||
// agriggio -- hotfix for #3794, to be revised once a proper solution is implemented
|
||||
if (std::max(img->getWidth(), img->getHeight()) / std::min(img->getWidth(), img->getHeight()) >= 10) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Thumbnail* tpp = new Thumbnail ();
|
||||
|
||||
unsigned char* data;
|
||||
@ -235,15 +230,29 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h,
|
||||
h = img->getHeight();
|
||||
tpp->scale = 1.;
|
||||
} else {
|
||||
if (fixwh == 1) {
|
||||
if (fixwh < 0 && w > 0 && h > 0) {
|
||||
const int ww = h * img->getWidth() / img->getHeight();
|
||||
const int hh = w * img->getHeight() / img->getWidth();
|
||||
if (ww <= w) {
|
||||
w = ww;
|
||||
tpp->scale = static_cast<double>(img->getHeight()) / h;
|
||||
} else {
|
||||
h = hh;
|
||||
tpp->scale = static_cast<double>(img->getWidth()) / w;
|
||||
}
|
||||
} else if (fixwh == 1) {
|
||||
w = h * img->getWidth() / img->getHeight();
|
||||
tpp->scale = (double)img->getHeight() / h;
|
||||
tpp->scale = static_cast<double>(img->getHeight()) / h;
|
||||
} else {
|
||||
h = w * img->getHeight() / img->getWidth();
|
||||
tpp->scale = (double)img->getWidth() / w;
|
||||
tpp->scale = static_cast<double>(img->getWidth()) / w;
|
||||
}
|
||||
}
|
||||
|
||||
// Precaution to prevent division by zero later on
|
||||
if (h < 1) h = 1;
|
||||
if (w < 1) w = 1;
|
||||
|
||||
// bilinear interpolation
|
||||
if (tpp->thumbImg) {
|
||||
delete tpp->thumbImg;
|
||||
@ -565,7 +574,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, eSensorType &sens
|
||||
tpp->defGain = max (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]) / min (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]);
|
||||
tpp->defGain *= std::pow(2, ri->getBaselineExposure());
|
||||
|
||||
tpp->scaleGain = scale_mul[0] / pre_mul[0]; // used to reconstruct scale_mul from filmnegativethumb.cc
|
||||
tpp->scaleGain = scale_mul[0] / pre_mul[0]; // can be used to reconstruct scale_mul later in processing
|
||||
|
||||
tpp->gammaCorrected = true;
|
||||
|
||||
@ -1141,11 +1150,18 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
|
||||
rwidth = int (size_t (thumbImg->getWidth()) * size_t (rheight) / size_t (thumbImg->getHeight()));
|
||||
}
|
||||
|
||||
if (rwidth < 1) rwidth = 1;
|
||||
if (rheight < 1) rheight = 1;
|
||||
|
||||
Imagefloat* baseImg = resizeTo<Imagefloat> (rwidth, rheight, interp, thumbImg);
|
||||
|
||||
if (isRaw && params.filmNegative.enabled) {
|
||||
processFilmNegative(params, baseImg, rwidth, rheight);
|
||||
// Film negative legacy mode, for backwards compatibility RT v5.8
|
||||
if (params.filmNegative.enabled) {
|
||||
if (params.filmNegative.backCompat == FilmNegativeParams::BackCompat::V1) {
|
||||
processFilmNegative(params, baseImg, rwidth, rheight);
|
||||
} else if (params.filmNegative.backCompat == FilmNegativeParams::BackCompat::V2) {
|
||||
processFilmNegativeV2(params, baseImg, rwidth, rheight);
|
||||
}
|
||||
}
|
||||
|
||||
if (params.coarse.rotate) {
|
||||
@ -1187,6 +1203,19 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
|
||||
|
||||
// if luma denoise has to be done for thumbnails, it should be right here
|
||||
|
||||
int fw = baseImg->getWidth();
|
||||
int fh = baseImg->getHeight();
|
||||
//ColorTemp::CAT02 (baseImg, ¶ms) ;//perhaps not good!
|
||||
|
||||
ImProcFunctions ipf (¶ms, forHistogramMatching); // enable multithreading when forHistogramMatching is true
|
||||
ipf.setScale (sqrt (double (fw * fw + fh * fh)) / sqrt (double (thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale);
|
||||
ipf.updateColorProfiles (ICCStore::getInstance()->getDefaultMonitorProfileName(), RenderingIntent(settings->monitorIntent), false, false);
|
||||
|
||||
// Process film negative BEFORE colorspace conversion, if needed
|
||||
if (params.filmNegative.enabled && params.filmNegative.backCompat == FilmNegativeParams::BackCompat::CURRENT && params.filmNegative.colorSpace == FilmNegativeParams::ColorSpace::INPUT) {
|
||||
ipf.filmNegativeProcess(baseImg, baseImg, params.filmNegative);
|
||||
}
|
||||
|
||||
// perform color space transformation
|
||||
|
||||
if (isRaw) {
|
||||
@ -1196,13 +1225,10 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
|
||||
StdImageSource::colorSpaceConversion (baseImg, params.icm, embProfile, thumbImg->getSampleFormat());
|
||||
}
|
||||
|
||||
int fw = baseImg->getWidth();
|
||||
int fh = baseImg->getHeight();
|
||||
//ColorTemp::CAT02 (baseImg, ¶ms) ;//perhaps not good!
|
||||
|
||||
ImProcFunctions ipf (¶ms, forHistogramMatching); // enable multithreading when forHistogramMatching is true
|
||||
ipf.setScale (sqrt (double (fw * fw + fh * fh)) / sqrt (double (thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale);
|
||||
ipf.updateColorProfiles (ICCStore::getInstance()->getDefaultMonitorProfileName(), RenderingIntent(settings->monitorIntent), false, false);
|
||||
// Process film negative AFTER colorspace conversion, if needed
|
||||
if (params.filmNegative.enabled && params.filmNegative.backCompat == FilmNegativeParams::BackCompat::CURRENT && params.filmNegative.colorSpace != FilmNegativeParams::ColorSpace::INPUT) {
|
||||
ipf.filmNegativeProcess(baseImg, baseImg, params.filmNegative);
|
||||
}
|
||||
|
||||
LUTu hist16 (65536);
|
||||
|
||||
@ -1376,11 +1402,22 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
|
||||
params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 16);
|
||||
|
||||
|
||||
ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy);
|
||||
if (params.colorToning.enabled && params.colorToning.method == "LabGrid") {
|
||||
ipf.colorToningLabGrid(labView, 0,labView->W , 0, labView->H, false);
|
||||
}
|
||||
|
||||
ipf.shadowsHighlights(labView, params.sh.enabled, params.sh.lab,params.sh.highlights ,params.sh.shadows, params.sh.radius, 16, params.sh.htonalwidth, params.sh.stonalwidth);
|
||||
|
||||
if (params.localContrast.enabled) {
|
||||
// Alberto's local contrast
|
||||
ipf.localContrast(labView, labView->L, params.localContrast, false, 16);
|
||||
}
|
||||
ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy);
|
||||
|
||||
ipf.vibrance (labView, params.vibrance, params.toneCurve.hrenabled, params.icm.workingProfile);
|
||||
ipf.labColorCorrectionRegions(labView);
|
||||
|
||||
|
||||
if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || !params.colorappearance.enabled) {
|
||||
ipf.EPDToneMap (labView, 5, 6);
|
||||
}
|
||||
|
@ -77,6 +77,7 @@ class Thumbnail
|
||||
double scaleGain;
|
||||
|
||||
void processFilmNegative(const procparams::ProcParams& params, const Imagefloat* baseImg, int rwidth, int rheight);
|
||||
void processFilmNegativeV2(const procparams::ProcParams& params, const Imagefloat* baseImg, int rwidth, int rheight);
|
||||
|
||||
public:
|
||||
|
||||
|
@ -219,16 +219,6 @@ private:
|
||||
imgsrc->setCurrentFrame(params.raw.bayersensor.imageNum);
|
||||
imgsrc->preprocess(params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled);
|
||||
|
||||
// After preprocess, run film negative processing if enabled
|
||||
if ((imgsrc->getSensorType() == ST_BAYER || (imgsrc->getSensorType() == ST_FUJI_XTRANS)) && params.filmNegative.enabled) {
|
||||
std::array<float, 3> filmBaseValues = {
|
||||
static_cast<float>(params.filmNegative.redBase),
|
||||
static_cast<float>(params.filmNegative.greenBase),
|
||||
static_cast<float>(params.filmNegative.blueBase)
|
||||
};
|
||||
imgsrc->filmNegativeProcess (params.filmNegative, filmBaseValues);
|
||||
}
|
||||
|
||||
if (pl) {
|
||||
pl->setProgress(0.20);
|
||||
}
|
||||
@ -873,7 +863,23 @@ private:
|
||||
//ImProcFunctions ipf (¶ms, true);
|
||||
ImProcFunctions &ipf = * (ipf_p.get());
|
||||
|
||||
imgsrc->convertColorSpace(baseImg, params.icm, currWB);
|
||||
if (params.filmNegative.enabled) {
|
||||
// Process film negative AFTER colorspace conversion if camera space is NOT selected
|
||||
if (params.filmNegative.colorSpace != FilmNegativeParams::ColorSpace::INPUT) {
|
||||
imgsrc->convertColorSpace(baseImg, params.icm, currWB);
|
||||
}
|
||||
|
||||
FilmNegativeParams copy = params.filmNegative;
|
||||
ipf.filmNegativeProcess(baseImg, baseImg, copy, params.raw, imgsrc, currWB);
|
||||
|
||||
// ... otherwise, process film negative BEFORE colorspace conversion
|
||||
if (params.filmNegative.colorSpace == FilmNegativeParams::ColorSpace::INPUT) {
|
||||
imgsrc->convertColorSpace(baseImg, params.icm, currWB);
|
||||
}
|
||||
|
||||
} else {
|
||||
imgsrc->convertColorSpace(baseImg, params.icm, currWB);
|
||||
}
|
||||
|
||||
// perform first analysis
|
||||
hist16(65536);
|
||||
@ -935,6 +941,281 @@ private:
|
||||
*/
|
||||
// RGB processing
|
||||
|
||||
labView = new LabImage(fw, fh);
|
||||
|
||||
if (params.locallab.enabled && params.locallab.spots.size() > 0) {
|
||||
ipf.rgb2lab(*baseImg, *labView, params.icm.workingProfile);
|
||||
|
||||
MyTime t1, t2;
|
||||
t1.set();
|
||||
|
||||
const std::unique_ptr<LabImage> reservView(new LabImage(*labView, true));
|
||||
const std::unique_ptr<LabImage> lastorigView(new LabImage(*labView, true));
|
||||
std::unique_ptr<LabImage> savenormtmView;
|
||||
std::unique_ptr<LabImage> savenormretiView;
|
||||
LocretigainCurve locRETgainCurve;
|
||||
LocretitransCurve locRETtransCurve;
|
||||
LocLHCurve loclhCurve;
|
||||
LocHHCurve lochhCurve;
|
||||
LocCHCurve locchCurve;
|
||||
LocCCmaskCurve locccmasCurve;
|
||||
LocLLmaskCurve locllmasCurve;
|
||||
LocHHmaskCurve lochhmasCurve;
|
||||
LocHHmaskCurve lochhhmasCurve;
|
||||
LocCCmaskCurve locccmasexpCurve;
|
||||
LocLLmaskCurve locllmasexpCurve;
|
||||
LocHHmaskCurve lochhmasexpCurve;
|
||||
LocCCmaskCurve locccmasSHCurve;
|
||||
LocLLmaskCurve locllmasSHCurve;
|
||||
LocHHmaskCurve lochhmasSHCurve;
|
||||
LocCCmaskCurve locccmasvibCurve;
|
||||
LocLLmaskCurve locllmasvibCurve;
|
||||
LocHHmaskCurve lochhmasvibCurve;
|
||||
LocCCmaskCurve locccmaslcCurve;
|
||||
LocLLmaskCurve locllmaslcCurve;
|
||||
LocHHmaskCurve lochhmaslcCurve;
|
||||
LocCCmaskCurve locccmascbCurve;
|
||||
LocLLmaskCurve locllmascbCurve;
|
||||
LocHHmaskCurve lochhmascbCurve;
|
||||
LocCCmaskCurve locccmasretiCurve;
|
||||
LocLLmaskCurve locllmasretiCurve;
|
||||
LocHHmaskCurve lochhmasretiCurve;
|
||||
LocCCmaskCurve locccmastmCurve;
|
||||
LocLLmaskCurve locllmastmCurve;
|
||||
LocHHmaskCurve lochhmastmCurve;
|
||||
LocCCmaskCurve locccmasblCurve;
|
||||
LocLLmaskCurve locllmasblCurve;
|
||||
LocHHmaskCurve lochhmasblCurve;
|
||||
LocCCmaskCurve locccmaslogCurve;
|
||||
LocLLmaskCurve locllmaslogCurve;
|
||||
LocHHmaskCurve lochhmaslogCurve;
|
||||
|
||||
LocCCmaskCurve locccmas_Curve;
|
||||
LocLLmaskCurve locllmas_Curve;
|
||||
LocHHmaskCurve lochhmas_Curve;
|
||||
LocHHmaskCurve lochhhmas_Curve;
|
||||
|
||||
LocwavCurve loclmasCurveblwav;
|
||||
LocwavCurve loclmasCurvecolwav;
|
||||
LocwavCurve loclmasCurve_wav;
|
||||
LocwavCurve locwavCurve;
|
||||
LocwavCurve loclevwavCurve;
|
||||
LocwavCurve locconwavCurve;
|
||||
LocwavCurve loccompwavCurve;
|
||||
LocwavCurve loccomprewavCurve;
|
||||
LocwavCurve locedgwavCurve;
|
||||
LocwavCurve locwavCurvehue;
|
||||
LocwavCurve locwavCurveden;
|
||||
LUTf lllocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lclocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf cllocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf cclocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf rgblocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf hltonecurveloc(65536, LUT_CLIP_OFF);
|
||||
LUTf shtonecurveloc(65536, LUT_CLIP_OFF);
|
||||
LUTf tonecurveloc(65536, LUT_CLIP_OFF);
|
||||
LUTf lightCurveloc(32770, LUT_CLIP_OFF);
|
||||
LUTf exlocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmasklocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskexplocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskSHlocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskviblocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmasktmlocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskretilocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskcblocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskbllocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmasklclocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskloglocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmasklocal_curve(65536, LUT_CLIP_OFF);
|
||||
|
||||
array2D<float> shbuffer;
|
||||
for (size_t sp = 0; sp < params.locallab.spots.size(); sp++) {
|
||||
if (params.locallab.spots.at(sp).inverssha) {
|
||||
shbuffer(fw, fh);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t sp = 0; sp < params.locallab.spots.size(); sp++) {
|
||||
|
||||
// Set local curves of current spot to LUT
|
||||
locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve);
|
||||
locRETtransCurve.Set(params.locallab.spots.at(sp).localTtranscurve);
|
||||
const bool LHutili = loclhCurve.Set(params.locallab.spots.at(sp).LHcurve);
|
||||
const bool HHutili = lochhCurve.Set(params.locallab.spots.at(sp).HHcurve);
|
||||
const bool CHutili = locchCurve.Set(params.locallab.spots.at(sp).CHcurve);
|
||||
const bool lcmasutili = locccmasCurve.Set(params.locallab.spots.at(sp).CCmaskcurve);
|
||||
const bool llmasutili = locllmasCurve.Set(params.locallab.spots.at(sp).LLmaskcurve);
|
||||
const bool lhmasutili = lochhmasCurve.Set(params.locallab.spots.at(sp).HHmaskcurve);
|
||||
const bool lhhmasutili = lochhhmasCurve.Set(params.locallab.spots.at(sp).HHhmaskcurve);
|
||||
const bool lcmasexputili = locccmasexpCurve.Set(params.locallab.spots.at(sp).CCmaskexpcurve);
|
||||
const bool llmasexputili = locllmasexpCurve.Set(params.locallab.spots.at(sp).LLmaskexpcurve);
|
||||
const bool lhmasexputili = lochhmasexpCurve.Set(params.locallab.spots.at(sp).HHmaskexpcurve);
|
||||
const bool lcmasSHutili = locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve);
|
||||
const bool llmasSHutili = locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve);
|
||||
const bool lhmasSHutili = lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve);
|
||||
const bool lcmasvibutili = locccmasvibCurve.Set(params.locallab.spots.at(sp).CCmaskvibcurve);
|
||||
const bool llmasvibutili = locllmasvibCurve.Set(params.locallab.spots.at(sp).LLmaskvibcurve);
|
||||
const bool lhmasvibutili = lochhmasvibCurve.Set(params.locallab.spots.at(sp).HHmaskvibcurve);
|
||||
const bool lcmascbutili = locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve);
|
||||
const bool llmascbutili = locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve);
|
||||
const bool lhmascbutili = lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve);
|
||||
const bool lcmasretiutili = locccmasretiCurve.Set(params.locallab.spots.at(sp).CCmaskreticurve);
|
||||
const bool llmasretiutili = locllmasretiCurve.Set(params.locallab.spots.at(sp).LLmaskreticurve);
|
||||
const bool lhmasretiutili = lochhmasretiCurve.Set(params.locallab.spots.at(sp).HHmaskreticurve);
|
||||
const bool lcmastmutili = locccmastmCurve.Set(params.locallab.spots.at(sp).CCmasktmcurve);
|
||||
const bool lhmaslcutili = lochhmaslcCurve.Set(params.locallab.spots.at(sp).HHmasklccurve);
|
||||
const bool llmastmutili = locllmastmCurve.Set(params.locallab.spots.at(sp).LLmasktmcurve);
|
||||
const bool lhmastmutili = lochhmastmCurve.Set(params.locallab.spots.at(sp).HHmasktmcurve);
|
||||
const bool lcmasblutili = locccmasblCurve.Set(params.locallab.spots.at(sp).CCmaskblcurve);
|
||||
const bool llmasblutili = locllmasblCurve.Set(params.locallab.spots.at(sp).LLmaskblcurve);
|
||||
const bool lhmasblutili = lochhmasblCurve.Set(params.locallab.spots.at(sp).HHmaskblcurve);
|
||||
const bool lcmaslogutili = locccmaslogCurve.Set(params.locallab.spots.at(sp).CCmaskcurveL);
|
||||
const bool llmaslogutili = locllmaslogCurve.Set(params.locallab.spots.at(sp).LLmaskcurveL);
|
||||
const bool lhmaslogutili = lochhmaslogCurve.Set(params.locallab.spots.at(sp).HHmaskcurveL);
|
||||
|
||||
const bool lcmas_utili = locccmas_Curve.Set(params.locallab.spots.at(sp).CCmask_curve);
|
||||
const bool llmas_utili = locllmas_Curve.Set(params.locallab.spots.at(sp).LLmask_curve);
|
||||
const bool lhmas_utili = lochhmas_Curve.Set(params.locallab.spots.at(sp).HHmask_curve);
|
||||
const bool lhhmas_utili = lochhhmas_Curve.Set(params.locallab.spots.at(sp).HHhmask_curve);
|
||||
const bool lmasutiliblwav = loclmasCurveblwav.Set(params.locallab.spots.at(sp).LLmaskblcurvewav);
|
||||
const bool lmasutilicolwav = loclmasCurvecolwav.Set(params.locallab.spots.at(sp).LLmaskcolcurvewav);
|
||||
const bool lcmaslcutili = locccmaslcCurve.Set(params.locallab.spots.at(sp).CCmasklccurve);
|
||||
const bool llmaslcutili = locllmaslcCurve.Set(params.locallab.spots.at(sp).LLmasklccurve);
|
||||
const bool lmasutili_wav = loclmasCurve_wav.Set(params.locallab.spots.at(sp).LLmask_curvewav);
|
||||
const bool locwavutili = locwavCurve.Set(params.locallab.spots.at(sp).locwavcurve);
|
||||
const bool locwavhueutili = locwavCurvehue.Set(params.locallab.spots.at(sp).locwavcurvehue);
|
||||
const bool locwavdenutili = locwavCurveden.Set(params.locallab.spots.at(sp).locwavcurveden);
|
||||
const bool loclevwavutili = loclevwavCurve.Set(params.locallab.spots.at(sp).loclevwavcurve);
|
||||
const bool locconwavutili = locconwavCurve.Set(params.locallab.spots.at(sp).locconwavcurve);
|
||||
const bool loccompwavutili = loccompwavCurve.Set(params.locallab.spots.at(sp).loccompwavcurve);
|
||||
const bool loccomprewavutili = loccomprewavCurve.Set(params.locallab.spots.at(sp).loccomprewavcurve);
|
||||
const bool locedgwavutili = locedgwavCurve.Set(params.locallab.spots.at(sp).locedgwavcurve);
|
||||
const bool locallutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).llcurve, lllocalcurve, 1);
|
||||
const bool localclutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).clcurve, cllocalcurve, 1);
|
||||
const bool locallcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).lccurve, lclocalcurve, 1);
|
||||
const bool localcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).cccurve, cclocalcurve, 1);
|
||||
const bool localrgbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).rgbcurve, rgblocalcurve, 1);
|
||||
const bool localexutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).excurve, exlocalcurve, 1);
|
||||
const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve, 1);
|
||||
const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve, 1);
|
||||
const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve, 1);
|
||||
const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve, 1);
|
||||
const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve, 1);
|
||||
const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, 1);
|
||||
const bool localmaskcbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcbcurve, lmaskcblocalcurve, 1);
|
||||
const bool localmaskblutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskblcurve, lmaskbllocalcurve, 1);
|
||||
const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve, 1);
|
||||
const bool localmasklogutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskcurveL, lmaskloglocalcurve, 1);
|
||||
const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmask_curve, lmasklocal_curve, 1);
|
||||
|
||||
//provisory
|
||||
double ecomp = params.locallab.spots.at(sp).expcomp;
|
||||
double lblack = params.locallab.spots.at(sp).black;
|
||||
double lhlcompr = params.locallab.spots.at(sp).hlcompr;
|
||||
double lhlcomprthresh = params.locallab.spots.at(sp).hlcomprthresh;
|
||||
double shcompr = params.locallab.spots.at(sp).shcompr;
|
||||
double br = params.locallab.spots.at(sp).lightness;
|
||||
double cont = params.locallab.spots.at(sp).contrast;
|
||||
if (lblack < 0. && params.locallab.spots.at(sp).expMethod == "pde" ) {
|
||||
lblack *= 1.5;
|
||||
}
|
||||
|
||||
// Reference parameters computation
|
||||
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
|
||||
int lastsav;
|
||||
float avge;
|
||||
float meantme;
|
||||
float stdtme;
|
||||
float meanretie;
|
||||
float stdretie;
|
||||
|
||||
if (params.locallab.spots.at(sp).spotMethod == "exc") {
|
||||
ipf.calc_ref(sp, reservView.get(), reservView.get(), 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili);
|
||||
} else {
|
||||
ipf.calc_ref(sp, labView, labView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili);
|
||||
}
|
||||
CurveFactory::complexCurvelocal(ecomp, lblack / 65535., lhlcompr, lhlcomprthresh, shcompr, br, cont, lumare,
|
||||
hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avge,
|
||||
1);
|
||||
float minCD;
|
||||
float maxCD;
|
||||
float mini;
|
||||
float maxi;
|
||||
float Tmean;
|
||||
float Tsigma;
|
||||
float Tmin;
|
||||
float Tmax;
|
||||
|
||||
// No Locallab mask is shown in exported picture
|
||||
ipf.Lab_Local(2, sp, shbuffer, labView, labView, reservView.get(), savenormtmView.get(), savenormretiView.get(), lastorigView.get(), 0, 0, fw, fh, 1, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve, locallutili,
|
||||
cllocalcurve, localclutili,
|
||||
lclocalcurve, locallcutili,
|
||||
loclhCurve, lochhCurve, locchCurve,
|
||||
lmasklocalcurve, localmaskutili,
|
||||
lmaskexplocalcurve, localmaskexputili,
|
||||
lmaskSHlocalcurve, localmaskSHutili,
|
||||
lmaskviblocalcurve, localmaskvibutili,
|
||||
lmasktmlocalcurve, localmasktmutili,
|
||||
lmaskretilocalcurve, localmaskretiutili,
|
||||
lmaskcblocalcurve, localmaskcbutili,
|
||||
lmaskbllocalcurve, localmaskblutili,
|
||||
lmasklclocalcurve, localmasklcutili,
|
||||
lmaskloglocalcurve, localmasklogutili,
|
||||
lmasklocal_curve, localmask_utili,
|
||||
|
||||
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
|
||||
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
|
||||
locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili,
|
||||
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
|
||||
locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili,
|
||||
locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili,
|
||||
locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili,
|
||||
locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili,
|
||||
locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili,
|
||||
|
||||
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
|
||||
lochhhmas_Curve, lhhmas_utili,
|
||||
loclmasCurveblwav,lmasutiliblwav,
|
||||
loclmasCurvecolwav,lmasutilicolwav,
|
||||
locwavCurve, locwavutili,
|
||||
loclevwavCurve, loclevwavutili,
|
||||
locconwavCurve, locconwavutili,
|
||||
loccompwavCurve, loccompwavutili,
|
||||
loccomprewavCurve, loccomprewavutili,
|
||||
locwavCurvehue, locwavhueutili,
|
||||
locwavCurveden, locwavdenutili,
|
||||
locedgwavCurve, locedgwavutili,
|
||||
loclmasCurve_wav,lmasutili_wav,
|
||||
LHutili, HHutili, CHutili, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc,
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantme, stdtme, meanretie, stdretie
|
||||
);
|
||||
|
||||
if (sp + 1u < params.locallab.spots.size()) {
|
||||
// do not copy for last spot as it is not needed anymore
|
||||
lastorigView->CopyFrom(labView);
|
||||
}
|
||||
|
||||
if (params.locallab.spots.at(sp).spotMethod == "exc") {
|
||||
ipf.calc_ref(sp, reservView.get(), reservView.get(), 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili);
|
||||
} else {
|
||||
ipf.calc_ref(sp, labView, labView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili);
|
||||
}
|
||||
}
|
||||
|
||||
t2.set();
|
||||
ipf.lab2rgb(*labView, *baseImg, params.icm.workingProfile);
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("Total local:- %d usec\n", t2.etime(t1));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
curve1(65536);
|
||||
curve2(65536);
|
||||
curve(65536, 0);
|
||||
@ -970,7 +1251,7 @@ private:
|
||||
CurveFactory::diagonalCurve2Lut(params.colorToning.cl2curve, cl2Toningcurve, 1);
|
||||
}
|
||||
|
||||
labView = new LabImage(fw, fh);
|
||||
// labView = new LabImage(fw, fh);
|
||||
|
||||
if (params.blackwhite.enabled) {
|
||||
CurveFactory::curveBW(params.blackwhite.beforeCurve, params.blackwhite.afterCurve, hist16, dummy, customToneCurvebw1, customToneCurvebw2, 1);
|
||||
@ -1001,7 +1282,7 @@ private:
|
||||
}
|
||||
|
||||
autor = -9000.f; // This will ask to compute the "auto" values for the B&W tool (have to be inferior to -5000)
|
||||
DCPProfile::ApplyState as;
|
||||
DCPProfileApplyState as;
|
||||
DCPProfile *dcpProf = imgsrc->getDCP(params.icm, as);
|
||||
|
||||
LUTu histToneCurve;
|
||||
@ -1077,246 +1358,15 @@ private:
|
||||
params.labCurve.lccurve, curve1, curve2, satcurve, lhskcurve, 1);
|
||||
|
||||
|
||||
if (params.locallab.enabled && params.locallab.spots.size() > 0) {
|
||||
MyTime t1, t2;
|
||||
t1.set();
|
||||
const std::unique_ptr<LabImage> reservView(new LabImage(*labView, true));
|
||||
const std::unique_ptr<LabImage> lastorigView(new LabImage(*labView, true));
|
||||
LocretigainCurve locRETgainCurve;
|
||||
LocretitransCurve locRETtransCurve;
|
||||
LocLHCurve loclhCurve;
|
||||
LocHHCurve lochhCurve;
|
||||
LocCHCurve locchCurve;
|
||||
LocCCmaskCurve locccmasCurve;
|
||||
LocLLmaskCurve locllmasCurve;
|
||||
LocHHmaskCurve lochhmasCurve;
|
||||
LocHHmaskCurve lochhhmasCurve;
|
||||
LocCCmaskCurve locccmasexpCurve;
|
||||
LocLLmaskCurve locllmasexpCurve;
|
||||
LocHHmaskCurve lochhmasexpCurve;
|
||||
LocCCmaskCurve locccmasSHCurve;
|
||||
LocLLmaskCurve locllmasSHCurve;
|
||||
LocHHmaskCurve lochhmasSHCurve;
|
||||
LocCCmaskCurve locccmasvibCurve;
|
||||
LocLLmaskCurve locllmasvibCurve;
|
||||
LocHHmaskCurve lochhmasvibCurve;
|
||||
LocCCmaskCurve locccmaslcCurve;
|
||||
LocLLmaskCurve locllmaslcCurve;
|
||||
LocHHmaskCurve lochhmaslcCurve;
|
||||
LocCCmaskCurve locccmascbCurve;
|
||||
LocLLmaskCurve locllmascbCurve;
|
||||
LocHHmaskCurve lochhmascbCurve;
|
||||
LocCCmaskCurve locccmasretiCurve;
|
||||
LocLLmaskCurve locllmasretiCurve;
|
||||
LocHHmaskCurve lochhmasretiCurve;
|
||||
LocCCmaskCurve locccmastmCurve;
|
||||
LocLLmaskCurve locllmastmCurve;
|
||||
LocHHmaskCurve lochhmastmCurve;
|
||||
LocCCmaskCurve locccmasblCurve;
|
||||
LocLLmaskCurve locllmasblCurve;
|
||||
LocHHmaskCurve lochhmasblCurve;
|
||||
LocCCmaskCurve locccmas_Curve;
|
||||
LocLLmaskCurve locllmas_Curve;
|
||||
LocHHmaskCurve lochhmas_Curve;
|
||||
LocHHmaskCurve lochhhmas_Curve;
|
||||
|
||||
LocwavCurve loclmasCurveblwav;
|
||||
LocwavCurve loclmasCurvecolwav;
|
||||
LocwavCurve loclmasCurve_wav;
|
||||
LocwavCurve locwavCurve;
|
||||
LocwavCurve loclevwavCurve;
|
||||
LocwavCurve locconwavCurve;
|
||||
LocwavCurve loccompwavCurve;
|
||||
LocwavCurve loccomprewavCurve;
|
||||
LocwavCurve locedgwavCurve;
|
||||
LocwavCurve locwavCurveden;
|
||||
LUTf lllocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lclocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf cllocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf cclocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf rgblocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf hltonecurveloc(65536, LUT_CLIP_OFF);
|
||||
LUTf shtonecurveloc(65536, LUT_CLIP_OFF);
|
||||
LUTf tonecurveloc(65536, LUT_CLIP_OFF);
|
||||
LUTf lightCurveloc(32770, LUT_CLIP_OFF);
|
||||
LUTf exlocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmasklocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskexplocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskSHlocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskviblocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmasktmlocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskretilocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskcblocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmaskbllocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmasklclocalcurve(65536, LUT_CLIP_OFF);
|
||||
LUTf lmasklocal_curve(65536, LUT_CLIP_OFF);
|
||||
if (params.colorToning.enabled && params.colorToning.method == "LabGrid") {
|
||||
ipf.colorToningLabGrid(labView, 0,labView->W , 0, labView->H, false);
|
||||
}
|
||||
|
||||
array2D<float> shbuffer;
|
||||
for (size_t sp = 0; sp < params.locallab.spots.size(); sp++) {
|
||||
if (params.locallab.spots.at(sp).inverssha) {
|
||||
shbuffer(fw, fh);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t sp = 0; sp < params.locallab.spots.size(); sp++) {
|
||||
// Set local curves of current spot to LUT
|
||||
locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve);
|
||||
locRETtransCurve.Set(params.locallab.spots.at(sp).localTtranscurve);
|
||||
const bool LHutili = loclhCurve.Set(params.locallab.spots.at(sp).LHcurve);
|
||||
const bool HHutili = lochhCurve.Set(params.locallab.spots.at(sp).HHcurve);
|
||||
const bool CHutili = locchCurve.Set(params.locallab.spots.at(sp).CHcurve);
|
||||
const bool lcmasutili = locccmasCurve.Set(params.locallab.spots.at(sp).CCmaskcurve);
|
||||
const bool llmasutili = locllmasCurve.Set(params.locallab.spots.at(sp).LLmaskcurve);
|
||||
const bool lhmasutili = lochhmasCurve.Set(params.locallab.spots.at(sp).HHmaskcurve);
|
||||
const bool lhhmasutili = lochhhmasCurve.Set(params.locallab.spots.at(sp).HHhmaskcurve);
|
||||
const bool lcmasexputili = locccmasexpCurve.Set(params.locallab.spots.at(sp).CCmaskexpcurve);
|
||||
const bool llmasexputili = locllmasexpCurve.Set(params.locallab.spots.at(sp).LLmaskexpcurve);
|
||||
const bool lhmasexputili = lochhmasexpCurve.Set(params.locallab.spots.at(sp).HHmaskexpcurve);
|
||||
const bool lcmasSHutili = locccmasSHCurve.Set(params.locallab.spots.at(sp).CCmaskSHcurve);
|
||||
const bool llmasSHutili = locllmasSHCurve.Set(params.locallab.spots.at(sp).LLmaskSHcurve);
|
||||
const bool lhmasSHutili = lochhmasSHCurve.Set(params.locallab.spots.at(sp).HHmaskSHcurve);
|
||||
const bool lcmasvibutili = locccmasvibCurve.Set(params.locallab.spots.at(sp).CCmaskvibcurve);
|
||||
const bool llmasvibutili = locllmasvibCurve.Set(params.locallab.spots.at(sp).LLmaskvibcurve);
|
||||
const bool lhmasvibutili = lochhmasvibCurve.Set(params.locallab.spots.at(sp).HHmaskvibcurve);
|
||||
const bool lcmascbutili = locccmascbCurve.Set(params.locallab.spots.at(sp).CCmaskcbcurve);
|
||||
const bool llmascbutili = locllmascbCurve.Set(params.locallab.spots.at(sp).LLmaskcbcurve);
|
||||
const bool lhmascbutili = lochhmascbCurve.Set(params.locallab.spots.at(sp).HHmaskcbcurve);
|
||||
const bool lcmasretiutili = locccmasretiCurve.Set(params.locallab.spots.at(sp).CCmaskreticurve);
|
||||
const bool llmasretiutili = locllmasretiCurve.Set(params.locallab.spots.at(sp).LLmaskreticurve);
|
||||
const bool lhmasretiutili = lochhmasretiCurve.Set(params.locallab.spots.at(sp).HHmaskreticurve);
|
||||
const bool lcmastmutili = locccmastmCurve.Set(params.locallab.spots.at(sp).CCmasktmcurve);
|
||||
const bool lhmaslcutili = lochhmaslcCurve.Set(params.locallab.spots.at(sp).HHmasklccurve);
|
||||
const bool llmastmutili = locllmastmCurve.Set(params.locallab.spots.at(sp).LLmasktmcurve);
|
||||
const bool lhmastmutili = lochhmastmCurve.Set(params.locallab.spots.at(sp).HHmasktmcurve);
|
||||
const bool lcmasblutili = locccmasblCurve.Set(params.locallab.spots.at(sp).CCmaskblcurve);
|
||||
const bool llmasblutili = locllmasblCurve.Set(params.locallab.spots.at(sp).LLmaskblcurve);
|
||||
const bool lhmasblutili = lochhmasblCurve.Set(params.locallab.spots.at(sp).HHmaskblcurve);
|
||||
const bool lcmas_utili = locccmas_Curve.Set(params.locallab.spots.at(sp).CCmask_curve);
|
||||
const bool llmas_utili = locllmas_Curve.Set(params.locallab.spots.at(sp).LLmask_curve);
|
||||
const bool lhmas_utili = lochhmas_Curve.Set(params.locallab.spots.at(sp).HHmask_curve);
|
||||
const bool lhhmas_utili = lochhhmas_Curve.Set(params.locallab.spots.at(sp).HHhmask_curve);
|
||||
const bool lmasutiliblwav = loclmasCurveblwav.Set(params.locallab.spots.at(sp).LLmaskblcurvewav);
|
||||
const bool lmasutilicolwav = loclmasCurvecolwav.Set(params.locallab.spots.at(sp).LLmaskcolcurvewav);
|
||||
const bool lcmaslcutili = locccmaslcCurve.Set(params.locallab.spots.at(sp).CCmasklccurve);
|
||||
const bool llmaslcutili = locllmaslcCurve.Set(params.locallab.spots.at(sp).LLmasklccurve);
|
||||
const bool lmasutili_wav = loclmasCurve_wav.Set(params.locallab.spots.at(sp).LLmask_curvewav);
|
||||
const bool locwavutili = locwavCurve.Set(params.locallab.spots.at(sp).locwavcurve);
|
||||
const bool locwavdenutili = locwavCurveden.Set(params.locallab.spots.at(sp).locwavcurveden);
|
||||
const bool loclevwavutili = loclevwavCurve.Set(params.locallab.spots.at(sp).loclevwavcurve);
|
||||
const bool locconwavutili = locconwavCurve.Set(params.locallab.spots.at(sp).locconwavcurve);
|
||||
const bool loccompwavutili = loccompwavCurve.Set(params.locallab.spots.at(sp).loccompwavcurve);
|
||||
const bool loccomprewavutili = loccomprewavCurve.Set(params.locallab.spots.at(sp).loccomprewavcurve);
|
||||
const bool locedgwavutili = locedgwavCurve.Set(params.locallab.spots.at(sp).locedgwavcurve);
|
||||
const bool locallutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).llcurve, lllocalcurve, 1);
|
||||
const bool localclutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).clcurve, cllocalcurve, 1);
|
||||
const bool locallcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).lccurve, lclocalcurve, 1);
|
||||
const bool localcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).cccurve, cclocalcurve, 1);
|
||||
const bool localrgbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).rgbcurve, rgblocalcurve, 1);
|
||||
const bool localexutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).excurve, exlocalcurve, 1);
|
||||
const bool localmaskutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcurve, lmasklocalcurve, 1);
|
||||
const bool localmaskexputili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskexpcurve, lmaskexplocalcurve, 1);
|
||||
const bool localmaskSHutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).LmaskSHcurve, lmaskSHlocalcurve, 1);
|
||||
const bool localmaskvibutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskvibcurve, lmaskviblocalcurve, 1);
|
||||
const bool localmasktmutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasktmcurve, lmasktmlocalcurve, 1);
|
||||
const bool localmaskretiutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskreticurve, lmaskretilocalcurve, 1);
|
||||
const bool localmaskcbutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskcbcurve, lmaskcblocalcurve, 1);
|
||||
const bool localmaskblutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmaskblcurve, lmaskbllocalcurve, 1);
|
||||
const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve, 1);
|
||||
const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params.locallab.spots.at(sp).Lmask_curve, lmasklocal_curve, 1);
|
||||
|
||||
//provisory
|
||||
double ecomp = params.locallab.spots.at(sp).expcomp;
|
||||
double lblack = params.locallab.spots.at(sp).black;
|
||||
double lhlcompr = params.locallab.spots.at(sp).hlcompr;
|
||||
double lhlcomprthresh = params.locallab.spots.at(sp).hlcomprthresh;
|
||||
double shcompr = params.locallab.spots.at(sp).shcompr;
|
||||
double br = params.locallab.spots.at(sp).lightness;
|
||||
double cont = params.locallab.spots.at(sp).contrast;
|
||||
if (lblack < 0. && params.locallab.spots.at(sp).expMethod == "pde" ) {
|
||||
lblack *= 1.5;
|
||||
}
|
||||
|
||||
// Reference parameters computation
|
||||
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
|
||||
int lastsav;
|
||||
float avge;
|
||||
if (params.locallab.spots.at(sp).spotMethod == "exc") {
|
||||
ipf.calc_ref(sp, reservView.get(), reservView.get(), 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili);
|
||||
} else {
|
||||
ipf.calc_ref(sp, labView, labView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili);
|
||||
}
|
||||
CurveFactory::complexCurvelocal(ecomp, lblack / 65535., lhlcompr, lhlcomprthresh, shcompr, br, cont, lumare,
|
||||
hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avge,
|
||||
1);
|
||||
float minCD;
|
||||
float maxCD;
|
||||
float mini;
|
||||
float maxi;
|
||||
float Tmean;
|
||||
float Tsigma;
|
||||
float Tmin;
|
||||
float Tmax;
|
||||
|
||||
// No Locallab mask is shown in exported picture
|
||||
ipf.Lab_Local(2, sp, shbuffer, labView, labView, reservView.get(), lastorigView.get(), 0, 0, fw, fh, 1, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve, locallutili,
|
||||
cllocalcurve, localclutili,
|
||||
lclocalcurve, locallcutili,
|
||||
loclhCurve, lochhCurve, locchCurve,
|
||||
lmasklocalcurve, localmaskutili,
|
||||
lmaskexplocalcurve, localmaskexputili,
|
||||
lmaskSHlocalcurve, localmaskSHutili,
|
||||
lmaskviblocalcurve, localmaskvibutili,
|
||||
lmasktmlocalcurve, localmasktmutili,
|
||||
lmaskretilocalcurve, localmaskretiutili,
|
||||
lmaskcblocalcurve, localmaskcbutili,
|
||||
lmaskbllocalcurve, localmaskblutili,
|
||||
lmasklclocalcurve, localmasklcutili,
|
||||
lmasklocal_curve, localmask_utili,
|
||||
|
||||
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
|
||||
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
|
||||
locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili,
|
||||
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
|
||||
locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili,
|
||||
locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili,
|
||||
locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili,
|
||||
locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili,
|
||||
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
|
||||
lochhhmas_Curve, lhhmas_utili,
|
||||
loclmasCurveblwav,lmasutiliblwav,
|
||||
loclmasCurvecolwav,lmasutilicolwav,
|
||||
locwavCurve, locwavutili,
|
||||
loclevwavCurve, loclevwavutili,
|
||||
locconwavCurve, locconwavutili,
|
||||
loccompwavCurve, loccompwavutili,
|
||||
loccomprewavCurve, loccomprewavutili,
|
||||
locwavCurveden, locwavdenutili,
|
||||
locedgwavCurve, locedgwavutili,
|
||||
loclmasCurve_wav,lmasutili_wav,
|
||||
LHutili, HHutili, CHutili, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc,
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax);
|
||||
|
||||
if (sp + 1u < params.locallab.spots.size()) {
|
||||
// do not copy for last spot as it is not needed anymore
|
||||
lastorigView->CopyFrom(labView);
|
||||
}
|
||||
|
||||
if (params.locallab.spots.at(sp).spotMethod == "exc") {
|
||||
ipf.calc_ref(sp, reservView.get(), reservView.get(), 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili);
|
||||
} else {
|
||||
ipf.calc_ref(sp, labView, labView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili);
|
||||
}
|
||||
}
|
||||
|
||||
t2.set();
|
||||
|
||||
if (settings->verbose) {
|
||||
printf("Total local:- %d usec\n", t2.etime(t1));
|
||||
}
|
||||
ipf.shadowsHighlights(labView, params.sh.enabled, params.sh.lab,params.sh.highlights ,params.sh.shadows, params.sh.radius, 1, params.sh.htonalwidth, params.sh.stonalwidth);
|
||||
|
||||
if (params.localContrast.enabled) {
|
||||
// Alberto's local contrast
|
||||
ipf.localContrast(labView, labView->L, params.localContrast, false, 1);//scale);
|
||||
}
|
||||
|
||||
ipf.chromiLuminanceCurve(nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy);
|
||||
|
@ -3,6 +3,11 @@
|
||||
// this code was taken from http://shibatch.sourceforge.net/
|
||||
// Many thanks to the author of original version: Naoki Shibata
|
||||
//
|
||||
// Copyright Naoki Shibata and contributors 2010 - 2021.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file sleef_LICENSE.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// This version contains modifications made by Ingo Weyrich
|
||||
//
|
||||
////////////////////////////////////////////////////////////////
|
||||
|