Lightroom plugin cr2hdr v3.0 DEV (WIP)

Started by kichetof, March 18, 2014, 05:04:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

poromaa

This is so neat! Thanks a lot!
Great work!

tomuse

Could you try to replace MLExportServiceProvider.lua with this version : https://bitbucket.org/kichetof/lr_cr2hdr/raw/b92125f660783c6bfd4bd44b8debf9af15153e41/MLExportServiceProvider.lua

Yes after changing this lua a Lightroom error come "unable to move the file" because the import and the export folder are the same.

After trying the modified version, could you try this one https://bitbucket.org/kichetof/lr_cr2hdr/raw/9cfa2803f006fd17af6cb6731415a61fa014fe2c/MLExportServiceProvider.lua
and let me know ! I replaced move by copy


After copy this lua File i became a Error "unable to copy the file" the same like above same Import / Export folder

My Folder form the CR Files is on Volume G:\...\DUAL_ISO - DNG\ The Error come always on the Volume C:\

Luiz Roberto dos Santos

@kichetof

Why export AdobeRGB? 0k, this is non-bayer, but why tag it?

Quotes = {
   id = "996B34E8-83FC-4D31-AF92-A644E36B8D96",
   internalName = "cr2hdr",
   title = "cr2hdr",
   type = "Export",
   value = {
      collisionHandling = "overwrite",
      embeddedMetadataOption = "all",
      exportServiceProvider = "com.adobe.lightroom.export.ml.dualiso",
      exportServiceProviderTitle = "Magic Lantern",
           export_colorSpace = "AdobeRGB"
      export_destinationPathSuffix = "ML",
      export_destinationType = "sourceFolder",
      export_photoSectionsEnabled = true,
      [...]


Anyway, I had some free time so I took the liberty to translate correctly to pt-br:
Note: the blue is the correct translation.

TranslatedStrings_br.txt
Quote
"$$$/ML/ExportManager/Title=Magic Lantern Dual ISO" [Magic Lantern Dual ISO]
"$$$/ML/ExportManager/MLTopic=Magic Lantern fio Dual ISO" [Tópico para Magic Lantern Dual ISO]
"$$$/ML/ExportManager/MLDocTech=doc Técnico" [Documento Técnico]
"$$$/ML/ExportManager/Description=Este plugin permite converter uma imagem ISO com dupla cr2hdr (graças a1ex) de lanterna mágica.^n^nComo funciona :^n^n- Exportação imagem para pasta temporária^n- Add -dualiso sufixo imaginar^n- Converter foto com cr2hdr^n- Importação convertido imagem deste catálogo LR^n- Adicionar DualISO ao rótulo^n- Adicionar imagem convertida para as coleções da imagem original" [Este plugin permite converter uma imagem Dual ISO por meio do cr2hdr (obrigado ao a1ex) do Magic Lantern.^n^Como isso funciona :^n^n- Exporta a imagem para uma pasta temporária^n- Adiciona o sulfixo -dualiso a imagem^n- Converte a imagem com cr2hdr^n- Importa a imagem convertida dentro do mesmo catálogo do LR^n- Adiciona o rótulo DualISO^n- Adiciona a imagem convertida as mesmas coleções de sua imagem original]
"$$$/ML/ExportManager/ASTitle=configurações avançadas" [Configurações Avançadas]
"$$$/ML/ExportManager/ASSuffix=Sufixo para saída de arquivo iso dupla :" [Sulfixo dual iso ao arquivo de saída :]
"$$$/ML/ExportManager/ASLabel=Definir o rótulo para arquivo ISO dupla :" [Definindo o rótulo para o arquivo Dual ISO :]
"$$$/ML/ExportManager/ASCollection=Adicionar arquivo ISO dupla a coleção?" [Adicionar o arquivo Dual ISO a coleção ?]
"$$$/ML/ExportManager/ASCollectionInfo=Desmarque para não adicionar à coleção imagem original" [Desmarcar para não adicionar à coleção da imagem original]
"$$$/ML/ExportManager/ASLog=Manter arquivo de log após a conversão?" [Mantenha o arquivo de histórico de eventos depois da conversão?]
"$$$/ML/ExportManager/ASLogInfo=Desmarque para remover" [Desmarque para remover]
"$$$/ML/Dependencies/ErrorTitle=~ Dependências erro ~" [~ Erro com dependências ~]
"$$$/ML/Dpendencies/Error=Este plugin obras (cr2hdr) precisam dcraw e exiftool.^n^nFavor instalá-lo antes de executar este plugin" [Para esse plugin trabalhar (cr2hdr) é necessário ter dcraw e exiftool.^n^nPor favor, instale estes antes de executar esse plugin]

:)

mad.eos

What happened? I installed v2 now it creates to a temp folder but then it's not available! Creates the dng file but then when I try to develop "Folder could not be found" am I missing something? What am I doing wrong? My workflow is doomed! LOL

Switching back to 1.03! You're still the man Kich! With all this help, and your hard work, i'm sure this problem will be solved in no time!  ;D
Canon EOS 1100D w/ 18-55mm | ML Nightly Build Tester

kichetof

Quote from: tomuse on March 25, 2014, 09:04:18 PM
Could you try to replace MLExportServiceProvider.lua with this version : https://bitbucket.org/kichetof/lr_cr2hdr/raw/b92125f660783c6bfd4bd44b8debf9af15153e41/MLExportServiceProvider.lua

Yes after changing this lua a Lightroom error come "unable to move the file" because the import and the export folder are the same.

After trying the modified version, could you try this one https://bitbucket.org/kichetof/lr_cr2hdr/raw/9cfa2803f006fd17af6cb6731415a61fa014fe2c/MLExportServiceProvider.lua
and let me know ! I replaced move by copy


After copy this lua File i became a Error "unable to copy the file" the same like above same Import / Export folder

My Folder form the CR Files is on Volume G:\...\DUAL_ISO - DNG\ The Error come always on the Volume C:\

Okay thanks for the report! It's the move/copy functions that is problematic on windows only... always windows, always...


Quote from: Luiz Roberto dos Santos on March 25, 2014, 11:53:30 PM
Why export AdobeRGB? 0k, this is non-bayer, but why tag it?

Do you prefer sRGB or ProPhoto ? I think is the best profil for export to cr2hdr, but if you think it's not, tell me the best :)

Quote from: Luiz Roberto dos Santos on March 25, 2014, 11:53:30 PM
Anyway, I had some free time so I took the liberty to translate correctly to pt-br:
Note: the blue is the correct translation.

TranslatedStrings_br.txt
:)

