Page 1 of 1
camera driver development
Posted: Tue Mar 26, 2024 1:18 am
by y3000
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 ?
Re: camera driver development
Posted: Tue Mar 26, 2024 2:19 pm
by admin
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
Re: camera driver development
Posted: Mon Aug 12, 2024 9:52 am
by Groupaxis
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?
Re: camera driver development
Posted: Mon Aug 12, 2024 10:38 am
by admin
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
Re: camera driver development
Posted: Fri Jul 25, 2025 9:46 am
by Groupaxis
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
Re: camera driver development
Posted: Fri Jul 25, 2025 10:10 am
by Groupaxis
That's the path where Sharpcap saves each light frame of course - I didn't make that clear - sorry.
Re: camera driver development
Posted: Fri Jul 25, 2025 1:37 pm
by admin
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
Re: camera driver development
Posted: Sun Jul 27, 2025 7:06 pm
by Groupaxis
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.