Real-time light metering

  • 8 Replies
  • 2276 Views
*

Offline LjL

  • ****
  • 266
  • A720IS
Real-time light metering
« on: 14 / July / 2008, 08:55:40 »
Advertisements
The manual mode of the A-series is a bit annoying to you, because you basically have to go by trial and error, since the only way to ask the camera to judge exposure is to half-press the shutter button.

Other cameras have a real time moving bar that lets you know how far off you are from correct exposure at all times (centered bar meaning correct exposure).

Even the "show measured Ev" option in Misc doesn't update the display until you hit half-shutter.

But I don't see anything technically different, in principle, between the A-series cameras and the other cameras I have in mind; both have no light meter proper, and instead use the CCD sensor to judge exposure, while dynamically adjusting the iris when the CCD goes out of scale.

The only mechanical difference I can suspect is that the A720 has fewer aperture steps than the camera with real-time metering that I've tried (by the way, how come I can only hear the iris clicking about 3 times in the A720 when going from darkness to sunlight, when the aperture is supposed to be adjustable in several steps?).

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Real-time light metering
« Reply #1 on: 14 / July / 2008, 11:47:17 »
"Show Live Histogram":"Always" does this to an extent, but of course it's huge compared to a single number and in modes other than M, misleading. Maybe there could be a "Show Live Histogram:" "Always in M mode" choice there (AFAIK, M mode is the only mode in which LCD brightness doesn't change with half-shoot, because the effect of Ev compensation is only visible on LCD during half-shoot and while Ev compensation setting is selected and the Ev horizontal selection bar visible).

Aside that, I think a small indicator only active in M mode could be nice. For it to be only active in M mode, I think we need modemaps to be accurate, see http://chdk.setepontos.com/index.php/topic,1838.0.html.

*

Offline RaduP

  • *****
  • 890
Re: Real-time light metering
« Reply #2 on: 14 / July / 2008, 14:49:27 »
I heard from some people (but didn't verify) that the camera can use a neutral density filter to act as an f stop. Which, if it's true, it kind of sucks.

*

Offline jeff666

  • ****
  • 181
  • A720IS
Re: Real-time light metering
« Reply #3 on: 14 / July / 2008, 15:58:49 »
I heard from some people (but didn't verify) that the camera can use a neutral density filter to act as an f stop. Which, if it's true, it kind of sucks.

That's true for Ixus/SD-models. A-Series cameras have a real diaphragm. Also I checked the A720-firmware for ND-Enable and ND-Disable functions. They exist, but don't actually do anything. Conclusion: No ND-Filter in the A720.

Cheers.


*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Real-time light metering
« Reply #4 on: 14 / July / 2008, 21:07:05 »
On the other hand, does the A720 have all the f-stops it claims to have? I.e. is there any actual difference in the diaphragm aperture between 2.8 and 3.2 at wide angle, for instance?

Anyway, the indicator would not only be useful in M mode. In M mode it would be, as I described, a slider indicating correct exposure when centered; but in Av and Tv mode, it would indicate the camera-selected shutter speed and aperture, respectively - before pressing half-shutter.

Sure, during half-shutter press the camera might end up with a better estimate and change the number... but that's life, and it also happens on cameras that have the features I described built in.

The live histogram is nice but doesn't really cut it, even in M mode, since it doesn't change at all when changing the shutter speed and aperture settings... while the thing I have in mind would be centered when you've got the correct speed/aperture/ISO combination. (EDIT: I don't know what I was on when I said that, brightness and thus the histogram definitely change with exposure settings in M mode)
« Last Edit: 18 / July / 2008, 17:23:41 by LjL »

*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Real-time light metering
« Reply #5 on: 15 / July / 2008, 08:35:55 »
A list of what's (likely) needed to implement this:

- a readout of the current aperture (the one that the camera is really using during live preview)
- the current sensor gain
- the current multiplication factor for viewport rendering
- the current framerate that the viewport is harvesting the sensor at

Or, alternatively, just some composite number giving the total gain in some unit due to the above factors.
Or even better, a "total incoming light" number. Or better still, a number providing the total gain to be applied (in terms of shutter speed, aperture, etc) to obtain correct exposure, according to the selected evalution method. Whatever the camera provides, if anything.

If we have the last item, then almost all the work is done already, and we just need to know how the number translates into aperture, etc.

If we have one of the other indications, then we need to perform our own metering on the viewport raster. It won't be equal to the one the camera will do on half-press (evaluative, spot, etc) unless we're very smart, but the good news is that it might be even better in some circumstances and the code to do it is already in the Zebra routines.

So, where is the data? ;)
I'm sure I could implement this myself somehow, if I had access to them. On DIGIC III, propcase 196 seems to be light-dependent somehow, but that's just a guess and I don't really know what it represents.
« Last Edit: 15 / July / 2008, 08:39:00 by LjL »

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Real-time light metering
« Reply #6 on: 15 / July / 2008, 14:22:50 »
On the other hand, does the A720 have all the f-stops it claims to have? I.e. is there any actual difference in the diaphragm aperture between 2.8 and 3.2 at wide angle, for instance?