Many thanks for your corrections! I'll add on the next stable version :)

kichetof

Quote from: camagna on March 25, 2014, 06:25:49 PM
There must be something wrong. in LR (5.3, Mac 10.9.2) I get this errors on plugin loading:

Plug-in error log for plug-in at: /Users/xxxx/Library/Application Support/Adobe/Lightroom/Modules/cr2hdr.lrplugin

**** Error 1

An error occurred while attempting to run one of the plug-in's scripts.
Could not load toolkit script: MLFunctions

**** Error 2

Could not load the post-processing filter from this plug-in.
Could not load toolkit script: MLFunctions

Very strange ! I've the same configuration, I'll investigate why you have this error.

Quote from: mad.eos on March 26, 2014, 12:26:04 AM
What happened? I installed v2 now it creates to a temp folder but then it's not available! Creates the dng file but then when I try to develop "Folder could not be found" am I missing something? What am I doing wrong? My workflow is doomed! LOL

Switching back to 1.03! You're still the man Kich! With all this help, and your hard work, i'm sure this problem will be solved in no time!  ;D

The copy/move fail on windows, maybe you have this problem

------------------------------------------------------------------------------------------


Windows, windows, windows .......

I think I found why it's bug! my custom functions is not loaded... I need to found how to read it!


====================================================

Please try to replace MLExportServiceProvider.lua with this version. It works on my windows.. I really need a Windows VM at home ;)

kichetof

V2.0.12 to download ;) Try and report me if it works (... or not :))

forget to update portuguese correction, 2.0.2 now up to date ;)

Luiz Roberto dos Santos

Quote from: kichetof on March 26, 2014, 09:30:20 AM
Do you prefer sRGB or ProPhoto ? I think is the best profil for export to cr2hdr, but if you think it's not, tell me the best

Well, in my work process I try to keep as much detail in the process. ProPhotoRGB is known to be the larger of the known color spaces (not counting the tangential wide gammut, etc.).
But, I think the engine Lightroom has its own color space, called Melissa RGB, which does not restrict or limit the colors, keeping the information in full.

Quote from: kichetof on March 26, 2014, 09:30:20 AM
Many thanks for your corrections! I'll add on the next stable version :)

;D

tomuse

Please try to replace MLExportServiceProvider.lua with this version. It works on my windows.. I really need a Windows VM at home ;)
« Last Edit: Today at 11:49:45 AM by kichetof »


Yes wonderfull with this new LUA File the workflow rock... Many thanks, fast and big JOB !!!

tomuse

V2.0.2 to download ;) Try and report me if it works (... or not :))

forget to update portuguese correction, 2.0.2 now up to date ;)


Good, this Version 2.02 has no Problems, everything is as it should be :)

shahed26

Thanks for this. Going to try it out on windows 8.1

kichetof

V2.1 :)

Quote from: Danne on March 25, 2014, 05:06:59 PM
"With v2, you can't import into a subfolder. I can add a field to add a custom name to create a new subfolder on the top folder"

Hehe, I like the sound lf that

You can now!

