Smart Histogram not working when using ASCOM drivers for camera

A place to report problems and bugs in SharpCap
Forum rules


If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs

Please also read about Troubleshooting USB Issues before posting.

*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
Post Reply
RazvanUnderStars
Posts: 18
Joined: Sat Aug 25, 2018 11:11 pm

Smart Histogram not working when using ASCOM drivers for camera

#1

Post by RazvanUnderStars »

(I'm not 100% sure it's a bug, see below, apologies if I'm wrong).

Setup: SharpCap Pro 3.2.6383.0, tested with ZWO ASI294MC Pro and no other camera connected (to avoid the issue reported on a different thread). Latest native and ASCOM drivers from ZWO (published at the end of June).

Note I have not run a sensor analysis.

When connecting to the camera with the native driver, the Smart Histogram works fine.
When connecting with the ASCOM driver, I get the warning to run the sensor analysis and that's it.

I tried to find out whether the Smart Histogram is only supposed to work with the native driver, but haven't found any reference. I will run a sensor analysis and try again to see if there is a difference. Perhaps the built-in data for the ASI294MC Pro camera (fairly common) was built with the native driver and therefore available only in that case? In this case it's not a bug but a clarification in the documentation would be useful since.

Thanks.
sh.png
sh.png (73.14 KiB) Viewed 1718 times
RazvanUnderStars
Posts: 18
Joined: Sat Aug 25, 2018 11:11 pm

Re: Smart Histogram not working when using ASCOM drivers for camera

#2

Post by RazvanUnderStars »

An update: I tried to do a sensor analysis with the ASCOM driver multiple times but each time it failed with "Minimum exposure reached. Reduce the light level and try again".

At first I took it at face value and kept adding more diffusing material but still got the error. The last time was in the evening (8:30pm), I was indoors and the only light was through a small window with a frosty covering. The camera was facing towards the ceiling and had a sheet of paper as a diffuser.

Because I had grown suspicious of the error, only minutes before I had completed a successful sensor analysis using the native driver. I was watching the light, there was no increase in its level (on the contrary, one can say, the evening was progressing).

I'm attaching a debug log with the sensor analysis with the ASCOM driver. Could it be that the limited exposure times in ASCOM caused this?
Attachments
sensor analysis - ASCOM driver failed.log
(29.86 KiB) Downloaded 100 times
User avatar
admin
Site Admin
Posts: 13337
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Smart Histogram not working when using ASCOM drivers for camera

#3

Post by admin »

Hi,

you are correct that the sensor analysis files that install was SharpCap are tied to the camera when used by the native SDK. The data in them does not transfer across to using the same camera via the Ascom driver – for instance in some cases it may not even be possible to tell the exact model of camera in use When using an Ascom driver.

I would certainly recommend using your camera via the native driver if at all possible – some things that are important to the smart histogram are hidden from SharpCap in the Ascom driver – for instance the setting of the black level/brightness control.

The failure of the analysis to run to completion is a combination of the relatively high minimum exposure time (from the log, I'm guessing 100 ms) and a bug in the way that SharpCap deals with the exposure while it is trying to measure the gain range. The theory is that it should stop increasing the gain once it hits the minimum exposure of the camera meaning that the analysis would complete, although possibly missing out measurements for the higher gains. In practice this wasn't working quite correctly as one of the possible ways the code could run was ending up at a different cheque for the minimum exposure that was setting the whole process into a failed condition.

I will put together a fix for this, but it will be in SharpCap 3.3 rather than 3.2 – I've already made a number of improvements in the same area for SharpCap 3.3 and therefore it makes most sense to make this change in the new version rather than trying to make it in both places.

Thanks for the report, Robin
RazvanUnderStars
Posts: 18
Joined: Sat Aug 25, 2018 11:11 pm

Re: Smart Histogram not working when using ASCOM drivers for camera

#4

Post by RazvanUnderStars »

Thanks. Indeed, I think I'll use the native drivers. On a slight tangent, the single reason for trying the ASCOM drivers was to avoid a problem with WB that was wrong either in the live stacking view or in the saved FITS raw frames (so I had to choose between a nice EAA image or good frames for later processing in PI). Details at https://pixinsight.com/forum/index.php? ... ion.11547/, see section 2.3, it appears to be a problem specific to ZWO cameras.

Yesterday I re-captured darks with both the native driver and the ASCOM driver and saved them as FITS. If I set the WB_R and WB_B parameters to be 50, the darks had identical histograms, with the R and B channels having the same peak to the right of the G channel. I was able to compensate both in PI and tonight I'll be testing in the field how the live stacking image will be doing. In the past I had my darks saved as PNG so I didn't run into the WB issue.
User avatar
admin
Site Admin
Posts: 13337
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Smart Histogram not working when using ASCOM drivers for camera

#5

Post by admin »

Hi,

I think the right approach is to set the white balance levels to 50-50 and then save that as a default capture profile for the camera. Quite why ZWO set the blue level so high by default in the SDK I'm not quite sure. All I can think is that those settings give a reasonable set up for capturing daylight or artificial light images in fairly natural colour – may be ZWO default the cameras to those settings to avoid a flood of support queries about 'why is the image from my new camera all orange'.

Cheers, Robin
extolstudios
Posts: 4
Joined: Mon Aug 31, 2020 6:19 pm

Re: Smart Histogram not working when using ASCOM drivers for camera

#6

Post by extolstudios »

I've had the same issue and just downloaded the v3.3 beta. I tried to run sensor analysis on the ZWO ASI1600MM Pro and it still fails. Not sure if the fix you mentioned is in this beta version yet or not but just thought I'd check.
User avatar
admin
Site Admin
Posts: 13337
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Smart Histogram not working when using ASCOM drivers for camera

#7

Post by admin »

Hi,

can you just confirm if you were using the ASCOM driver or the native driver this time around?

cheers,

Robin
extolstudios
Posts: 4
Joined: Mon Aug 31, 2020 6:19 pm

Re: Smart Histogram not working when using ASCOM drivers for camera

#8

Post by extolstudios »

I was trying it with the ASCOM driver (it's actually the latest driver that ZWO release on 12/30/2020. Sensor analysis works fine with the native ZWO driver. I thought the "fix" being put in place was to address the ASCOM driver sensor analysis failure but I may have mis-understood the earlier post.
User avatar
admin
Site Admin
Posts: 13337
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Smart Histogram not working when using ASCOM drivers for camera

#9

Post by admin »

Hi,

I did make some improvements to try to fix the ASCOM analysis, but it looks like it just continued to fail at a later stage. I've done some more tweaks and have just managed to run the analysis through to the end on the ASCOM driver, so this will be the next update.

cheers,

Robin
extolstudios
Posts: 4
Joined: Mon Aug 31, 2020 6:19 pm

Re: Smart Histogram not working when using ASCOM drivers for camera

#10

Post by extolstudios »

great... I'll look out for that in the future. It was failing early in the process and now seems to fail after it takes that dark frames. Progress!!!


thanks
Post Reply