Adj. Camera gain for brightness changes due to airmass

Got an idea for something that SharpCap should do? Share it here.
Forum rules
'+1' posts are welcome in this area of the forums to indicate your support for a particular feature suggestion. Suggestions that get the most +1's will be seriously considered for inclusion in future versions of SharpCap.
Post Reply
valrayco
Posts: 2
Joined: Fri Aug 04, 2023 8:30 pm

Adj. Camera gain for brightness changes due to airmass

#1

Post by valrayco »

I am doing solar animations and have to constantly adjust camera gain to keep the histogram placement somewhat constant to compensate for brightness changes due to airmass.The goal is to keep the image / background intensity relatively constant. Example: if SUN imaging at 8am with a camera gain of 4.80 by the time 12 noon arrives I may be at a gain of 3.2 to 3.5 on a relatively clear day. I use Autostackkert and ImPPG for processing the video / image files and large changes in image brightness make processing the images difficult and/or tedious. This is especially true if running the imaging capture somewhat unattended.

I see that there is a new checkbox in SharpCap v4.1 for the seeing monitor controls for compensation for brightness changes. Could this be implemented as a method to adjust camera gain +/- some amount... in my case, usually about 0.3 gain per hour ,or, as a max/min delta gain from am to mid day or mid day to later pm ?

Or are there other (easier?) suggestions to accomplish this?
User avatar
admin
Site Admin
Posts: 13514
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Adj. Camera gain for brightness changes due to airmass

#2

Post by admin »

Hi,

the brightness change compensation in the seeing monitor and focus scores is just a mathematical thing to rescale the calculated contrast value based on how bright the frame is - the idea being that if things get 20% dimmer then rather than the score dropping and looking like poor focus, it stays roughly the same as both the contrast and the scaling factor change by roughly the same amount.

Unfortunately that doesn't feed back into the camera settings, and doing so is a bit trickier as you have the possibility of over-adjustment leading to instability.

Right now, I don't think there is a way to get this to happen in basic SharpCap unless your camera has autoexposure/auto gain and you are prepared to trust that.

You might be able to do something in python scripting if you have some coding experience - it's possible to be notified of every frame captured from the camera and your code could call .GetStats() on perhaps every 100th frame, look at the mean brightness and then tweak the gain slightly. There are bits and pieces of sample code that could be re-used/patched together in the scripting forum. For instance, this post shows how to add notification of frames being captured and insert some fake metadata into each frame captured : viewtopic.php?t=244&start=10 and this post shows how to print the statistics (mean, standard deviation) of each captured frame in python : viewtopic.php?p=16184#p16184

cheers,

Robin
valrayco
Posts: 2
Joined: Fri Aug 04, 2023 8:30 pm

Re: Adj. Camera gain for brightness changes due to airmass

#3

Post by valrayco »

Robin
Thanks for the quick reply.

Since I am not a coder and can barely do a simple Macro, this is beyond me. So I'll keep doing it the old fashioned manual way.

Ray
User avatar
admin
Site Admin
Posts: 13514
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Adj. Camera gain for brightness changes due to airmass

#4

Post by admin »

Hi Ray,

the trick is then to find someone else who wants to solve the same problem who is a coder ;) Right now I am not adding new features due to the release of 4.1 and this sort of thing sounds (to me, anyway) fairly niche. If lots of people jump in on this thread and say 'great idea' then obviously I'm wrong...

cheers,

Robin
Post Reply