Real vs market ISO - page 11 - General Discussion and Assistance - CHDK Forum

Real vs market ISO

  • 110 Replies
  • 25840 Views
*

Offline philmoz

  • *****
  • 3411
    • Photos
Re: Real vs market ISO
« Reply #100 on: 29 / July / 2013, 02:59:37 »
Advertisements
Here's what I've found so far (although I reserve the right to be completely wrong).

In the 'old' ISO code (release-1.1) a conversion was done from the 'real' ISO entered to the SV96 values to set into the propcases.

The conversion equation (shooting_get_sv96_from_iso) was not based on the APEX equation; but was using some other factor whose source remains lost in the dim distant past.
However the code did produce the correct SV96 values, and was balanced by equivalent equations to convert SV96 back to 'real' ISO and 'real' ISO to 'market' ISO. So no-one really noticed.

The end result is that the old CHDK ISO values are about as 'real' as the Canon 'market' values - they are just a number that gets converted to SV96 - which is the important value.

The code changes to entering CHDK ISO overrides as 'market' values has introduced a conversion error because the new conversion from 'market' to 'real' is based on the APEX equations to get the 'real' ISO; but the code is still using the dodgy equations to get the SV96 values.

For example:
    in release-1.1 -> CHDK ISO 261 = SV96 603 = Canon ISO 400
    in new code   -> CHDK ISO 400 = 'real' ISO 243 = SV96 592 = Canon ISO 369

The Canon OSD shows this as ISO 400, and the difference is only about 1/9th of a stop - so hardly noticeable (even if the firmware is actually using the value and not rounding it to some other value).

My suggestion is to completely abandon the idea of 'real' ISO, and just make the code work with (and display) the Canon ISO values only, using the APEX conversion equations.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline philmoz

  • *****
  • 3411
    • Photos
Re: Real vs market ISO
« Reply #101 on: 29 / July / 2013, 09:23:38 »
Some more findings from the G12 & SX30:

The special case values (sv96=371, sv96_m=449), for converting 'low' ISO values from 'market' to 'real', only happen when the camera is manually set to ISO 80.

If the camera selects ISO 80 when set to AUTO ISO then the sv values used are sv96=380, sv96_m=449 - so the conversion factor to convert 'market' to 'real' remains at 69 and the special case is not needed.

Since we override ISO by forcing the camera to think it is in AUTO ISO mode, then stuffing the propcase values, it would seem that we don't need any special cases for low ISO.

The ISO override can be simplified as follows.

First define the following:
 convert_iso_to_sv96 function = int(log2(ISO/3.125)*96+0.5)   [APEX equation]
 canon_iso_base = 50, 100 or 200  [as per current shooting_get_iso_market_base(), constant for a given camera]
 canon_sv96_base = convert_iso_to_sv96(canon_iso_base)  [also constant for a given camera]
 canon_sv96_offset = 69  [fixed offset to adjust sv96 for PROPCASE_SV]
 CHDK_iso = target ISO override

Now calculate:
 CHDK_sv96 = convert_iso_to_sv96(CHDK_iso)

Then set PROPCASES:
 PROPCASE_ISO_MODE = 0  [force AUTO ISO]
 PROPCASE_SV_MARKET = canon_sv96_base
 PROPCASE_SV = CHDK_sv96 - canon_sv96_offset
 PROPCASE_DELTA_SV = CHDK_sv96 - canon_sv96_base
 
Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline reyalp

  • ******
  • 13718
Re: Real vs market ISO
« Reply #102 on: 29 / July / 2013, 23:04:56 »
Thanks Phil, that makes a lot of sense.

Quote
The special case values (sv96=371, sv96_m=449), for converting 'low' ISO values from 'market' to 'real', only happen when the camera is manually set to ISO 80.

If the camera selects ISO 80 when set to AUTO ISO then the sv values used are sv96=380, sv96_m=449 - so the conversion factor to convert 'market' to 'real' remains at 69 and the special case is not needed.

Since we override ISO by forcing the camera to think it is in AUTO ISO mode, then stuffing the propcase values, it would seem that we don't need any special cases for low ISO.
That would definitely make things simpler.

It would be interesting to know which propcase actually accomplishes the override. I assume it's the base + delta, as I recall that just setting sv96 doesn't do it. Also, does the base have to be constant?

I think we should try your approach in 1.3, and if it works as expected we can back port it to 1.2
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3411
    • Photos
Re: Real vs market ISO
« Reply #103 on: 29 / July / 2013, 23:31:40 »
Thanks Phil, that makes a lot of sense.

Quote
The special case values (sv96=371, sv96_m=449), for converting 'low' ISO values from 'market' to 'real', only happen when the camera is manually set to ISO 80.

If the camera selects ISO 80 when set to AUTO ISO then the sv values used are sv96=380, sv96_m=449 - so the conversion factor to convert 'market' to 'real' remains at 69 and the special case is not needed.

Since we override ISO by forcing the camera to think it is in AUTO ISO mode, then stuffing the propcase values, it would seem that we don't need any special cases for low ISO.
That would definitely make things simpler.

It would be interesting to know which propcase actually accomplishes the override. I assume it's the base + delta, as I recall that just setting sv96 doesn't do it. Also, does the base have to be constant?

