camera driver development
camera driver development
I have some industrial camera with SDK, if I want to develope the camera driver myself uses in SharpCap, is there any document or information about the camera driver with SharpCap development ?
- admin
- Site Admin
- Posts: 17464
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: camera driver development
Hi,
there is currently no way for people to add a new brand of cameras to SharpCap and get full support. If you want to develop the integration yourself then you have two options
1) Write or use a DirectShow driver for the camera. There are limitations for DirectShow drivers, including that images must be 8 bit, RAW modes are not supported and exposure can only be changed in one stop steps. Directshow will support good frame rates though. Various bits of sample code for writing DirectShow drives can be found in Microsoft documentation, and I would expect that there are a few on Github too that you could investigate and learn from. The code will need to be C/C++
2) Write an ASCOM driver for the camera. There are also limitations for ASCOM, but they are different - high frame rates are hard to achieve, but you can use high bit depths, RAW modes and the exposure can be changed without a step size issue. Unfortunately only the exposure and gain controls are surfaced by the ASCOM interface, so any additional controls would need to be implemented in a 'Setup Window' for the camera that can be shown from SharpCap. Code can be written in C# and there is a wizard for creating the boilerplate to fill in as part of the ASCOM Platform developer downloads (see https://ascom-standards.org/Downloads/Index.htm).
Hope this helps,
Robin
there is currently no way for people to add a new brand of cameras to SharpCap and get full support. If you want to develop the integration yourself then you have two options
1) Write or use a DirectShow driver for the camera. There are limitations for DirectShow drivers, including that images must be 8 bit, RAW modes are not supported and exposure can only be changed in one stop steps. Directshow will support good frame rates though. Various bits of sample code for writing DirectShow drives can be found in Microsoft documentation, and I would expect that there are a few on Github too that you could investigate and learn from. The code will need to be C/C++
2) Write an ASCOM driver for the camera. There are also limitations for ASCOM, but they are different - high frame rates are hard to achieve, but you can use high bit depths, RAW modes and the exposure can be changed without a step size issue. Unfortunately only the exposure and gain controls are surfaced by the ASCOM interface, so any additional controls would need to be implemented in a 'Setup Window' for the camera that can be shown from SharpCap. Code can be written in C# and there is a wizard for creating the boilerplate to fill in as part of the ASCOM Platform developer downloads (see https://ascom-standards.org/Downloads/Index.htm).
Hope this helps,
Robin
Re: camera driver development
I too have developed an ASCOM driver using the C# templates. It worked well until I clicked "plate solve and synch" whereupon I was informed I didn't have a pro licence. I do have a pro licence but it came with an Altair camera. Do I need to buy a "proper" licence for the pro stuff to work with my ASCOM driver or do I have a bug?
- admin
- Site Admin
- Posts: 17464
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: camera driver development
Hi,
yes, you're right that this is a deliberate limitation of the 'bundled' licenses included when you purchase an Altair camera... They can only be used to activate the SharpCap Pro features when you are using an Altair branded camera.
Paid SharpCap Pro licenses do not have this restriction and can be used with any camera.
thanks,
Robin
yes, you're right that this is a deliberate limitation of the 'bundled' licenses included when you purchase an Altair camera... They can only be used to activate the SharpCap Pro features when you are using an Altair branded camera.
Paid SharpCap Pro licenses do not have this restriction and can be used with any camera.
thanks,
Robin
Re: camera driver development
My ASCOM driver seems to be working well but it has raised another minor issue. My driver returns an image array as per spec but it also saves a DNG file. I have to define a file path in the driver but it would be better if I could obtain Sharpcap's path (after the parameters have been resolved).
Does Sharpcap expose this information somehow?
Could Sharpcap post this information to the ICameraV3.CommandBlind method for each exposure?
The string could just be the path or maybe xml/json with other info.
Just thinking out loud.
Cheers Steve
Does Sharpcap expose this information somehow?
Could Sharpcap post this information to the ICameraV3.CommandBlind method for each exposure?
The string could just be the path or maybe xml/json with other info.
Just thinking out loud.
Cheers Steve
Re: camera driver development
That's the path where Sharpcap saves each light frame of course - I didn't make that clear - sorry.
- admin
- Site Admin
- Posts: 17464
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: camera driver development
Hi,
I think that is going to have to remain separate - at the point that SharpCap interacts with the ASCOM driver to start the capture (or to retrieve the image data for that matter), it's not necessarily decided whether the image will be saved and the potential filename that it will be saved to hasn't been calculated yet. In fact all of the saving/file name calculation/etc is something that the camera drivers like the ASCOM one or the ones for ZWO/QHY/Altair know nothing about.
It would be too big an architectural shift to try to make that sort of information available to the camera handling code in time for it to be useful, so it's probably best to stick with just having a folder that can be customized in the ASCOM driver setup.
sorry about that,
Robin
I think that is going to have to remain separate - at the point that SharpCap interacts with the ASCOM driver to start the capture (or to retrieve the image data for that matter), it's not necessarily decided whether the image will be saved and the potential filename that it will be saved to hasn't been calculated yet. In fact all of the saving/file name calculation/etc is something that the camera drivers like the ASCOM one or the ones for ZWO/QHY/Altair know nothing about.
It would be too big an architectural shift to try to make that sort of information available to the camera handling code in time for it to be useful, so it's probably best to stick with just having a folder that can be customized in the ASCOM driver setup.
sorry about that,
Robin
Re: camera driver development
Oh well - I'm glad I asked. I shall soldier on an concentrate on the beauty of the skies. Thanks for making the time to answer.