×
INDI Library v1.8.1 Released (09 Sep 2019)

Monthly maintenance release INDI v1.8.1

INDI ASI Driver Bug causes false binned images

6 months 1 week ago
starhopper
Senior Boarder
Senior Boarder
Posts: 79
More
Topic Author
INDI ASI Driver Bug causes false binned images #37350
Hello Developers,
not long ago, a bug came into the indi asi driver, which causes unusable frames for the further image processing. The image format (geometry) is not the same if binning is changed e.g from 1x1 to 4x4 and back to 1x1. Typical for a image session. This bug can be verified with the driver itself, no indi client needed. The log is made only with the driver.

In the attached log at
254.667038 sec
binning is set to 1x1 and the correct geometry of 4656x3520pix is set. Than at

318.716916 sec
binning is set to 4x4 for a fast download or to center an object.. The image geometry is correct set. Than
at

333.930084 sec
I set binning back to 1x1 which results in a false image geometry of 4640x3520px

The same happens with my ASI183. Is is possible to fix this.
Thomas

Thomas Jäger
www.starhopper.eu
Linux Mint19
300/1200mm, 200/1000mm & 200/618mm Newton, Esprit 100/550mm, C 9.25"
SBIG STL11000M C2, Moravian G2-8300, ZWO ASI183MM-C
Attachments:

Please Log in or Create an account to join the conversation.

6 months 15 hours ago
starhopper
Senior Boarder
Senior Boarder
Posts: 79
More
Topic Author
INDI ASI Driver Bug causes false binned images #37831
up

Thomas Jäger
www.starhopper.eu
Linux Mint19
300/1200mm, 200/1000mm & 200/618mm Newton, Esprit 100/550mm, C 9.25"
SBIG STL11000M C2, Moravian G2-8300, ZWO ASI183MM-C

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago
pch
Expert Boarder
Expert Boarder
Posts: 159
Karma: 2
More
INDI ASI Driver Bug causes false binned images #38141
Hi Jasem,

Thomas ask me if I can give some idea about this issue., I think it is better to continue the discussion here if other have idea on the subject. Note that I not use a ASI camera myself.

For me the origin of the problem is the change that force the image width modulo 8 to be 0.
So my first idea is to check with ASI if this really also concern the binned size or not, I am a bit surprised of this requirement when it concern software binning as with the 183 in bin 4x4. This is probably the only way to fully fix the issue.

The temporary fix I do in CCDciel is the following.
When processing a request to change the binning, it look for the current image size (CCD_FRAME) and if the current ROI start from 0/0 and it's width and height are not the full size (CCD_FRAME.WIDTH.max) but more than 90% of the full size it send a CCD_FRAME_RESET before to set the binning.

This is not perfect, this not work if a small ROI is set, But this fix the issue with the calibration frames and for me this look more reliable than trying to remember what the size was the last time this binning was in use.

Another possible fix is the driver compute a size that work for (CCD_FRAME.WIDTH/ maxbinning) % 8 = 0 from the maximum size, this new value must be used as the default size, returned by CCD_FRAME.WIDTH.max and set by CCD_FRAME_RESET. This way it not need to change the size when the binning change.

Patrick

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago
knro
Administrator
Administrator
Posts: 7280
Karma: 51
INDI ASI Driver Bug causes false binned images #38261
Patrick,

Thanks for the feedback. Regarding this (CCD_FRAME.WIDTH/ maxbinning) % 8 = 0, why is maxbinning used here?

I'm thinking:

driver_max_w = camera_max_w - camera_max_w % 8;
driver_max_h = camera_max_h - camera_max_h % 2;

and then the driver_max values are used as the maximum resolution throughout the driver. would this work?

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago
pch
Expert Boarder
Expert Boarder
Posts: 159
Karma: 2
More
INDI ASI Driver Bug causes false binned images #38266
Jasem,

This is because the driver apply a size reduction based on BinnedWidth % 8 = 0

Look at Thomas log above with the ASI1600.
It start with bin 1x1 and width=4656
when it set bin 4x4 the image width change to 1160 = (4656/4) - ((4656/4) % 8 )
As ccd_frame.width is always unbinned it is set to 4*1160 = 4640

So if MaxBinning for this camera is 4, the value for ccd_frame.width.max must be set to 4640.
This width work for bin 1x1, 2x2, 4x4 without resizing.

Patrick

