<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Articles on Lluvia</title><link>https://lluvia.ai/blog/articles/</link><description>Recent content in Articles on Lluvia</description><generator>Hugo</generator><language>en</language><atom:link href="https://lluvia.ai/blog/articles/index.xml" rel="self" type="application/rss+xml"/><item><title>Color mapping for data visualization</title><link>https://lluvia.ai/blog/2023/07/07/color-mapping-for-data-visualization/</link><pubDate>Fri, 07 Jul 2023 00:00:00 +0000</pubDate><guid>https://lluvia.ai/blog/2023/07/07/color-mapping-for-data-visualization/</guid><description>&lt;div class="alert alert-primary" role="alert"&gt;
&lt;h4 class="alert-heading"&gt;Jupyter notebook:&lt;/h4&gt;

 A Jupyter notebook with the code in this article is available in &lt;a href="https://colab.research.google.com/drive/147ywmmX4e5Ozvnf0DVJSqJcea26fx8jS#scrollTo=iYVTQmChletC"&gt;Google Colab&lt;/a&gt;. Check it out!

&lt;/div&gt;

&lt;h2 id="introduction"&gt;Introduction&lt;a class="td-heading-self-link" href="#introduction" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Data visualization is an important tool for presenting the results of new algorithms. For 2D data in particular, it is possible to visualize the data as colored images so that our brains can interpret the data in a visual way. This article presents new color mapping nodes available in Lluvia to transform 2D data into color images. These nodes use several color maps available in the &lt;a href="https://matplotlib.org/"&gt;Matplotlib project&lt;/a&gt; to accelerate data to color conversion using the GPU.&lt;/p&gt;</description></item><item><title>Raspberry Pi 4 build</title><link>https://lluvia.ai/blog/2022/11/28/raspberry-pi-4-build/</link><pubDate>Mon, 28 Nov 2022 00:00:00 +0000</pubDate><guid>https://lluvia.ai/blog/2022/11/28/raspberry-pi-4-build/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;a class="td-heading-self-link" href="#introduction" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The Raspberry Pi 4 project announced back in &lt;a href="https://www.raspberrypi.com/news/vulkan-update-were-conformant/"&gt;November 2020&lt;/a&gt; that the Vulkan 1.0 conformance tests successfully passed for its GPU driver. More recently in &lt;a href="https://www.raspberrypi.com/news/vulkan-update-version-1-2-conformance-for-raspberry-pi-4/"&gt;August 2022&lt;/a&gt;, Vulkan 1.2 conformance testing has been completed.&lt;/p&gt;
&lt;p&gt;The conformance tests are a large set of tests run against a driver implementation to see if it conforms with the Vulkan specification. This is essential to maintain the Vulkan API portable across platforms and GPU vendors.&lt;/p&gt;</description></item><item><title>Android integration using mediapipe</title><link>https://lluvia.ai/blog/2022/11/08/android-integration-using-mediapipe/</link><pubDate>Tue, 08 Nov 2022 00:00:00 +0000</pubDate><guid>https://lluvia.ai/blog/2022/11/08/android-integration-using-mediapipe/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;a class="td-heading-self-link" href="#introduction" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://lluvia.ai/blog/2022/10/08/mediapipe-integration/"&gt;previous post on mediapipe integration&lt;/a&gt; explored how to integrate Lluvia with Mediapipe to create complex Computer Vision pipelines leveraging mediapipe&amp;rsquo;s integration with other frameworks such as OpenCV and Tensorflow. This post expands this integration to run Lluvia on Android systems.&lt;/p&gt;
&lt;p&gt;The video below shows the &lt;a href="https://doi.org/10.1109/LRA.2016.2532928"&gt;Optical Flow Filter algorithm&lt;/a&gt; running on a Samsung Galaxy S22+ phone.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
			&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/wLLmh0e9J0Y?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
		&lt;/div&gt;

&lt;h2 id="graph-for-mobile-applications"&gt;Graph for mobile applications&lt;a class="td-heading-self-link" href="#graph-for-mobile-applications" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The figure below illustrates the pipeline used on Android for running the &lt;strong&gt;&lt;code&gt;LluviaCalculator&lt;/code&gt;&lt;/strong&gt;. First, a &lt;code&gt;FlowLimiter&lt;/code&gt; calculator receives the images from the &lt;code&gt;input_stream&lt;/code&gt;. This calculator controls the rate at which packets are sent downstream; it receives an additional input from the last calculator, &lt;code&gt;ImageFrameToGpuBuffer&lt;/code&gt;, that indicates processing has been completed and that a new packet can be received.&lt;/p&gt;</description></item><item><title>Mediapipe integration</title><link>https://lluvia.ai/blog/2022/10/08/mediapipe-integration/</link><pubDate>Sat, 08 Oct 2022 00:00:00 +0000</pubDate><guid>https://lluvia.ai/blog/2022/10/08/mediapipe-integration/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;a class="td-heading-self-link" href="#introduction" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://mediapipe.dev/"&gt;Mediapipe&lt;/a&gt; is a cross-platform framework to create complex Computer Vision pipelines both for offline and real-time applications. It leverages popular frameworks such as OpenCV and Tensorflow to process audio, video, and run deep learning models. By integrating Lluvia into mediapipe, it is possible to speed up some of those computations by creating a GPU compute pipeline.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
			&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/xBtUh7rrSgI?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
		&lt;/div&gt;



