Author Topic: SplitCFA  (Read 22600 times)

Offline rlange

  • Newcomer
  • Posts: 2
Re: SplitCFA
« Reply #15 on: 2014 January 09 23:19:50 »
Is it possible to integrate CFASplit in BatchPreprocessing ?

Offline gvanhau

  • PixInsight Old Hand
  • ****
  • Posts: 345
Re: SplitCFA
« Reply #16 on: 2014 January 21 13:27:15 »
Hello Nikolay
I didn't see this before, and was writing a script to do the same. 

The reason for it is that I am having trouble in calibrating my QHY8L CFA images.
For some reason almost always when I apply flats, the image results over corrected.

Note that I dont have the same problem with CFA images from my DSLR (dont know why)

Using pixel math to split the images, I calibrated separately each of the 4 resulting images  and then rebuild cfa images also using pixel math and  continued processing via debayer, align, stack .....
The result was a lot better.

I was now writing a script to avoid this tedious manual procedure.

So thank You in advance.

Regards
Geert




Geert Vanhauwaert

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: SplitCFA
« Reply #17 on: 2014 March 10 22:56:56 »
Added MergeCFA module
See post #1

Offline jdonald

  • Member
  • *
  • Posts: 56
Re: SplitCFA
« Reply #18 on: 2014 March 17 11:07:11 »
I can't find a download link, figured it was included in the install.

If I capture CFA Fits file from my Canon DSLR do you need to extract the red channel after stacking from day DSS?

Whats the difference from Capturing in BackyardEOS vs the CFA Fits method other than BYE is a completely red image and CFA Fits is monochrome.  I am using a 12nm Ha Filter.

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: SplitCFA
« Reply #19 on: 2014 March 17 20:12:55 »
I can't find a download link, figured it was included in the install.
SplitCFA includet in standatd PI distribution.
MergeCFA see in post#1

Offline Ignacio

  • PixInsight Old Hand
  • ****
  • Posts: 375
    • PampaSkies
Re: SplitCFA
« Reply #20 on: 2014 March 30 19:20:28 »
Hi,

A good use to these modules would be to neutralize the color of a master flat without debayering or applying a boxar filter (i.e., keeping pixel level information intact). So far I have done this with a special function in fitswork software. But there are two things that bother me about that apporach: not understanding exactly how its done in that soft, and having to move from one application to another.

With Split/MergeCFA, one could do it simply by applying, with pixelmath, appropriate weights to each CFA channel, which could be obtained by doing a background neutralization of the debayered master flat (just to get those weights).

I tried this, but when I use MergeCFA, I get a blank image (all zeros). The individual CFA channels images look perfect, with almost exactly the same modal value after applying the weights.

Is MergeCFA working?

thanks,
Ignacio

« Last Edit: 2014 April 03 13:37:10 by Ignacio »

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: SplitCFA
« Reply #21 on: 2014 March 30 22:14:34 »
I tried this, but when I use MergeCFA, I get a blank image (all zeros).
Please share with me individual CFA channels images.
 And wich OS and PI version you use ?

Offline Ignacio

  • PixInsight Old Hand
  • ****
  • Posts: 375
    • PampaSkies
Re: SplitCFA
« Reply #22 on: 2014 March 31 05:55:27 »
Please share with me individual CFA channels images.
 And wich OS and PI version you use ?

Hi, Nikolay. I am using PI version 01.01.01.1087 in a Windows 7 64-bit machine. RAW frames are from a canon 6D and a 1000D (no success on either).

Also, I applied SplitCFA on any given raw frame, and then MergeCFA without changing anything, and had the same outcome: all zeros. So it must be a general problem, unrelated to the data in the particular frame.

I don't have access to the frames from this computer. If you still need them, I can upload one later today.

Many thanks,
Ignacio

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: SplitCFA
« Reply #23 on: 2014 March 31 22:47:34 »
I tried this, but when I use MergeCFA, I get a blank image (all zeros).
The bug fixed. Module updated.

Offline Ignacio

  • PixInsight Old Hand
  • ****
  • Posts: 375
    • PampaSkies
Re: SplitCFA
« Reply #24 on: 2014 April 01 11:26:51 »
Works perfectly now, thanks!

Ignacio

Offline mash.m

  • Newcomer
  • Posts: 5
Re: SplitCFA
« Reply #25 on: 2014 September 27 10:54:45 »
Hi,

just wan to split some of my Images, but splitcfa created an error:

File 1 of 1
Open D:/ServerFolders/Bilder/Hobby/Markus/IC1396/hAlpha/IMG_5469.CR2
Wrong image dimension: odd width [5202] or height [3465].
Close D:/ServerFolders/Bilder/Hobby/Markus/IC1396/hAlpha/IMG_5469.CR2

files are from a Canon eos 600d.

markus

Offline Don

  • Newcomer
  • Posts: 47
Re: SplitCFA
« Reply #26 on: 2014 September 28 10:09:04 »
Same error with raw files from my EOS 550D.  I suspect this will happen with any CFA images that have an odd number of pixel columns or rows.

Don

Offline cdavid

  • PixInsight Addict
  • ***
  • Posts: 137
    • Through Space and Time
Re: SplitCFA
« Reply #27 on: 2014 December 08 17:48:41 »
I'm getting this error about odd width also with my 600D....any solution for this?

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: SplitCFA
« Reply #28 on: 2014 December 08 18:08:17 »
I also get this error on Canon EOS REBEL T3i CR2.

Image size is 5202 x 3465.

Debayer process accepts this size and produces VNG results with the same size.

For Superpixel the result has size 2601 x 1732. (Rounds half height downward).

Mike

Offline Don

  • Newcomer
  • Posts: 47
Re: SplitCFA
« Reply #29 on: 2014 December 08 18:42:48 »
If it is the height that is odd, as it is with my 550D (5202x3465), I found a solution.  The Bayer matrix is 2x2, so if a raw image has an odd number of rows, it has an incomplete matrix at the top or at the bottom.  I used the Crop process (not DynamicCrop) to remove the bottom row of a raw image, then debayered it and verified that the colors were correct.  Removing the top row instead destroyed the integrity of the bayer matrix, leading to obviously wrong color balance.

If it is the width that is odd, you will need to experiment with a raw image to determine whether you need to crop out the left or right column - whichever you determine it is, it should never change with that camera.  Try cropping one row off of the left or right side and determine which one leaves the color balance unchanged after debayering.

So open a raw image, open the Crop process and select the raw image.  Type "-1" in the bottom margin field of the Crop process interface  (or one of the other margin fields if appropriate) and click the apply button.  The image will now have an even number of rows and columns (5202x3464 in my case) and you can use the SplitCFA process on it. 

You can also create a new instance of the crop tool after setting it up and apply it to an ImageContainer containing an entire set of raw files in order to crop all of them with one stroke.

Of course if you are using SplitCFA before ImageCalibration, you will need to perform this procedure on the calibration images too so that all images end up with the same geometry.  Just add the calibration images to the ImageContainer along with the lights.

Don

« Last Edit: 2014 December 10 07:20:42 by Don »