Author Topic: Image Acquisition in PixInsight (Was: When will Pixinsight...)  (Read 78821 times)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #135 on: 2013 February 08 05:45:54 »
Quote
For example, the Canon SDK only supports Windows and Mac OS and not Linux

Well, fortunately we can run Windows from a virtual machine on Linux and FreeBSD. This is how the Windows version of PixInsight is being developed, in fact :)

Quote
and, even worse, only 32-bit (argh)

Ouch. This is a much worse problem... and surprising that they don't have a 64-bit version of their SDK.

Do you plan on supporting Nikon cameras too?
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline kkretzsch

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 217
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #136 on: 2013 February 08 06:34:50 »
Quote
...and surprising that they don't have a 64-bit version of their SDK...
Yes,  hope they will change that soon; I think they have to ...   

Quote
Do you plan on supporting Nikon cameras too?
Currently not, since I don't have a Nikon camera ... developing without testing is not fun ;)

Offline kkretzsch

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 217
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #137 on: 2013 March 06 08:25:53 »
Some updates...

A first version of the DSLR driver for Daves ImageAqcuisition plugin is working now (see attachement). I've tested it a few days ago with my Canon 500D. However currently tested only  with the PixInsight Windows  32bit version  :-\.

I contacted the Canon DSLR developers to find out whether there is a plan to provide a 64-bit version of their library. There is already a "beta" version on their download page but with only very limited functionality -> not usable for our purposes.  However, they don't want commit to any release date ...

On Linux I found a opensource library gphoto2 (32 and 64 bit of course ;) ), which supports several DSLR models... that sounds promising. Maybe also running on a raspberry pi  ;)   

 

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #138 on: 2013 July 07 09:16:20 »
Some updates...

A first version of the DSLR driver for Daves ImageAqcuisition plugin is working now (see attachement). I've tested it a few days ago with my Canon 500D. However currently tested only  with the PixInsight Windows  32bit version  :-\.
 

I should have posted this sooner, but - Great job Klaus!!!  If we could get a couple more contributors on this project...that would be spectacular ;-) 

I wanted to update everyone here with the latest.

I am currently working on stability and bug fixes.  There are a number of issues that need to be addressed so that we can get a usable version of ImageAcquisition made available to the community.

Previously, I posted this list as  my "next steps":

Quote

My next steps are:

    Finish Filter Wheel Support (This is really just part of Camera Control I think)
    Finish Autofocus Support (initially through FocusMax I think)
    Image Sessions (Think simple UI to manage everything)
    Auto-guiding
    Plate-solving
    Telescope Control


