MX8 Basler Camera: Difference between revisions
No edit summary |
No edit summary |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 13: | Line 13: | ||
* [https://www.variscite.com/product/accessories/vcam-ar1335b-i-mx8-camera-board/ VCAM-AR1335B] (daA4200-30mci): supported | * [https://www.variscite.com/product/accessories/vcam-ar1335b-i-mx8-camera-board/ VCAM-AR1335B] (daA4200-30mci): supported | ||
* [https://www.variscite.com/product/accessories/vcam-ar0821b-camera-board/ VCAM-AR0821B] (daA3840- | * [https://www.variscite.com/product/accessories/vcam-ar0821b-camera-board/ VCAM-AR0821B] (daA3840-30mc): {{#ifeq: {{#var:META_BASLER_SUPPORT_AR0821}} | | not }} supported | ||
* [https://www.variscite.com/product/accessories/vcam-ar0521b-camera-board/ VCAM-AR0521B] (daA2500-60mc): {{#ifeq: {{#var:META_BASLER_SUPPORT_AR0521}} | | not }} supported | |||
= Download Variscite Yocto BSP = | = Download Variscite Yocto BSP = | ||
Line 28: | Line 29: | ||
}}}}<!-- | }}}}<!-- | ||
-->{{#ifeq: {{#var:YOCTO_NAME}} | Sumo | | -->{{#ifeq: {{#var:YOCTO_NAME}} | Sumo | | ||
$ wget | $ wget https://variscite-public.nyc3.cdn.digitaloceanspaces.com/Basler/Software/basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo.tar.gz | ||
$ mkdir basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo | $ mkdir basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo | ||
$ tar xf basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo.tar.gz -C basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo | $ tar xf basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo.tar.gz -C basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo | ||
$ mv basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo/meta-basler* ../sources | $ mv basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo/meta-basler* ../sources | ||
$ wget | $ wget https://variscite-public.nyc3.cdn.digitaloceanspaces.com/Basler/Software/sumo-fsl-4.14.98-cep-1.5.0/meta-variscite-imx-basler.tar.gz | ||
$ tar xf meta-variscite-imx-basler.tar.gz -C ../sources/ | $ tar xf meta-variscite-imx-basler.tar.gz -C ../sources/ | ||
}} | }} | ||
Line 40: | Line 41: | ||
== Customize bblayers.conf == | == Customize bblayers.conf == | ||
Add the following lines to conf/bblayers.conf under your Yocto build directory: | Add the following lines to conf/bblayers.conf under your Yocto build directory: | ||
BBLAYERS += " ${BSPDIR}/sources/meta-basler-imx8 " | BBLAYERS += " ${BSPDIR}/sources/meta-basler-imx8 "<!-- | ||
{{#if: {{#var:BASLER_REPO_BRANCH}}| BBLAYERS += " ${BSPDIR}/sources/meta-basler-tools "| BBLAYERS += " ${BSPDIR}/sources/meta-basler-tools/meta-basler-common "}}<!-- | -->{{#if: {{#var:BASLER_REPO_BRANCH}}| | ||
<br>BBLAYERS += " ${BSPDIR}/sources/meta-basler-tools "| | |||
<br>BBLAYERS += " ${BSPDIR}/sources/meta-basler-tools/meta-basler-common "}}<!-- | |||
-->{{#ifeq: {{#var:YOCTO_NAME}} | Sumo |<br>BBLAYERS += " ${BSPDIR}/sources/meta-variscite-imx-basler "}} | -->{{#ifeq: {{#var:YOCTO_NAME}} | Sumo |<br>BBLAYERS += " ${BSPDIR}/sources/meta-variscite-imx-basler "}} | ||
Line 65: | Line 68: | ||
{{#if: {{#var:BASLER_GSTREAMER_SECTION}} | | {{#if: {{#var:BASLER_GSTREAMER_SECTION}} | | ||
= Running GStreamer = | = Running GStreamer = | ||
{{#lst:Yocto_Platform_Customization|{{#var:BASLER_GSTREAMER_SECTION}}}} | {{#lst:Yocto_Platform_Customization|{{#var:BASLER_GSTREAMER_SECTION}}}} | ||
}} | }} | ||
Line 76: | Line 77: | ||
camera by default.<br> | camera by default.<br> | ||
In order to use the [https://www.variscite.com/product/accessories/vcam-ar0821b-camera-board/ VCAM-AR0821B] (daA3840-mc) | In order to use the [https://www.variscite.com/product/accessories/vcam-ar0821b-camera-board/ VCAM-AR0821B] (daA3840-mc) | ||
or the [https://www.variscite.com/product/accessories/vcam-ar0521b-camera-board/ VCAM-AR0521B] (daA2500-60mc) | |||
camera you need to run the following commands at the shell prompt: | camera you need to run the following commands at the shell prompt: | ||
{{#lst:Yocto_Platform_Customization|{{#var:BASLER_SWITCH_CAM_SECTION}}}} | {{#lst:Yocto_Platform_Customization|{{#var:BASLER_SWITCH_CAM_SECTION}}}} | ||
Line 83: | Line 85: | ||
= Prebuilt recovery SD card image = | = Prebuilt recovery SD card image = | ||
A prebuilt recovery SD card image with Basler camera support can be downloaded from:<br> | A prebuilt recovery SD card image with Basler camera support can be downloaded from:<br> | ||
[{{#var:VAR_FILES_HTTPS}}/Basler/Software/{{#var:BASLER_RECOVERY_SD_PATH}} {{#sub:{{#var:BASLER_RECOVERY_SD_PATH}}|{{#expr:{{#rpos:{{#var:BASLER_RECOVERY_SD_PATH}}|/}}+1}}}}] | |||
}} | }} |
Latest revision as of 21:24, 22 August 2024
Introduction
The following instructions will allow you to add CEP (Camera Enablement Package) support for the Basler MIPI camera to your Yocto images.
This will allow you to stream images/video from a Basler camera(s) connected to a Variscite evaluation kit.
Available Basler cameras
- VCAM-AR1335B (daA4200-30mci): supported
- VCAM-AR0821B (daA3840-30mc): not supported
- VCAM-AR0521B (daA2500-60mc): not supported
Download Variscite Yocto BSP
Please follow Build Yocto from source code.
Execute steps 1-4.3 to download the BSP sources, but don't start bitbake yet.
Download and install Basler meta layers
$ wget https://variscite-public.nyc3.cdn.digitaloceanspaces.com/Basler/Software/basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo.tar.gz $ mkdir basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo $ tar xf basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo.tar.gz -C basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo $ mv basler-dart-bcon-mipi-imx8-cep_1.5.0-for-imx-4.14.98-2.0.0_ga_sumo/meta-basler* ../sources $ wget https://variscite-public.nyc3.cdn.digitaloceanspaces.com/Basler/Software/sumo-fsl-4.14.98-cep-1.5.0/meta-variscite-imx-basler.tar.gz $ tar xf meta-variscite-imx-basler.tar.gz -C ../sources/
Customize configuration files
Customize bblayers.conf
Add the following lines to conf/bblayers.conf under your Yocto build directory:
BBLAYERS += " ${BSPDIR}/sources/meta-basler-imx8 "
BBLAYERS += " ${BSPDIR}/sources/meta-basler-tools/meta-basler-common "
BBLAYERS += " ${BSPDIR}/sources/meta-variscite-imx-basler "
Customize local.conf
Add the following to conf/local.conf under your Yocto build directory:
IMAGE_INSTALL_append = " \ basler-camera-driver \ pylon \ python3-pypylon \ gentl-producer \ xauth \ " MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-module-basler-camera-driver"
Build Yocto image
Continue following Build Yocto from source code from where you left off, to bitbake and install an image.
Running Basler camera application
Run the following commands at the shell prompt:
$ export DISPLAY=:0.0 $ /usr/bin/pylon
Using the pypylon Python 3 interface to Basler camera
This interface lets you configure the camera and acquire video and images from a Python application. You can also type commands in an interactive Python session.
All software needed is already installed in the Yocto image generated following instructions on this page.
For more information and sample code refer to the pypylon page on Github.
Before starting Python run the following command at the shell prompt:
$ export GENICAM_GENTL64_PATH=/opt/dart-bcon-mipi/lib
Prebuilt recovery SD card image
A prebuilt recovery SD card image with Basler camera support can be downloaded from:
dart-mx8mm-basler-cep-1.5-recovery-sd.v25.img.gz