RunAlg
Deinterlaces an interlaced image. The pixels in a CCD or IR array are read out in a predefined order or set of orders. The readout order can result in an interlaced image that must be deinterlaced to reconstruct the original image as seen by the CCD or IR array. Only single readout arrays do not require deinterlacing.
Syntax
void RunAlg( data, rows, cols, algorithm );
void RunAlg( data, rows, cols, algorithm, arg );
Parameters
void * data
A void pointer to the buffer containing the interlaced image data.
int rows
The image row size ( in pixels ).
int cols
The image column size ( in pixels ).
int algorithm
The algorithm to use for deinterlacing. Can be one of the following class constants:
Class Constant Argument
CDeinterlace::DEINTERLACE_NONE N/A
CDeinterlace::DEINTERLACE_PARALLEL N/A
CDeinterlace::DEINTERLACE_SERIAL N/A
CDeinterlace::DEINTERLACE_CCD_QUAD N/A
CDeinterlace::DEINTERLACE_IR_QUAD N/A
CDeinterlace::DEINTERLACE_CDS_IR_QUAD N/A
CDeinterlace::DEINTERLACE_HAWAII_RG The number of channels in the image (16, 32, ..)
CDeinterlace::DEINTERLACE_STA1600 N/A
int arg
[optional] Any argument that may be required by the algorithm in use. See above for details. Default value: -1.
Returns
None
Required Headers
CDeinterlace.h
Namespace
arc
Throws
std::runtime_error
Remarks
This method will throw an exception if an error occurs. Exceptions can be caught using a try/catch block.
Example
        // This code demonstrates how to deinterlace a previously
        // taken quad readout CCD image that currently resides in
        // the kernel image buffer (CController::mapFd).

        #include <iostream>
        #include "CController.h"
        #include "CDeinterlace.h"

        using namespace std;
        using namespace arc;

        int main()
        {
            CController cController;

            try {
                // .... previously exposed quad readout
                // .... image resides in kernel buffer
                // .... at CController.mapFd

                CDeinterlace cDeint;
     
                cDeint.RunAlg( cController.mapFd,
                               rows,
                               cols,
                               CDeinterlace::DEINTERLACE_CCD_QUAD ); 
            }
            catch ( std::exception &e )
            {
                cerr << "Exception Occurred: " << e.what() << endl;
            }
        }

© Astronomical Research Cameras, Inc.