structure, challenges, prospects...>jai rm2030 7.4 um 1920 x 1080 pixels (ccd: kodak kai-2093) 12...
TRANSCRIPT
AVINE Video System at PITZ
Structure, Challenges, Prospects
Stefan WeisseDESY IT/Controls
PITZ Betriebsseminar Gohrisch, June 2017
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 2
Agenda
> Outline / Structure / Overview
> Hardware (Cameras, Servers)
> Software: Server-side
> Software: Client-side, Client-API
> Documentation
> Challenges
> Prospects
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 3
Focus of the Functionality
> Nearly not covered in this talk (but Video System depends on it)
� lenses in front of cameras (optics mounted to cameras, flexible lenses (not mounted to cameras), no optics (laser beam directly hits imager sensor))
� remote camera power on/off, camera power supplies
� trigger signal generation, transport of trigger signal to camera (via cable)
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 4
Overview / rooms
Tunnel
Rack-Room
Laser Hut
znpfg5
znpvs1 znpfg1 znpfg2 znpfg3znpfg6
Switch
common PITZ computer network (shared)
…
Trigger
Power
Network (copper)Network (fibre)
Trigger
Power
Trigger
Power
Trigger
Power
…
Control Room
Computer Centre
Offices
znpvs1
znpfg1
znpfg3 Server: tests, develop, spare
Server: in production (aged)
Server: in production (new)
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 5
AVINE Video System at PITZ
Hardware (Cameras, Servers)
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 6
Cameras used
Cameras
� all monochrome
> Allied Vision Techn. (AVT) Prosilica GC1350M
� 4.65um 1360 x 1024 pixels (CCD Sony ICX205AL)
� binning possible (e.g. 2x2)
� up to 12 bit
� about 35 pieces (~25 installed in tunnel and laser hut)
� application: images of electron beam at screen stations (looking at screens, with optics), sometimes used for laser beam monitoring (laser beam hits CCD), …
“general all-purpose”
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 7
Cameras used (cont’d)
> JAI RM1405
� special modification of imager sensor for direct laser beam imaging
� 4.65 um 1392 x 1040 pixels (CCD Sony ICX205AL)
� up to 10 bit
� 2 pieces
� application: images of laser beam at Virtual Cathode 2
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 8
Cameras used (cont’d)
> JAI CM-140 GE-UV (spare VC2 etc.)
� special modification of imager sensor for direct laser beam imaging
� 4.65 um 1392 x 1040 pixels (CCD Sony ICX267AL)
� 10 bit
� 2 pieces
� application: images of Laser beam in laser hut, possibly Virtual Cathode 2 in future
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 9
Cameras used (cont’d)
> JAI RM2040
� 7.4 um 1600 x 1200 pixels (CCD: Kodak KAI-2020)
� 12 bit
� special modification of imager sensor for direct laser beam imaging
� single piece
� application: images of laser beam at Las.vBSA position
> JAI RM2030
� 7.4 um 1920 x 1080 pixels (CCD: Kodak KAI-2093)
� 12 bit
� 2x2 binning
� application: Disp2.Scr2, Disp3.Scr2
RM1405, RM2040 and RM2030 housing looks very similar
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 10
Camera Support Hardware
Camera Power and Trigger Box
Camera Network Sockets
NO Camera Network Socket
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 11
Server Hardware (Rack-Room, Rack 18)
znpvs1
znpfg6
znpfg3
pitzser02 (PCO tunnel)
znmops27 (Gun Audio Recording)
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 12
Server Hardware (Rack-Room, Rack 18)
znpfg1
znpfg2
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 13
Server Hardware (Rack-Room, Rack 18)
Trigger
Trigger
Trigger Signal to Tunnel (parts)
Analogue Video (obsolete)
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 14
AVINE Video System at PITZ
Software: Server-side
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 15
Video Distribution Architecture: Server side
> Server-side functionality is divided into individual components
(components with video output/input can be dynamically interconnected via TINE, also beyond machine level)
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 16
Server PC, Software Components
> SGP: Small Grabber Part
� 1 server process – 1 camera (connection to camera can be changed on the fly)
� communication with camera (slow control connection to hardware)
� image acquisition (video stream)
� image preprocessing (orientation change)
� attach metadata to image (e.g. scale factor)
� shared memory: lightweight image transport to other processes on the same host
� connection to control system via TINE protocol- stream live images as TINE CF_IMAGE- status information- change image orientation and scale factors on the fly (switchable lenses)- switch from one camera to another one (on the fly)- communication partner for Universal Slow Control server
� Flavours: - JAI SDK: Jai and Basler cameras (focused to GigE/Vision + GenICam, but not limited to)- Prosilica API: Prosilica and AVT Prosilica cameras- …
e.g. /PITZ/FG1S.Prosilica/PITZ/FG1S.PJAIGigE
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 17
Server PC, Software Components
> Layer: Raw2Jpeg
� Layer: intermediate server, no connection to camera hardware
� receives images from an image source (e.g. SGP server)
� provides images jpeg-compressed via TINE to control system
� lowers demands on networking and control system protocol (e.g. TINE)
� JPEG images size is smaller than raw, with reasonable loss of information (at 30-50% compression, loss is low (MEAN values error 0.1-10 per mille))
e.g. /PITZ/FG1L.R2J/PITZ/FG2L.R2J
� drawbacks: - only 8 bit per pixel (as provided by standard JPEG grayscale images)- CPU power needed
� Possibly in future:- proprietary extension to more than 8 bit (10, 12 bit etc.)- faster compression (less CPU demanding)
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 18
Server PC, Software Components
> Universal Slow Control Server
� an XML configuration file defines layout of exported properties of camera (e.g. Gain, ExposureTime, …)
� a TINE server provides communication to e.g. Universal Slow Control Client
� Simple Slow Control (SSC): regular TINE-based com-munication with SGP component (which provides communication to camera hardware) in order to- get current values of exported camera properties- set a value of an exported camera properties
� direct communication to serial port (RS232) possible, but hasn’t been used recently
� Java software (runs on Windows, may run on Linux (not tested))
/PITZ/SLOWCONTUNNEL/PITZ/SLOWCONLASER
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 19
Server PC, Software Components
> EVNAgent
� EVent Number Agent
� small software component on each video server PC
� receives central pitz timing telegram (event number, global timestamp) and repetition rate property
� provides event number and global timestamp to SGP server (each newly acquired video frame can be ‘stamped’ with it)
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 20
Server PCs, distribution of tasks
znpfg1
SGP ProsilicaSVR.PROSILICAFG1S.Prosilica
type of server process
watchdog name of server process(on jDDD watchdog_main.xml)
TINE name of server process(/PITZ/FG1S.Prosilica/)
> Explanation of names
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 21
Server PCs, distribution of tasks (cont’d)
znpfg1 znpfg2 znpfg6
USC ServerSVR.SLOWCONTUNNELSLOWCONTUNNEL
SGP ProsilicaSVR.PROSILICAFG1S.Prosilica
SGP Jai SVR.PJAIGIGEFG1S.PJAIGigE
Layer Raw2Jpeg SVR.R2JFG1L.R2J
EvnAgentPRG.EVNAGENT
Rack-Room, Rack 18
EvnAgentPRG.EVNAGENT
SGP ProsilicaSVR.PROSILICAFG2S.Prosilica
Layer Raw2Jpeg SVR.R2JFG2L.R2J
SGP ProsilicaSVR.PROSILICAFG6S.Prosilica
SGP Jai SVR.PJAIGIGEFG6S.PJAIGigE
Layer Raw2Jpeg SVR.R2JFG6L.R2J
EvnAgentPRG.EVNAGENT
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 22
Server PCs, distribution of tasks (cont’d)
znpvs1 znpfg5
USC ServerSVR.SLOWCONLASERSLOWCONLASER
EvnAgentPRG.EVNAGENT
SGP ProsilicaSVR.PROSILICAFG5S.Prosilica
Layer Raw2Jpeg SVR.R2JFG2L.R2J
Room before Laser Hut
SGP ProsilicaSVR.PROS2FG5S.Pros2
SGP ProsilicaSVR.PROS3FG5S.Pros3
SGP Jai SVR.JAIFG5S.JAI
SGP Jai SVR.JAI1TV1S.Jai1
SGP ProsilicaSVR.PROS1TV1S.Pros1
SGP ProsilicaSVR.PROS2TV1S.Pros2
SGP Jai SVR.JAI2TV1S.Jai2
Rack-Room, Rack 18
EvnAgentPRG.EVNAGENT
Layer Raw2Jpeg SVR.R2JTV1L.R2J
Layer CalcSVR.CALC1TV1L.CALC1
Layer CalcSVR.CALC2TV1L.CALC2
…
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 23
jDDD Watchdog Panel: Video Server PCs
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 24
AVINE Video System at PITZ
Software: Client-side, Client-API
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 25
Clients (1/2)
common PITZ computer network (shared)
Video Client 3
Video SystemControl Panel
Universal Slow Control (USC) Client
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 26
Clients (2/2)
AVINE C/C++ Client API / Library
EMWiz (FastScan, EmCalc)
Matlabscripts and applications,e.g. OMA, TDS, SliceEnergySpread,PulseShapeOptimizer, ….
common PITZ computer network (shared)
avine_tine_read_images()avine_load_video_images_from_file()avine_save_video_images_to_file()
xcomm
Matlab API
Linux Linux
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 27
AVINE Client-API
> Matlab External Functions
� load image (sequence) from disk
� save image (sequence) to disk
� obtain live (sequence of) image(s)
> AVINE C/C++ client library
� fundament for Matlab
� used by dedicated Linux clientapplications at PITZ (e.g. EMWiz)
> Availability
� Windows (64 bit)
� Linux (64 bit)
� Matlab 2007 to 2017a
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 28
AVINE C/C++ Client Library
> acquire single images and image sequences from video server
> load and save images and image sequences (imc, bkc, imm, bkg, bmp)
> X-ray filtering
> normalize whole image or rectangular area of image
> get all raw video server names, get all image source (camera) names
> decompress image (JPEG)
> calculate significance map
� ever used?
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 29
Clients (not used at PITZ*)
> ACOP Video Bean
� In TINE Instant Client
� In ACOP Video Application
� In Java Video Client
* as far as I know
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 30
Clients (for Experts)
Universal Slow Control (USC) Server Configurator
Camera Switching Panel
SGP Monitor Panel
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 31
Data communication h ttp://tine.desy.de
> native TINE protocol
� better support on Windows platform
� Windows mandatory for video servers (SDK/API for cameras are not so widely available on Linux as on Windows)
� avine_tine_read_images, xcomm, Video Client 3, video system library (C/C++), universal slow control server, client, vs control panel etc.=> all use native TINE library
> well-defined property layout of video servers
> TINE-integrated image type (CF_IMAGE)(many clients understand this)
> communication to DOOCS clients/ servers is basically working (but it’s not the native language)
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 32
Documentation http://avine.desy.de
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 33
Challenges
> loss-less live video streaming (demanding to computers and networking)
> fragile software
� maintenance and development of EMWiz
� TINE protocol (sometimes)
> operating hardware under harsh environment (radiation, limited cooling)
� Hard/software fails easier under harsh environment (effects only observable in tunnel, not lab)
> support for long-term (5+ years)
> some installation sites at DESY (not only PITZ), with different needs
� PETRA 3 (DESY), FS-BT (Users at Petra3, P3xn, P3xe), EMBL HH (Users at Petra3), REGAE, SALOME
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 34
Prospects
> video analysis and calculations will be mainly done on server side
� for backward compatibility to previous use cases of Video Client 3, pure client-side analysis is foreseen to be kept (for near future)
� server-side video analysis/calculations: only image by image (no averaging of results on a sequence of images, or?)
> restrict/remove raw video distribution to client side, use JPEG instead
� possibility to use multicast to stream images (at the cost of image quality)
� reduces effort required on TINE protocol
⇒calculations based on loss-less raw image data can only be done on server-side
> ZeroMQ (TCP) as alternative to TINE when streaming video over network
� to have a failover in case transfer problems in recent TINE are not fixable
� but ZeroMQ (TCP) is no general solution either (data needs to be sent to each client individually)
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 35
Prospects
Server-sideSmall Grabber Part (SGP)
Layer: Raw2Jpeg
Layer: Calc- bckgnd subtraction- area of interest- xyMEAN, xyRMS, …
AVINE Video Transport (TINE CF_IMAGE)
control/get status of Calc server- get/set/clear bckgnd- get/set/clear AOI- X-Ray filtering on/off- …
current settings and results of calculations (comparable to structure Values in Video Client 3 integrated Tine server, can be obtained at full repetition rate (10 Hz…))
current raw image, settings and results of calculations (<= 1 Hz!), as TINE structure
raw video transport
raw
JPEG
Calculation Engine
GUI
Video Client 3
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 36
Recommendation to other groups
> space is exhausted
� cabling, rackmount-space, esp. Laser Hut
⇒ Consolidation !
> remove pieces which are no longer in use
� cabling: overloaded cable trays, cooling efficiency, ground looping, EM interference
� hardware / devices
� software
� files
Stefan Weisse | AVINE Video System | June 22, 2017 | Page 37
AVINE Video System at PITZ
Thank you for your attention!
Questions? Comments?
Remarks?