I just ran into a situation tonight, using an ATIK 490EX OSC CCD camera. Up to now I had been blithely using its color imaging capabilities and never saw anything odd. But tonight, attempting some photometric experiments, I need to split out the CFA channels and the PI SplitCFA tool refused to do anything. Looking at the error messages, it says I had an odd number of rows or columns.
Looking carefully through the system, I surely did indeed have 3379 columns by 2703 rows in every image. And the capture software also sees that exact same size. The Sony 814 sensor specifies its resolution as 3380 x 2704, as does the literature on the ATIK 490EX camera.
So, either the driver firmware is off-by-one, perhaps using indices (0-3379, 0-2703) as an incorrect indication of pixel column and row counts, or else they are reading out the sensor in such a way as to truncate one row and one column, leaving some truncated Bayer matrices laying about along a couple of image edges.
Either way, the deBayering routines in PI seem capable of gracefully dealing with this odd situation. But SplitCFA has real trouble with it. I can perfectly understand the complaints of SplitCFA, but I need to proceed somehow.
My guess is that I should Crop the image by one row and column before handing off to SplitCFA. But has anyone else run into this, and do you have a better way of handling things?
- DM