Leutron Vision - OrChid Guide
Outline <ul><li>Introduction </li></ul><ul><li>Image Acquisition </li></ul><ul><li>Image Processing </li></ul><ul><li>Adva...
Introduction <ul><li>Orchid/Daisy </li></ul><ul><li>DLL  / .Net Class Library </li></ul><ul><li>Log Message Receiver </li>...
Introduction Log Message Receiver
Introduction <ul><li>Acquisition Modules </li></ul><ul><li>Processing Modules </li></ul>Modules Live Module (LvxLive) Real...
Introduction <ul><li>Display Live Image </li></ul><ul><li>Making a Snap(By Stopping the Live) </li></ul><ul><li>Copying th...
Introduction <ul><li>Primary Module / Asynchronous Reset Module </li></ul><ul><li>Grabbing of an Image or Sequence of Imag...
Introduction <ul><li>Convert Pixel Format </li></ul><ul><li>Applying Filters </li></ul>Preprocessor Module Noise Reduction...
Introduction <ul><li>Image Manipulation </li></ul><ul><li>Overlay Text and Graphics </li></ul>DirectX Processor
Introduction <ul><li>C Interface </li></ul><ul><li>Backward compatible </li></ul>DLL Version of Orchid
Introduction <ul><li>Unmanaged/managed Code </li></ul><ul><li>.NET Frame Work 2.0 </li></ul><ul><li>LeutronVision.Orchid.D...
Introduction <ul><li>DLL - C </li></ul><ul><li>.Net - C++ </li></ul><ul><li>lvx_OpenTask() / lvx_CloseTask() </li></ul><ul...
Introduction <ul><li>The names of the Orchid .Net Classes correspond to the module types: • LvxLive - the Live module • Lv...
<ul><li>•  For  C/C++ compilers  the  Orchid.lib  import library must be linked to your application and the Orchid.h file ...
Introdction <ul><li>1. Check in your code 2. Hardware Functionality 3. Manual </li></ul><ul><li>Log Message Receiver </li>...
Image Acquisition <ul><li>Setup A Connection </li></ul><ul><li>Specify Display Window </li></ul><ul><li>Showing the Live I...
Image Acquisition <ul><li>LvxBaseAcquisition::Grabber, LvxBaseAcquisition::Connector, LvxBaseAcquisition::Camera </li></ul...
Image Acquisition <ul><li>Lvx_SetDisplayWindow() </li></ul>Specify Display Window
  Image Acquisition <ul><li>lvx_SetLive() </li></ul><ul><li>lvx_SetGain() </li></ul><ul><li>lvx_SetExposure() </li></ul><u...
