QHYCCD

QHY6 deinterlacing with Linux SDK

QHY6 deinterlacing with Linux SDK
« on: May 06, 2014, 02:54:39 PM »
I am using the Linux CCD to readout images from a QHY6 camera.
The images I capture show the light/dark alternative lines due to interlacing.  There appears to be no setting to "fix" this.

Looking at the GetFrame code it seems that the whole frame is read (all 596 lines) and then the image is de-interlaced using the qhy6->ConvertQHY6PRODataBIN11 function.  This uses the first 298 lines of the resulting image as the odd lines and the bottom 298 lines as the even lines. 
What I think should happen is that after the exposure the first 298 lines are read and then a second exposure should be timed.  Then the next 298 lines should be read and then de-interlaced.
Is this correct?
Would the camera firmware behave appropriately  if only 298 lines are read and then commanded to perform a second exposure.
If not what is the correct procedure?
Regards
Graham
« Last Edit: May 06, 2014, 03:51:13 PM by gkec »

yump67

  • *
  • 290
    • View Profile
    • Email
Re: QHY6 deinterlacing with Linux SDK
« Reply #1 on: May 09, 2014, 03:32:08 AM »
Hello Graham,
after last firmware revision in 2010/11 (I think) the camera does switch automatically between single and double exposure based on download speed and exposure time.
Please read also this http://qhyccd.com/ccdbbs/index.php?topic=2879.msg17047#msg17047
Can't seem to find the original message from Dr. Qiu about the subject.
Since then I could only see traces of VBE on occasions when exposure time is near the "switch value". But definitely less then original firmware.

Since in short time exposure it does a double, static subjects (and DSO) are usually fine, not so with planetary capture. This is where I prefer the older (also quicker) firmware and dealing with VBE at a later stage.

That is why I kept support for both in my capture program. ;-)

I may be prove wrong, but AFAIK all data (as set in registers) must be read from the camera in order to be able to set another exposure.

Back in the days of old firmware Tony developed a version of code for QHY6Pro that could deal with VBE in software in a couple of different ways.
Better one to choose depending on circumstances.
You can find it following this thread http://qhyccd.com/ccdbbs/index.php?topic=2446.0
I did once a port of that code for QHY6, must still have it here somewhere and I can share if you wish. (And the firmware of course).
From that code you might derive the special readout...

Beware that if you want to go and use the old firmware, you need to change the udev rule (different final vid/pid) and so the rest of the code to allow for this (the send register function, for one).

Hope this whole lot can help.

Ciao
Giampiero
Giampiero

Re: QHY6 deinterlacing with Linux SDK
« Reply #2 on: May 09, 2014, 01:41:04 PM »
Thank you very much Giampiero.  Lots of interesting information including why my exposure times appear to be wrong!
I will have a read and try some experiments.
« Last Edit: May 09, 2014, 01:43:09 PM by gkec »

yump67

  • *
  • 290
    • View Profile
    • Email
Re: QHY6 deinterlacing with Linux SDK
« Reply #3 on: May 10, 2014, 05:02:10 PM »
Hello Graham,
you're most welcome.

Should you need some more mind sharing about this, please feel free to contact me on private email (it's in my profile).

Good luck with your develop.

Ciao
Giampiero
Giampiero