I think we should try your approach in 1.3, and if it works as expected we can back port it to 1.2

On my cameras PROPCASE_SV_MARKET is always set to the same value when the camera is in AUTO ISO, and PROPCASE_DELTA_SV contains the adjustment to get the actual sv96 value.

When setting the ISO value directly (Canon setting) then PROPCASE_DELTA_SV is always 0 and PROPCASE_SV_MARKET is the actual sv96 value for the selected ISO.

PROPCASE_SV is always the target ISO sv96 value - 69.

(We need better names for the propcases methinks!).

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


*

Offline philmoz

  • *****
  • 3411
    • Photos
Re: Real vs market ISO
« Reply #104 on: 30 / July / 2013, 20:14:58 »
For example:
    in release-1.1 -> CHDK ISO 261 = SV96 603 = Canon ISO 400
    in new code   -> CHDK ISO 400 = 'real' ISO 243 = SV96 592 = Canon ISO 369

I've found a possible source of this confusion / discrepancy (I think).

In the release-1.1 (and older) code the conversion from CHDK 'real' ISO to sv96 was done using
    sv = log2(iso * pow(2, -7/4))
This is the equation shown in the wikipedia article at http://en.wikipedia.org/wiki/APEX_system
There is a corresponding function to convert from sv96 back to 'real' ISO

However the conversion of Canon 'market' ISO to sv96 is done using
    sv = log2(iso / 3.125)
which is the equation in Doug Kerr's APEX PDF document.
Again a corresponding conversion exists to go back from sv96 to 'market' ISO.

Now the CHDK calculated values for 'market' ISO and sv96 match the Canon values generated by the firmware so it would appear that Canon use the Doug Kerr conversion.

I suggest we standardise on the Doug Kerr equation for 1.3.
This will mean that any scripts or documentation that use 1.1 CHDK 'real' ISO values will no longer be accurate.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline lapser

  • *****
  • 1093
Re: Real vs market ISO
« Reply #105 on: 30 / July / 2013, 21:21:45 »
I suggest we standardise on the Doug Kerr equation for 1.3.
http://dougkerr.net/pumpkin/articles/APEX.pdf
I think you're talking about this document? It sounds like Wikipedia is using the original Apex definition, which is incorrect according to this quote from the article:

Quote
Speed value (Sv)
Speed value (Sv) reflects the sensitivity of the film or equivalent,
expressed as an “ISO speed”. A larger Sv represents a greater
sensitivity (speed).
Speed
value (Sv)
Sensitivity
(ISO speed)
0 3.125 [3]
1 6.25 [6]
2 12.5 [12]
3 25
4 50
5 100
6 200
7 400
8 800
9 1600
10 3200
(Actually, in the original definition of APEX, the precise speeds at the
different Sv points were “1/12 stop” higher (1.06x) than those shown
here, for a peculiar reason relating to the origin of the underlying
definitions. This curiosity has basically been discarded in current
practice, and we will not reflect it here.)
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline philmoz

  • *****
  • 3411
    • Photos
Re: Real vs market ISO
« Reply #106 on: 01 / August / 2013, 06:40:34 »
Patch with re-worked ISO code.
- grouped all ISO functions together in shooting.c instead of being spread throughout the file
- added some comments
- converted the ISO limit values (CAM_MIN_ISO_OVERRIDE & CAM_ISO_LIMIT_IN_HQ_BURST) to 'market' ISO
- conversion calculations based on Doug Kerrs' APEX document

This seems to work across all my cameras.

Note: I haven't touched the autoiso.c code; but it should work as before. Script functions should also work as before.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline dvip

  • ****
  • 451
Re: Real vs market ISO
« Reply #107 on: 03 / August / 2013, 01:33:55 »
Did a quick test (@3002 ) with the SX40HS and there
is no exposure difference between chdk iso 61 (equivalent to market ISO 100?)
and Canon's  iso 100.
Any way to get market iso 80 with the SX40HS?

Thanks for the work on the iso code, Phil.


*

Offline philmoz

  • *****
  • 3411
    • Photos
Re: Real vs market ISO
« Reply #108 on: 03 / August / 2013, 01:51:24 »
Did a quick test (@3002 ) with the SX40HS and there
is no exposure difference between chdk iso 61 (equivalent to market ISO 100?)
and Canon's  iso 100.
Any way to get market iso 80 with the SX40HS?

Thanks for the work on the iso code, Phil.

The SX40 doesn't have anything usable lower than ISO 100 (market).
If you want to experiment with lower values change the CAM_MIN_ISO_OVERRIDE in platform_camera.h and rebuild. In my testing there is only a tiny difference between 50 & 100 that is not worth worrying about.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline dvip

  • ****
  • 451
Re: Real vs market ISO
« Reply #109 on: 03 / August / 2013, 02:02:38 »
@Phil,

>If you want to experiment with lower values change the
>CAM_MIN_ISO_OVERRIDE in platform_camera.h and rebuild.

Ok, I'll keep that in mind.

>In my testing there is only a tiny difference between 50 & 100
>that is not worth worrying about.

Yep, it might not be worth the effort for a small difference.
 

 

Related Topics