ifw-odp  2.0.0-alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros
clipm_priv_irplib_slitpos.c File Reference
#include <math.h>
#include <cpl.h>
#include "clipm_priv_irplib_slitpos.h"
#include "clipm_priv_irplib_flat.h"

Macros

#define MAX_NB_EROSIONS   1024
 Find the ends of a vertical slit (y coordinates in FITS convention) More...
 
#define KERNEL_SIZE_Y   5
 
cpl_table * clipm_priv_irplib_slitpos_analysis (cpl_image *inimage, cpl_size slit_max_width)
 Detect the slit position, detect its ends, extract a thin image containing only the slit and find its edges. More...
 

Macro Definition Documentation

#define KERNEL_SIZE_Y   5
#define MAX_NB_EROSIONS   1024

Find the ends of a vertical slit (y coordinates in FITS convention)

Parameters
ininput image
kernel_sizevertical kernel size
bot_slit_ybottom slit y position
top_slit_ytop slit y position
Returns
-1 in error case, 0 otherwise

The input image as to be as thin as possible to contain only the slit

Function Documentation

cpl_table* clipm_priv_irplib_slitpos_analysis ( cpl_image *  inimage,
cpl_size  slit_max_width 
)

Detect the slit position, detect its ends, extract a thin image containing only the slit and find its edges.

Parameters
inimageinput image
slit_max_widthmaximum slit width
Returns
the table with the slit position

This function detects the borders of a vertical slit.

This function is temporarily copied from IRPLIB into CLIPM. It will be removed as soon as it is accepted to be in CPL. Use it at your own risk!

A table is returned which contains 4 columns, indicating the image row indices and the corresponding horizontal edge positions, as following:

SLIT_Y SLIT_LEFT SLIT_CENTER SLIT_RIGHT
int double double double

The number of table rows equals the number of pixels that the slit spans vertically.

Original IRPLIB Documentation

This function can be used for vertical slits.

This function returns 3 double3 objects:

  • Left or Lower edge of the slit
  • Center of the slit
  • Right or Upper edge of the slit

NB: Coordinates use FITS convention.