I'm tempted to believe it has. In any case this can be verified by looking at the iris while half-shooting. It's very clearly visible in full tele, but at wide angle it gets too small for the bare eye to see much of any difference between any Av setting. All three Av settings available without overrides at full zoom on my a570is are mechanically different.

Now that I've said that, a look-into-the-lense-with-a-microscope method could probably be used in finding the narrowest aperture override setting the camera is capable of and to judge it's repeatability.

- a readout of the current aperture (the one that the camera is really using during live preview)

At least my a570is always idles aperture full open, even in M and Av modes. It only narrows the aperture to the desired state at half-shoot. This makes sense, since this reduces noise in the LCD view and probably power consumption as well since a fully open aperture is probably resting powerless on springs or similar.

This can even be heard on the camera... if you set the lowest available aperture in M or Av mode and half-shoot, there will be no click from aperture adjustment. Set any other aperture and there will be. And to support my earlier claim that the lowest settings are probably truly different apertures, I don't get this aperture adjust click at F2.6 in wide angle, but I do at F2.8 wide angle.

*

Offline wontolla

  • ****
  • 413
  • S3 & G9 & A720
Re: Real-time light metering
« Reply #7 on: 15 / July / 2008, 15:33:22 »
Quote
On the other hand, does the A720 have all the f-stops it claims to have? I.e. is there any actual difference in the diaphragm aperture between 2.8 and 3.2 at wide angle, for instance?

Yes there is!

A720 has 10 real stops.



*

Offline LjL

  • ****
  • 266
  • A720IS
Re: Real-time light metering
« Reply #8 on: 18 / July / 2008, 17:22:17 »
Feature partially implemented.

In M mode, the viewport brightness (and the aperture and framerate as a consequence) only depend on the shutter speed and aperture dialled in by the user.
Therefore, it's possible to determine the overall brightness of the upcoming shot before half-click, by just looking at the viewport.

The downside is that it's virtually impossible to replicate Canon's metering modes (I have evaluative, center-weighted average and spot) exactly, and right now I can't even do it "more or less".

I'm using the histogram data, without being entirely certain it's completely appropriate for my purposes, to display a moving slider that's supposed to be centered when a correct exposure is attained.

I've tried to properly integrate this into the OSD, layout editor and configuration options, but I'm not at my computer and I don't have access to my usual development tools (nano and grep), so it didn't work and I'm giving up until I'm back home  ::)

So to avoid deleting the code mistakenly, here's the snippet to add to gui_osd.c (and then you should place a call to it somewhere, such as inside gui_osd_draw_histo() just for quick testing).

Code: [Select]
#define SLIDER_WIDTH (HISTOGRAM_WIDTH*0.8)

void gui_osd_draw_slider() {
    // These don't actually exist, so just make them 200 and 200 or somesuch
    int x=conf.slider_pos.x, y=conf.slider_pos.y;
    int sum=0, avg=0;
    static int old=0;
    color slider_color=COLOR_GREEN;
    int i;
    for(i=0; i<HISTO_WIDTH; i++) {
             avg+=histogram[HISTO_Y][i];
             sum+=i*histogram[HISTO_Y][i];
    }
    avg=sum/avg;
    avg-=HISTO_WIDTH*0.1;
    if(avg>SLIDER_WIDTH) avg=SLIDER_WIDTH; else if(avg<0) avg=0;
    if(old!=avg) {
        draw_filled_round_rect(x-4+old, y-5, x+4+old, y+6, MAKE_COLOR(COLOR_TRANSPARENT, COLOR_TRANSPARENT));
        if(avg>SLIDER_WIDTH*0.35 && avg<SLIDER_WIDTH*0.65) slider_color=COLOR_GREEN;
        else if(avg<SLIDER_WIDTH*0.1 || avg>SLIDER_WIDTH*0.9) slider_color=COLOR_RED;
        else slider_color=COLOR_YELLOW;
        draw_filled_round_rect(x-4+avg, y-5, x+4+avg, y+6, MAKE_COLOR(slider_color, COLOR_BLACK));
        old=avg;
    }
    // Draw horizontal line
    draw_line(x, y, x+SLIDER_WIDTH, y, COLOR_WHITE);
    draw_line(x, y+1, x+SLIDER_WIDTH, y+1, COLOR_BLACK);
    // Draw plus sign
    draw_line(x-1+SLIDER_WIDTH, y-4, x+5+SLIDER_WIDTH, y-4, COLOR_BLACK);
    draw_line(x+SLIDER_WIDTH+2, y-7, x+SLIDER_WIDTH+2, y-1, COLOR_BLACK);
    draw_line(x-2+SLIDER_WIDTH, y-5, x+4+SLIDER_WIDTH, y-5, (avg>SLIDER_WIDTH/2)?slider_color:COLOR_WHITE);
    draw_line(x+SLIDER_WIDTH+1, y-8, x+SLIDER_WIDTH+1, y-2, (avg>SLIDER_WIDTH/2)?slider_color:COLOR_WHITE);
    // Draw minus sign
    draw_line(x-3, y-4, x+3, y-4, COLOR_BLACK);
    draw_line(x-4, y-5, x+2, y-5, (avg<SLIDER_WIDTH/2)?slider_color:COLOR_WHITE);
}

 

Related Topics