1 / 19

CLIP

CLIP. Instrument Control SW. Pipeline DRS. „ “ C ommon L ibrary for I mage P rocessing“. Overview. Definition and Goals. CLIP is the new standard online image processing tool for the VLT Instrumentation Software. Goals

trella
Download Presentation

CLIP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CLIP Instrument Control SW Pipeline DRS „“Common Library for Image Processing“

  2. Overview Definition and Goals • CLIP is the new standard online image processing tool for the VLT Instrumentation Software. • Goals • To provide an image processing toolkit, flexible and well integrated with the INS SW. • To share the same image processing algorithms whenever possible between INS SW and pipeline DRS • To implement some specialized image processing routines which are generally required during the instrument acquisition process.

  3. Overview Package • Image Processing Library • clipm extending CPL • C++ VLTSW Library • clipv • Tcl VLTSW Library • clipvTcl • Real Time Display • rtdc • Image Acquisition Simulator • clipias • Template modules • xxclipv, xxclipm

  4. Image Processing Library Goals • Cover common image processing needs, for example • star centroiding and object characterisation, • image alignment, • focusing etc. • Serve as temporary development platform (until routines are accepted for CPL), • thus providing flexibility by separating DFS and INS SW development cycles • Thus instrument-only

  5. Image Processing Library Functions • Image Analysis Mathematics • Full bad pixel support • Background Estimation • Point-Source Centroiding • Fitting • Barycentre • Alignment • Cross-correlation • Transformation • Aperture Characterisation • Variously shaped objects • Automatic region of interest • Optimised results • Statistics in- & outside • Focusing (pending) • Linear Regression • Random Number Generation • Gaussian • Poisson 2d-pattern • Pattern Alignment • Different degrees of freedom • Transformation • Interface • ANSI-C • Error Message History • CPL Objects in Memory

  6. C++ VLTSW Library Features • Main Features: • Direct access of images from shared memory • C++ wrappers for some CPL objects • Automatic initialization and cleaning up of CPL • Verbose and logging facilities • Byte swapping and data conversion. • VLTSW standard error handling

  7. Server Mode Register RTD App. Notify Read Shared Memory Shared Memory Write Clipv Server Create/ Remove C++ VLTSW Library Shared Memory Client Mode Acq. Process RTD Server Notify Register/ Notify Notify Create/ Write Clipv Client Read

  8. C++ VLTSW Library Interface Example // Initialize the connection to the RTD server registering // as the CCS process name and attaching to the image events // generated by the acquisition process. clipvRTD_EVT_RECV *rtdEvtRecv; rtdEvtRecv = new clipvRTD_EVT_RECV(ccsGetMyNameInt(), ”fierab”); rtdEvtRecv->Attach(); // Receives the image event and store it in the internal // structure. rtdEvtRecv->ReceiveImageInfo(); More examples in the test directory of module clipv

  9. TclVLTSW Library Functions TCL Commands: General Purpose, e.g. verbose, version, subcommands, etc. RTD Image Events, e.g. rtd_attach, rtd_detach, rtd_image_wait, etc. Image Basic Operations, e.g image_add_scalar, image_add, etc. Image Statistics, e.g. image_get_min, image_get_mean, etc. Image Processing Recipes, e.g. image_center_gauss, image_slit, etc. Others Services Image Store Data by Reference

  10. Tcl VLTSW Library Interface Example • Instrument Templates • Asynchronous exposure wait • New class: tplCLIP # object declaration tplCLIP clip # Attach to the image events from camera clip Attach fiera set cmdId [obsWaitAsync $expId "-detId [fiera Subsystem]"] # Wait until image is complete clip Wait 20000 fiera # Compute mean value from shared memory tplLog "Image MeanLevel: [clip MeanLevelfiera]“ # Check the reply from asynchronous wait obsRecvReply $cmdId

  11. Real Time Display • Display image in real-time • Like a normal RTD • Display superimposed graphics. • Ovals, • Lines, • Rectangles • Crosses • Text • User interaction. • Pickup Object • Get Rectangle

  12. Image Acquisition Simulator • Commands: SETUP, START, STOP. • Modes: BIAS, SKY and FILE • Supported sky objects: Gaussian star • Supported star parameters: pos, sigma, maxflux and gaussian norm. shell> msgSend “” clipiasControl_IR SETUP “-function CIAS.MODE SKY CIAS.SKY.STAR.NUM 3 CIAS.SKY.STAR1.POSX 300 CIAS.SKY.STAR1.POSY 512 CIAS.SKY.STAR1.MAXFLUX 5000 CIAS.SKY.STAR1.SIGMAX 6 CIAS.SKY.STAR2.POSX 200 CIAS.SKY.STAR2.POSY 100 CIAS.SKY.STAR3.POSX 700 CIAS.SKY.STAR3.POSY 700 CIAS.SKY.STAR3.SIGMAX 8” shell> msgSend “” clipiasControl_IR START “”

  13. Extendability Requirements & Templates • Requirements to be served: instrument specific needs: • control software-only image processing tasks, and/or • shared functions for pipeline and control software • Template modules: • Interface Templates (C++ and Tcl) • Image Processing Library Template

  14. <xx>clipm DRL (Master) DFS CLIP Responsible Copy Slave <xx>clipm Extendability Image Processing - Development Strategy Consortium ESO Repositories Observatory CVS Pipeline World DRL Developer Pipeline Responsible Pipeline DRL Pipeline Integration CMM INS World INS Developer <xx>clipv (Wrappers) INS / RTD Integration

  15. Extendability Image Processing - Adding new functions (1) cpl_image *xxclipm_something( cpl_image *img_in, double some_param) { cpl_image *img_out = NULL; XXCLIPM_TRY { XXCLIPM_TRY_CHECK_AUTOMSG( img_in != NULL, CPL_ERROR_NULL_INPUT); XXCLIPM_TRY_CHECK_AUTOMSG( some_param > 1.5, CPL_ERROR_ILLEGAL_INPUT); /* do some processing here */ XXCLIPM_TRY_CHECK_ERROR_STATE(); } XXCLIPM_CATCH { cpl_image_delete(img_out); /* clean up if error happened */ img_out = NULL; } return img_out; }

  16. Extendability Image Processing - Adding new functions (2) cpl_error_code xxclipm_something( cpl_image *img_in, double *out_value) { cpl_image *img_tmp = NULL; XXCLIPM_TRY { XXCLIPM_TRY_CHECK_AUTOMSG( img_in != NULL, CPL_ERROR_NULL_INPUT); XXCLIPM_TRY_CHECK_AUTOMSG( out_value != NULL, CPL_ERROR_NULL_INPUT); /* do some processing here */ } XXCLIPM_CATCH { if (out_param != NULL) *out_param = -1; } cpl_image_delete(img_tmp); /* delete temporary stuff in any case */ return XXCLIPM_ERROR_GET_NEW_SINCE_TRY(); }

  17. Extendability TCL - Adding new commands // Declare the command in the constructor NewSubCmd(string("image_app") ,this, &xxclipvTCL_APP::CmdApp); vltINT32 xxclipvTCL_APP::CmdApp(int argc, char *argv[]) { clipvLOG_3(("xxclipvTCL_APP::CmdApp - begin")); // defining subcommand parameters clipvTCL_LINE_ARG tclArg(&par_file, &par_scalar, NULL); // parsing subcommand parameters if (tclArg.ParseArgs(_interp, argc, argv) != TCL_OK) clipvTCL_ERR_RETURN(tclArg.Usage(tclArg.GetStrError())); // adding image processing here clipvLOG_3(("xxclipvTCL_APP::CmdApp - end")); return(TclSetResult("XXXX sample command executed !")); }

  18. Extendability TCL – Parameter Handling • Predefined classes for main built-in types: int, double, logical and string • Class for handling the list of parameters objects. static clipvTCL_ARG_STRpar_mode('m', "mode", "alignment mode", "SHIFT", "SHIFT SHIFT_ROBUST UNIT EQUAL FREE", (clipvTCL_ARG::OPTIONAL_ARG| clipvTCL_ARG::MANDATORY_VAL_ARG)); // Define the subcommand line arguments clipvTCL_LINE_ARGtclArg(&par_mode,NULL); // Parse the subcommand line arguments if (tclArg.ParseArgs(_interp, argc, argv) != TCL_OK) clipvTCL_ERR_RETURN(tclArg.Usage(tclArg.GetStrError()));

  19. Status & Outlook • Status • CLIP Version 1.0 with VLTSW release 2009 • Instruments using CLIP • HAWKI • XSHOOTER • KMOS • SPHERE • MUSE? • Outlook • Address instruments which still use MIDAS

More Related