-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new option to set a fixed size for brackets. #168
base: master
Are you sure you want to change the base?
Conversation
@ff2000 did you mean the program should exit if that is not the case? |
@Beep6581 Yes, that's what I wanted to say. Or would you just put the last remaining photos in a new set? As merging RAWs takes some time I think it's better to just abort instead of creating bad HDRs. |
I agree. If there are remaining photos, that means there is a problem. I would definitely not put the last photos in a new set. P.S. I wrote a Bash script which does exactly that and have been using it for years. It allows me to specify the number of images per set, then takes all input images and groups them accordingly. I originally wrote it for tufuse/enfuse, which were not capable of grouping images automatically based on metadata like HDRMerge can. It eliminates the need for relying on metadata, which sometimes can fail, for example when shooting quick brackets using my old Pentax K10D sometimes it was not possible to figure out which image belongs to which set based on metadata, as the creation time's precision was 1 second, and if you happened to shoot more than one set in that second, then you had a metadata problem. Using the script eliminated that problem. |
6ad9867
to
4775297
Compare
Yes, that's true, but as mentioned here it requires scripting skills: Would you probably also like to have implemented some sort of batch-processing/editing in the gui? On import the user can select if the files are for one hdr, should be grouped automatically or by a fixed number for the set size. I now abort (throw a logic_error). IMO should be done in the bad case for "-i", "-b", "-w", "-g", "-r", too. |
4775297
to
882c813
Compare
@ff2000 sorry for the delay, I haven't tested this yet but will do so the next time I process some shots. @heckflosse @Floessie any objections code-wise? |
I’m not familiar with the files you changed Edit: |
hdrmerge groups the files to create an HDR by looking at the EXIF time.
Works most of the time but sometimes fails. E.G. missing/bad EXIF data.
Per user request on pixls forum I implemented an option where the user can
just say "I bracketed my shots, each HDR should be created with 5 shots.
Here are 15 RAW files. HDR - Merge!"
How should the batch mode be refreshed in your opinion?
Am So., 15. Sept. 2019 um 21:38 Uhr schrieb Imad abdulkarim <
[email protected]>:
… I’m not familiar with the files you changed
Can someone explain to me what Is this PR is about?
Is it refreshing to CLI batch mode by any chance?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#168?email_source=notifications&email_token=AAPB3TG5JPA5MPR5SXPB3MTQJZ6L3A5CNFSM4GHMY572YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XWPDY#issuecomment-531589007>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPB3TFLE67EQ7WUW53TELDQJZ6L3ANCNFSM4GHMY57Q>
.
|
@ff2000 I made a an autocorrect typo in my previous comment. but it's all good now I read the changes again and I understand what this PR is about. I think what you did is the awesome and very handy 👍 ; usually bracketed sets have the same amount image per set. @Beep6581, could you add this to the v0.7 milestone? |
Before merging there IMO are some changes that should be considered, as mentioned in the OP of this PR:
|
Regarding the expiations part, I'm not sure I lack the technical skills for that part, if you could solve it that would be great. v0.6 will be released soon and v0.7 will come after once we get some bugs fixed so adding this to v0.7 looks like the right thing to do in my opinion. |
Concerning exceptions: I introduced a |
This is a good feature. However, the list of switches is becoming confusing, so we should take the opportunity to clean them up. I am not a fan of mixing lowercase with uppercase switches. HDRMerge
HDRMerge
I will refer the RawTherapee:
Both HDRMerge and RawTherapee use "Batch mode" has become vague. Now there are two batch modes - one groups images based on a timestamp, the other based on a user-defined count of images per group. Or maybe even three batch modes, if you consider that the default behavior is to assume all input images belong to one group. Q1: Q2: Furthermore, please confirm: when using the new IPG mode, are Assuming the answers to the two questions above are correct, instead of "batch mode" and
Isn't that more clear? |
@Beep6581 thanks for the thoughtful reply. Concerning the naming:
to get memorizable long/short option names? A related issue is hardening the command line parsing. I really would like to port it to boost::program_options as it makes things more robust and easier to use and extend. If that is OK we should think of compatible ways to specify cmdline args. ( I could do the boost porting (if that's desired) and change the CLI. |
@ff2000 0.* implies "unstable/feature-incomplete" while 1.0 implies "stable/feature-complete", so we should definitely break things sooner rather than later, especially since my proposed changes might require changes in your branch. I prefer |
What about And would it be OK to depend on boost? It's already used for tests. |
Why not. |
@ff2000 While I like the |
@Floessie thank you very much for the hint! I did a lot of Qt programming some time ago and back then this did not yet exist, so I used boost. I will use the Qt framework instead now. |
882c813
to
eaa1d94
Compare
Options are read through QCommandLineParser now. I'm currently transferring all the help text over. - QCommandLineOption batchOpt({"B","batch"}, tr("batch"));
+ QCommandLineOption batchOpt({"B","batch"},
+ tr("Batch mode: Input images are automatically grouped into bracketed sets,") + " " +
+ tr("by comparing the creation time. Implies -a if no output file name is given.")
+ );
parser.addOption(batchOpt);
- QCommandLineOption bracketSizeOpt("s", tr("bracket-size"), "integer", "-");
+ QCommandLineOption bracketSizeOpt("s",
+ tr("Fixed number of images per bracket set. Use together with -B. "
+ "Creation time and --single option will be ignored."),
+ "integer", "-1");
parser.addOption(bracketSizeOpt); I wanted to preserve the old translations as far as possible. The bracketSizeOpt IMO is easier to maintain. [I do this step-by-step to keep commits minimal and make possible issues I introduce easily bisectable.
|
Don't worry about preserving translations. |
Porting to QCommandLineParser should be complete now. Next step: refactor batch cmdline options. |
Refactoring cmdlineargs done.
Summed up changes:
Questions:
|
i personally think |
That's also my thought, but as we now have the "group" option I had to think about it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are more places that should be const
ified, I didn't tag them all. It's your choice to change them, but generally recommendable.
Otherwise this is a nice overhaul. 👍
Thx @Floessie for the feedback. I will const-qualify as much as I can and fix the other things. |
Removed the GROUPING prefix. One more thing could be to not use abbreviations to more comply to #188 (e.g. bitOpt -> bitOption, invalidParamHandler -> invalidParameterHandler). |
@fanckush do you see any more abbreviations (besides Anybody also gave it some real testruns on a set of RAW files? The tests I did succeeded but I may be doing just the right things ;) |
Bracketed sets will not get computed automatically. Closes jcelaya#146
This commit drops the "-a" option as it wasn't used besides the useGUI check. Use -B for batch conversion and automatic naming of generated DNG files. Otherwise it's compatible. Also add validation of parameters.
Grouping can be done with all: behaviour when "--batch" was not set but only "-o" auto: old "--batch" behaviour manual: specify the size of each group/bracketed set of images
b2d338c
to
3ee7c03
Compare
Commits squashed. Each commit compiles and converts as expected - I hope I didn't miss something... At least the final state is where the review ended ;) |
Bracketed sets will not get computed automatically.
Sets get built in order of input files.
NOTE: This is the basic functionality.
Probably you want a different character than "-i" for the option.
Also this currently requires "-B/--batch", if it stays the help text needs to be updated. (IMO it's still batch processing, so it made sense for me).
And IMO there is a check needed if the number of files is a multiple of the set size. Program should exit in that case IMO.
[option parsing in general could be safer: options that expect an integer currently increment argc and do not decrement it if the value is not an integer which will eat the next option. IMO in such cases the program should exit and not keep processing the files.]