The following user(s) said Thank You knro, starhopper

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago
knro
Administrator
Administrator
Posts: 7280
Karma: 51
INDI ASI Driver Bug causes false binned images #38270
Thank you Patrick, that cleared it up. I submitted a change (v1.3 of the driver) and let's see if it resolves the issue.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You starhopper

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago
starhopper
Senior Boarder
Senior Boarder
Posts: 79
More
Topic Author
INDI ASI Driver Bug causes false binned images #38347

let's see if it resolves the issue

I would like to test it, when does it come on ubuntu via ppa?
Thanks

Thomas Jäger
www.starhopper.eu
Linux Mint19
300/1200mm, 200/1000mm & 200/618mm Newton, Esprit 100/550mm, C 9.25"
SBIG STL11000M C2, Moravian G2-8300, ZWO ASI183MM-C

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago
pch
Expert Boarder
Expert Boarder
Posts: 159
Karma: 2
More
INDI ASI Driver Bug causes false binned images #38350
Thomas,

I see indi-asi-1.3 is now available in the nightly ppa : launchpad.net/~mutlaqja/+archive/ubuntu/indinightly
When testing, beware you probably have to re-do all your calibration frames because of the change in the default image size.

Patrick

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago
starhopper
Senior Boarder
Senior Boarder
Posts: 79
More
Topic Author
INDI ASI Driver Bug causes false binned images #38367
The weather is not clear at the moment in germany. I have tested it in the lab. It works, but I cannot agree to this solution.
Fancy somebody buys a ASI Cam an reads in the manual that it has a 5496×3672 pixel geometry and he uses INDI and sees a 5472x3672.
Furthermore ccd images made with ASCOM and INDI are not compatible any more. They were compatible before this BUG.

Thomas

Thomas Jäger
www.starhopper.eu
Linux Mint19
300/1200mm, 200/1000mm & 200/618mm Newton, Esprit 100/550mm, C 9.25"
SBIG STL11000M C2, Moravian G2-8300, ZWO ASI183MM-C

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago 5 months 3 weeks ago by wvreeven.
wvreeven
Platinum Boarder
Platinum Boarder
Posts: 1027
Karma: 6
More
INDI ASI Driver Bug causes false binned images #38368
I actually agree with Thomas. Perhaps I misunderstand the complexity of this issue but shouldn’t sensor dimensions when binning always be computed straight from the actual dimensions? Meaning that when one switches from 1x1 to 2x2 to 4x4 and then back to 1x1 via 2x2 that all the dimensions should be computed from the “original” (meaning true) sensor dimensions dividing by the binning factor (and possibly applying %8 ) instead of the current implementation?


Wouter

ASI1600MM-Pro Cooled and filter wheel with a SkyWatcher Esprit 80 ED on a SkyWatcher HEQ5-Pro

ASI1600MM-Pro Cooled and filter wheel with an 8" TS Ritchey-Chrétien on a SkyWatcher EQ6-R

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago
knro
Administrator
Administrator
Posts: 7280
Karma: 51
INDI ASI Driver Bug causes false binned images #38383
Well, this is what Nightly releases are for, to test these changes. So I can either revert the changes or make them as an option. Though I'm afraid an "option" will only complicate things for end users who will end up with incompatible photos with and without this option.

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

Please Log in or Create an account to join the conversation.

5 months 3 weeks ago 5 months 3 weeks ago by sterne-jaeger.
sterne-jaeger
Gold Boarder
Gold Boarder
Posts: 311
Karma: 5
More
INDI ASI Driver Bug causes false binned images #38385
@Thomas: I also agree, reducing the factual CCD size creates incompatibilities with other non-INDI applications.

When you take a look into driver, you can see the problem. In the current implementation, changing the binning tries to keep the currently set ROI (modulo the factor discussed above). That leads to exactly the situation described in the bug. Take the ASI-1600 with its 4656x3520 CCD and start with the full frame and 1x1 binning. Now reduce to 4x4 requires to reduce to 1160x880 and not 1164x880, since 1164 mod 8 = 4.

Until here everything is fine. But when you change back to 1x1, the ROI ends up in 4460x3520 <strong>unless</strong> you reset the ROI to the full frame at the same time.

The question is, what is the expected behaviour of changing the binning. Would it be OK to reset the ROI - which might have been an entirely different one before changing the binning?

@Jasem: I would opt for taking back the change.

Wolfgang

Please Log in or Create an account to join the conversation.

Time to create page: 0.283 seconds