mad.eos

You sir... I take off my hat... Great job!! It now works!! Thank you!  ;)
Canon EOS 1100D w/ 18-55mm | ML Nightly Build Tester

LazR

I have reread the topic numerous times in hopes of finding an answer, but could not find one. I have installed OSX_cr2hdr as per the instruction, and I run cr2hdr, which is in my Applications folder, before starting Lightroom, but I continue to receive Error #11 when trying to export a single Dual ISO image. The plugin appears to be installing correctly through the plugin manager as well as manually (tried numerous times).

Any ideas what I might be doing wrong? Your help is greatly appreciated.

Running on:
Lightroom 5.3
Mac OS X 10.7.5
cr2hdr.2.1


kichetof

Hi LazR,

Could you try to run cr2hdr into a terminal a paste the output. Maybe I'll can determine what the problem is with that.

LazR

Thank you your time and help, Kichetof. Sorry, as I am quite the newb when it comes to all of this, so perhaps I am not completely understanding your request.

I opened the GUI version of cr2hdr Beta 2.0 app in terminal (open -a /Applications/cr2hdr.app/ 140327-092716-0001.CR2) and it simply opens the app and processes the CR2 dual iso file perfectly. There was no output afterwards in Terminal. Only the saved text file for the image processed (info below) was included in the folder with the new DNG file.

I was able to process the dual iso files like this before. It is just in your plugin that I still get the Error #11. Could this be related to your Lightroom plugin not finding the cr2hdr app? Should I have another version of cr2hdr on my Mac instead? Perhaps the binary version in /usr/bin folder instead. I have tried both of the versions of your plugin listed on the beginning of this post and both are giving me the same #11 Error.

I appreciate your help.

Text file:
    1 image files updated
cr2hdr: a post processing tool for Dual ISO images

Last update: 2f4e2df on 2013-12-02 17:45:36 UTC by alex:
cr2hdr: fix DNG compression under Windows

Active options:
--amaze-edge    : use a temporary demosaic step (AMaZE) followed by edge-directed interpolation (default)
--cs2x2         : apply 2x2 chroma smoothing in noisy and aliased areas (default)

Input file      : 140327-092716-0001.CR2
Camera          : Canon EOS 7D
Full size       : 5360 x 3516
Active area     : 5202 x 3465
White level     : 12500
Black borders   : 158 left, 51 top
Black level     : 1957
ISO pattern     : dBBd GBRG
Noise levels    : 5.86 21.15 23.25 5.79 (14-bit)
ISO difference  : 4.08 EV (1691)
Black delta     : 8.20
Dynamic range   : 10.83 (+) 8.82 => 12.90 EV (in theory)
Looking for hot/cold pixels...
Hot pixels      : 23
Cold pixels     : 990
AMaZE interpolation ...
Amaze took 4.22 s
Edge-directed interpolation...
Semi-overexposed: 7.17%
Deep shadows    : 74.08%
Horizontal stripe fix...
Full-res reconstruction...
ISO overlap     : 3.8 EV (approx)
Half-res blending...
Chroma smoothing...
Building alias map...
Filtering alias map...
Smoothing alias map...
Final blending...
Noise level     : 4.49 (16-bit), ideally 4.44
Dynamic range   : 13.20 EV (cooked)
Black adjust    : -1
Output file     : 140327-092716-0001.DNG


kichetof

So strange!

The plugin work well, but the execute command for cr2hdr doesn't works...

Could you uninstall the plugin, install this version and paste the output log (normally MLDualISO.txt into your home folder or documents folder). You can replace your username/name if you want but keep space if present.

I hope I'll solve your problem quickly!

Danne

Quote from: kichetof on March 27, 2014, 12:21:42 AM
V2.1 :)

You can now!

Will try this asap!

*Nice one! Creates a subfolder and puts them in there nice and with options keeping logs or not. Real nice. Truly grateful for your work on this! Big thanks

LazR

Quote from: kichetof on March 27, 2014, 09:32:56 PM
So strange!

The plugin work well, but the execute command for cr2hdr doesn't works...

Could you uninstall the plugin, install this version and paste the output log (normally MLDualISO.txt into your home folder or documents folder). You can replace your username/name if you want but keep space if present.

I hope I'll solve your problem quickly!

