×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Accessing image stream from PyIndi - developping an autofocus.

  • Posts: 102
  • Thank you received: 13
Dear all,

I always like to start by thanking all developers of Indi. This tools changed the way I do amateur astronomy for ever :)
Since I discovered Indi, I decided to write my own sequencer in python, despite the fact that Ekos looks awesome, and that I am probably going to use it from time to time because of its robustness and ease of use.

For my current project, I use of course PyIndi, and although it was not an easy tool for me to start with, I now consider that this API is really awesome, I especially like the fact that one can leverage very powerful tools from the python community such as astropy.

I hope it will remain maintained in the future, and I'll try to give support to people new to pyindi on the forum if I can help (don't hesistate to contact me by inmails).

Anyway, after this long introduction, here is what I would like to ask:

Is it possible to get the image stream coming from a DSLR/CCD/CMos camera through PyIndi, so that one can for instance open it through open CV ?
(I already know from the tutorial, how to get the fits blob asynchronously)
Second question (more open this one), how would one implement a reasonably fast autofocuser using pyindi/indi ?

I can eventually write some c++ code if this is really needed (I'll make my own python binding later)

Thank you very much for giving this awesome tool to the world :)
Last edit: 6 years 1 month ago by dolguldur.
6 years 1 month ago #23490

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

Hello! Thank you for your work!

1. So if you know how to get a FITS blob, what you do with it is up to you. The image blob is sent via CCD1 property.
2. That really depends. You can check open source programs out there that already have this functionality like Ekos. There is no "one way" to do it, but the overall principle is pretty much the same.
6 years 1 month ago #23502

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

  • Posts: 102
  • Thank you received: 13
Thank you Jasem for your answer.
I found this from the documentation:
indilib.org/develop/developer-manual/101...es.html#h5-streaming

I now understand what you meant, ie the same blob from ccd1 is used to get a handle to the images.
However, I wonder if the blob can be deserialized as a fits file also in this case or if it is sent as a raw buffer ?
6 years 1 month ago #23509

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

When using CCD_EXPOSURE, it's sent completely as a FITS file (or PNG, JPG, depending on the driver). When using streaming, it is sent as a raw format. Only 2 raw formats are supported now. 8bit gray scale and 24bit (RGB) color buffer. By check the length of the blob in streaming mode, you can know whether the image is gray scale or color.
The following user(s) said Thank You: dolguldur
6 years 1 month ago #23511

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

Time to create page: 0.195 seconds