&lt;div class="alert alert-warning" role="alert"&gt;
&lt;h4 class="alert-heading"&gt;Difference 1: project scope&lt;/h4&gt;

 &lt;p&gt;Mediapipe is a more general framework than Lluvia. Mediapipe, at its core, is a compute graph scheduler, where each node can contain any arbitrary processing logic. The integration of third-party frameworks (e.g. OpenCV, Tensorflow, Lluvia) gives the framework its power for developing complex Computer Vision pipelines.&lt;/p&gt;</description></item><item><title>Camera undistort</title><link>https://lluvia.ai/blog/2022/09/18/camera-undistort/</link><pubDate>Sun, 18 Sep 2022 00:00:00 +0000</pubDate><guid>https://lluvia.ai/blog/2022/09/18/camera-undistort/</guid><description>&lt;div class="alert alert-primary" role="alert"&gt;
&lt;h4 class="alert-heading"&gt;Jupyter notebook:&lt;/h4&gt;

 A Jupyter notebook with the code in this article is available in &lt;a href="https://colab.research.google.com/drive/1ZCuY7E904K7IdsI0FW2O13H_bYn-2LYJ?usp=sharing"&gt;Google Colab&lt;/a&gt;. Check it out!

&lt;/div&gt;

&lt;h2 id="background"&gt;Background&lt;a class="td-heading-self-link" href="#background" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Camera undistort is the process by which distortions generated by the optics used in the camera during the capture process are corrected in software. The process requires a mathematical model of the distortion, and a calibration procedure to estimate the parameters of such model given actual images.&lt;/p&gt;
&lt;p&gt;An overview of the camera modeling is pressented in the Computer Vision book of &lt;a href="https://szeliski.org/Book/"&gt;Szeliski&lt;/a&gt; and the Multiple View Geometry book of &lt;a href="https://www.cambridge.org/core/books/multiple-view-geometry-in-computer-vision/0B6F289C78B2B23F596CAA76D3D43F7A"&gt;Hartley and Zisserman&lt;/a&gt;, as well as the articles of &lt;a href="https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr98-71.pdf"&gt;Zhang&lt;/a&gt;, &lt;a href="https://doi.org/10.1109/34.291450"&gt;Wei and Ma&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Implementing the Horn and Schunck optical flow algorithm</title><link>https://lluvia.ai/blog/2022/08/07/implementing-the-horn-and-schunck-optical-flow-algorithm/</link><pubDate>Sun, 07 Aug 2022 00:00:00 +0000</pubDate><guid>https://lluvia.ai/blog/2022/08/07/implementing-the-horn-and-schunck-optical-flow-algorithm/</guid><description>&lt;div class="alert alert-primary" role="alert"&gt;
&lt;h4 class="alert-heading"&gt;Jupyter notebook:&lt;/h4&gt;

 A Jupyter notebook with the code in this article is available in &lt;a href="https://colab.research.google.com/drive/1SPwxUIdYxCALD0d0w7rE93EuX0fm832S?usp=sharing"&gt;Google Colab&lt;/a&gt;. Check it out!

&lt;/div&gt;

&lt;h2 id="background"&gt;Background&lt;a class="td-heading-self-link" href="#background" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://scholar.google.com/citations?view_op=view_citation&amp;amp;hl=en&amp;amp;user=uWsBKQ0AAAAJ&amp;amp;citation_for_view=uWsBKQ0AAAAJ:u5HHmVD_uO8C"&gt;Horn and Schunck&lt;/a&gt; variational method for computing optical flow is one of the seminal works in the field. It introduces the idea of using a global smoothness constrain on the estimated optical flow. This constrain helps the numerical solution to find a good flow estimate even in image regions with poor texture.&lt;/p&gt;</description></item><item><title>Working with floating point precision</title><link>https://lluvia.ai/blog/2022/02/12/working-with-floating-point-precision/</link><pubDate>Sat, 12 Feb 2022 00:00:00 +0000</pubDate><guid>https://lluvia.ai/blog/2022/02/12/working-with-floating-point-precision/</guid><description>&lt;div class="alert alert-primary" role="alert"&gt;
&lt;h4 class="alert-heading"&gt;Jupyter notebook:&lt;/h4&gt;

 A Jupyter notebook with the code in this article is available in &lt;a href="https://colab.research.google.com/drive/1bddxWnYp8Rloiv4helVJznFe7NzwxxsJ?usp=sharing"&gt;Google Colab&lt;/a&gt;. Check it out!

&lt;/div&gt;

&lt;p&gt;GPU devices support several floating point number precisions, where precision refers to the number of bits used for representing a given number. Typical representations are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;FP16&lt;/code&gt;&lt;/strong&gt;: or half precision. Numbers are represented in 16 bits.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;FP32&lt;/code&gt;&lt;/strong&gt;: or single precision. It uses 32 bits for representing a number.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;FP64&lt;/code&gt;&lt;/strong&gt;: or doble precision. 64 bits are used for represeting a number.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;FP64&lt;/code&gt;&lt;/strong&gt; is used when numerical precision is required, while &lt;strong&gt;&lt;code&gt;FP16&lt;/code&gt;&lt;/strong&gt; is suitable for fast, less exact calculations, and &lt;strong&gt;&lt;code&gt;FP32&lt;/code&gt;&lt;/strong&gt; sits in the middle. The &lt;a href="https://en.wikipedia.org/wiki/IEEE_754"&gt;IEEE 754 standard&lt;/a&gt; defines the specification of floating point numbers used in modern computers. It defines the rules for interpreting the bit fields that form a number, as well as the arithmetic rules to process them.&lt;/p&gt;</description></item></channel></rss>