Difference between revisions of "ON Semiconductor AR0144 Linux driver"

From RidgeRun Developer Connection
Jump to: navigation, search
(Created page with "<seo title="ON Semiconductor Linux Drivers | Linux Driver for Jetson TX2 | RidgeRun Developer" titlemode="replace" keywords="GStreamer, Linux SDK, Linux BSP, Embedded Linux,...")
 
m
 
(62 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<seo title="ON Semiconductor Linux Drivers | Linux Driver for Jetson TX2 | RidgeRun Developer" titlemode="replace" keywords="GStreamer, Linux SDK, Linux BSP,  Embedded Linux, Device Drivers, Nvidia, Xilinx, TI, NXP, Freescale, Embedded Linux driver development, Linux Software development, Embedded Linux SDK, Embedded Linux Application development, GStreamer Multimedia Framework,AR1335 Jetson TX2,AR1335,V4L2 Driver." description="Check out our comprehensive overview of the ON Semiconductor AR1335 Linux driver for Jetson TX2.Check out the features and more at RidgeRun!"></seo>
+
<seo title="ON Semiconductor AR0144 Linux driver | AR0144 Linux driver for Jetson TX2 | RidgeRun Developer" titlemode="replace" metakeywords="GStreamer, Embedded Linux, Device Drivers, NVIDIA, Xilinx, TI, NXP, Freescale, Embedded Linux driver development, Linux Software development, Embedded Linux SDK, Embedded Linux Application development, Multimedia Framework, Jetson TX2, NVIDIA Jetson TX2, AR0144, V4L2 Driver, AR0144 Linux driver, ON Semiconductor, AR0144 driver, ON Semi, i.MX8, i.MX8MQ, SnapDragon, i.MX8M Plus, AR0144 Linux driver support, AR0144 Performance measurement, AR0144 Latency measurement, NXP i.MX8, V4l2, AR0144 Latency." metadescription="Check out RidgeRun's Linux driver for ON Semiconductor AR0144 camera sensor, GStreamer test pipelines and performance results.!"></seo>
  
 
<table>
 
<table>
Line 5: Line 5:
 
<td><div class="clear; float:right">__TOC__</div></td>
 
<td><div class="clear; float:right">__TOC__</div></td>
 
<td>
 
<td>
<html>
+
{{Shopping cart mpo for V4L2 camera drivers}}
<div id='product-component-1572034278260'></div>
 
<script type="text/javascript">
 
/*<![CDATA[*/
 
(function () {
 
  var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js';
 
  if (window.ShopifyBuy) {
 
    if (window.ShopifyBuy.UI) {
 
      ShopifyBuyInit();
 
    } else {
 
      loadScript();
 
    }
 
  } else {
 
    loadScript();
 
  }
 
  function loadScript() {
 
    var script = document.createElement('script');
 
    script.async = true;
 
    script.src = scriptURL;
 
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script);
 
    script.onload = ShopifyBuyInit;
 
  }
 
  function ShopifyBuyInit() {
 
    var client = ShopifyBuy.buildClient({
 
      domain: 'ridgerun1.myshopify.com',
 
      storefrontAccessToken: 'b0ca98633a82de5d2f63cd51f5af30ac',
 
    });
 
    ShopifyBuy.UI.onReady(client).then(function (ui) {
 
      ui.createComponent('product', {
 
        id: '1748848148551',
 
        node: document.getElementById('product-component-1572034278260'),
 
        moneyFormat: '%24%7B%7Bamount%7D%7D',
 
        options: {
 
  "product": {
 
    "styles": {
 
      "product": {
 
        "@media (min-width: 601px)": {
 
          "max-width": "calc(25% - 20px)",
 
          "margin-left": "20px",
 
          "margin-bottom": "50px"
 
        }
 
      },
 
      "button": {
 
        "font-family": "Open Sans, sans-serif",
 
        "font-weight": "bold",
 
        "font-size": "18px",
 
        "padding-top": "17px",
 
        "padding-bottom": "17px",
 
        ":hover": {
 
          "background-color": "#0187a7"
 
        },
 
        "background-color": "#0196ba",
 
        ":focus": {
 
          "background-color": "#0187a7"
 
        },
 
        "border-radius": "5px",
 
        "padding-left": "50px",
 
        "padding-right": "50px"
 
      },
 
      "quantityInput": {
 
        "font-size": "18px",
 
        "padding-top": "17px",
 
        "padding-bottom": "17px"
 
      }
 
    },
 
    "text": {
 
      "button": "Add to cart"
 
    },
 
    "googleFonts": [
 
      "Open Sans"
 
    ]
 
  },
 
  "productSet": {
 
    "styles": {
 
      "products": {
 
        "@media (min-width: 601px)": {
 
          "margin-left": "-20px"
 
        }
 
      }
 
    }
 
  },
 
  "modalProduct": {
 
    "contents": {
 
      "img": false,
 
      "imgWithCarousel": true,
 
      "button": false,
 
      "buttonWithQuantity": true
 
    },
 
    "styles": {
 
      "product": {
 
        "@media (min-width: 601px)": {
 
          "max-width": "100%",
 
          "margin-left": "0px",
 
          "margin-bottom": "0px"
 
        }
 
      },
 
      "button": {
 
        "font-family": "Open Sans, sans-serif",
 
        "font-weight": "bold",
 
        "font-size": "18px",
 
        "padding-top": "17px",
 
        "padding-bottom": "17px",
 
        ":hover": {
 
          "background-color": "#0187a7"
 
        },
 
        "background-color": "#0196ba",
 
        ":focus": {
 
          "background-color": "#0187a7"
 
        },
 
        "border-radius": "5px",
 
        "padding-left": "50px",
 
        "padding-right": "50px"
 
      },
 
      "quantityInput": {
 
        "font-size": "18px",
 
        "padding-top": "17px",
 
        "padding-bottom": "17px"
 
      }
 
    },
 
    "googleFonts": [
 
      "Open Sans"
 
    ]
 
  },
 
  "cart": {
 
    "styles": {
 
      "button": {
 
        "font-family": "Open Sans, sans-serif",
 
        "font-weight": "bold",
 
        "font-size": "18px",
 
        "padding-top": "17px",
 
        "padding-bottom": "17px",
 
        ":hover": {
 
          "background-color": "#0187a7"
 
        },
 
        "background-color": "#0196ba",
 
        ":focus": {
 
          "background-color": "#0187a7"
 
        },
 
        "border-radius": "5px"
 
      },
 
      "title": {
 
        "color": "#4c4c4c"
 
      },
 
      "header": {
 
        "color": "#4c4c4c"
 
      },
 
      "lineItems": {
 
        "color": "#4c4c4c"
 
      },
 
      "subtotalText": {
 
        "color": "#4c4c4c"
 
      },
 
      "subtotal": {
 
        "color": "#4c4c4c"
 
      },
 
      "notice": {
 
        "color": "#4c4c4c"
 
      },
 
      "currency": {
 
        "color": "#4c4c4c"
 
      },
 
      "close": {
 
        "color": "#4c4c4c",
 
        ":hover": {
 
          "color": "#4c4c4c"
 
        }
 
      },
 
      "empty": {
 
        "color": "#4c4c4c"
 
      },
 
      "noteDescription": {
 
        "color": "#4c4c4c"
 
      },
 
      "discountText": {
 
        "color": "#4c4c4c"
 
      },
 
      "discountIcon": {
 
        "fill": "#4c4c4c"
 
      },
 
      "discountAmount": {
 
        "color": "#4c4c4c"
 
      }
 
    },
 
    "googleFonts": [
 
      "Open Sans"
 
    ]
 
  },
 
  "toggle": {
 
    "styles": {
 
      "toggle": {
 
        "font-family": "Open Sans, sans-serif",
 
        "font-weight": "bold",
 
        "background-color": "#0196ba",
 
        ":hover": {
 
          "background-color": "#0187a7"
 
        },
 
        ":focus": {
 
          "background-color": "#0187a7"
 
        }
 
      },
 
      "count": {
 
        "font-size": "18px"
 
      }
 
    },
 
    "googleFonts": [
 
      "Open Sans"
 
    ]
 
  },
 
  "lineItem": {
 
    "styles": {
 
      "variantTitle": {
 
        "color": "#4c4c4c"
 
      },
 
      "title": {
 
        "color": "#4c4c4c"
 
      },
 
      "price": {
 
        "color": "#4c4c4c"
 
      },
 
      "fullPrice": {
 
        "color": "#4c4c4c"
 
      },
 
      "discount": {
 
        "color": "#4c4c4c"
 
      },
 
      "discountIcon": {
 
        "fill": "#4c4c4c"
 
      },
 
      "quantity": {
 
        "color": "#4c4c4c"
 
      },
 
      "quantityIncrement": {
 
        "color": "#4c4c4c",
 
        "border-color": "#4c4c4c"
 
      },
 
      "quantityDecrement": {
 
        "color": "#4c4c4c",
 
        "border-color": "#4c4c4c"
 
      },
 
      "quantityInput": {
 
        "color": "#4c4c4c",
 
        "border-color": "#4c4c4c"
 
      }
 
    }
 
  }
 
},
 
      });
 
    });
 
  }
 
})();
 
/*]]>*/
 
</script>
 
</html>
 
 
<td>
 
<td>
{{Debug Symbol}} Problems running the pipelines shown on this page?<br>Please see our [http://developer.ridgerun.com/wiki/index.php?title=GStreamer_Debugging GStreamer Debugging guide] for help.
+
{{GStreamer debug}}
<br>
+
<td>  
<br>
+
<center>
<div style='text-align: center;'>[[File:RR Contact Us.png|200px|link=http://www.ridgerun.com/contact]]</div>
+
{{ContactUs Button}}
</td>
+
</center>
</td>
 
 
</tr>
 
</tr>
 
</table>
 
</table>
 +
<br>
  
=AR0144 Features=
+
==ON Semiconductor AR0144 Features==
  
The ON Semiconductor AR0144 is an image sensor with the following features:
+
The AR0144 is a 1/4-inch 1.0 Mp CMOS digital image sensor with an active pixel array of 1280H x 800V. It incorporates a new innovative global shutter pixel design optimized for accurate and fast capture of moving scenes. The sensor produces clear, low noise images in both low-light and bright scenes. It includes sophisticated camera functions such as auto exposure control, windowing, row skip mode, column-skip mode, pixel-binning, and both video and single frame modes. It is programmable through a simple two-wire serial interface. The AR0144 produces extraordinarily clear, sharp digital pictures, and its ability to capture both continuous video and single frames makes it the perfect choice for a wide range of applications, including scanning and industrial inspection.<ref>https://www.onsemi.com/products/sensors/image-sensors-processors/image-sensors/ar0144cs</ref>
  
* TODO
+
== AR0144 Linux driver support ==
  
 
RidgeRun has developed a driver for the following platforms:
 
RidgeRun has developed a driver for the following platforms:
  
* Jetson TX2
+
* NVIDIA Jetson TX2
* i.MX8
+
* NXP i.MX8
 
* SnapDragon
 
* SnapDragon
  
 
The driver has the following support:
 
The driver has the following support:
  
* TODO
+
=== Jetson TX2 ===
 +
 
 +
<pre>
 +
TODO
 +
</pre>
 +
 
 +
=== i.MX8MQ===
  
=Enabling the driver=
+
* Linux 4.14.98
 +
* V4l2 Subdevice
 +
* Tested at 1280x800@30fps
 +
* 8bpp monochrome
 +
* Capture with v4l2src
 +
 
 +
=== i.MX8M Plus===
 +
 
 +
* Linux 5.10.35
 +
* V4l2 Subdevice
 +
* Tested at 1280x800@30fps
 +
* 12bpp color
 +
* Capture with v4l2src
 +
 
 +
=== SnapDragon ===
 +
 
 +
* Linux 4.14
 +
* V4l2 Media controller driver
 +
* Tested resolutions 1280x800 and 640x400 (2x2 binning) with framerates up to 59fps
 +
* 8, 10 and 12bpp monochrome
 +
* Capture with v4l2src (8bpp) and yavta (10bpp and 12 bpp).
 +
 
 +
==Enabling the AR0144 Linux driver==
 +
=== Jetson TX2 ===
  
 
<pre>
 
<pre>
Line 290: Line 67:
 
</pre>
 
</pre>
  
=Using the driver=
+
=== i.MX8 ===
  
==Gstreamer examples==
+
<pre>
 +
Location:                                                                                                                                                                                           
 +
  -> Device Drivers 
 +
    -> Multimedia support (MEDIA_SUPPORT [=y])
 +
      -> I2C Encoders, decoders, sensors and other helper chips
 +
        -> OnSemi camera sensors (VIDEO_ONSEMI_SENSORS [=y])
 +
          -> AR0144 (VIDEO_ONSEMI_AR0144 [=y])
 +
</pre>
 +
 
 +
=== SnapDragon ===
 +
 
 +
<pre>
 +
  Location:                                                                                                                                                                                           
 +
    -> Device Drivers
 +
      -> Multimedia support (MEDIA_SUPPORT [=m])
 +
      -> Sensors used on soc_camera driver
 +
        -> OnSemi camera sensors (VIDEO_ONSEMI_SENSORS [=y])
 +
          -> <M>  AR0144 (VIDEO_ONSEMI_AR0144 [=m])
 +
</pre>
 +
 
 +
==GStreamer Examples: Testing a AR0144 Linux driver==
  
 
=== Capture ===
 
=== Capture ===
 +
 +
==== Jetson TX2 ====
  
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 312: Line 111:
  
 
New clock: GstSystemClock
 
New clock: GstSystemClock
 +
</pre>
 +
 +
==== i.MX8 ====
 +
 +
* 1280x800@30fps
 +
 +
<pre style="background:#d6e4f1">
 +
gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=800,framerate=30/1,format=GRAY8 ! videoconvert ! waylandsink sync=false -v
 +
</pre>
 +
 +
* 1280x800@20fps
 +
 +
<pre style="background:#d6e4f1">
 +
gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=800,framerate=20/1,format=GRAY8 ! videoconvert ! waylandsink sync=false -v
 +
</pre>
 +
 +
==== SnapDragon ====
 +
 +
Snapdragon uses Media Controller, so before being able to capture, the modules need to be properly linked and configured.
 +
<br>
 +
*'''Link modules:''' This configuration will use the VFE RDI (raw dump interface) as the PIX interface doesn't support raw video.
 +
 +
<pre style="background:#d6e4f1">
 +
media-ctl -d /dev/media0 -l '"msm_csiphy0":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]'
 +
</pre>
 +
 +
You will need to configure the modules for the desired resolution and format:
 +
<br>
 +
*'''Configure format and resolution for RAW8 1280x800'''
 +
 +
<pre style="background:#d6e4f1">
 +
media-ctl -d /dev/media0 -V '"ar0144 4-0020":0[fmt:Y8_1X8/1280x800 field:none],"msm_csiphy0":0[fmt:Y8_1X8/1280x800 field:none],"msm_csid0":0[fmt:Y8_1X8/1280x800 field:none],"msm_ispif0":0[fmt:Y8_1X8/1280x800 field:none],"msm_vfe0_rdi0":0[fmt:Y8_1X8/1280x800 field:none]'
 +
</pre>
 +
 +
{{Ambox
 +
|type=notice
 +
|small=left
 +
|issue='''NOTE:''' Use '''640x400''' when capturing at 640x400, '''fmt:Y10_1X10''' to capture at 10bpp and '''fmt:SBGGR12_1X12''' to capture at 12bpp.
 +
|style=width:unset;
 +
}}
 +
<br>
 +
*'''2x2 Binning configuration'''
 +
 +
When capturing at 640x400, 2x2 binning mode has to be configured as follows:
 +
 +
<pre style="background:#d6e4f1">
 +
v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=horizontal_skipping=1
 +
v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=vertical_skipping=1
 +
v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=row_binning=1
 +
v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=col_binning=1
 +
</pre>
 +
<br>
 +
*'''1280x800@30fps capture using GStreamer'''
 +
 +
<pre style="background:#d6e4f1">
 +
DISPLAY=:0.0 GST_DEBUG=WARNING gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=GRAY8,width=1280,height=800 ! queue ! videoconvert ! xvimagesink -v sync=false
 +
</pre>
 +
<br>
 +
*'''1280x800@30fps RAW8 capture using Yavta'''
 +
 +
<pre style="background:#d6e4f1">
 +
yavta /dev/video0 -c600 -n6 -s1280x800 --enum-formats -fY8
 +
</pre>
 +
<br>
 +
*'''1280x800@30fps RAW10 capture using Yavta'''
 +
 +
<pre style="background:#d6e4f1">
 +
yavta /dev/video0 -c600 -n6 -s1280x800 --enum-formats -fY10P
 +
</pre>
 +
<br>
 +
*'''1280x800@30fps RAW12 capture using Yavta'''
 +
 +
<pre style="background:#d6e4f1">
 +
yavta /dev/video0 -c100 -n6 -s1280x800 --enum-formats -fSBGGR12P
 +
</pre>
 +
<br>
 +
*'''1280x800@50fps RAW12 capture using Yavta'''
 +
 +
<pre style="background:#d6e4f1">
 +
yavta /dev/video0 -c100 -n6 -s1280x800 --enum-formats -fSBGGR12P --time-per-frame 1/50
 
</pre>
 
</pre>
  
 
=== Video Encoding ===
 
=== Video Encoding ===
 +
 +
==== Jetson TX2 ====
  
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 322: Line 203:
 
The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.
 
The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.
  
=== Dual Capture + Encoding ===
+
==== i.MX8 ====
 +
 
 +
<pre style="background:#d6e4f1">
 +
TODO
 +
</pre>
 +
 
 +
The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.
 +
 
 +
==== SnapDragon ====
 +
 
 +
<pre style="background:#d6e4f1">
 +
TODO
 +
</pre>
 +
 
 +
The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.
 +
 
 +
=== Dual Capture + Encoding ===
  
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 330: Line 227:
 
The sensor will capture from TODO cameras in the TODO mode and the pipeline will encode the videos and save them into test_0.ts and test_1.ts files.
 
The sensor will capture from TODO cameras in the TODO mode and the pipeline will encode the videos and save them into test_0.ts and test_1.ts files.
  
== Performance ==
+
== AR0144 Performance measurements ==
  
 
=== ARM Load ===
 
=== ARM Load ===
 +
 +
==== Jetson TX2 ====
 +
 +
<pre style="background:#d6e4f1">
 +
TODO
 +
</pre>
  
 
Tegrastats display the following output when capturing with the sensor:
 
Tegrastats display the following output when capturing with the sensor:
Line 346: Line 249:
 
RAM 1263/7855MB (lfb 1500x4MB) CPU [16%@345,off,off,15%@345,27%@345,17%@345]  
 
RAM 1263/7855MB (lfb 1500x4MB) CPU [16%@345,off,off,15%@345,27%@345,17%@345]  
 
RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,18%@345,17%@345,19%@345]  
 
RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,18%@345,17%@345,19%@345]  
 +
</pre>
 +
 +
==== i.MX8 ====
 +
 +
<pre style="background:#d6e4f1">
 +
TODO
 +
</pre>
 +
 +
==== SnapDragon ====
 +
 +
<pre style="background:#d6e4f1">
 +
TODO
 
</pre>
 
</pre>
  
 
=== Framerate ===
 
=== Framerate ===
 +
 +
==== Jetson TX2 ====
 +
 
Using the next pipeline we were able to measure the framerate for single capture with perf element:
 
Using the next pipeline we were able to measure the framerate for single capture with perf element:
 
<pre style="background:#d6e4f1">
 
<pre style="background:#d6e4f1">
Line 370: Line 288:
 
</pre>
 
</pre>
  
The results show the framerate constant at 30FPS that use nvcamerasrc and passing frames through the ISP to convert from bayer to yuv.
+
The results show the framerate constant at 30FPS that use nvcamerasrc and passing frames through the ISP to convert from Bayer to YUV.
 +
 
 +
==== i.MX8 ====
 +
 
 +
Using the next pipeline we were able to measure the framerate for single capture with perf element:
 +
<pre style="background:#d6e4f1">
 +
TODO
 +
</pre>
 +
 
 +
==== SnapDragon ====
 +
 
 +
Using the next pipeline we were able to measure the framerate for single capture with v4l2-ctrl:
 +
 
 +
* '''1280x800@30fps, RAW8'''
 +
<pre style="background:#d6e4f1">
 +
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat=GREY --set-parm 30 --stream-mmap
 +
Frame rate set to 30.000 fps
 +
[ 1541.976821] ar0144 4-0020: ar0144_pll_calculate: code=2001, bpp=8, frame=1280x800 [4x4+1280x800]
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
 +
</pre>
 +
 
 +
* '''1280x800@50fps, RAW8'''
 +
<pre style="background:#d6e4f1">
 +
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat=GREY --set-parm 50 --stream-mmap
 +
Frame rate set to 50.000 fps
 +
[ 1626.444759] ar0144 4-0020: ar0144_pll_calculate: code=2001, bpp=8, frame=1280x800 [4x4+1280x800]
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
 +
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
  
=== Latency ===
+
</pre>
 +
 
 +
== AR0144 Latency measurement ==
  
 
The glass to glass latency measured is about TODO ms with nvcamerasrc.
 
The glass to glass latency measured is about TODO ms with nvcamerasrc.
 +
 +
==See also==
 +
<references />
  
 
{{ContactUs}}
 
{{ContactUs}}
 
+
[[Category:Jetson]][[Category:Jetson V4L2 Drivers]][[Category:ON Semiconductor]]
[[Category:Jetson]][[Category:Jetson V4L2 Drivers]]
 

Latest revision as of 14:21, 17 March 2023

Error something wrong.jpg Problems running the pipelines shown on this page?
Please see our GStreamer Debugging guide for help.

RR Contact Us.png


ON Semiconductor AR0144 Features

The AR0144 is a 1/4-inch 1.0 Mp CMOS digital image sensor with an active pixel array of 1280H x 800V. It incorporates a new innovative global shutter pixel design optimized for accurate and fast capture of moving scenes. The sensor produces clear, low noise images in both low-light and bright scenes. It includes sophisticated camera functions such as auto exposure control, windowing, row skip mode, column-skip mode, pixel-binning, and both video and single frame modes. It is programmable through a simple two-wire serial interface. The AR0144 produces extraordinarily clear, sharp digital pictures, and its ability to capture both continuous video and single frames makes it the perfect choice for a wide range of applications, including scanning and industrial inspection.[1]

AR0144 Linux driver support

RidgeRun has developed a driver for the following platforms:

  • NVIDIA Jetson TX2
  • NXP i.MX8
  • SnapDragon

The driver has the following support:

Jetson TX2

TODO

i.MX8MQ

  • Linux 4.14.98
  • V4l2 Subdevice
  • Tested at 1280x800@30fps
  • 8bpp monochrome
  • Capture with v4l2src

i.MX8M Plus

  • Linux 5.10.35
  • V4l2 Subdevice
  • Tested at 1280x800@30fps
  • 12bpp color
  • Capture with v4l2src

SnapDragon

  • Linux 4.14
  • V4l2 Media controller driver
  • Tested resolutions 1280x800 and 640x400 (2x2 binning) with framerates up to 59fps
  • 8, 10 and 12bpp monochrome
  • Capture with v4l2src (8bpp) and yavta (10bpp and 12 bpp).

Enabling the AR0144 Linux driver

Jetson TX2

TODO

i.MX8

 Location:                                                                                                                                                                                            
   -> Device Drivers  
     -> Multimedia support (MEDIA_SUPPORT [=y])
       -> I2C Encoders, decoders, sensors and other helper chips
         -> OnSemi camera sensors (VIDEO_ONSEMI_SENSORS [=y])
           -> AR0144 (VIDEO_ONSEMI_AR0144 [=y])

SnapDragon

   Location:                                                                                                                                                                                            
     -> Device Drivers
       -> Multimedia support (MEDIA_SUPPORT [=m])
       -> Sensors used on soc_camera driver
         -> OnSemi camera sensors (VIDEO_ONSEMI_SENSORS [=y])
           -> <M>   AR0144 (VIDEO_ONSEMI_AR0144 [=m])

GStreamer Examples: Testing a AR0144 Linux driver

Capture

Jetson TX2

TODO

The sensor will capture in the TODO mode

Setting pipeline to PAUSED ...

Available Sensor modes : 
3840 x 2160 FR=30.000000 CF=0x1209208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...

NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 0 WxH = 3840x2160 FrameRate = 30.000000 ...

New clock: GstSystemClock

i.MX8

  • 1280x800@30fps
gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=800,framerate=30/1,format=GRAY8 ! videoconvert ! waylandsink sync=false -v
  • 1280x800@20fps
gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=800,framerate=20/1,format=GRAY8 ! videoconvert ! waylandsink sync=false -v

SnapDragon

Snapdragon uses Media Controller, so before being able to capture, the modules need to be properly linked and configured.

  • Link modules: This configuration will use the VFE RDI (raw dump interface) as the PIX interface doesn't support raw video.
media-ctl -d /dev/media0 -l '"msm_csiphy0":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]'

You will need to configure the modules for the desired resolution and format:

  • Configure format and resolution for RAW8 1280x800
media-ctl -d /dev/media0 -V '"ar0144 4-0020":0[fmt:Y8_1X8/1280x800 field:none],"msm_csiphy0":0[fmt:Y8_1X8/1280x800 field:none],"msm_csid0":0[fmt:Y8_1X8/1280x800 field:none],"msm_ispif0":0[fmt:Y8_1X8/1280x800 field:none],"msm_vfe0_rdi0":0[fmt:Y8_1X8/1280x800 field:none]'


  • 2x2 Binning configuration

When capturing at 640x400, 2x2 binning mode has to be configured as follows:

v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=horizontal_skipping=1
v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=vertical_skipping=1
v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=row_binning=1
v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=col_binning=1


  • 1280x800@30fps capture using GStreamer
DISPLAY=:0.0 GST_DEBUG=WARNING gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=GRAY8,width=1280,height=800 ! queue ! videoconvert ! xvimagesink -v sync=false


  • 1280x800@30fps RAW8 capture using Yavta
yavta /dev/video0 -c600 -n6 -s1280x800 --enum-formats -fY8


  • 1280x800@30fps RAW10 capture using Yavta
yavta /dev/video0 -c600 -n6 -s1280x800 --enum-formats -fY10P


  • 1280x800@30fps RAW12 capture using Yavta
yavta /dev/video0 -c100 -n6 -s1280x800 --enum-formats -fSBGGR12P


  • 1280x800@50fps RAW12 capture using Yavta
yavta /dev/video0 -c100 -n6 -s1280x800 --enum-formats -fSBGGR12P --time-per-frame 1/50

Video Encoding

Jetson TX2

TODO

The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.

i.MX8

TODO

The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.

SnapDragon

TODO

The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.

Dual Capture + Encoding

TODO

The sensor will capture from TODO cameras in the TODO mode and the pipeline will encode the videos and save them into test_0.ts and test_1.ts files.

AR0144 Performance measurements

ARM Load

Jetson TX2

TODO

Tegrastats display the following output when capturing with the sensor:

RAM 1263/7855MB (lfb 1501x4MB) CPU [0%@2035,off,off,0%@2035,0%@2035,0%@2035] 
RAM 1263/7855MB (lfb 1501x4MB) CPU [23%@960,off,off,17%@960,16%@960,23%@960] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [17%@345,off,off,17%@345,18%@345,20%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [20%@345,off,off,16%@345,18%@345,15%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,13%@345,15%@345,14%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [20%@345,off,off,15%@345,12%@345,15%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,15%@345,15%@345,16%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [20%@345,off,off,18%@345,18%@345,17%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [16%@345,off,off,15%@345,27%@345,17%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,18%@345,17%@345,19%@345] 

i.MX8

TODO

SnapDragon

TODO

Framerate

Jetson TX2

Using the next pipeline we were able to measure the framerate for single capture with perf element:

TODO
GST-PERF INFO -->  Timestamp: 0:07:19.108602798; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:20.141189052; Bps: 782; fps: 30.3 
GST-PERF INFO -->  Timestamp: 0:07:21.174265435; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:22.207318757; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:23.240543516; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:24.273697886; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:25.306822764; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:26.340117514; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:27.373087284; Bps: 782; fps: 30.3 
GST-PERF INFO -->  Timestamp: 0:07:28.406069581; Bps: 782; fps: 30.3 
GST-PERF INFO -->  Timestamp: 0:07:29.439238457; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:30.472398102; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:31.472948042; Bps: 808; fps: 30.0 

The results show the framerate constant at 30FPS that use nvcamerasrc and passing frames through the ISP to convert from Bayer to YUV.

i.MX8

Using the next pipeline we were able to measure the framerate for single capture with perf element:

TODO

SnapDragon

Using the next pipeline we were able to measure the framerate for single capture with v4l2-ctrl:

  • 1280x800@30fps, RAW8
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat=GREY --set-parm 30 --stream-mmap
Frame rate set to 30.000 fps
[ 1541.976821] ar0144 4-0020: ar0144_pll_calculate: code=2001, bpp=8, frame=1280x800 [4x4+1280x800]
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
  • 1280x800@50fps, RAW8
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat=GREY --set-parm 50 --stream-mmap
Frame rate set to 50.000 fps
[ 1626.444759] ar0144 4-0020: ar0144_pll_calculate: code=2001, bpp=8, frame=1280x800 [4x4+1280x800]
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps

AR0144 Latency measurement

The glass to glass latency measured is about TODO ms with nvcamerasrc.

See also


RidgeRun Resources

Quick Start Client Engagement Process RidgeRun Blog Homepage
Technical and Sales Support RidgeRun Online Store RidgeRun Videos Contact Us

OOjs UI icon message-progressive.svg Contact Us

Visit our Main Website for the RidgeRun Products and Online Store. RidgeRun Engineering informations are available in RidgeRun Professional Services, RidgeRun Subscription Model and Client Engagement Process wiki pages. Please email to support@ridgerun.com for technical questions and contactus@ridgerun.com for other queries. Contact details for sponsoring the RidgeRun GStreamer projects are available in Sponsor Projects page. Ridgerun-logo.svg
RR Contact Us.png