.. role:: raw-html-m2r(raw) :format: html **Contents** * `Basler Camera <#basler-camera>`__ * `Set Securiry Context to Enable Basler Camera in helm environment <#updating-security-context-of-videoingestion-helm-charts-for-enabling-k8s-environment-to-accessdetect-basler-camera>`__ Basler Camera ^^^^^^^^^^^^^ **NOTE**\ : * ``Pixel Formats`` .. list-table:: :header-rows: 1 * - Camera Model - Tested Pixel Formats * - Basler acA1920-40gc - mono8\ :raw-html-m2r:`
`\ ycbcr422_8\ :raw-html-m2r:`
`\ bayerrggb * - Basler acA1920-150uc - mono8\ :raw-html-m2r:`
`\ rgb8\ :raw-html-m2r:`
`\ bgr8\ :raw-html-m2r:`
`\ bayerbggr * In case one wants to use any of the bayer pixel-format then ``bayer2rgb`` element needs to be used to covert raw bayer data to RGB. Refer the below example pipeline. .. code-block:: javascript { "type": "gstreamer", "pipeline": "gencamsrc serial= pixel-format=bayerrggb ! bayer2rgb ! videoconvert ! video/x-raw,format=BGR ! appsink" } * In case one wants to use ``mono8`` image format or wants to work with monochrome camera then change the ``pixel-format`` to ``mono8`` in the pipeline. Since ``gstreamer`` ingestor expects a ``BGR`` image format, a single channel ``GRAY8`` format would be converted to 3 channel BGR format. **Example pipeline to use ``mono8`` imageformat or work with monochrome basler camera:** .. code-block:: javascript { "type": "gstreamer", "pipeline": "gencamsrc serial= pixel-format=mono8 ! videoconvert ! video/x-raw,format=BGR ! appsink" } * In case one wants to enable resizing with basler camera ``vaapipostproc`` element can be used to specify the height and width parameter in the gstreamer pipeline. **Example pipeline to enable resizing the frame to ``600x600`` with basler camera:** .. code-block:: javascript { "type": "gstreamer", "pipeline": "gencamsrc serial= pixel-format= ! vaapipostproc height=600 width=600 ! videoconvert ! video/x-raw,format=BGR ! appsink" } * In case one wants to divert the colour space conversion to ``GPU`` for basler camera ``vaapipostproc`` can be used. This can be useful when the CPU% is maxing out due to the input ingestion stream. **Example pipeline to perform color space conversion from ``YUY2 to BGRx`` in GPU with ``vaapipostproc`` with basler camera:** .. code-block:: javascript { "type": "gstreamer", "pipeline": "gencamsrc serial= pixel-format= ! vaapipostproc format=bgrx ! videoconvert ! video/x-raw,format=BGR ! appsink" } ``Basler camera hardware triggering`` * If the camera is configured for triggered image acquisition, one can trigger image captures at particular points in time. * With respect to hardware triggering if the camera supports it then an electrical signal can be applied to one of the camera's input lines which can act as a trigger signal. * In order to configure the camera for hardware triggering, during our tests we set the following properties of Generic Plugin. * ``trigger-selector=FrameStart`` - the camera initializes the acquisition of only image * ``acquisition-mode=singleframe`` - the camera will acquire exactly one image * ``trigger-source=Line1`` - the appropriate H/W trigger source needs to be selected * ``trigger-activation=RisingEdge`` - the approriate trigger activation parameter need to be selected * ``hw-trigger-timeout=100`` - the H/W trigger timeout value in seconds in multiples of 5 For more information on the properties related to hardware triggering refer Generic-Plugin-readme(\ ``[WORK_DIR]/IEdgeInsights/VideoIngestion/src-gst-gencamsrc/README``\ ) ``Validated test setup for basler camera hardware triggering`` * In our test setup a python script was used to control a ModBus I/O module to generate a digital output to Opto-insulated input line(Line1) of the basler camera. * For testing the hardware trigger functionality Basler ``acA1920-40gc`` camera model had been used. .. **Note**\ : Other triggering capabilities with different camera models are not tested. Updating Security Context of VideoIngestion Helm Charts for enabling K8s environment to access/detect Basler Camera ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Please follow the steps to update helm charts for enabling K8s environment to access/detect Basler Camera * Open ``EII_HOME_DIR/IEdgeInsights/VideoIngestion/helm/templates/video-ingestion.yaml`` file * Update below security context snippet .. code-block:: yml securityContext: privileged: true in the yaml file as: .. code-block:: yaml ... ... ... imagePullPolicy: {{ $global.Values.imagePullPolicy }} securityContext: privileged: true volumeMounts: - name: dev mountPath: /dev ... * Re-run ``builder.py`` to apply these changes to your deployment helm charts.