From 736e67b7bb84b45d300baadc3d5258c1928e63c0 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sat, 4 Jul 2020 10:00:16 +0200 Subject: [PATCH 1/8] french A --- rtdata/languages/Francais | 106 ++++++++++++++++++++++++++++++++++---- 1 file changed, 97 insertions(+), 9 deletions(-) diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 01a5bf317..ef281b97b 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -1827,8 +1827,8 @@ TP_LOCALLAB_CLARITYML;Claté 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 - Petits défauts -TP_LOCALLAB_COLORDE;Coleurr previsualisation sélection ΔE - Intensité -TP_LOCALLAB_COLORDEPREV_TOOLTIP;Bouton Previsualisation ΔE a besoin qu'un seul outil soit activé (expander).\nPour pouvoir avoir une Previsualisation ΔE avec plusieurs outils activés utiliser Masque et modifications - Prévisualisation ΔE +TP_LOCALLAB_COLORDE;Couleur prévisualisation 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 TP_LOCALLAB_COLORSCOPE_TOOLTIP;Utilise une étendue commune pour Couleur et lumière, Exposition (Standard), Ombres Lumières, Vibrance.\nLes autres outils ont leur étendue spécifique. @@ -2107,13 +2107,13 @@ TP_LOCALLAB_PASTELS2;Vibrance TP_LOCALLAB_PDE;ΔØ Laplacian PDE - Compression dynamique + Standard TP_LOCALLAB_PDEFRA;PDE IPOL - Contrast attenuation ƒ TP_LOCALLAB_PDEFRAME_TOOLTIP;PDE IPOL - algorithme personnel adapté de IPOL à Rawtherapee: conduit à des résultats très variés et a besoin de différents réglages que Standard (Noir négatif, gamma < 1,...)\nPeut être utils pour des iamges sous-exposées ou avec une étendue dynamique importante.\n -TP_LOCALLAB_PREVIEW;Previsualisation ΔE +TP_LOCALLAB_PREVIEW;Prévisualisation ΔE TP_LOCALLAB_PROXI;ΔE Affaiblissement TP_LOCALLAB_QUALCURV_METHOD;Types de Courbes TP_LOCALLAB_QUAL_METHOD;Qualité globale TP_LOCALLAB_RADIUS;Rayon TP_LOCALLAB_RADIUS_TOOLTIP;Above Radius 30 Use Fast Fourier Transform -TP_LOCALLAB_RADMASKCOL;Smooth Radius Mask +TP_LOCALLAB_RADMASKCOL;Rayon adoucir Masque TP_LOCALLAB_RECT;Rectangle TP_LOCALLAB_RECURS;Réferences Récursives TP_LOCALLAB_RECURS_TOOLTIP;Recalcule les références pour teinte, luma, chroma après chaque module et après chaque RT-spot.\nAussi utile pour le travail avec les masques. @@ -2216,20 +2216,108 @@ TP_LOCALLAB_SHOWVI;Masque et modifications TP_LOCALLAB_SHRESFRA;Ombres/Lumières TP_LOCALLAB_SHTRC_TOOLTIP;Modifie les tons de l'image en agissant sur la TRC (Tone Response Curve).\nGamma agit principalement sur les tons lumineux.\nSlope (pente) agit principalement sur les tons sombres. TP_LOCALLAB_SH_TOOLNAME;Ombres-lumières & Egaliser tonal - 5 -TP_LOCALLAB_SIGMAWAV;Attenuation Réponse +TP_LOCALLAB_SIGMAWAV;Atténuation Réponse TP_LOCALLAB_SIM;Simple TP_LOCALLAB_SLOMASKCOL;Pente (slope) masque TP_LOCALLAB_SLOSH;Pente TP_LOCALLAB_SOFT;Lumière douce - Original Retinex TP_LOCALLAB_SOFTM;Lumière douce (soft light) TP_LOCALLAB_SOFTMETHOD_TOOLTIP;Original Retinex est très différent des autres méthodes Retinex.\nIl agit sur les gris et équilibre la luminance.\nC'est une émulation de "Dodge" and "Burn" -TP_LOCALLAB_SOFTRADIUSCOL;Radius adoucir +TP_LOCALLAB_SOFTRADIUSCOL;Rayon adoucir TP_LOCALLAB_SOFTRETI;Reduire artefact ΔE TP_LOCALLAB_SOFTRETI_TOOLTIP;Prend en compte ΔE pour améliorer Transmission map TP_LOCALLAB_SOFT_TOOLNAME;Soft Light & Original Retinex - 6 - - - +TP_LOCALLAB_SOURCE_GRAY;Valeur +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". +TP_LOCALLAB_SPOTNAME;Nouveau Spot +TP_LOCALLAB_STD;Standard +TP_LOCALLAB_STR;Force +TP_LOCALLAB_STRBL;Force +TP_LOCALLAB_STREN;Compression Force +TP_LOCALLAB_STRENG;Force +TP_LOCALLAB_STRENGR;Force +TP_LOCALLAB_STRENGTH;Bruit +TP_LOCALLAB_STRGRID;Force +TP_LOCALLAB_STRRETI_TOOLTIP;Si force Retinex < 0.2 seul Dehaze est activé.\nSi force Retinex >= 0.1 Dehaze est en mode luminance. +TP_LOCALLAB_STRUC;Structure +TP_LOCALLAB_STRUCCOL;Structure +TP_LOCALLAB_STRUCCOL1;Spot Structure +TP_LOCALLAB_STRUCT_TOOLTIP;Utilise l'algorithme de Sobel pour prendre en compte la structure dans la détection de forme.\nvous pouvez prévisualiser avec "masque et modifications - Montrer structure spot".\n\nPeut être utilisé avec masques (expert) structure, flouter, ondelettes pour améliorer la détection de bords.\n\nA besoin de réglages sans-masque pour êtrre activé (luminosité, exposition...) +TP_LOCALLAB_STRUMASKCOL;Structure masque force +TP_LOCALLAB_STRUMASK_TOOLTIP;Génère un masque structure qui va différencier les aplats et reliefs.\nSi structure masque comme outil est activé, ce masque est untilisé en plus des autres outils (gamma, slope, courbe contraste ...) +TP_LOCALLAB_STYPE;Forme méthode +TP_LOCALLAB_STYPE_TOOLTIP;Vous pouvez choisir entre:\nSymétrique - gauche et droite sont liés, haut et bas sont liés.\nIndépendent - toutes les saisies sont indépendantes. +TP_LOCALLAB_SYM;Symétrique (souris) +TP_LOCALLAB_SYMSL;Symétrique (souris + curseurs) +TP_LOCALLAB_TARGET_GRAY;Point Gris Cible +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_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_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. +TP_LOCALLAB_TONEMAPREWEI_TOOLTIP;Dans certains 'compression tonal' peut amener des effets de perspective, et dans de rares cas des halos peuvent apparaître.\n Accroître le nombre d'itérations peut aider à résoudre ces problèmes. +TP_LOCALLAB_TONEMAP_TOOLTIP;Compression tonal - menu principal doit être désactivé +TP_LOCALLAB_TONEMASCALE_TOOLTIP;Ce contrôle donne le pouvoir de différencier le contraste "local" et "global".\nPlus il est important, plus un détail sera accentué. +TP_LOCALLAB_TONE_TOOLNAME;Compression tonale - 4 +TP_LOCALLAB_TOOLCOL;Masque Structure comme outil +TP_LOCALLAB_TOOLMASK;Outils +TP_LOCALLAB_TRANSIT;Transition Gradiant +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_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 +TP_LOCALLAB_TRANSMISSIONMAP;Transmission map +TP_LOCALLAB_TRANSMISSION_TOOLTIP;Transmission en accord à transmission.\nAbscisse: transmission pour les valeurs négatives (min), mean, et les valeurs positives (max).\nOrdonnée: amplification ou réduction.\nVous pouvez agir sur cette courbe pour chnager la Transmission et réduire les artefacts +TP_LOCALLAB_USEMASK;Utiliser masque +TP_LOCALLAB_VART;Variance (contraste) +TP_LOCALLAB_VIBRANCE;Vibrance - Chaud & Froid +TP_LOCALLAB_VIB_TOOLNAME;Vibrance - Chaud & Froid - 3 +TP_LOCALLAB_SOFT_TOOLNAME;Lumière douce & Original Retinex - 6 +TP_LOCALLAB_BLUR_TOOLNAME;Adoucir Flouter Grain & De-bruite - 1 +TP_LOCALLAB_TONE_TOOLNAME;Compression tonale - 4 +TP_LOCALLAB_RET_TOOLNAME;De-brume & Retinex - 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 (Défauts) - 2 +TP_LOCALLAB_LOG_TOOLNAME;Codage log - 0 +TP_LOCALLAB_MASKCOM_TOOLNAME;Masque Commun Couleur - 13 +TP_LOCALLAB_VIS_TOOLTIP;Click pour montrer/cacher le Spot sélectionné.\nCtrl+click pour montrer/cacher tous les Spot. +TP_LOCALLAB_WAMASKCOL;Ψ Masque 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à. +TP_LOCALLAB_WAV;Contrast local niveau +TP_LOCALLAB_WAVBLUR_TOOLTIP;Réalise un flou pour chaque niveau de décomposition, également pour l'image résiduelle. +TP_LOCALLAB_WAVCOMP;Compression par niveau +TP_LOCALLAB_WAVCOMPRE;(de)Compression par niveau +TP_LOCALLAB_WAVCOMPRE_TOOLTIP;Réalise un 'Tone-mapping' ou une réduction du contraste local par niveau.\nEn abscisse: niveaux +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_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;Ψ Masque Niveau contraste local +TP_LOCALLAB_WAVMASK_TOOLTIP;Autorise un travail fin sur les masques niveaux de contraste (structure) +TP_LOCALLAB_WAVMED;Ψ Ondelette normal +TP_LOCALLAB_WEDIANHI;Median Haut +TP_LOCALLAB_WHITE_EV;Blanc Ev TP_METADATA_EDIT;Appliquer les modifications TP_METADATA_MODE;Mode de copie des métadonnées TP_METADATA_STRIP;Retirer toutes les métadonnées From b251b7318b208b050b693e55aa27ca2ac598df4b Mon Sep 17 00:00:00 2001 From: Desmis Date: Sat, 4 Jul 2020 10:13:42 +0200 Subject: [PATCH 2/8] French corrections --- rtdata/languages/Francais | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index ef281b97b..abb657063 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -1799,11 +1799,11 @@ 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 - Défauts +TP_LOCALLAB_CBDL;Contraste par niveaux détail-Défauts 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;CBDL (Defauts) - 2 +TP_LOCALLAB_CBDL_TOOLNAME;Contraste par niveaux de détails(Défauts) - 2 TP_LOCALLAB_CENTER_X;Centre X TP_LOCALLAB_CENTER_Y;Centre Y TP_LOCALLAB_CH;Courbes CL - LC @@ -2131,7 +2131,7 @@ 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_RETIFRA;Retinex +TP_LOCALLAB_RETIFRA;Retinexfr TP_LOCALLAB_RETIM;Original Retinex TP_LOCALLAB_RETITOOLFRA;Retinex Outils TP_LOCALLAB_RETI_FFTW_TOOLTIP;FFT améliore la qualité et autorise de grands rayons, mais accroît les temps de traitement.\nCe temps dépends de la surface traitée\nLe temps de traitements dépend de "scale" (échelle) (soyez prudent avec les hautes valeurs ).\nA utiliser de préférence avec de grand rayons.\n\nLes Dimensions peuvent être réduites de quelques pixels pour optimiser FFTW.\nCette optimisation peut réduire le temps de traitement d'un facteur de 1.5 à 10.\nOptimisation pas utilsée en prévisualisation @@ -2226,7 +2226,7 @@ TP_LOCALLAB_SOFTMETHOD_TOOLTIP;Original Retinex est très différent des autres TP_LOCALLAB_SOFTRADIUSCOL;Rayon adoucir TP_LOCALLAB_SOFTRETI;Reduire artefact ΔE TP_LOCALLAB_SOFTRETI_TOOLTIP;Prend en compte ΔE pour améliorer Transmission map -TP_LOCALLAB_SOFT_TOOLNAME;Soft Light & Original Retinex - 6 +TP_LOCALLAB_SOFT_TOOLNAME;Lumière douce & Original Retinex - 6 TP_LOCALLAB_SOURCE_GRAY;Valeur TP_LOCALLAB_SPECCASE; Cas spécifiques TP_LOCALLAB_SPECIAL;Usage Special des courbes RGB From 510810626cd60444cb5509ffdf98589352c5147e Mon Sep 17 00:00:00 2001 From: Desmis Date: Sat, 4 Jul 2020 13:04:30 +0200 Subject: [PATCH 3/8] Various change typo -spelling French --- rtdata/languages/Francais | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index af1682fea..cbef2e5ef 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -1792,7 +1792,7 @@ TP_LOCALLAB_BLURLEVELFRA;Flouter niveaux TP_LOCALLAB_BLURMASK_TOOLTIP;Génère un masque flou, prend en compte la structure avec le curseur de seuil de contraste du Masque flou. TP_LOCALLAB_BLURRESIDFRA;Flouter image Résiduelle TP_LOCALLAB_BLUR_TOOLNAME;Adoucir Flouter Grain & Réduction du Bruit - 1 -TP_LOCALLAB_BLWH;Tous les chnagements forcés en noir et blanc +TP_LOCALLAB_BLWH;Tous les changements forcés en noir et blanc TP_LOCALLAB_BLWH_TOOLTIP;Force le changement de la composante "a" et "b" à zéro.\nUtile quand l'utilisateur choisit un processus noir et blanc, ou un film. TP_LOCALLAB_BUTTON_ADD;Ajouter TP_LOCALLAB_BUTTON_DEL;Effacer @@ -1823,7 +1823,7 @@ TP_LOCALLAB_CLARIFRA;Clarté & Masque de netteté - Fusion & adoucir images 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 -TP_LOCALLAB_CLARITYML;Claté +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 - Petits défauts @@ -1854,7 +1854,7 @@ 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). TP_LOCALLAB_CURVEEDITORM_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.\nVous pouvez choisir ou non de positionner le sommet de la courbe sur la transition. TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP;Pour être actif, vous devez activer la combobox 'Curves type' -TP_LOCALLAB_CURVEEDITOR_TONES_LABEL;Curve tonale +TP_LOCALLAB_CURVEEDITOR_TONES_LABEL;Courbe tonale TP_LOCALLAB_CURVEEDITOR_TONES_TOOLTIP;L=f(L), peut être utilisée avec L(H) dans Couleur et lumière TP_LOCALLAB_CURVEMETHOD_TOOLTIP;'Normal', la courbe L=f(L) a le même algorithme que le curseur luminosité.\n'Super' the curve L=f(L) has an new improved algorithm, which can leeds in some cases to artifacts. TP_LOCALLAB_CURVENCONTRAST;Super+Contrast threshold (experimental) @@ -1921,7 +1921,7 @@ TP_LOCALLAB_EXPOSURE_TOOLTIP;Dans certains cases (fortes ombres ..) vous pouvez 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;Tone Response Curve - TRC +TP_LOCALLAB_EXPTRC;Courbe de réponse Tonale - TRC TP_LOCALLAB_EXP_TOOLNAME;Exposition - Compression Dynamique - 10 TP_LOCALLAB_FATAMOUNT;Quantité TP_LOCALLAB_FATANCHOR;Ancre @@ -1932,30 +1932,30 @@ 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_FEATH_TOOLTIP;Largeur du Gradiant 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 gradiant (Filtres Gradués) +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_FFTCOL_MASK;FFTW ƒ 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 DarkEv - WhiteEv - sur l'image entière +TP_LOCALLAB_FULLIMAGE;Calcule les valeurs Noir Ev - Blanc Ev - sur l'image entière TP_LOCALLAB_GAM;Gamma -TP_LOCALLAB_GAMFRA;Tone response curve (TRC) +TP_LOCALLAB_GAMFRA;Courbe Réponse Tonale (TRC) TP_LOCALLAB_GAMM;Gamma TP_LOCALLAB_GAMMASKCOL;Gamma masque TP_LOCALLAB_GAMSH;Gamma -TP_LOCALLAB_GRADANG;Angle du Gradiant +TP_LOCALLAB_GRADANG;Angle du Gradient TP_LOCALLAB_GRADANG_TOOLTIP;Angle de Rotation en degrés : -180 0 +180 TP_LOCALLAB_GRADFRA;Filtre gradué Masque TP_LOCALLAB_GRADGEN_TOOLTIP;Filtre Gradué est fourni avec Couleur et Lumière & Fusion fichier, Exposition & masque, Shadows Highlight, Vibrance, Encoding log.\n\nVibrance, Couleur et Lumière & Fusion fichier, sont fournis avec GF luminance, chrominance, teinte.\nAdoucissement est situé dans "réglages". TP_LOCALLAB_GRADLOGFRA;Filtre Gradué Luminance -TP_LOCALLAB_GRADSTR;Force du Gradiant +TP_LOCALLAB_GRADSTR;Force du Gradient TP_LOCALLAB_GRADSTRAB_TOOLTIP;Filtre chroma force -TP_LOCALLAB_GRADSTRCHRO;Force Gradiant Chrominance -TP_LOCALLAB_GRADSTRHUE;Force Gradiant Teinte -TP_LOCALLAB_GRADSTRHUE2;Force Gradiant Teinte +TP_LOCALLAB_GRADSTRCHRO;Force Gradient Chrominance +TP_LOCALLAB_GRADSTRHUE;Force Gradient Teinte +TP_LOCALLAB_GRADSTRHUE2;Force Gradient Teinte TP_LOCALLAB_GRADSTRHUE_TOOLTIP;Filttre Teinte force -TP_LOCALLAB_GRADSTRLUM;Force Gradiant Luminance +TP_LOCALLAB_GRADSTRLUM;Force Gradient Luminance TP_LOCALLAB_GRADSTR_TOOLTIP;Force Filtre en Ev TP_LOCALLAB_GRAINFRA;Film Grain 1:1 TP_LOCALLAB_GRALWFRA;Filtre Gradué Local contraste @@ -2003,7 +2003,7 @@ TP_LOCALLAB_LOCCONT;Masque Flou TP_LOCALLAB_LOC_CONTRAST;Contraste Local-Ondelettes-déf. TP_LOCALLAB_LOC_CONTRASTPYR;Ψ Pyramide 1: TP_LOCALLAB_LOC_CONTRASTPYR2;Ψ Pyramide 2: -TP_LOCALLAB_LOC_CONTRASTPYR2LAB; Contraste par niveaux- Tone Mapping - Contraste Dir. +TP_LOCALLAB_LOC_CONTRASTPYR2LAB; Contr. par niveaux- Tone Mapping - Cont.Dir. TP_LOCALLAB_LOC_CONTRASTPYRLAB; Filtre Gradué - Netteté bords - Flouter TP_LOCALLAB_LOC_RESIDPYR;Image Residuelle TP_LOCALLAB_LOG;Codage log @@ -2131,7 +2131,7 @@ 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_RETIFRA;Retinexfr +TP_LOCALLAB_RETIFRA;Retinex TP_LOCALLAB_RETIM;Original Retinex TP_LOCALLAB_RETITOOLFRA;Retinex Outils TP_LOCALLAB_RETI_FFTW_TOOLTIP;FFT améliore la qualité et autorise de grands rayons, mais accroît les temps de traitement.\nCe temps dépends de la surface traitée\nLe temps de traitements dépend de "scale" (échelle) (soyez prudent avec les hautes valeurs ).\nA utiliser de préférence avec de grand rayons.\n\nLes Dimensions peuvent être réduites de quelques pixels pour optimiser FFTW.\nCette optimisation peut réduire le temps de traitement d'un facteur de 1.5 à 10.\nOptimisation pas utilsée en prévisualisation @@ -2269,7 +2269,7 @@ TP_LOCALLAB_TONEMASCALE_TOOLTIP;Ce contrôle donne le pouvoir de différencier l TP_LOCALLAB_TONE_TOOLNAME;Compression tonale - 4 TP_LOCALLAB_TOOLCOL;Masque Structure comme outil TP_LOCALLAB_TOOLMASK;Outils -TP_LOCALLAB_TRANSIT;Transition Gradiant +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 From fd43ed28fe055d9e125b83fb5d1630ebad45b708 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 5 Jul 2020 08:33:40 +0200 Subject: [PATCH 4/8] change exposure with Laplacian --- rtdata/languages/default | 4 ++-- rtengine/improcfun.h | 2 +- rtengine/iplocallab.cc | 52 +++++++++++++++++++++++++++++++++------- rtengine/procparams.cc | 2 +- rtgui/locallabtools.cc | 2 +- 5 files changed, 48 insertions(+), 14 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 7ce5b4f3f..2457b83ee 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2492,13 +2492,13 @@ TP_LOCALLAB_EXPLAP_TOOLTIP;The more you act on this threshold slider, the greate TP_LOCALLAB_EXPMERGEFILE_TOOLTIP;Allows various possibilities to blend image (as layers in Photosshop) : difference, multiply, soft light, overlay...with opacity...\nOriginal Image : merge current RT-spot with Original.\nPrevious spot : merge current Rt-spot with previous - if there is only one spot previous = original.\nBackground : merge current RT-spot with a color and luminance background (less possibilties) TP_LOCALLAB_EXPMETHOD_TOOLTIP;Standard : use an algorithm similar as main Exposure but in L*a*b* and taking account of deltaE.\n\nLaplacian & PDE : use another algorithm also with deltaE and with Poisson equation to solve Laplacian in Fourier space.\nPDE IPOL, PDE Fattal and Standard can be combined.\nFFTW Fourier Transform is optimized in size to reduce processing time.\nPDE reduce artifacts and noise. TP_LOCALLAB_EXPNOISEMETHOD_TOOLTIP;Apply a median before Laplace transform to prevent artifacts (noise).\nYou can also use "Denoise" tool. -TP_LOCALLAB_EXPOSE;Exposure - PDE algorithms +TP_LOCALLAB_EXPOSE;PDE algorithms & Exposure TP_LOCALLAB_EXPOSURE_TOOLTIP;In some cases (strong shadows ..) you can use others modules "Shadows Highlights", "Tone equalizer", "TRC", "Encoding Log"... TP_LOCALLAB_EXPRETITOOLS;Advanced Retinex Tools TP_LOCALLAB_EXPSHARP_TOOLTIP;RT-Spot minimum 39*39.\nUse low transition values and high decay transition values and scope to simulate small RT-spot. TP_LOCALLAB_EXPTOOL;Tools exposure TP_LOCALLAB_EXPTRC;Tone Response Curve - TRC -TP_LOCALLAB_EXP_TOOLNAME;Exposure - Dynamic Range Compression - 10 +TP_LOCALLAB_EXP_TOOLNAME;Laplacian PDE -Dynamic Range Compression & Exposure- 10 TP_LOCALLAB_FATAMOUNT;Amount TP_LOCALLAB_FATANCHOR;Anchor TP_LOCALLAB_FATANCHORA;Offset diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 57c8c4c64..66ad4dc57 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -351,7 +351,7 @@ public: 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(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, LabImage* bufexporig, LabImage* lab, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve); + 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 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); diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 9b982cd84..ca65f3779 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2405,7 +2405,7 @@ void ImProcFunctions::softprocess(const LabImage* bufcolorig, array2D &bu } } -void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, LabImage* bufexporig, LabImage* lab, const LUTf& hltonecurve, const LUTf& shtonecurve, const LUTf& tonecurve) +void ImProcFunctions::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) { BENCHFUN //exposure local @@ -2422,8 +2422,42 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, LabImage* b if (lp.linear > 0.f && lp.expcomp == 0.f) { lp.expcomp = 0.001f; } + bool exec = (lp.expmet == 1 && lp.linear > 0.f && lp.laplacexp > 0.1f && !lp.invex); - if (lp.expmet == 1 && lp.linear > 0.f && lp.laplacexp > 0.1f && !lp.invex) { + //Laplacian PDE before exposure to smooth L, algorithm exposure leads to increase L differences + const std::unique_ptr datain(new float[bfwr * bfhr]); + const std::unique_ptr dataout(new float[bfwr * bfhr]); + const std::unique_ptr dE(new float[bfwr * bfhr]); + + + if(!exec) { + float diffde = 100.f - lp.sensex;//the more scope, the less take into account dE for Laplace + deltaEforLaplace(dE.get(), diffde, bfwr, bfhr, bufexporig, hueref, chromaref, lumaref); + +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int y = 0; y < bfhr; y++) { + for (int x = 0; x < bfwr; x++) { + datain[y * bfwr + x] = bufexporig->L[y][x]; + } + } + + MyMutex::MyLock lock(*fftwMutex); + ImProcFunctions::retinex_pde(datain.get(), dataout.get(), bfwr, bfhr, 360.f, 1.f, dE.get(), 0, 1, 1);//350 arbitrary value about 45% strength Laplacian +#ifdef _OPENMP + #pragma omp parallel for schedule(dynamic,16) if (multiThread) +#endif + for (int y = 0; y < bfhr; y++) { + for (int x = 0; x < bfwr; x++) { + bufexporig->L[y][x] = dataout[y * bfwr + x]; + } + } + } + + + + if (exec) { #ifdef _OPENMP #pragma omp parallel for if (multiThread) @@ -2432,7 +2466,7 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, LabImage* b for (int jr = 0; jr < bfw; jr++) { float L = bufexporig->L[ir][jr]; const float Llin = LIM01(L / 32768.f); - const float addcomp = linear * (-kl * Llin + kl);//maximum about 1. IL + const float addcomp = linear * (-kl * Llin + kl);//maximum about 1 . IL const float exp_scale = pow_F(2.0, (lp.expcomp + addcomp)); const float shoulder = ((maxran / rtengine::max(1.0f, exp_scale)) * hlcompthr) + 0.1f; const float comp = (rtengine::max(0.f, (lp.expcomp + addcomp)) + 1.f) * hlcomp; @@ -2451,8 +2485,8 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, LabImage* b #ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif - for (int ir = 0; ir < bfh; ir++) { - for (int jr = 0; jr < bfw; jr++) { + for (int ir = 0; ir < bfhr; ir++) { + for (int jr = 0; jr < bfwr; jr++) { float L = bufexporig->L[ir][jr]; //highlight const float hlfactor = (2 * L < MAXVALF ? hltonecurve[2 * L] : CurveFactory::hlcurve(cexp_scale, ccomp, chlrange, 2 * L)); @@ -5253,7 +5287,7 @@ void ImProcFunctions::InverseColorLight_Local(bool tonequ, bool tonecurv, int sp } } else if (senstype == 1) { //exposure - ImProcFunctions::exlabLocal(lp, GH, GW, original, temp.get(), hltonecurveloc, shtonecurveloc, tonecurveloc); + ImProcFunctions::exlabLocal(lp, GH, GW, GW, GH, original, temp.get(), hltonecurveloc, shtonecurveloc, tonecurveloc, hueref, lumaref, chromaref); if (exlocalcurve) { #ifdef _OPENMP @@ -12942,7 +12976,7 @@ void ImProcFunctions::Lab_Local( if (bfw >= mSP && bfh >= mSP) { - if (lp.expmet == 1) { + if (lp.expmet == 1 || lp.expmet == 0) { optfft(N_fftwsize, bfh, bfw, bfhr, bfwr, lp, original->H, original->W, xstart, ystart, xend, yend, cx, cy); } @@ -13096,12 +13130,12 @@ void ImProcFunctions::Lab_Local( lp.expcomp = 0.001f; // to enabled } - ImProcFunctions::exlabLocal(lp, bfh, bfw, bufexpfin.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc); + ImProcFunctions::exlabLocal(lp, bfh, bfw, bfhr, bfwr, bufexpfin.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc, hueref, lumaref, chromaref); } else { - ImProcFunctions::exlabLocal(lp, bfh, bfw, bufexporig.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc); + ImProcFunctions::exlabLocal(lp, bfh, bfw, bfhr, bfwr, bufexporig.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc, hueref, lumaref, chromaref); } //gradient diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index deeae9c54..d177e44a2 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2869,7 +2869,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : expexpose(false), complexexpose(0), expcomp(0.0), - hlcompr(0), + hlcompr(20), hlcomprthresh(0), black(0), shadex(0), diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index 1dd5513da..8deff0170 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -2191,7 +2191,7 @@ LocallabExposure::LocallabExposure(): exptoolexp(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_EXPTOOL")))), expcomp(Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), MINEXP, MAXEXP, 0.01, 0.))), black(Gtk::manage(new Adjuster(M("TP_EXPOSURE_BLACKLEVEL"), -16384, 32768, 10, 0))), - hlcompr(Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 0))), + hlcompr(Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 20))), hlcomprthresh(Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), 0, 100, 1, 0))), shadex(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHADEX"), 0, 100, 1, 0))), shcompr(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHADEXCOMP"), 0, 100, 1, 50))), From 78ab54780126dd619db44f34ef13eec51812f334 Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 5 Jul 2020 09:44:34 +0200 Subject: [PATCH 5/8] change scope exposure --- rtdata/languages/default | 2 +- rtengine/iplocallab.cc | 4 ++-- rtgui/locallabtools.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 2457b83ee..56c5edd2b 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2407,7 +2407,7 @@ TP_LOCALLAB_COLORDE;Color preview selection ΔE - Intensity TP_LOCALLAB_COLORDEPREV_TOOLTIP;Button Preview ΔE needs that only one tool is enabled (expander).\nTo be able to have an Preview ΔE with several enable tools use Mask and modifications - Preview ΔE TP_LOCALLAB_COLORDE_TOOLTIP;Show preview selection ΔE in blue if negative and in green if positive.\n\nMask and modifications (show modifications without mask): show real modifications if positive, show enhanced modifications (only luminance) with blue and yellow if negative. TP_LOCALLAB_COLORSCOPE;Scope Color Tools -TP_LOCALLAB_COLORSCOPE_TOOLTIP;Use a common Scope for Color and light, Exposure (Standard), Shadows highlight, Vibrance.\nOthers tools have their specific scope. +TP_LOCALLAB_COLORSCOPE_TOOLTIP;Use a common Scope for Color and light, Shadows highlight, Vibrance.\nOthers tools have their specific scope. TP_LOCALLAB_COLOR_TOOLNAME;Color&Light (Defects) - 11 TP_LOCALLAB_COL_NAME;Name TP_LOCALLAB_COL_VIS;Status diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index ca65f3779..d443a9464 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -1376,12 +1376,12 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.residhithr = locallab.spots.at(sp).residhithr; lp.blwh = locallab.spots.at(sp).blwh; lp.senscolor = (int) locallab.spots.at(sp).colorscope; - //replace scope color exposure vibrance shadows + //replace scope color vibrance shadows lp.sens = lp.senscolor; lp.sensv = lp.senscolor; lp.senshs = lp.senscolor; if(lp.expmet == 0){ - lp.sensex = lp.senscolor; +// lp.sensex = lp.senscolor; } } diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index 8deff0170..49b6feb56 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -3185,7 +3185,7 @@ void LocallabExposure::updateExposureGUI2() pdeFrame->hide(); fatFrame->hide(); softradiusexp->set_sensitive(true); - sensiex->set_sensitive(false); + sensiex->set_sensitive(true); } else if (expMethod->get_active_row_number() == 1) { pdeFrame->show(); fatFrame->show(); From 20e86dac98d9552f17b80f9dc3342e0a1c3e71ee Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 5 Jul 2020 11:29:17 +0200 Subject: [PATCH 6/8] Improve algo laplace --- rtengine/iplocallab.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index d443a9464..f080feb1f 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2433,7 +2433,21 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, int bfhr, i if(!exec) { float diffde = 100.f - lp.sensex;//the more scope, the less take into account dE for Laplace deltaEforLaplace(dE.get(), diffde, bfwr, bfhr, bufexporig, hueref, chromaref, lumaref); + float lap = 1.f; + float alap = 600.f; + float blap = 100.f; + if(diffde > 80.f) { + lap = alap; + } + if(diffde < 30.f) { + lap = blap; + } + float aa = (alap - blap) / 50.f; + float bb = 100.f - 30.f * aa; + if(diffde >= 30.f && diffde <= 80.f) { + lap = aa * diffde + bb; + } #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif @@ -2444,7 +2458,7 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, int bfhr, i } MyMutex::MyLock lock(*fftwMutex); - ImProcFunctions::retinex_pde(datain.get(), dataout.get(), bfwr, bfhr, 360.f, 1.f, dE.get(), 0, 1, 1);//350 arbitrary value about 45% strength Laplacian + ImProcFunctions::retinex_pde(datain.get(), dataout.get(), bfwr, bfhr, lap, 1.f, dE.get(), 0, 1, 1);//350 arbitrary value about 45% strength Laplacian #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif From a393a500a1e6afd82c38c1441132eb85722803ef Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Sun, 5 Jul 2020 12:46:29 +0200 Subject: [PATCH 7/8] retinex_pde(): cleanup and speedup --- rtengine/iplocallab.cc | 141 ++++++++++++++++++++--------------------- 1 file changed, 69 insertions(+), 72 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index f080feb1f..bce27f8dd 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -3642,30 +3642,27 @@ void ImProcFunctions::retinex_pde(const float * datain, float * dataout, int bfw fftwf_plan_with_nthreads(omp_get_max_threads()); } #endif - float *data_fft, *data_fft04, *data_tmp, *data, *data_tmp04; - float *datashow = nullptr; + float *datashow = nullptr; if (show != 0) { - if (NULL == (datashow = (float *) fftwf_malloc(sizeof(float) * bfw * bfh))) { + datashow = (float *) fftwf_malloc(sizeof(float) * bfw * bfh); + if (!datashow) { fprintf(stderr, "allocation error\n"); abort(); } } - if (NULL == (data_tmp = (float *) fftwf_malloc(sizeof(float) * bfw * bfh))) { - fprintf(stderr, "allocation error\n"); - abort(); - } - - if (NULL == (data_tmp04 = (float *) fftwf_malloc(sizeof(float) * bfw * bfh))) { + float *data_tmp = (float *) fftwf_malloc(sizeof(float) * bfw * bfh); + if (!data_tmp) { fprintf(stderr, "allocation error\n"); abort(); } //first call to laplacian with plein strength - ImProcFunctions::discrete_laplacian_threshold(data_tmp, datain, bfw, bfh, thresh); + discrete_laplacian_threshold(data_tmp, datain, bfw, bfh, thresh); - if (NULL == (data_fft = (float *) fftwf_malloc(sizeof(float) * bfw * bfh))) { + float *data_fft = (float *) fftwf_malloc(sizeof(float) * bfw * bfh); + if (!data_fft) { fprintf(stderr, "allocation error\n"); abort(); } @@ -3673,74 +3670,100 @@ void ImProcFunctions::retinex_pde(const float * datain, float * dataout, int bfw if (show == 1) { for (int y = 0; y < bfh ; y++) { for (int x = 0; x < bfw; x++) { - datashow[y * bfw + x] = data_tmp[y * bfw + x]; + datashow[y * bfw + x] = data_tmp[y * bfw + x]; } } } - //second call to laplacian with 40% strength ==> reduce effect if we are far from ref (deltaE) - ImProcFunctions::discrete_laplacian_threshold(data_tmp04, datain, bfw, bfh, 0.4f * thresh); - - if (NULL == (data_fft04 = (float *) fftwf_malloc(sizeof(float) * bfw * bfh))) { - fprintf(stderr, "allocation error\n"); - abort(); - } - - if (NULL == (data = (float *) fftwf_malloc(sizeof(float) * bfw * bfh))) { - fprintf(stderr, "allocation error\n"); - abort(); - } - //execute first const auto dct_fw = fftwf_plan_r2r_2d(bfh, bfw, data_tmp, data_fft, FFTW_REDFT10, FFTW_REDFT10, FFTW_ESTIMATE | FFTW_DESTROY_INPUT); fftwf_execute(dct_fw); + fftwf_destroy_plan(dct_fw); //execute second if (dEenable == 1) { + float* data_fft04 = (float *)fftwf_malloc(sizeof(float) * bfw * bfh); + float* data_tmp04 = (float *)fftwf_malloc(sizeof(float) * bfw * bfh); + if (!data_fft04 || !data_tmp04) { + fprintf(stderr, "allocation error\n"); + abort(); + } + //second call to laplacian with 40% strength ==> reduce effect if we are far from ref (deltaE) + discrete_laplacian_threshold(data_tmp04, datain, bfw, bfh, 0.4f * thresh); const auto dct_fw04 = fftwf_plan_r2r_2d(bfh, bfw, data_tmp04, data_fft04, FFTW_REDFT10, FFTW_REDFT10, FFTW_ESTIMATE | FFTW_DESTROY_INPUT); fftwf_execute(dct_fw04); fftwf_destroy_plan(dct_fw04); + constexpr float exponent = 4.5f; #ifdef _OPENMP - #pragma omp parallel for if (multiThread) + #pragma omp parallel if (multiThread) #endif - for (int y = 0; y < bfh ; y++) {//mix two fftw Laplacian : plein if dE near ref - for (int x = 0; x < bfw; x++) { - float prov = pow(dE[y * bfw + x], 4.5f); - data_fft[y * bfw + x] = prov * data_fft[y * bfw + x] + (1.f - prov) * data_fft04[y * bfw + x]; + { +#ifdef __SSE2__ + const vfloat exponentv = F2V(exponent); +#endif +#ifdef _OPENMP + #pragma omp for +#endif + for (int y = 0; y < bfh ; y++) {//mix two fftw Laplacian : plein if dE near ref + int x = 0; +#ifdef __SSE2__ + for (; x < bfw - 3; x += 4) { + STVFU(data_fft[y * bfw + x], intp(pow_F(LVFU(dE[y * bfw + x]), exponentv), LVFU(data_fft[y * bfw + x]), LVFU(data_fft04[y * bfw + x]))); + } +#endif + for (; x < bfw; x++) { + data_fft[y * bfw + x] = intp(pow_F(dE[y * bfw + x], exponent), data_fft[y * bfw + x], data_fft04[y * bfw + x]); + } } } + fftwf_free(data_fft04); + fftwf_free(data_tmp04); } - if (show == 2) { - for (int y = 0; y < bfh ; y++) { - for (int x = 0; x < bfw; x++) { - datashow[y * bfw + x] = data_fft[y * bfw + x]; - } - } - } - - fftwf_free(data_fft04); - fftwf_free(data_tmp); - fftwf_free(data_tmp04); - /* solve the Poisson PDE in Fourier space */ /* 1. / (float) (bfw * bfh)) is the DCT normalisation term, see libfftw */ - ImProcFunctions::rex_poisson_dct(data_fft, bfw, bfh, 1. / (double)(bfw * bfh)); + rex_poisson_dct(data_fft, bfw, bfh, 1. / (double)(bfw * bfh)); if (show == 3) { for (int y = 0; y < bfh ; y++) { for (int x = 0; x < bfw; x++) { - datashow[y * bfw + x] = data_fft[y * bfw + x]; + datashow[y * bfw + x] = data_fft[y * bfw + x]; } } } - const auto dct_bw = fftwf_plan_r2r_2d(bfh, bfw, data_fft, data, FFTW_REDFT01, FFTW_REDFT01, FFTW_ESTIMATE | FFTW_DESTROY_INPUT); + const auto dct_bw = fftwf_plan_r2r_2d(bfh, bfw, data_fft, data_tmp, FFTW_REDFT01, FFTW_REDFT01, FFTW_ESTIMATE | FFTW_DESTROY_INPUT); fftwf_execute(dct_bw); - fftwf_destroy_plan(dct_fw); fftwf_destroy_plan(dct_bw); fftwf_free(data_fft); + + if (show != 4 && normalize == 1) { + normalize_mean_dt(data_tmp, datain, bfw * bfh, 1.f, 1.f); + } + + if (show == 0 || show == 4) { + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int y = 0; y < bfh ; y++) { + for (int x = 0; x < bfw; x++) { + dataout[y * bfw + x] = clipLoc(multy * data_tmp[y * bfw + x]); + } + } + } else if (show == 1 || show == 2 || show == 3) { + for (int y = 0; y < bfh ; y++) { + for (int x = 0; x < bfw; x++) { + dataout[y * bfw + x] = clipLoc(multy * datashow[y * bfw + x]); + } + } + } + + fftwf_free(data_tmp); + if (datashow) { + fftwf_free(datashow); + } fftwf_cleanup(); #ifdef RT_FFTW3F_OMP @@ -3748,32 +3771,6 @@ void ImProcFunctions::retinex_pde(const float * datain, float * dataout, int bfw fftwf_cleanup_threads(); } #endif - if (show != 4 && normalize == 1) { - normalize_mean_dt(data, datain, bfw * bfh, 1.f, 1.f); - } - - if (show == 0 || show == 4) { - -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int y = 0; y < bfh ; y++) { - for (int x = 0; x < bfw; x++) { - dataout[y * bfw + x] = clipLoc(multy * data[y * bfw + x]); - } - } - } else if (show == 1 || show == 2 || show == 3) { - for (int y = 0; y < bfh ; y++) { - for (int x = 0; x < bfw; x++) { - dataout[y * bfw + x] = clipLoc(multy * datashow[y * bfw + x]); - } - } - - fftwf_free(datashow); - } - - fftwf_free(data); - } void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int xstart, int ystart, int sk, int cx, int cy, LabImage* bufcolorig, LabImage* bufmaskblurcol, LabImage* originalmaskcol, LabImage* original, LabImage* reserved, int inv, struct local_params & lp, From 10334f5c81ba501a506dfc54fbb6aee00e6fcee8 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Sun, 5 Jul 2020 13:30:19 +0200 Subject: [PATCH 8/8] exlabLocal(): cleanup --- rtengine/iplocallab.cc | 116 +++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 63 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index bce27f8dd..aa06dcda3 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -1380,9 +1380,6 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.sens = lp.senscolor; lp.sensv = lp.senscolor; lp.senshs = lp.senscolor; - if(lp.expmet == 0){ -// lp.sensex = lp.senscolor; - } } static void calcTransitionrect(const float lox, const float loy, const float ach, const local_params& lp, int &zone, float &localFactor) @@ -2411,45 +2408,41 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, int bfhr, i //exposure local constexpr float maxran = 65536.f; - const float cexp_scale = std::pow(2.f, lp.expcomp); - const float ccomp = (rtengine::max(0.f, lp.expcomp) + 1.f) * lp.hlcomp / 100.f; - const float cshoulder = ((maxran / rtengine::max(1.0f, cexp_scale)) * (lp.hlcompthr / 200.f)) + 0.1f; - const float chlrange = maxran - cshoulder; const float linear = lp.linear; - constexpr float kl = 1.f; - const float hlcompthr = lp.hlcompthr / 200.f; - const float hlcomp = lp.hlcomp / 100.f; - if (lp.linear > 0.f && lp.expcomp == 0.f) { - lp.expcomp = 0.001f; + if (linear > 0.f && lp.expcomp == 0.f) { + lp.expcomp = 0.001f; } - bool exec = (lp.expmet == 1 && lp.linear > 0.f && lp.laplacexp > 0.1f && !lp.invex); - - //Laplacian PDE before exposure to smooth L, algorithm exposure leads to increase L differences - const std::unique_ptr datain(new float[bfwr * bfhr]); - const std::unique_ptr dataout(new float[bfwr * bfhr]); - const std::unique_ptr dE(new float[bfwr * bfhr]); - + const bool exec = (lp.expmet == 1 && linear > 0.f && lp.laplacexp > 0.1f && !lp.invex); if(!exec) { - float diffde = 100.f - lp.sensex;//the more scope, the less take into account dE for Laplace - deltaEforLaplace(dE.get(), diffde, bfwr, bfhr, bufexporig, hueref, chromaref, lumaref); - float lap = 1.f; - float alap = 600.f; - float blap = 100.f; + //Laplacian PDE before exposure to smooth L, algorithm exposure leads to increase L differences + const std::unique_ptr datain(new float[bfwr * bfhr]); + const std::unique_ptr dataout(new float[bfwr * bfhr]); + const std::unique_ptr dE(new float[bfwr * bfhr]); + const float cexp_scale = std::pow(2.f, lp.expcomp); + const float ccomp = (rtengine::max(0.f, lp.expcomp) + 1.f) * lp.hlcomp / 100.f; + const float cshoulder = ((maxran / rtengine::max(1.0f, cexp_scale)) * (lp.hlcompthr / 200.f)) + 0.1f; + const float chlrange = maxran - cshoulder; + const float diffde = 100.f - lp.sensex;//the more scope, the less take into account dE for Laplace - if(diffde > 80.f) { + deltaEforLaplace(dE.get(), diffde, bfwr, bfhr, bufexporig, hueref, chromaref, lumaref); + + constexpr float alap = 600.f; + constexpr float blap = 100.f; + constexpr float aa = (alap - blap) / 50.f; + constexpr float bb = 100.f - 30.f * aa; + + float lap; + if (diffde > 80.f) { lap = alap; - } - if(diffde < 30.f) { + } else if (diffde < 30.f) { lap = blap; - } - float aa = (alap - blap) / 50.f; - float bb = 100.f - 30.f * aa; - if(diffde >= 30.f && diffde <= 80.f) { + } else { lap = aa * diffde + bb; } + #ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) + #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif for (int y = 0; y < bfhr; y++) { for (int x = 0; x < bfwr; x++) { @@ -2460,42 +2453,13 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, int bfhr, i MyMutex::MyLock lock(*fftwMutex); ImProcFunctions::retinex_pde(datain.get(), dataout.get(), bfwr, bfhr, lap, 1.f, dE.get(), 0, 1, 1);//350 arbitrary value about 45% strength Laplacian #ifdef _OPENMP - #pragma omp parallel for schedule(dynamic,16) if (multiThread) + #pragma omp parallel for schedule(dynamic,16) if (multiThread) #endif for (int y = 0; y < bfhr; y++) { for (int x = 0; x < bfwr; x++) { bufexporig->L[y][x] = dataout[y * bfwr + x]; } } - } - - - - if (exec) { - -#ifdef _OPENMP - #pragma omp parallel for if (multiThread) -#endif - for (int ir = 0; ir < bfh; ir++) { - for (int jr = 0; jr < bfw; jr++) { - float L = bufexporig->L[ir][jr]; - const float Llin = LIM01(L / 32768.f); - const float addcomp = linear * (-kl * Llin + kl);//maximum about 1 . IL - const float exp_scale = pow_F(2.0, (lp.expcomp + addcomp)); - const float shoulder = ((maxran / rtengine::max(1.0f, exp_scale)) * hlcompthr) + 0.1f; - const float comp = (rtengine::max(0.f, (lp.expcomp + addcomp)) + 1.f) * hlcomp; - const float hlrange = maxran - shoulder; - - //highlight - const float hlfactor = (2 * L < MAXVALF ? hltonecurve[2 * L] : CurveFactory::hlcurve(exp_scale, comp, hlrange, 2 * L)); - L *= hlfactor * pow_F(2.f, addcomp);//approximation but pretty good with Laplacian and L < mean, hl aren't call - //shadow tone curve - L *= shtonecurve[2 * L]; - //tonecurve - lab->L[ir][jr] = 0.5f * tonecurve[2 * L]; - } - } - } else { #ifdef _OPENMP #pragma omp parallel for if (multiThread) #endif @@ -2511,10 +2475,36 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, int bfhr, i lab->L[ir][jr] = 0.5f * tonecurve[2 * L]; } } + } else { + constexpr float kl = 1.f; + const float hlcompthr = lp.hlcompthr / 200.f; + const float hlcomp = lp.hlcomp / 100.f; + +#ifdef _OPENMP + #pragma omp parallel for if (multiThread) +#endif + for (int ir = 0; ir < bfh; ir++) { + for (int jr = 0; jr < bfw; jr++) { + float L = bufexporig->L[ir][jr]; + const float Llin = LIM01(L / 32768.f); + const float addcomp = linear * (-kl * Llin + kl);//maximum about 1 . IL + const float exp_scale = pow_F(2.f, lp.expcomp + addcomp); + const float shoulder = (maxran / rtengine::max(1.0f, exp_scale)) * hlcompthr + 0.1f; + const float comp = (rtengine::max(0.f, (lp.expcomp + addcomp)) + 1.f) * hlcomp; + const float hlrange = maxran - shoulder; + + //highlight + const float hlfactor = (2 * L < MAXVALF ? hltonecurve[2 * L] : CurveFactory::hlcurve(exp_scale, comp, hlrange, 2 * L)); + L *= hlfactor * pow_F(2.f, addcomp);//approximation but pretty good with Laplacian and L < mean, hl aren't call + //shadow tone curve + L *= shtonecurve[2 * L]; + //tonecurve + lab->L[ir][jr] = 0.5f * tonecurve[2 * L]; + } + } } } - void ImProcFunctions::addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk) { // BENCHFUN