[scripting] ConvertColor CameraType - limited choice 0-7 ? (need Canon option)

Discussion in 'Scripting and Programming' started by tech_api, Jul 28, 2015.

  1. tech_api

    tech_api Cyanogen Customer

    Joined:
    Jul 3, 2015
    Messages:
    12
    Hi All,

    When I use that method, I always get non-correcly debayerized images.
    (I tried all settings, and 0/+1 offsets)

    I need to choose another camera than the available ones - but the choice is limited to 0-7. (by the way, 8 works, too ;-) ).

    I currently use a Canon T6s - that is a new model, and maybe does fills the EXIF correctly.
    In the workaround kindly given by Owen - to make T6s work w/MDL- the CameraType is set to 36 in the txt file CCDPlugNeoEos.txt.

    ----

    But the method only accepts 0-8 values.

    When I use MaximDL "manually", go to color convert menu, with the same images, it looks like the system chooses Canon 6D (which gives a good image in terms of bayer to RVB conversion).
    "Auto-select using header" is greyed, so I assume this is the default choice?

    How could I FORCE my CameraType to the right value then ?
    Any workaround ? e.g. to fill the exif with fake values ?

    Thanks a lot...and clear skies !
     
  2. Owen Lawrence

    Owen Lawrence Retired Staff

    Joined:
    Oct 1, 2014
    Messages:
    1,397
    In the GUI, the colour conversion isn't really affected (much) by your choice of camera model once you've chosen it in the list and changed parameters. Basically the models in the list provide a starting point, and then the values you choose are applied to that point. Theoretically you can end up with exactly the same results by selecting any model as long as you choose the settings that get you there.

    You should choose 0 (zero) for the CameraType value. It's actually the conversion algorithm type, not the camera model. It's used for all of the Canon models. (Don't confuse it with the CameraType in the CCDPlugNeoEos.txt, which actually does specify the model. That file is an undocumented back door so don't count on its features being supported in any permanent way. Use only as directed. Sorry for the unfortunate choice of names. I must admit I'm pretty pleased that it's doing the job it was supposed to, which is helping us add support for the new model.)

    Interactively, once you have your Convert Color dialog doing the job the way you like it, close it and look at the values in the file MaxIm DL 6\Settings\ConvertColor.txt. I think those are the ones you need for your call to ConvertColor().

    There is no way to select a preset through MaxIm DL's automation interface. Presets are just starting points anyway; selecting one from the GUI just loads a copy of it as the "current" preset. Changes made after that only affect the current preset, unless you update the selected one (from its little menu), which overwrites the saved values. When you launch a script the current settings are cached. The script can then manipulate them all it wants, and when it exits the settings are restored to whatever they were.

    - Owen -
     
  3. tech_api

    tech_api Cyanogen Customer

    Joined:
    Jul 3, 2015
    Messages:
    12
    Dear Owen-

    There is something that I should be misunderstanding.

    My process :
    I choose RVB in color convert window.
    I choose default values, and get a standard ConvertColor.txt :

    Like this one :

    AutoBackground 0
    AutoSelect 0
    Camera 0
    CheckAuto 0
    CheckAutoFSP 1
    HighQuality 1
    OffsetB 0.0
    OffsetG 0.0
    OffsetM 0.0
    OffsetR 0.0
    OffsetX 0
    OffsetY 0
    ScaleB 100.0
    ScaleG 100.0
    ScaleR 100.0
    UnderSampled 0

    If I change camera, etc. the file changes.
    I also discovered that you should restart MDL to reload the ConvertColor.txt, right ?

    ----

    My image is too green with default settings...but anyway.

    when I launch my script, I use the following command :
    my_local_image.ConvertColor 0, 100, 100, 100, 0, 0, 0, 0, 0

    I tought I would get the same results - and then 'play' with my scale/bcgrd values until I get the right balance.

    But images are totaly different...!

    If I use dcraw.exe on my images, I get fairly close results to the ones I get when using MDL the 'manual' way, and tweaking the RVB scale/bckgrd parameters.

    I neeed your help...what am I doing the wrong way ?

    Thank you very much for your support.

    Cheers,

    François
     
  4. Owen Lawrence

    Owen Lawrence Retired Staff

    Joined:
    Oct 1, 2014
    Messages:
    1,397
    The number I gave you, 36, is the code for the EOS 1200D, i.e. Rebel T5. If you select that camera in the Color Convert dialog you may get a starting point closer to your goal, and it will still use the same algorithm (i.e. "CameraType") as your script function call. You could still choose "RGB" from the list, but it's more work.

    The only difference I can see between your script call and the settings you posted is that "HighQuality" is on in the dialog. The script command does not support that feature. What happens if you uncheck it? Do your two tests then produce closer results?

    - Owen -
     
  5. tech_api

    tech_api Cyanogen Customer

    Joined:
    Jul 3, 2015
    Messages:
    12
    Thanks Owen for your reply.

    I think I better understand the way it works now. The content of the dialog windows is really influencing the scripts...
    I am using step-by-step fine tuning to get a correct color balance. I will check the impact of the "HighQuality" checkbox, and post any feedback.

    One more concern :

    When I open a .CR2 file (still from the 760d), using the document.OpenFile method, it looks like the file is automaticaly debayerized.
    It really performs the same way as when the Convert to Color checkbox (in Open menu) is forced - but the behavior when scripting is the same, whether I check this box or not.

    Is this a known bug ? or is there some interaction I have not understood ?

    Thanks for your help.

    François
     
  6. Owen Lawrence

    Owen Lawrence Retired Staff

    Joined:
    Oct 1, 2014
    Messages:
    1,397
    Hi François,

    I wouldn't call it a "bug" as much as a deficiency. The author left a comment in the code to suggest someday adding an optional parameter to control whether or not to convert to colour during OpenFile(). That was ten years ago. The forced conversion remains to this day.

    - Owen -
     
  7. tech_api

    tech_api Cyanogen Customer

    Joined:
    Jul 3, 2015
    Messages:
    12
    Hi Owen !

    uh...too bad - everything was SO different in 2005, I understand this guy ;-))

    OK - what are the workarounds ? May I change something in the header ? or does the system do this automatically with .CR2 extensions ?

    One question : it looks like the conversion is NOT correlated with the ColorConvert box options...do you confirm that it performs some 'default' color conversion ?

    Thank you very much for your support.

    François
     
  8. Owen Lawrence

    Owen Lawrence Retired Staff

    Joined:
    Oct 1, 2014
    Messages:
    1,397
    François,

    Yes, I can confirm that OpenFile() does not correlate with the ColorConvert dialog settings. I took a closer look, and learned that OpenFile() on a ".cr2" file runs the same colour conversion as "RAW Color" readout mode on the "Expose" tab. It is indeed a built-in "default" colour conversion.

    You should be able to use the File | Batch Save And Convert... dialog to get around this barrier by loading your .cr2 files and saving them as .fit. Then you can use your script to do the colour conversion as you wish. To avoid that manual step in the future, acquire your images as "RAW Monochrome".

    - Owen -
     
  9. tech_api

    tech_api Cyanogen Customer

    Joined:
    Jul 3, 2015
    Messages:
    12
    Thanks Owen -

    I think the best workaround is to use MDL for acquiring the images from the DSLR - then I can save FITS files, and no more issues, as I get through ColorConvert() - and the dialog box parameters are now "under control", thanks to your (see above) help !

    François
     

Share This Page