Those "next steps" are really more of a road map.  I'd say the next steps for ImageAcquisition are the following:

  • Bug Fixes
  • Testing
  • Feature Completion (filter wheel control, subframe ui, abort,
  • Documentation!

The latest code in github is actually quite stable for testing ASCOM or Canon DSLR based cameras on PixInsight 1.7 32 bit for Windows.   

Here is a build for Windows and the ASCOM driver for anyone that feels adventurous. 

https://www.dropbox.com/sh/gnyrt7j9bzhbbmd/P36V-lWsov

Any issues that you discover with the plugin - please file them here:
https://github.com/ceterumnet/ImageAcquisition/issues

Here is how to use it:

  • copy ImageAcquisition-pxm.dll to <PIXINSIGHT32_DIR>\bin.
  • open PixInsight 1.7 32-bit for windows
  • Double click "ImageAcquisitionSettings"
  • Click "Add Camera"
  • Name the camera something like "ASCOM"
  • Select the downloaded file PixInsightASCOMCameraDriver2.dll
  • Click "Set as Primary Imager"
  • The ASCOM Dialog should come up.  Select your camera and setup anything you need for your camera
  • Double Click "ExposeImage" in "Processes"
  • Click "Connect Camera"
  • Set a "File Output Path" - this directory must exist
  • Set a "File Output Pattern" - can't be blank
  • Click the "Apply Global" button on the bottom of the window
  • You should see an exposure afterwards

Here are some screenshots to assist as well:
http://www.flickr.com/photos/21315110@N00/9232390108/in/set-72157634525856869/



David Raphael

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #139 on: 2013 July 07 14:06:54 »
cool, i just saw this in an email from flickr and i was like ... whaaaa?


Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #140 on: 2014 April 12 19:51:10 »
Howdy all,

I've been doing some more work on this module, and I think it is working pretty well on PixInsight 1.7 :-(

So I've been working on updating it to PixInsight 1.8.  Previously, I was using the following to determine an screen stretch for the image coming in from the camera:

Code: [Select]
m = HistogramTransformation::FindMidtonesBalance( .25, m - c0 );

However, in the latest release of PCL - this doesn't exist.  Can someone point me in the right direction of where this has moved?


Cheers,
Dave
David Raphael

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #141 on: 2014 April 19 11:38:46 »
Hi David,

The FindMidtonesBalance function is no longer necessary. Use this code instead:

m = HistogramTransformation::MTF( .25, m - c0 );

This is possible thanks to the invertible property of the MTF function. Given input and output background values b0 and b1, respectively, we want to find the required midtones balance mb for the MTF function such that:

b1 = MTF( b0, mb )

It can be shown that the answer is:

mb = MTF( b1, b0 )

For a more complete reference of the AutoStretch routine in the current versions of the ScreenTransferFunction tool, see the ScreenTransferFunctionInterface.cpp source file in the latest version of the PCL distribution (IntensityTransformations module).
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #142 on: 2014 April 19 12:17:34 »
Thanks!


Another thing I should mention:

Since PixInsight is deprecating Windows 32 bit support, this makes supporting ASCOM a bit of a problem moving forward. 

I'm working on 64-bit drivers for QHY cameras that will work with the module.  It shouldn't be too hard to add support for other vendors...but it does limit the number of devices ImageAcquisition can support. 

Is it possible for you to include the 32 bit support in PCL for the time being so that the module can still run on 32-bit PixInsight?
David Raphael

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #143 on: 2014 April 19 13:49:49 »
All 32-bit versions of PixInsight are definitely deprecated and will no longer be supported or updated.

A 64-bit application cannot execute code in a 32-bit DLL. The only way to solve this problem that I know of is through interprocess communication. Matt Nicholson has an article that describes this in detail in this blog post.

The article mentions COM to implement an interprocess communication mechanism. Instead of COM I would use Qt's IPC implementation. See for example the documentation for QSharedMemory. I use QSharedMemory to manage multiple running instances of the PixInsight Core application. As long as you take some precautions with data alignment (for example, ensuring that all shared data blocks start at 16-byte aligned addresses), this should allow you to implement a data sharing protocol easily between a 32-bit executable that interfaces with ASCOM and your 64-bit module.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #144 on: 2014 April 19 14:01:11 »
I considered doing some sort of IPC based approach...but I'm already not too impressed with ASCOM - so I'm not sure I'm going to invest any more time with ASCOM.  Perhaps someone else will take this part of the project.

I am going to focus in on native drivers on Linux anyways.  I don't really like Windows  >:D  QHY has open sourced a bunch of their Linux stuff...so I will play around with that and see what success I get.  If I can't progress with that quickly enough I may revisit the IPC based approach.

Cheers,
Dave
David Raphael

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #145 on: 2014 April 20 12:38:31 »
I considered doing some sort of IPC based approach...but I'm already not too impressed with ASCOM - so I'm not sure I'm going to invest any more time with ASCOM.  Perhaps someone else will take this part of the project.

I am going to focus in on native drivers on Linux anyways.  I don't really like Windows  >:D  QHY has open sourced a bunch of their Linux stuff...so I will play around with that and see what success I get.  If I can't progress with that quickly enough I may revisit the IPC based approach.

Cheers,
Dave

Thank you very much for taking this decision.

You already have native software for FLI and Apogee. There's also a command line software that allows to control an Apogee camera, it's pretty easy to use.


V.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #146 on: 2014 April 20 17:35:15 »
some of the SBIG cameras have ethernet interfaces and they have a pretty simple http API.

not sure who really uses this though. there's no support in phd2 for the http API, but then again if you connect to the guider over USB you can still use the http API to talk to the main imager.

rob

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #147 on: 2014 April 21 02:13:29 »
Does anyone know if INDI drivers http://www.indilib.org/ are a viable alternative to ASCOM now?
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #148 on: 2014 April 21 09:01:27 »
Does anyone know if INDI drivers http://www.indilib.org/ are a viable alternative to ASCOM now?

I think INDI shows a lot of promise.  There doesn't seem to be a lot of vendor support, but there are a few community contributed drivers.  Either way, the approach I'm taking with ImageAcquisition abstracts all of that so that we can support whatever moving forward. 

Cheers,
Dave
David Raphael

Offline David Raphael

  • PixInsight Addict
  • ***
  • Posts: 226
    • Astrofactors CCD Cameras
Re: Image Acquisition in PixInsight (Was: When will Pixinsight...)
« Reply #149 on: 2014 May 05 04:56:14 »
I just wanted to post a quick update:

New Features:
1.  The first native 64-bit Linux driver is working (QHY5-II) -
  - it is based on https://github.com/ceterumnet/QHYPixInsightLinuxDrivers/
  - and I've created a fork of the QHYCCD Linux driver base - https://github.com/ceterumnet/QHYCCD_Linux
2.  The "Frame and Focus" feature is working.  It starts up a modal dialog
3.  Abort is now enabled for the process

Bug Fixes:
1.  Sub-frames work correctly now
2.  Less crashes

General Updates:
1.  The module is updated for PixInsight 1.8.x
2.  The build system now uses CMake instead of the built-in PixInsight module makefile generation. 
3.  The ImageAcquisition repository has been cleaned up quite a bit - https://github.com/ceterumnet/ImageAcquisition

If anyone has a QHY5-II and wants to try this out on Linux - please let me know.  I plan on adding support in the near future for:

1.  QHY9 + FW
2.  FLI Cameras

It has been a long journey for me so far.  I never thought back in 2011 when I started this project that it would take me this long!  However, I am confident that I will be using this as my only software for controlling cameras in the near future.  I've specifically not renewed my MaximDL license as added incentive for me to get this production ready ;-)

Finally, I'd GREATLY appreciate anyone that is willing to lend a hand.  I can use help with the following:
1.  Testing
2.  Icons
3.  Driver Development


Cheers,
Dave
David Raphael