Page 1 of 1

Flat and image histogram

Posted: Sun Jul 06, 2025 9:39 pm
by cyo
Hi,

I have a long standing question that I couldn't find the answer about flat in SharpCap. Suppose I have taken a flat with the correct settings (histogram within 30-60% range), and I checked apply flat to my capture. I noticed the histogram of my captured image shifted to the right and the brightness of the preview image also changed.

I suppose that's because the histogram is calculated based on the flat corrected image and the correction scales some pixels up. So comparing the unscaled image vs the scaled image under the same exp/gain settings, if the scaled image is taking the full width of the histogram, the unscaled image must not be occupying the full range of the 255 data range. And AFAIK this is not desirable, and we'd be better off if we adjust the settings to take the exposure to the right and apply flat in post.

Side note: I noticed there is a 30-50% frame drop with the flat correction on when my CPU usage is >60%. Same with dark but the penalty seems more severe.

Best,
Siyu

Re: Flat and image histogram

Posted: Mon Jul 07, 2025 4:01 pm
by admin
Hi,

yes, the way that flats correct in SharpCap is to apply no corrections to the areas that are brightest in the flat frame and to boost the brgihtness of other areas that are darker in the flat frame to bring them up to a consistent level.

That means that if you then set the exposure/gain so that the flat corrected image is taking pretty much the whole range of the histogram then those brightest areas that are not being boosted by the flat will be using the whole range in the raw image, while other areas that are being boosted will use a smaller range. This is fine - or rather, the alternative is worse! The thing you want to avoid at all costs is overexposed regions (since in those regions all detail is wiped out as the pixels are all 255). If you try to set the camera up so that the darker areas being boosted by the flat are up to 255 then you will have overexposure, and that's not good.

The flat correction does use a significant amount of CPU power, so it can slow things down, particularly if you have a high resolution camera and an old CPU or one that is of the 'low power usage' types like Intel Celerons. SharpCap will also cut back on the update rate of the display when the CPU usage becomes high. Do make sure that you have the latest update version of SharpCap 4.1 from our download page, as there have been fixes relatively recently to how the reduction in display update rate works.

cheers,

Robin

Re: Flat and image histogram

Posted: Mon Jul 07, 2025 4:51 pm
by cyo
Pardon me if I'm not following. Is the "yes" confirming my statement about "we'd be better off if we adjust the settings to take the exposure to the right and apply flat in post."?

What I don't understand is why flat corrected image contains brighter pixels than the raw image.

My PC is powerful enough to run SharpCap and AS3 in parallel and the frame drop seems a recent issue since last month (IIRC 4.1.2333. Or maybe the PC is just feeling old.
Screenshot 2025-07-07 at 9.36.21 AM Large.jpeg
Screenshot 2025-07-07 at 9.36.21 AM Large.jpeg (134.98 KiB) Viewed 1747 times
Screenshot 2025-07-07 at 9.36.26 AM Large.jpeg
Screenshot 2025-07-07 at 9.36.26 AM Large.jpeg (133.65 KiB) Viewed 1747 times

Re: Flat and image histogram

Posted: Tue Jul 08, 2025 4:31 pm
by admin
Hi,

I was agreeing that flat correction in SharpCap naturally brightens the image in areas that have reduced illumination levels due to vignetting or dust shadows. This is expected and correct behaviour.

Please can you try the very latest version 4.1.13447 to see if you are still seeing any issues with reduced frame rates. If it is still an issue, let me know, along with details of your CPU and camera and I can investigate further to see if I see anything similar.

thanks,

Robin