Image Acquisition <ul><li>lvx_DisplaySnapSettingDialog() </li></ul><ul><li>lvx_CreateDisplayableImageBitmap() </li></ul>Ma...
Image Acquisition <ul><li>Select Compressor </li></ul><ul><li>lvx_SaveAviSettings() </li></ul><ul><li>lvx_LoadAviSettings(...
Image Acquisition <ul><li>lvx_SaveSettings() </li></ul><ul><li>lvx_LoadSettings() </li></ul>Save Setting
Image Acquisition <ul><li>lvx_SetLoadWindowEnable() </li></ul><ul><li>lvx_SetOptoOutput() </li></ul>Other Functionality
Image Acquisition <ul><li>Hardware: Direct to VGA Memory </li></ul><ul><li>Software: to CPU Memory </li></ul><ul><li>Direc...
Image Acquisition <ul><li>Open Format </li></ul><ul><li>Codec Issue </li></ul><ul><li>lvx_DisplayAviSettingDialog() </li><...
Image Acquisition <ul><li>Frame Rate </li></ul><ul><li>Image Size </li></ul><ul><li>Can’t Resize </li></ul>Creat AVI File ...
Image Acquisition <ul><li>lvx_OpenAviFile() </li></ul><ul><li>lvx_CloseAviFile() </li></ul><ul><li>lvx_SaveImageToAviFile(...
  Image Acquisition <ul><li>Sequences and Frames </li></ul><ul><li>Check Point </li></ul><ul><li>Module Type </li></ul><ul...
Image Acquisition <ul><li>Accessing Grabbed Images </li></ul><ul><li>Storing Grabbed Images to File </li></ul><ul><li>Savi...
Image Acquisition <ul><li>Circular Buffer </li></ul><ul><li>Analog Grabber : Sub-Sequence </li></ul><ul><li>Digital Grabbe...
Image Acquisition <ul><li>Grabbing / Circular Buffer </li></ul><ul><li>Check Control Value </li></ul><ul><li>Continue Flag...
Image Acquisition <ul><li>LvxRT </li></ul><ul><li>LvxRtAr </li></ul>Module Type
Image Acquisition <ul><li>lvx_Initialize() </li></ul><ul><li>lvx_GrabContinue() </li></ul>Initialize the Module
Image Acquisition <ul><li>LvRT </li></ul><ul><li>LvRtAr </li></ul>Run Time Setting LvxRT::ExternalTrigger LvxBaseAcquisiti...
Image Acquisition <ul><li>lvx_GrabContinue() </li></ul><ul><li>wait for Trigger wait for Next Frame </li></ul><ul><li>lvx_...
Image Acquisition <ul><li>Handle </li></ul><ul><li>lvx_SetTileImages() </li></ul><ul><li>lvx_DisplayImage()/lvx_DisplayIma...
Image Processing <ul><li>Convert Color Format </li></ul><ul><li>Preprocessing Filter </li></ul><ul><li>Overlay Text </li><...
Image Processing <ul><li>Lvx_OpenTask(lvx_Task_Preprossor) </li></ul><ul><li>Attach to Acquisition Module </li></ul><ul><l...
Image Processing <ul><li>Lvx_SetOwnerTask() </li></ul><ul><li>•  Create the acquisition module and the preprocessor module...
Image Processing <ul><li>The Color Format Conversion </li></ul><ul><li>Filters </li></ul><ul><li>Overlays </li></ul><ul><l...
Image Processing <ul><li>Color format Conversion </li></ul>Configuring the Preprocessor Lvx_SetImageBitsPerPixel()
Image Processing <ul><li>Filters </li></ul>Configuring the Preprocessor Bayer Array Decoding Noise Reduction White Balance...
Image Processing <ul><li>Filters </li></ul>Configuring the Preprocessor lvx_AddFilter() lvx_AddFilterRect() lvx_Command()
Image Processing <ul><li>Noise Reduction Filter </li></ul>Configuring the Preprocessor Pixel by Pixel DestPixel=((100-Fact...
Image Processing <ul><li>White Balance </li></ul>Configuring the Preprocessor [R` G` B`] = [p1* R  p2*G  p3*B]
Image Processing <ul><li>Color Space Correction </li></ul>Configuring the Preprocessor
Image Processing <ul><li>ABSOLUTE_WHITE = (white_image_pixel - offset)* factor </li></ul><ul><li>0 = (black_image_pixel - ...
Image Processging <ul><li>lvx_CreatOverlay() </li></ul><ul><li>lvx_SetOverlayVisible() </li></ul><ul><li>lvx_SetoverlayOff...
Image Processing <ul><li>lvx_WriteTextToOverlay() </li></ul><ul><li>lvx_PutBitmapToOverlay() </li></ul>Overlays
Image Processing <ul><li>TextShadow </li></ul>Overlays lvx_TextAttr_ShadowRB lvx_TextAttr_ShadowRT lvx_TextAttr_ShadowLB l...
Image Processing <ul><li>Preprocessing Run </li></ul>Application Controlled Preprocessing Automatic Preprocessing
Image Processing <ul><li>Application Controlled Preprocessing </li></ul>Preprocessing Run lvx_PreprocessImage() lvx_SetNot...
Image Processing <ul><li>Automatic Preprocessing </li></ul>Preprocessing Run LvxRealTime::Preprocessing Limitation: •  Onl...
Image Processing <ul><li>Preprocessing in the LvxLive Module </li></ul>
Image Processing <ul><li>DirectX Display of Image </li></ul>Reduce CPU Load DirectDraw
Upcoming SlideShare
Loading in …5
×

Orchid Programming

903 views

Published on

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
903
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Orchid Programming

  1. 1. Leutron Vision - OrChid Guide
  2. 2. Outline <ul><li>Introduction </li></ul><ul><li>Image Acquisition </li></ul><ul><li>Image Processing </li></ul><ul><li>Advanced Topics </li></ul><ul><li>Commands </li></ul>
  3. 3. Introduction <ul><li>Orchid/Daisy </li></ul><ul><li>DLL / .Net Class Library </li></ul><ul><li>Log Message Receiver </li></ul><ul><li>Obsolete - ActiveX </li></ul>
  4. 4. Introduction Log Message Receiver
  5. 5. Introduction <ul><li>Acquisition Modules </li></ul><ul><li>Processing Modules </li></ul>Modules Live Module (LvxLive) Real-Time Modules (LvxRt) The Preprocessor Module (LvxPrep) The DirectX Preprocessor Module(LvxDX)
  6. 6. Introduction <ul><li>Display Live Image </li></ul><ul><li>Making a Snap(By Stopping the Live) </li></ul><ul><li>Copying the Snap Image to Clipboard </li></ul><ul><li>Saving the Snap Image to a BMP, TIFF or JPG File </li></ul><ul><li>Saving Live Image to an AVI file </li></ul><ul><li>Returning the Snap Bitmap as Pointer to Device Independent Bitmap </li></ul><ul><li>Display a Dialog Box for Grabber/Camera/Connector Selection </li></ul><ul><li>Display a Dialog Box for Live Image Setting </li></ul><ul><li>Possibility to Save/Load the Setting </li></ul>LvxLive Module
  7. 7. Introduction <ul><li>Primary Module / Asynchronous Reset Module </li></ul><ul><li>Grabbing of an Image or Sequence of Images to an Internal Buffer </li></ul><ul><li>Display the Acquired Sequence </li></ul><ul><li>Notify Frame Completion </li></ul><ul><li>Grabbing in a Loop to Simulate Live </li></ul><ul><li>Saving Image to BMP, TIFF, JPEG file </li></ul><ul><li>Adding Grabbed Image to AVI File </li></ul><ul><li>Copying Image to Clipboard </li></ul><ul><li>Display a Dialog Box </li></ul>Real Time Module Run-Time Setting I/O Configure COM Ports Communication
  8. 8. Introduction <ul><li>Convert Pixel Format </li></ul><ul><li>Applying Filters </li></ul>Preprocessor Module Noise Reduction Bayer Array Decoding White Balance 、 Color Space Correction Shading Correction Overlay Text or Graph
  9. 9. Introduction <ul><li>Image Manipulation </li></ul><ul><li>Overlay Text and Graphics </li></ul>DirectX Processor
  10. 10. Introduction <ul><li>C Interface </li></ul><ul><li>Backward compatible </li></ul>DLL Version of Orchid
  11. 11. Introduction <ul><li>Unmanaged/managed Code </li></ul><ul><li>.NET Frame Work 2.0 </li></ul><ul><li>LeutronVision.Orchid.DLL </li></ul>.Net Class Library
  12. 12. Introduction <ul><li>DLL - C </li></ul><ul><li>.Net - C++ </li></ul><ul><li>lvx_OpenTask() / lvx_CloseTask() </li></ul><ul><li>lvx_ Prefix </li></ul><ul><li>Error Handling </li></ul><ul><li>GDIPlus </li></ul>Difference Between DLL and .Net Class Library Version
  13. 13. Introduction <ul><li>The names of the Orchid .Net Classes correspond to the module types: • LvxLive - the Live module • LvxRt - the real-time Primary module (based on Basic Sequencer DRAL) • LvxRtAr - the real-time Asynchronous Reset module (based on Asynchronous Reset Sequencer DRAL) • LvxPrep - the Preprocessor module • LvxDX - the DirectX Processor module • LvxDll - auxiliary class for controlling the load of Orchid.DLL. Its properties and methods are static, i.e. you do not need to create an instance of this class and use the properties and methods directly. • LvxException - class for throwing exceptions, derived from System::Exception </li></ul>
  14. 14. <ul><li>• For C/C++ compilers the Orchid.lib import library must be linked to your application and the Orchid.h file must be included. Note that for Borland compilers the OrchidBc.lib must be used instead. </li></ul><ul><li>• For Borland Delphi , the Orchid.pas unit is to be added to your project and referenced in the &quot;uses&quot; part in other units. Alternatively, you can use OrchidDyn.pas , which can load Orchid DLL on demand. </li></ul><ul><li>• For MS Visual Basic 6 the Orchid.bas file is to be added to the project. </li></ul>Introduction Linking Orchid With Your Application
  15. 15. Introdction <ul><li>1. Check in your code 2. Hardware Functionality 3. Manual </li></ul><ul><li>Log Message Receiver </li></ul>Trouble Shooting * Running Before Orchid Application Star up * spends additional time by sending the messages to it
  16. 16. Image Acquisition <ul><li>Setup A Connection </li></ul><ul><li>Specify Display Window </li></ul><ul><li>Showing the Live Image and Setting its Attributes </li></ul><ul><li>Making a Snap and Setting its Attributes </li></ul><ul><li>Recording to AVI File </li></ul><ul><li>Saving the Setting </li></ul><ul><li>Other Functions </li></ul>Understanding LvxLive Module Functionality
  17. 17. Image Acquisition <ul><li>LvxBaseAcquisition::Grabber, LvxBaseAcquisition::Connector, LvxBaseAcquisition::Camera </li></ul><ul><li>lvx_DisplayConnectionDialog() </li></ul>Setting Up a Connection
  18. 18. Image Acquisition <ul><li>Lvx_SetDisplayWindow() </li></ul>Specify Display Window
  19. 19. Image Acquisition <ul><li>lvx_SetLive() </li></ul><ul><li>lvx_SetGain() </li></ul><ul><li>lvx_SetExposure() </li></ul><ul><li>lvx_SetBlackLevel() </li></ul>Showing the Live Image and Setting its Attributes
  20. 20. Image Acquisition <ul><li>lvx_DisplaySnapSettingDialog() </li></ul><ul><li>lvx_CreateDisplayableImageBitmap() </li></ul>Making a Snap and Setting its Attributes
  21. 21. Image Acquisition <ul><li>Select Compressor </li></ul><ul><li>lvx_SaveAviSettings() </li></ul><ul><li>lvx_LoadAviSettings() </li></ul><ul><li>lvx_SetCaptureToAvi() </li></ul>Recording to AVI File
  22. 22. Image Acquisition <ul><li>lvx_SaveSettings() </li></ul><ul><li>lvx_LoadSettings() </li></ul>Save Setting
  23. 23. Image Acquisition <ul><li>lvx_SetLoadWindowEnable() </li></ul><ul><li>lvx_SetOptoOutput() </li></ul>Other Functionality
  24. 24. Image Acquisition <ul><li>Hardware: Direct to VGA Memory </li></ul><ul><li>Software: to CPU Memory </li></ul><ul><li>DirectX(Visible) </li></ul><ul><li>Hardware/Software Transition </li></ul><ul><li>MDI </li></ul><ul><li>Command: Window List Add / Window List Clear </li></ul>Hardware Live V.S. Software Live
  25. 25. Image Acquisition <ul><li>Open Format </li></ul><ul><li>Codec Issue </li></ul><ul><li>lvx_DisplayAviSettingDialog() </li></ul><ul><li>lvx_SaveAviSettings() </li></ul>Create AVI File
  26. 26. Image Acquisition <ul><li>Frame Rate </li></ul><ul><li>Image Size </li></ul><ul><li>Can’t Resize </li></ul>Creat AVI File Indeo Version 4 - Quick Compress Option LvxLive Module - Divided by 8
  27. 27. Image Acquisition <ul><li>lvx_OpenAviFile() </li></ul><ul><li>lvx_CloseAviFile() </li></ul><ul><li>lvx_SaveImageToAviFile() </li></ul>AVI Functions
  28. 28. Image Acquisition <ul><li>Sequences and Frames </li></ul><ul><li>Check Point </li></ul><ul><li>Module Type </li></ul><ul><li>More Initial Setting </li></ul><ul><li>Initializing the Module </li></ul><ul><li>Run-Time Settings </li></ul><ul><li>Grabbing </li></ul><ul><li>Specify Display Window </li></ul><ul><li>Live </li></ul>Understanding the Functionality of Real-Time Modules
  29. 29. Image Acquisition <ul><li>Accessing Grabbed Images </li></ul><ul><li>Storing Grabbed Images to File </li></ul><ul><li>Saving and Loading the Settings </li></ul><ul><li>I/O Settings </li></ul><ul><li>Other Functions </li></ul><ul><li>Advanced Functions </li></ul>Understanding the Functionality of Real-Time Modules
  30. 30. Image Acquisition <ul><li>Circular Buffer </li></ul><ul><li>Analog Grabber : Sub-Sequence </li></ul><ul><li>Digital Grabber : Historical Reason </li></ul><ul><li>lvx_GetSubsequences() </li></ul>Sequences and Frames
  31. 31. Image Acquisition <ul><li>Grabbing / Circular Buffer </li></ul><ul><li>Check Control Value </li></ul><ul><li>Continue Flag </li></ul><ul><li>lvx_GrabContinue() </li></ul><ul><li>Attribute: AsynchronousGrab </li></ul>Check Points
  32. 32. Image Acquisition <ul><li>LvxRT </li></ul><ul><li>LvxRtAr </li></ul>Module Type
  33. 33. Image Acquisition <ul><li>lvx_Initialize() </li></ul><ul><li>lvx_GrabContinue() </li></ul>Initialize the Module
  34. 34. Image Acquisition <ul><li>LvRT </li></ul><ul><li>LvRtAr </li></ul>Run Time Setting LvxRT::ExternalTrigger LvxBaseAcquisition::SetGain() LvxBaseAcquisition::SetExposure() LvxRtAr::ShutterTime LvxRtAr::CameraRestartDelay LvxRtAr::FlashMode LvxRtAr::FlashEnable
  35. 35. Image Acquisition <ul><li>lvx_GrabContinue() </li></ul><ul><li>wait for Trigger wait for Next Frame </li></ul><ul><li>lvx_SetNotifyCallBack() </li></ul>Grabbing
  36. 36. Image Acquisition <ul><li>Handle </li></ul><ul><li>lvx_SetTileImages() </li></ul><ul><li>lvx_DisplayImage()/lvx_DisplayImageEX() </li></ul><ul><li>lvx_CreateDisplayableImageBitmap() </li></ul>Specify Display Window
  37. 37. Image Processing <ul><li>Convert Color Format </li></ul><ul><li>Preprocessing Filter </li></ul><ul><li>Overlay Text </li></ul>
  38. 38. Image Processing <ul><li>Lvx_OpenTask(lvx_Task_Preprossor) </li></ul><ul><li>Attach to Acquisition Module </li></ul><ul><li>lvx_SetOwnerTask() </li></ul><ul><li>lvx_PreprocessImage() </li></ul>Using the Preprocessor
  39. 39. Image Processing <ul><li>Lvx_SetOwnerTask() </li></ul><ul><li>• Create the acquisition module and the preprocessor module. </li></ul><ul><li>• Configure the acquisition module. </li></ul><ul><li>• lvx_Initialize() method. </li></ul><ul><li>。 Lvx_SetOwnerTask() </li></ul><ul><li>。 Configure Filters and Overlays </li></ul>Sequences of initialize
  40. 40. Image Processing <ul><li>The Color Format Conversion </li></ul><ul><li>Filters </li></ul><ul><li>Overlays </li></ul><ul><li>Text Shadow by the WriteTextToOverlay Method </li></ul>Configuring the Preprocessor
  41. 41. Image Processing <ul><li>Color format Conversion </li></ul>Configuring the Preprocessor Lvx_SetImageBitsPerPixel()
  42. 42. Image Processing <ul><li>Filters </li></ul>Configuring the Preprocessor Bayer Array Decoding Noise Reduction White Balance Color Space Correction Shading Correction
  43. 43. Image Processing <ul><li>Filters </li></ul>Configuring the Preprocessor lvx_AddFilter() lvx_AddFilterRect() lvx_Command()
  44. 44. Image Processing <ul><li>Noise Reduction Filter </li></ul>Configuring the Preprocessor Pixel by Pixel DestPixel=((100-Factor)*AcquiredPixel + Factor*AccumulatorPixel)/100
  45. 45. Image Processing <ul><li>White Balance </li></ul>Configuring the Preprocessor [R` G` B`] = [p1* R p2*G p3*B]
  46. 46. Image Processing <ul><li>Color Space Correction </li></ul>Configuring the Preprocessor
  47. 47. Image Processing <ul><li>ABSOLUTE_WHITE = (white_image_pixel - offset)* factor </li></ul><ul><li>0 = (black_image_pixel - offset)*factor </li></ul><ul><li>new_pixel_value = (acquired_image_pixel - offset)* factor </li></ul>
  48. 48. Image Processging <ul><li>lvx_CreatOverlay() </li></ul><ul><li>lvx_SetOverlayVisible() </li></ul><ul><li>lvx_SetoverlayOffset() </li></ul><ul><li>lvx_WipeOverlay() </li></ul><ul><li>lvx_GetOverlayDc() </li></ul><ul><li>lvx_ReleaseOverlayDc() </li></ul>Overlays
  49. 49. Image Processing <ul><li>lvx_WriteTextToOverlay() </li></ul><ul><li>lvx_PutBitmapToOverlay() </li></ul>Overlays
  50. 50. Image Processing <ul><li>TextShadow </li></ul>Overlays lvx_TextAttr_ShadowRB lvx_TextAttr_ShadowRT lvx_TextAttr_ShadowLB lvx_TextAttr_ShadowLT lvx_TextAttr_ShadowB lvx_TextAttr_ShadowT lvx_TextAttr_ShadowL lvx_TextAttr_ShadonR
  51. 51. Image Processing <ul><li>Preprocessing Run </li></ul>Application Controlled Preprocessing Automatic Preprocessing
  52. 52. Image Processing <ul><li>Application Controlled Preprocessing </li></ul>Preprocessing Run lvx_PreprocessImage() lvx_SetNotifyCallBack() lvx_OnCheckPoint()
  53. 53. Image Processing <ul><li>Automatic Preprocessing </li></ul>Preprocessing Run LvxRealTime::Preprocessing Limitation: • Only single preprocessor can be used. • It is applied when a checkpoint is reached, always only to the last image. • The preprocessing is done in-place, so the output color format must be the same as the input.
  54. 54. Image Processing <ul><li>Preprocessing in the LvxLive Module </li></ul>
  55. 55. Image Processing <ul><li>DirectX Display of Image </li></ul>Reduce CPU Load DirectDraw

×