Here is the information from the log file:
2014-03-28 03:52:02 +0000, DEBUG   Export cr2hdr file: /Volumes/Photo Vault 1/Underwater Photos/2014 Photos/2014-03-27/ML/140327-092716-0001-dualiso.DNG
2014-03-28 03:52:02 +0000, DEBUG   Export cr2hdr output: /Volumes/Photo Vault 1/Underwater Photos/2014 Photos/2014-03-27/ML/140327-092716-0001-dualiso.txt
2014-03-28 03:52:02 +0000, DEBUG   Export xmp file: /Volumes/Photo Vault 1/Underwater Photos/2014 Photos/2014-03-27/ML/140327-092716-0001-dualiso.xmp
2014-03-28 03:52:02 +0000, DEBUG   Plugin Path: /Lightroom Catalogs/Plugins/cr2hdr.lrplugin
2014-03-28 03:52:02 +0000, DEBUG   Command for cr2hdr: exec "/Lightroom Catalogs/Plugins/cr2hdr.lrplugin/bin/cr2hdr" "/Volumes/Photo Vault 1/Underwater Photos/2014 Photos/2014-03-27/ML/140327-092716-0001-dualiso.cr2" > "/Volumes/Photo Vault 1/Underwater Photos/2014 Photos/2014-03-27/ML/140327-092716-0001-dualiso.txt"
2014-03-28 03:52:02 +0000, DEBUG   Problem with export to cr2hdr
2014-03-28 03:52:02 +0000, DEBUG   Error: 11

kichetof

uh?! I don't understand...

Quote from: LazR on March 28, 2014, 04:57:55 AM
2014-03-28 03:52:02 +0000, DEBUG   Command for cr2hdr: exec "/Lightroom Catalogs/Plugins/cr2hdr.lrplugin/bin/cr2hdr" "/Volumes/Photo Vault 1/Underwater Photos/2014 Photos/2014-03-27/ML/140327-092716-0001-dualiso.cr2" > "/Volumes/Photo Vault 1/Underwater Photos/2014 Photos/2014-03-27/ML/140327-092716-0001-dualiso.txt"

Could you try to run into a Terminal this command and let me know:

"/Lightroom Catalogs/Plugins/cr2hdr.lrplugin/bin/cr2hdr" "/Volumes/Photo Vault 1/Underwater Photos/2014 Photos/2014-03-27/ML/140327-092716-0001-dualiso.cr2"

(If quote failed, remove it)

Maybe there are some restriction in 10.7.5 but it's too old and my head doesn't remember...

When you launched cr2hdr into a terminal in my last request, do you use cr2hdr exec from my plugin or from another one ?

LazR

Quote from: kichetof on March 28, 2014, 09:01:09 AM
Maybe there are some restriction in 10.7.5 but it's too old and my head doesn't remember...

When you launched cr2hdr into a terminal in my last request, do you use cr2hdr exec from my plugin or from another one ?

I think you might be on to something here, Kitchetof. I originally ran the cr2hdr APP that was included in the zip file in OSX_cr2hdr. As a standalone application, dropping the CR2 files into the window will convert them properly as DNG files. Now, when trying the cr2hdr exec in your application or any other version I could find in the Mac terminal, I keep getting an Illegal instruction: 4. From what I read online, this error has to do with code that is not compatible with an older OS X version. Strange that the cr2hdr APP works perfectly, though. Hmmmm...

I will upgrade my system to OS X Maverick and report back if the problem continues. Thank you so much for your time and assistance. It is greatly appreciated.

kichetof

The cr2hdr app on my plugin was build on my system (Mac 10.9.2) and maybe I'll have to enable something to be backward compatible.

I'll read how to build with backward compatibility. Thanks for your feedback

LazR

Quote from: kichetof on March 28, 2014, 02:56:44 PM
The cr2hdr app on my plugin was build on my system (Mac 10.9.2) and maybe I'll have to enable something to be backward compatible.

I'll read how to build with backward compatibility. Thanks for your feedback

FYI - I pulled the cr2hdr exec from the package content of the cr2hdr gui app that works with my system and even that one gives me the same error when executing it in the Mac terminal.

kichetof

Quote from: LazR on March 28, 2014, 03:18:49 PM
FYI - I pulled the cr2hdr exec from the package content of the cr2hdr gui app that works with my system and even that one gives me the same error when executing it in the Mac terminal.

uh ?! When you run outside LR it works, but in my plugin no.

Which command do you use into the terminal ?

could you run "ls -l" on the folder where cr2hdr for the plugin is. It's really strange

LazR

Quote from: kichetof on March 28, 2014, 04:20:05 PM
uh ?! When you run outside LR it works, but in my plugin no.

Which command do you use into the terminal ?

could you run "ls -l" on the folder where cr2hdr for the plugin is. It's really strange

Good news is that upgrading the OS X to Maverick did the trick. Your wonderful plugin is working beautifully now.

Here is the listing from the bin folder inside your plugin:
-rwxr-xr-x  1 Laz  wheel   101256 Mar 16 19:37 cr2hdr
-rwxr-xr-x@ 1 Laz  wheel   164735 Mar 16 19:37 cr2hdr.exe
-rwxr-xr-x@ 1 Laz  wheel   631720 Mar 19 23:04 dcraw.exe
-rwxr-xr-x@ 1 Laz  wheel  5265644 Mar 19 23:04 exiftool.exe