Orchid Programming
-
Upload
rayhsu -
Category
Technology
-
view
748 -
download
3
Transcript of Orchid Programming
![Page 1: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/1.jpg)
Leutron Vision - OrChid Guide
![Page 2: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/2.jpg)
Outline
✰Introduction✰Image Acquisition✰Image Processing✰Advanced Topics✰Commands
![Page 3: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/3.jpg)
Introduction
✰Orchid/Daisy✰DLL / .Net Class Library✰Log Message Receiver✰Obsolete - ActiveX
![Page 4: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/4.jpg)
IntroductionLog Message Receiver
![Page 5: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/5.jpg)
Introduction
✰Acquisition Modules
✰Processing Modules
Modules
Live Module (LvxLive)Real-Time Modules (LvxRt)
The Preprocessor Module (LvxPrep)The DirectX Preprocessor Module(LvxDX)
![Page 6: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/6.jpg)
Introduction
✰ Display Live Image✰ Making a Snap(By Stopping the Live)✰ Copying the Snap Image to Clipboard✰ Saving the Snap Image to a BMP, TIFF or JPG File✰ Saving Live Image to an AVI file✰ Returning the Snap Bitmap as Pointer to Device Independent
Bitmap✰ Display a Dialog Box for Grabber/Camera/Connector Selection✰ Display a Dialog Box for Live Image Setting✰ Possibility to Save/Load the Setting
LvxLive Module
![Page 7: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/7.jpg)
Introduction
✰ Primary Module / Asynchronous Reset Module✰ Grabbing of an Image or Sequence of Images to an Internal Buffer✰ Display the Acquired Sequence✰ Notify Frame Completion✰ Grabbing in a Loop to Simulate Live✰ Saving Image to BMP, TIFF, JPEG file✰ Adding Grabbed Image to AVI File✰ Copying Image to Clipboard✰ Display a Dialog Box
Real Time Module
Run-Time SettingI/O ConfigureCOM Ports Communication
![Page 8: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/8.jpg)
Introduction
✰Convert Pixel Format✰Applying Filters
Preprocessor Module
Noise ReductionBayer Array DecodingWhite Balance 、 Color Space CorrectionShading CorrectionOverlay Text or Graph
![Page 9: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/9.jpg)
Introduction
✰Image Manipulation✰Overlay Text and Graphics
DirectX Processor
![Page 10: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/10.jpg)
Introduction
✰C Interface✰Backward compatible
DLL Version of Orchid
![Page 11: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/11.jpg)
Introduction
✰Unmanaged/managed Code✰.NET Frame Work 2.0✰LeutronVision.Orchid.DLL
.Net Class Library
![Page 12: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/12.jpg)
Introduction
✰DLL - C✰.Net - C++✰lvx_OpenTask() / lvx_CloseTask()✰lvx_ Prefix✰Error Handling✰GDIPlus
Difference Between DLL and .Net Class Library Version
![Page 13: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/13.jpg)
Introduction
✰ 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
![Page 14: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/14.jpg)
✰ • For C/C++ compilers the Orchid. l ib import library must be linked to your application and the Orchid.h file must be included. Note that for Borland compilers the OrchidBc.l ib must be used instead.
✰ • For Borland Delphi, the Orchid.pas unit is to be added to your project and referenced in the "uses" part in other units. Alternatively, you can use OrchidDyn.pas, which can load Orchid DLL on demand.
✰ • For MS Visual Basic 6 the Orchid.bas file is to be added to the project.
Linking Orchid With Your Application
Introduction
![Page 15: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/15.jpg)
Introdction
✰1. Check in your code2. Hardware Functionality3. Manual
✰Log Message Receiver
Trouble Shooting
* Running Before Orchid Application Star up* spends additional time by sending the messages to it
![Page 16: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/16.jpg)
Image Acquisition
✱ Setup A Connection✱ Specify Display Window✱ Showing the Live Image and Setting its Attributes
✱ Making a Snap and Setting its Attributes
✱ Recording to AVI File✱ Saving the Setting✱ Other Functions
Understanding LvxLive Module Functionality
![Page 17: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/17.jpg)
Image Acquisition
✰ LvxBaseAcquisition::Grabber, LvxBaseAcquisition::Connector, LvxBaseAcquisition::Camera
✰ lvx_DisplayConnectionDialog()
Setting Up a Connection
![Page 18: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/18.jpg)
Image Acquisition
✰Lvx_SetDisplayWindow()
Specify Display Window
![Page 19: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/19.jpg)
Image Acquisition
✰lvx_SetLive()✰lvx_SetGain()✰lvx_SetExposure()✰lvx_SetBlackLevel()
Showing the Live Image and Setting its Attributes
![Page 20: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/20.jpg)
Image Acquisition
✰lvx_DisplaySnapSettingDialog()✰lvx_CreateDisplayableImageBitmap()
Making a Snap and Setting its Attributes
![Page 21: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/21.jpg)
Image Acquisition
✰Select Compressor✰lvx_SaveAviSettings()✰lvx_LoadAviSettings()✰lvx_SetCaptureToAvi()
Recording to AVI File
![Page 22: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/22.jpg)
Image Acquisition
✰lvx_SaveSettings()✰lvx_LoadSettings()
Save Setting
![Page 23: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/23.jpg)
Image Acquisition
✰lvx_SetLoadWindowEnable()✰lvx_SetOptoOutput()
Other Functionality
![Page 24: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/24.jpg)
Image Acquisition
✰ Hardware: Direct to VGA Memory✰ Software: to CPU Memory✰ DirectX(Visible)✰ Hardware/Software Transition✰ MDI✰ Command: Window List Add / Window List Clear
Hardware Live V.S. Software Live
![Page 25: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/25.jpg)
Image Acquisition
✰Open Format✰Codec Issue✰lvx_DisplayAviSettingDialog()✰lvx_SaveAviSettings()
Create AVI File
![Page 26: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/26.jpg)
Image Acquisition
✰Frame Rate
✰Image Size
✰Can’t Resize
Creat AVI File
Indeo Version 4 - Quick Compress Option
LvxLive Module - Divided by 8
![Page 27: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/27.jpg)
Image Acquisition
✰lvx_OpenAviFile()✰lvx_CloseAviFile()✰lvx_SaveImageToAviFile()
AVI Functions
![Page 28: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/28.jpg)
Image Acquisition
✰ Sequences and Frames✰ Check Point✰ Module Type✰ More Initial Setting✰ Initializing the Module✰ Run-Time Settings✰ Grabbing✰ Specify Display Window✰ Live
Understanding the Functionality of Real-Time Modules
![Page 29: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/29.jpg)
Image Acquisition
✰ Accessing Grabbed Images✰ Storing Grabbed Images to File✰ Saving and Loading the Settings✰ I/O Settings✰ Other Functions✰ Advanced Functions
Understanding the Functionality of Real-Time Modules
![Page 30: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/30.jpg)
Image Acquisition
✰Circular Buffer✰Analog Grabber : Sub-Sequence✰Digital Grabber : Historical Reason
✰lvx_GetSubsequences()
Sequences and Frames
![Page 31: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/31.jpg)
Image Acquisition
✰Grabbing / Circular Buffer✰Check Control Value✰Continue Flag✰lvx_GrabContinue()✰Attribute: AsynchronousGrab
Check Points
![Page 32: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/32.jpg)
Image Acquisition
✰LvxRT✰LvxRtAr
Module Type
![Page 33: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/33.jpg)
Image Acquisition
✰lvx_Initialize()✰lvx_GrabContinue()
Initialize the Module
![Page 34: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/34.jpg)
Image Acquisition
✰LvRT
✰LvRtAr
Run Time Setting
LvxRT::ExternalTriggerLvxBaseAcquisition::SetGain()LvxBaseAcquisition::SetExposure()
LvxRtAr::ShutterTimeLvxRtAr::CameraRestartDelayLvxRtAr::FlashModeLvxRtAr::FlashEnable
![Page 35: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/35.jpg)
Image Acquisition
✰lvx_GrabContinue()✰wait for Triggerwait for Next Frame
✰lvx_SetNotifyCallBack()
Grabbing
![Page 36: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/36.jpg)
Image Acquisition
✰Handle✰lvx_SetTileImages()✰lvx_DisplayImage()/lvx_DisplayImageEX()
✰lvx_CreateDisplayableImageBitmap()
Specify Display Window
![Page 37: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/37.jpg)
Image Processing
✰Convert Color Format✰Preprocessing Filter✰Overlay Text
![Page 38: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/38.jpg)
Image Processing
✰Lvx_OpenTask(lvx_Task_Preprossor)
✰Attach to Acquisition Module✰lvx_SetOwnerTask()✰lvx_PreprocessImage()
Using the Preprocessor
![Page 39: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/39.jpg)
Image Processing
✰ Lvx_SetOwnerTask()✰ • Create the acquisition module and the preprocessor module.
✰ • Configure the acquisition module.✰ • lvx_Initialize() method.✰ 。 Lvx_SetOwnerTask()✰ 。 Configure Filters and Overlays
Sequences of initialize
![Page 40: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/40.jpg)
Image Processing
✰ The Color Format Conversion✰ Filters✰ Overlays✰ Text Shadow by the WriteTextToOverlay Method
Configuring the Preprocessor
![Page 41: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/41.jpg)
Image Processing
✰Color format Conversion
Configuring the Preprocessor
Lvx_SetImageBitsPerPixel()
![Page 42: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/42.jpg)
Image Processing
✰Filters
Configuring the Preprocessor
Bayer Array DecodingNoise ReductionWhite BalanceColor Space CorrectionShading Correction
![Page 43: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/43.jpg)
Image Processing
✰Filters
Configuring the Preprocessor
lvx_AddFilter()lvx_AddFilterRect()lvx_Command()
![Page 44: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/44.jpg)
Image Processing
✰Noise Reduction Filter
Configuring the Preprocessor
Pixel by Pixel
DestPixel=((100-Factor)*AcquiredPixel + Factor*AccumulatorPixel)/100
![Page 45: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/45.jpg)
Image Processing
✰White Balance
Configuring the Preprocessor
[R` G` B`] = [p1* R p2*G p3*B]
![Page 46: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/46.jpg)
Image Processing
✰Color Space Correction
Configuring the Preprocessor
![Page 47: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/47.jpg)
Image Processing
✰ ABSOLUTE_WHITE = (white_image_pixel - offset)* factor
✰ 0 = (black_image_pixel - offset)*factor✰ new_pixel_value = (acquired_image_pixel -
offset)* factor
![Page 48: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/48.jpg)
Image Processging
✰lvx_CreatOverlay()✰lvx_SetOverlayVisible()✰lvx_SetoverlayOffset()✰lvx_WipeOverlay()✰lvx_GetOverlayDc()✰lvx_ReleaseOverlayDc()
Overlays
![Page 49: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/49.jpg)
Image Processing
✰lvx_WriteTextToOverlay()✰lvx_PutBitmapToOverlay()
Overlays
![Page 50: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/50.jpg)
Image Processing
✰TextShadowOverlays
lvx_TextAttr_ShadowRBlvx_TextAttr_ShadowRTlvx_TextAttr_ShadowLBlvx_TextAttr_ShadowLTlvx_TextAttr_ShadowBlvx_TextAttr_ShadowTlvx_TextAttr_ShadowLlvx_TextAttr_ShadonR
![Page 51: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/51.jpg)
Image Processing
✰Preprocessing RunApplication Controlled PreprocessingAutomatic Preprocessing
![Page 52: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/52.jpg)
Image Processing
✰Application Controlled Preprocessing
Preprocessing Run
lvx_PreprocessImage()lvx_SetNotifyCallBack()lvx_OnCheckPoint()
![Page 53: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/53.jpg)
Image Processing
✰Automatic Preprocessing
Preprocessing Run
LvxRealTime::PreprocessingLimitation:• 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.
![Page 54: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/54.jpg)
Image Processing
✰Preprocessing in the LvxLive Module
![Page 55: Orchid Programming](https://reader031.fdocuments.in/reader031/viewer/2022031817/55a2c7e71a28abbe5d8b4581/html5/thumbnails/55.jpg)
Image Processing
✰DirectX Display of Image
Reduce CPU LoadDirectDraw