Create Canon DSLR CR2 image statistics (exiftool & GNU Plot) and convert ML dual ISO CR2 files painlessly for post-processing
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.1 KiB

6 years ago
  1. --- a/magic-lantern/modules/dual_iso/cr2hdr.c
  2. +++ b/magic-lantern/modules/dual_iso/cr2hdr.c
  3. @@ -60,6 +60,7 @@
  4. /** Command-line interface */
  5. +int process_method = 0;
  6. int interp_method = 0; /* 0:amaze-edge, 1:mean23 */
  7. int chroma_smooth_method = 2;
  8. int fix_pink_dots = 0;
  9. @@ -98,7 +99,13 @@
  10. void check_shortcuts()
  11. {
  12. - if (shortcut_fast)
  13. + if (process_method == 1)
  14. + {
  15. + interp_method = 2;
  16. + chroma_smooth_method = 1;
  17. + gray_wb = 5;
  18. + }
  19. + else if (shortcut_fast)
  20. {
  21. interp_method = 1;
  22. chroma_smooth_method = 0;
  23. @@ -129,6 +136,13 @@
  24. struct cmd_group options[] = {
  25. {
  26. + "Processing methods", (struct cmd_option[]) {
  27. + { &process_method, 0, "--process", "Process Dual ISO compatible file (default)" },
  28. + { &process_method, 1, "--dry-run", "Only check file for Dual ISO presence" },
  29. + OPTION_EOL
  30. + },
  31. + },
  32. + {
  33. "Shortcuts", (struct cmd_option []) {
  34. { &shortcut_fast, 1, "--fast", "disable most postprocessing steps (fast, but low quality)\n"
  35. " (--mean23, --no-cs, --no-fullres, --no-alias-map, --no-stripe-fix, --no-bad-pix)" },
  36. @@ -870,12 +884,12 @@
  37. whites[num_files] = raw_info.white_level;
  38. num_files++;
  39. }
  40. - else
  41. + else if (process_method != 1)
  42. {
  43. printf("ISO blending didn't work\n");
  44. }
  45. }
  46. - else
  47. + else if (process_method != 1)
  48. {
  49. printf("Doesn't look like interlaced ISO\n");
  50. }
  51. @@ -2206,7 +2220,15 @@
  52. double corr_ev = 0;
  53. int white_darkened = white_bright;
  54. int ok = match_exposures(&corr_ev, &white_darkened);
  55. - if (!ok) goto err;
  56. + if (!ok)
  57. + {
  58. + goto err;
  59. + }
  60. + else if (ok && process_method == 1)
  61. + {
  62. + printf("Interlaced ISO detected\n"); /*. File: %s\n", filename);*/
  63. + return 0;
  64. + }
  65. /* run a second black subtract pass, to fix whatever our funky processing may do to blacks */
  66. black_subtract_simple(raw_info.active_area.x1, raw_info.active_area.y1);