<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Marita Georganta on Medium]]></title>
        <description><![CDATA[Stories by Marita Georganta on Medium]]></description>
        <link>https://medium.com/@maritaganta?source=rss-fc67b3a8f4ca------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*SUGOas6EajL2p0zi</url>
            <title>Stories by Marita Georganta on Medium</title>
            <link>https://medium.com/@maritaganta?source=rss-fc67b3a8f4ca------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 01:06:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maritaganta/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Create Harry Potter’s Invisible Cloak with OpenCV]]></title>
            <link>https://medium.com/@maritaganta/create-harry-potters-invisible-cloak-with-opencv-6d7fcc95af64?source=rss-fc67b3a8f4ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d7fcc95af64</guid>
            <category><![CDATA[harry-potter]]></category>
            <category><![CDATA[invisible-cloak]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[opencv]]></category>
            <dc:creator><![CDATA[Marita Georganta]]></dc:creator>
            <pubDate>Mon, 12 Aug 2024 07:06:01 GMT</pubDate>
            <atom:updated>2024-08-12T07:06:01.328Z</atom:updated>
            <content:encoded><![CDATA[<h4>… or how to properly learn how to mask in OpenCV</h4><p>The magical world of Harry Potter introduced us to the concept of an invisible cloak, a fascinating piece of fiction where the wearer becomes invisible. In this tutorial, we will recreate this magical experience using Python and OpenCV, turning a piece of fabric into an “invisible” cloak on camera. This tutorial is perfect for beginners and intermediate programmers interested in computer vision.</p><h4>Project Overview</h4><p>The project is divided into two main components:</p><ol><li><strong>utils.py</strong>: Contains the core functionality, including background capture and video stream processing.</li><li><strong>main.py</strong>: The entry point of the application, orchestrating the workflow.</li></ol><p>We’ll use OpenCV to:</p><ul><li>Capture the background without the cloak.</li><li>Read the video stream and detect the cloak based on its color.</li><li>Replace the cloak area with the background, creating the illusion of invisibility.</li></ul><h3>Prerequisites</h3><p>Before starting, ensure you have the following installed:</p><ul><li>Python 3.x</li><li>OpenCV</li></ul><p>To install OpenCV, run:</p><pre>pip install opencv-python</pre><h3>Project Structure</h3><p>Your project should have the following structure:</p><pre>invisible_cloak/<br>│<br>├── utils.py<br>├── main.py<br>└── README.md</pre><h3>The Code</h3><h4>utils.py</h4><p>This file contains utility functions for capturing the background image and processing the video stream.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/83136ae7c976e06dc749fe64b24fe7d7/href">https://medium.com/media/83136ae7c976e06dc749fe64b24fe7d7/href</a></iframe><p><strong>Explanation</strong>:</p><ol><li><strong>capture_background</strong>: Captures and saves the initial background image.</li><li><strong>read_camera_stream</strong>: Reads the webcam feed, detects the cloak using a color range, and replaces the cloak area with the background image.</li></ol><h4>main.py</h4><p>This file orchestrates the application flow.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/79a2b7fb13ed06136be1ac00a74a0151/href">https://medium.com/media/79a2b7fb13ed06136be1ac00a74a0151/href</a></iframe><h3>Running the Project</h3><ol><li><strong>Capture the Background</strong>: Start by capturing the background without the cloak. Ensure the scene is clear.</li><li><strong>Apply the Cloak</strong>: After capturing the background, wear the cloak (or a cloth of a distinct color) in front of the camera. The script will replace the area covered by the cloak with the pre-captured background.</li></ol><p>To run the project, execute:</p><pre>python main.py</pre><h3>Fine-Tuning</h3><p>You can adjust the HSV color range (lower_bound and upper_bound in read_camera_stream) to match the color of your cloak. The current setup is calibrated for a yellowish color; modify these values based on your cloak&#39;s color.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-txEFPYitCWg3AdqpDcVmA.gif" /><figcaption>Demonstration of the application with yellow blanket</figcaption></figure><h3>Conclusion</h3><p>This project provides a fun and educational way to explore computer vision concepts, such as color detection, masking, and blending. By experimenting with different parameters and extending the functionality, you can deepen your understanding of OpenCV and its vast capabilities.</p><p>Feel free to share your experiences and enhancements to this project. Happy coding, and enjoy your journey into the magical world of computer vision!</p><p><a href="https://github.com/maritaganta/invisible-cloak">GitHub - maritaganta/invisible-cloak</a></p><p>Find the full project above <a href="https://emojipedia.org/index-pointing-up">☝️</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d7fcc95af64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up My MacOS for my Computer Vision Projects — work in progress…]]></title>
            <link>https://medium.com/@maritaganta/setting-up-my-macos-for-my-computer-vision-projects-work-in-progress-7928a6b6ceab?source=rss-fc67b3a8f4ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/7928a6b6ceab</guid>
            <category><![CDATA[terminal-commands]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[Marita Georganta]]></dc:creator>
            <pubDate>Mon, 05 Aug 2024 06:01:47 GMT</pubDate>
            <atom:updated>2024-08-05T06:01:47.152Z</atom:updated>
            <content:encoded><![CDATA[<h3>Setting Up My MacOS for my Computer Vision Projects — work in progress…</h3><p>As a Linux user it has been difficult for me to transition to my MacOS for my computer vision applications. I want to customise my MacBook Air as much as I can, so that I can be able to code without distractions.</p><h3>Terminal</h3><p>I have always used bash, but I have decided to proceed with zsh to see if it will suit me. I haven’t really read through the differences, but I will look for them along the way.</p><p>Firstly, I silenced the ‘Last login’ messages by running:</p><pre>touch .hushlogin</pre><p>I do not like the looks of the Terminal and iTerm2, none of the themes really can emulate the feeling of the Linux terminal. After a while, I didn’t want to go through the hustle of trying more themes than the ones that come out of the box with Terminal, so I just found an image online of the Linux terminal and used the same colour as background for the Default terminal.</p><p>I also played around with the seetings and unticked a lot of option to keep the terminal looking as plain as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I-3D99kj6OhylZazOU8_zg.png" /><figcaption>The look of my current terminal</figcaption></figure><p>I am still not too happy with the results, but it feels much better than before. The colour really makes a difference.</p><p>Finally, I installed brew.</p><h3>Window Management</h3><p>To say that I dislike the windows management in Mac is an understatement. I have set custom shortcuts already in order to emulate the following:</p><ul><li>Command + Shift + T -&gt; Get the terminal (Linux thinking)</li><li>Command + Shift + Left/Right Arrow -&gt; Move windows left or right</li></ul><p>I will set more as I need them, it is very easy to set them as long as they are not the same as some other built in function. I play around with them in different applications and, if they coincide, I tweak them slightly.</p><p>I also installed AltTab with brew to go through all of my opened windows instead of just applications, which can launch just with a shortcut. It gives me even more of a Linux feel.</p><p>I played around with the Stage Manager. I decided to use it only when relevant — it started confusing me when I didn’t have that many things to work on.</p><h3>Aesthetics</h3><p>I installed the app <a href="https://apps.apple.com/us/app/hidden-bar/id1452453066?mt=12">Hidden Bar</a> and I set the Dock to hide. The dock was too slow to hide/appear, so I run the commands from <a href="https://medium.com/@emieljanson/make-your-mac-dock-appear-faster-7e70724cd5fb">this article</a> to make it faster.</p><h3>Tools for my coding work</h3><p>I downloaded VSCode and kept the main theme. I installed Remote Development, Docker, and Copilot (yet to try out).</p><p>I have Python installed on my mac. I also installed Docker Desktop.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7928a6b6ceab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to properly rotate an image with OpenCV]]></title>
            <link>https://medium.com/@maritaganta/how-to-properly-rotate-an-image-with-opencv-475e44a252f6?source=rss-fc67b3a8f4ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/475e44a252f6</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[numpy]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[opencv]]></category>
            <dc:creator><![CDATA[Marita Georganta]]></dc:creator>
            <pubDate>Sun, 05 May 2024 20:43:40 GMT</pubDate>
            <atom:updated>2024-05-05T20:43:40.276Z</atom:updated>
            <content:encoded><![CDATA[<p>I have many times struggled with rotating objects using OpenCV. What is a slope? Do I use radians or degrees? How do I get the rotation matrix? Everything shall be explained.</p><p>We assume that we want to rotate the image with respect to horizontal lines, parallel to the x-axis, however this pipeline can be generalised for any other line.</p><h3>Image Coordinates</h3><p>When you read an image using OpenCV’s cv2.imread() function, the type of the variable that holds the image data is a NumPy array of shape (height, width, num_channels).</p><p>For the sake of this exercise, I create a np.array of shape (400, 400) filled with zeros to represent a black image.</p><pre>import numpy as np<br><br># Create a NumPy array filled with zeros of shape (400, 400)<br>array_zeros = np.zeros((400, 400))</pre><p>Unlike our known Cartesian coordinate system, the coordinate system of an image read with OpenCV follows the standard coordinate system used in computer graphics and image processing:</p><ul><li>The origin (0, 0) is typically located at the <strong>top-left corner</strong> of the image.</li><li>The x-coordinate increases from left to right.</li><li>The y-coordinate increases from top to bottom.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/0*UvakykUuog1gYmWP.png" /><figcaption>Computer coordinates start from the top left corner (<a href="https://learn365project.com/2015/08/01/why-do-computer-coordinates-start-from-the-upper-left-corner/">source</a>)</figcaption></figure><h3>Slope vs. Angle</h3><p>Mathematically, the slope and the angle represent different aspects of a line:</p><ul><li><strong>Slope</strong>: The slope of a line measures the <strong>steepness</strong> or incline of the line. It represents the ratio of the change in the vertical direction (y-axis) to the change in the horizontal direction (x-axis). Mathematically, the slope 𝑚 of a line passing through two points (𝑥1,𝑦1) and (𝑥2,𝑦2) is given by:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/0*JRQX6d6jYInTrFXe" /><figcaption>Equation of a slope (Image from Google)</figcaption></figure><p>We can also see the same calculations in code:</p><pre>def calculate_slope(point1, point2):<br>    # Calculate the slope between two points<br>    delta_y = point2[1] - point1[1]<br>    delta_x = point2[0] - point1[0]<br>    <br>    # Avoid division by zero<br>    if delta_x != 0:<br>        slope = delta_y / delta_x<br>    else:<br>        slope = np.inf<br>    <br>    return slope</pre><ul><li><strong>Angle</strong>: The angle of a line represents the <strong>orientation</strong> of the line with respect to a reference axis, typically the x-axis. It measures the deviation of the line from the horizontal axis in a counterclockwise direction. The angle can be calculated using trigonometric functions such as arctangent. Mathematically, the angle 𝜃 of a line with slope 𝑚 is given by: <strong>𝜃=arctan⁡(𝑚)</strong></li></ul><p>We can also see these calculations in code:</p><pre>def calculate_rotation_angle(slope):<br>    # Calculate the angle between the line connecting the two points and the horizontal axis<br>    delta_y = point2[1] - point1[1]<br>    delta_x = point2[0] - point1[0]<br>    <br>    # Calculate the angle using arctan<br>    angle = np.arctan(slope)<br>    <br>    return angle</pre><p>To sum up, while the slope quantifies the steepness of a line, the angle indicates its orientation relative to the horizontal axis.</p><blockquote>This means, that when we identify at least two points that we want to rotate such that they are the ones laying on the horizontal line, the only thing necessary is to calculate their slope, calculate the rotation angle, turn to degrees, compute the rotation, and lastly perform the rotation</blockquote><h3>Degrees vs. Radians</h3><p>Oftentimes when working with NumPy and OpenCV and plug angles into different functions, I get garbage results. That is because I did not properly account whether I should input the angle variable in degrees or radians, which are just different units of measurements for angles.</p><p>The slope is a dimensionless quantity and does not have any units. As mentioned, after we calculate the slope a line, we use np.arctan to find the actual orientation angle of the line with respect to the x-axis.</p><p>The result of np.arctan gives the result in <strong>radians</strong>. If we want the value in degrees, we can very quickly use the np.degrees function.</p><pre>rotation_angle = np.degrees(angle)</pre><h3>Rotation</h3><p>The rotation is performed in two steps.</p><ol><li>Calculating a <strong>rotation matrix</strong>, which needs the angle and the centre around which the rotation is to be performed. The OpenCV function cv2.getRotationMatrix(center, angle, 1.0) does this calculation, however the input angle should be <strong>in degrees</strong>.</li><li>Performing the rotation with thecv2.warpAffine function.</li></ol><pre>import cv2<br><br>def rotate_image(image, angle, center):<br>    <br>    # Get the rotation matrix<br>    rotation_matrix = cv2.getRotationMatrix2D(center, angle, 1.0)<br>    <br>    # Perform the rotation<br>    rotated_image = cv2.warpAffine(image, rotation_matrix, (image.shape[1], image.shape[0]))<br>    <br>    return rotated_image</pre><h3>Let’s put it all together!</h3><p>Here is the code all together again:</p><pre>import cv2<br>import numpy as np<br><br><br>def calculate_slope(point1, point2):<br>    # Calculate the slope between two points<br>    delta_y = point2[1] - point1[1]<br>    delta_x = point2[0] - point1[0]<br>    <br>    # Avoid division by zero<br>    if delta_x != 0:<br>        slope = delta_y / delta_x<br>    else:<br>        slope = np.inf<br>    <br>    return slope<br><br>def calculate_rotation_angle(point1, point2):<br>    # Calculate the angle between the line connecting the two points and the horizontal axis<br>    delta_y = point2[1] - point1[1]<br>    delta_x = point2[0] - point1[0]<br>    <br>    # Calculate the angle using arctan<br>    angle = np.arctan(delta_y, delta_x)<br>    <br>    return angle<br><br><br>def rotate_image(image, angle, center):<br>    <br>    # Get the rotation matrix<br>    rotation_matrix = cv2.getRotationMatrix2D(center, angle, 1.0)<br>    <br>    # Perform the rotation<br>    rotated_image = cv2.warpAffine(image, rotation_matrix, (image.shape[1], image.shape[0]))<br>    <br>    return rotated_image</pre><p>And here is a practical example:</p><pre>import numpy as np<br>import cv2<br><br># Create a NumPy array filled with zeros of shape (600, 600)<br>image = np.zeros((600, 600))<br><br># Define the two points in pixel coordinates<br>point1 = (100, 200)  # Example point 1<br>point2 = (300, 100)  # Example point 2<br><br># Draw a white line on the image from point 1 to point 2<br>color = (255, 255, 255)  # White color<br>thickness = 2  # Line thickness<br>image_with_line = cv2.line(image, point1, point2, color, thickness)<br><br># Display the original image<br>cv2.imshow(&quot;Original Image&quot;, image)<br>cv2.waitKey(0)<br>cv2.destroyAllWindows()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*jsc_m_a579Y3901MGpSdLA.png" /><figcaption>Fabricated Original Image</figcaption></figure><pre>import numpy as np<br>import cv2<br><br># Calculate the slope between the two points<br>slope = calculate_slope(point1, point2)<br><br># Calculate the angle to rotate the image so that the line becomes horizontal<br>angle = np.arctan(slope)<br><br># Turn to degrees<br>angle = np.degrees(angle)<br><br>center = (image.shape[1] // 2, image.shape[0] // 2)<br><br># Rotate the image<br>rotated_image = rotate_image(image, angle, center)<br><br># Display the rotated image<br>cv2.imshow(&quot;Rotated Image&quot;, rotated_image)<br>cv2.waitKey(0)<br>cv2.destroyAllWindows()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*fZvuktI6BrWsJb5g-Z6r4w.png" /><figcaption>Resulting Image</figcaption></figure><p>Have fun rotating! Here is a <a href="https://github.com/maritaganta/all_in_one/blob/main/RotateImage.ipynb">GitHub page</a> for the code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=475e44a252f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is it hard to build a satellite?]]></title>
            <link>https://medium.com/@maritaganta/is-it-hard-to-build-a-satellite-390c9492bc5e?source=rss-fc67b3a8f4ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/390c9492bc5e</guid>
            <category><![CDATA[satellite-technology]]></category>
            <category><![CDATA[satellite]]></category>
            <category><![CDATA[electronics]]></category>
            <category><![CDATA[space]]></category>
            <dc:creator><![CDATA[Marita Georganta]]></dc:creator>
            <pubDate>Wed, 17 Aug 2022 11:52:53 GMT</pubDate>
            <atom:updated>2022-08-17T11:52:53.936Z</atom:updated>
            <content:encoded><![CDATA[<p>A closer look</p><p>I did not come from a technical background, therefore I always thought that building hardware is the most complicated thing on earth — thus in space too!</p><p>To my surprise, as a Space Technologies student, I realized that it is indeed hard. However, not as hard as I thought.</p><p>In order to demystify how a satellite is actually build, I will present the basic components and functionalities of the satellite Eyassat, which is a satellite that we have in my university’s lab to play with.</p><p>Below the structural subsystems of Eyassat will be presented:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*X3SIDMhddQ9W7nmn" /><figcaption>Overview</figcaption></figure><h3><strong>Electrical Power Subsystems (EPS)</strong></h3><p>The components of this subsystem are:</p><ul><li>Solar array for power generation</li><li>Power storage as secondary battery</li><li>Power Distribution Board (PDB)</li><li>Battery charger manager</li><li>Power switching and distribution</li><li>Power monitoring</li></ul><p>The power from the battery is distributed to two voltage converters to create two buses. The one is the essential bus, power is always active and cannot be turned off. This bus contains the radio communications and the CDHS and EPS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cg_8lXWkSkOVtSU2" /></figure><h3><strong>Command and Data Handling Subsystem (CDHS)</strong></h3><p>The DH board is the master in the electronic stack. It distributes commands, collects telemetry and sends it back to the ground through the Comm system. It also has a thermistor reading bank for thermal monitoring. It is integrated with the EPS and Thermal Panel as they are to communicate properly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X3Jh7DXUINeWb0mw" /></figure><h3>Communications Subsystem (Comm)</h3><p>The Comm subsystem is integrated with the rest of the stack enabling wireless communication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VZMzrkk786KNRqjF" /></figure><h3>Attitude Determination and Control Subsystem (ADCS)</h3><p>The ADCS is integrated with the stack as the base and contains the following components:</p><ul><li>ADCS board for attitude determination and control</li><li>Magnetometer</li><li>Accelerometer</li><li>Reaction Wheel</li><li>Magnetorquers</li><li>Top and Bottom Sun Sensors</li><li>4 x Yaw Attitude Sensors</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NdtF9xgwhkmvni_y" /></figure><p>Is that all?</p><p>…no</p><p>Solar arrays, wires, bolts and much more will go onto the satellite’s body, but it is still less complicated than one would image.</p><blockquote>Satellites are not scary. Space is not scary. Space Technology is much more ordinary than you think.</blockquote><p>Here is the final look-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J4pwxks2OHnkjU0vIYnk2A.png" /></figure><p>Find more info <a href="https://smartech.gatech.edu/bitstream/handle/1853/8018/SSEC_SA5_doc.pdf">here</a></p><p>/Marita</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=390c9492bc5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro to Satellite Image Processing]]></title>
            <link>https://medium.com/@maritaganta/intro-to-satellite-image-processing-6faa515fdb8a?source=rss-fc67b3a8f4ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/6faa515fdb8a</guid>
            <category><![CDATA[satellite-imagery]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[sentinel-2]]></category>
            <category><![CDATA[space]]></category>
            <dc:creator><![CDATA[Marita Georganta]]></dc:creator>
            <pubDate>Wed, 17 Aug 2022 07:17:29 GMT</pubDate>
            <atom:updated>2022-08-17T07:17:29.626Z</atom:updated>
            <content:encoded><![CDATA[<h3>Preface</h3><p>Handling satellite data can be extremely overwhelming, therefore here is a guide to help you understand how to:</p><ol><li>Access and Understand Satellite Imagery</li><li>Perform Basic Analysis to reveal features</li><li>Make your way to the Deep Learning Approach</li></ol><p>Here is the best part — How to access and understand satellite imagery.</p><h3>Satellite Data</h3><p>The data used for the purposes of this assignment comes from ESA’s Sentinel-2A satellite. On June 23rd 2015, Sentinel-2A satellite was launched on a <a href="https://www.arianespace.com/vehicle/vega/">Vega</a> rocket by Arianespace from Europe’s Spaceport in French Guiana. Following the Sentinel-1A radar satellite, Sentinel-2A is the second satellite to be launched for Europe’s Copernicus programme.</p><p>During this phase the first swath of data from Sentinel-2 was received. It recorded a long strip reaching from the North Sea well into the African Sahara. This first data already showed the high resolution and level of detail expected from the mission.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bbd_08DlRvu-0SRZ" /></figure><p>Sentinel’s 290km wide swath, which is much wider than any other satellite in this resolution class, allowed any part of the surface to be revisited frequently. Its wide swath and frequent revisit times, along with the high spatial resolution and advanced multi-spectral imaging capabilities, makes this mission so extraordinary. Users can take advantage of this data for different applications, for example monitoring vegetation’s health and growth with unprecedented accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/0*aTAEEe_Y1S2PzTJy" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aV5lRpeUI228HDwH" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b95YyODMEL2isLqX" /></figure><p>We can observe that it is a LEO satellite. Unlike other smaller satellites in LEO, Sentinel-2 has 13 spectral bands of Sentinel-2 range from the Visible (VNIR) and Near Infra-Red (NIR) to the Short Wave Infra-Red (SWIR). An overview can be found below, while more information can be found <a href="https://sentinels.copernicus.eu/web/sentinel/user-guides/sentinel-2-msi/resolutions/radiometric">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nkpZoeetFfJTnbVO" /></figure><h3>Active Fire Detection</h3><p>Fires, whether naturally occurring or manmade, have substantial impacts upon society. Wildfires can destroy vast tracts of land, releasing tons of aerosols and gases into the atmosphere, while destroying homes, wildlife habitats, and valuable resources. Recording and monitoring fires from ground-based observations is a labor intensive and expensive process that results in an incomplete record. Satellites allow for detecting and monitoring a range of fires, providing information about the location, duration, size, temperature, and power output of those fires that would otherwise be unavailable</p><p>Fires produce a heat signature that is detectable by satellites even when the fires represent a small fraction of the satellite pixel. Remote sensing observations were made in channels with wavelengths centered at 1.63, 3.9, and 11.9 µm and with resolution of 3.1 m giving a nominal pixel size of 9.6 m2 . Fire temperatures were estimated from this high resolution data using the two short-wave infrared channels at 1.63 and 3.9 µm from <a href="https://www.fs.fed.us/psw/publications/4403/EstimatingFire.pdf">Estimating Fire Properties</a>. That is why bands 8, 11 and 12 are used for fire detection.</p><h3>Use Case</h3><p>In the summer of 2021 there were many fires all across Greece and specifically over Euboea. Specifically, the image patch below shows the fire front in Natural Color on the 6th of August 2021. This is the image that will be used to perform different satellite image processing practices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/0*M7sy7E20JyuMiD9a" /></figure><h3>Sentinel Hub Playground</h3><p>The picture above was taken from Sentinel Playground and the url can also be found <a href="https://apps.sentinel-hub.com/sentinel-playground/?source=S2L2A&amp;lat=38.89517465167739&amp;lng=23.31127166748047&amp;zoom=12&amp;preset=1_TRUE_COLOR&amp;layers=B01,B02,B03&amp;maxcc=71&amp;gain=1.2&amp;gamma=1.0&amp;time=2021-02-01%7C2021-08-06&amp;atmFilter=&amp;showDates=false"><strong>here</strong></a>. Sentinel Hub works best for finding interesting data or checking for availability. What makes Sentinel Hub is that custom scripts can be written on the code editor on the browser and immediately show results.</p><p>For example, using the custom script <a href="https://github.com/sentinel-hub/custom-scripts/tree/master/sentinel-2/markuse_fire">‘Wildfire Visualisation’</a>, which can be found among many others about different applications in the sentinel-hub custom-scripts repository <a href="https://github.com/sentinel-hub/custom-scripts#sentinel-2">here</a>, the following results can be seen immediately on the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ca63Wrd5ADLcIOmq" /></figure><p>Specifically, the script blends the Natural Colours (Red, Blue and Green multiplied by different gains), along with the NIR/SWIR bands B12, B08A and B05 (with a gain) and thresholds also the pixel values that could indicate fire.</p><h3>Google Earth Engine</h3><p>Google Earth Engine was used for analysis as it holds all public datasets (LandSat, Sentinel, etc) and is easy to use. The area of interest was marked on the map and the Sentinel 2 Dataset was imported. In the code editor, the aforementioned actions are the imports and a filter is created to isolate the polygon created on the Map. Before filtering the data to the day we need, we can see that there are 2873 images that we can choose from, from different days, cloud conditions, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SqaQHpf3sXxKt0Aq" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GgXdv7ZENpgQG6Pl" /></figure><p>By filtering the dataset to the date we are interested in, we see that we have 4 images and we can also take a pick in the metadata.</p><p>var filter= imageCollection.filterBounds(geometry).filterDate(‘2021–08–06’,’2021–08–07&#39;)</p><p>The most interesting thing that we can observe is that there is a detailed description of the satellite and its bands, minimum and maximum pixel values and all tags that are associated with the product.</p><p>The bit or colour depth of the image is 16bits. The extracted format can be .tiff or .jp2 .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/0*smVFlP9UmtND2aTH" /></figure><p>We can go ahead and show on the map one of the images. One would think that in order to see the 13-band image it would be easy to plot the median value for each pixel. That would not be representative, as the pixel values for each band shows the actual value of what this band measures and not a standard RGB value. This is why satellite images are complicated, because they cannot be handled like photographs.</p><p>Since the colour depth is 16 bits, there are 65536 possible values for each pixel value, from 0 to 65535. So, below we can see how the median of each pixel would look like even when we plot the RGB bands in the order we understand:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cSj2FckW0TjNBXBU" /></figure><p>We can perform a histogram stretch according to our preferences to bring out the features we are looking for:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YtsSS0Z9KKKIDwo6" /></figure><p>We can now see how the image actually looks like with the 1 sigma stretch in RGB. We can observe that the range of the pixel values has also changed as expected. Attention to the fact that the pixel values no longer represent their actual physical meaning.</p><p>Let’s apply some different histogram transformations. Specifically, the Gamma transformation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/0*IPU9l2Z1wt0dFxbz" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/0*IT6BmIQW7Ok_OWEG" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/0*ksliapTEdESl_LIF" /></figure><p>Another transformation to look at the image, where the fire boundary is more visible:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_BCEbpo5jnU7a6Q8" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6faa515fdb8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A short guide to an IoT Obstacle Detection Device]]></title>
            <link>https://medium.com/@maritaganta/a-short-guide-to-an-iot-obstacle-detection-device-831d57a81d8?source=rss-fc67b3a8f4ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/831d57a81d8</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[thingspeak]]></category>
            <dc:creator><![CDATA[Marita Georganta]]></dc:creator>
            <pubDate>Wed, 15 Jun 2022 14:31:26 GMT</pubDate>
            <atom:updated>2022-06-15T14:31:26.220Z</atom:updated>
            <content:encoded><![CDATA[<p>Because your standard Smart-Home Motion Sensors are expensive. Also, because it’s cooler<em> to build it yourself…</em></p><h3>The IoT platform</h3><p>Set up your account on <a href="https://thingspeak.com/">ThingSpeak</a>, it’s free! ThingSpeak is going to be the IoT platform that we will be using to keep our data. Now, you will need to set up a channel. <a href="https://www.youtube.com/watch?v=F1fQ8m3S8-4&amp;ab_channel=SimplyExplained">Here</a> is a very good tutorial on how to do that. You can also enable email alerts for when an obstacle is detected.</p><h3><em>The Device</em></h3><p>Let’s talk hardware:</p><ul><li>Microcontroller <a href="https://www.amazon.se/-/en/dp/B074Q2WM1Y/ref=sr_1_6?crid=OT3Z6IH5MVJ8&amp;keywords=nodemcu&amp;qid=1655301228&amp;sprefix=nodemcu%2Caps%2C104&amp;sr=8-6">NodeMCU </a>(ESP8266)</li><li>Sonar sensor <a href="https://www.amazon.se/-/en/dp/B01DM8MRTS/ref=sr_1_10?keywords=ultraljudssensor&amp;qid=1655301254&amp;sprefix=ultrasonic+%2Caps%2C96&amp;sr=8-10">HC-SR04</a></li><li>Breadboard x2</li><li>Jumper Wires x4</li></ul><p>Connect everything according to the schematic here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*_Cp33fiTK1KQsZw9zHDsRA.png" /><figcaption>Obstacle Detection Device Schematic</figcaption></figure><p>I imagine you get something looking like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VBoh5Y8P33JX79Yfa4I_fA.png" /><figcaption>Obstacle Detection Device</figcaption></figure><p>Once everything is put together you will have to connect NodeMCU to your Arduino IDE. Upload the code and once that is done, NodeMCU will connect to the internet and start publishing the readings on ThingSpeak.</p><p>The result will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*JVG58mAcSu09tFriTzbc4g.png" /><figcaption>Serial Monitor view while the sensor is active</figcaption></figure><p>If this is not what you see, open serial monitor and set the baud rate to 115200 in order to see the measurements.</p><h4>Results</h4><p>All of the measurements will be nicely organized in the charts we defined on our ThingSpeak channel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XsRZJvwmfBPuhZSnDyg8mA.png" /><figcaption>Charts on ThingSpeak channel</figcaption></figure><p>And email alerts will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*pWN1D7HltHl2t3M5qeDp8w.png" /><figcaption>Alert sent by ThingSpeak</figcaption></figure><h3>Conclusion</h3><p>It is very easy to set up an IoT obstacle detection device. The capabilities of such a set up are endless, as the sonar sensor can be swap out with any other sensor that you want and any other automated action fits your needs.</p><p>So, what else do you need to automate? Next time think of what you can build to make your days simpler.</p><blockquote>Is this device useful? Aren’t there privacy concerns?</blockquote><p>Yes and yes. Take a look at my previous article where I talk about the necessity of such a device and it’s privacy concerns.</p><blockquote>But, where is the code?</blockquote><p>There are many examples online for the MATLAB code for setting up the email alerts and the C++ code for setting up NodeMCU. However, feel free to contact me if you need guidance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=831d57a81d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[IoT Obstacle Detection Device]]></title>
            <link>https://medium.com/@maritaganta/iot-obstacle-detection-device-9002d67164b4?source=rss-fc67b3a8f4ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/9002d67164b4</guid>
            <category><![CDATA[visually-impaired]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[sonar]]></category>
            <category><![CDATA[thingspeak]]></category>
            <category><![CDATA[nodemcu]]></category>
            <dc:creator><![CDATA[Marita Georganta]]></dc:creator>
            <pubDate>Mon, 30 May 2022 03:53:44 GMT</pubDate>
            <atom:updated>2022-05-30T08:08:53.598Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Technology to support the visually impaired.</strong></p><p>In the year 2009, it was recorded by the International Agency for Prevention of Blindness, that more than 160 million people worldwide are visually impaired with 37 million of these being legally blind. Even though this statistic is from over 10 years ago, it still highlights the extent of how widely spread visual impairment is among the worldwide population.</p><p>The development of travel assistive aids allows individuals to walk around and effectively carry out daily tasks, similarly, to the classic aids of guide dogs or a white canes would. The reason for needing to replace the classic aids for visually impaired individuals stems from a need for discreteness in order to decrease psychological alienation, by allowing them to carry out tasks as a non-visually impaired person would.</p><h4>Why?</h4><p>There are some technical aspects of classic aids, which make them less reliable than navigation technology. For instance, the weather could truly influence walking with white canes outside. If it is snowing, it could be difficult to tap or find the right direction or find the objects which could help them to orient on the street. If you have a guide dog it could be faster to walk, but also it is a really big responsibility to take care of them every day. The benefit of travel aids over current aids would be their ability to direct its user with all the necessary information, i.e. speed, volume and distance information, which they can not get using classic aids. This information is continually gathered by our eyes and is used in order for us to smoothly navigate our daily lives.</p><p><em>So…let’s experiment with an obstacle detection device that uses IoT technology to alert the user of obstacles and give additional information according to the measurements taken to facilitate them in their decision making.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9qATDfQ7wcoS0pGtBezwDQ.png" /><figcaption>Ultrasonic Sensor Connected to Microcontroller NodeMCU</figcaption></figure><p>This device uses a sonar sensor plugged into a WiFi-enabled microcontroller for the purpose of posting data on an Internet of Things (IoT) platform. Subsequently, the device sends alerts to the user via email. When the device is in use, the IoT platform has the option of storing the data gathered and visualizing it in the form of linear graphs. Along with the visualization of data, this platform also gives the option for doing analysis of the data received from the device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/0*MW9SNBxC7rYCkZu0" /></figure><p>For this project, email alerts are enabled and an email will be generated by the IoT platform whenever an obstacle is detected within a specified distance. The email is sent to the user ID which is linked with the IoT platform, meaning that the user ID is independent of the actual technology and can change according to who is using the device at a given point, making the technology user-adaptable.</p><p><em>The full technical description of the project, along with the code and hardware integration, will come in a next story.</em></p><h4>Privacy Concerns</h4><p>In general, the public consensus is that data gathering and storage by any device is a liability. The risk of an information leak in the case of navigation devices for the visually impaired can pose a great danger to their privacy and general wellbeing. These issues can be resolved by general security measures, such as authentication agents and firewalls or interventions such as adequate password protection, compliance with existing safety guidelines and protocols by device manufacturers, device update management and introduction of security interfaces.</p><h4>Contact</h4><p>Feel free to leave any questions or inquire about the full description of the project, along with details about the code, hardware and IoT platform, on my LinkedIn page.</p><p>Technical Project by: <a href="https://www.linkedin.com/in/marita-georganta/">Marita Georganta</a></p><p>Article by: <a href="https://www.linkedin.com/in/hanna-pint%C3%A9r-94a6171a9/">Hanna Pinter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9002d67164b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Drones for a prosperous countryside]]></title>
            <link>https://medium.com/@maritaganta/drones-for-a-prosperous-countryside-4eb722485d71?source=rss-fc67b3a8f4ca------2</link>
            <guid isPermaLink="false">https://medium.com/p/4eb722485d71</guid>
            <category><![CDATA[rescue]]></category>
            <category><![CDATA[drones]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[object-detection]]></category>
            <dc:creator><![CDATA[Marita Georganta]]></dc:creator>
            <pubDate>Mon, 06 Sep 2021 10:53:20 GMT</pubDate>
            <atom:updated>2021-09-06T10:53:20.817Z</atom:updated>
            <content:encoded><![CDATA[<p>AI in the service of the community</p><h3>Smart Drones</h3><p>The project will show how new drone technology can be used to achieve a more sustainable and efficient aviation business and show the benefit primarily in sparsely populated regions. Emergency services and surveillance in sparse areas mean long distances. Drones are able to provide an improved community service for people in sparsely populated areas who want to feel secure in the environment in which they are located.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sO7VDaCizn5miR_I" /><figcaption>Photo by <a href="https://unsplash.com/@jeisblack?utm_source=medium&amp;utm_medium=referral">Jason Blackeye</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Drones have the potential to contribute to a large number of different functions. Especially when combined with artificial intelligence, the capabilities are limitless. Drones will be able to fly over remote areas and facilitate search-and-rescue missions, surveillance of fields or animals, environmental changes and much more.</p><h3>The Idea</h3><p>There are numerous applications of AI and we wanted to leverage AI in cases involving people detection. Emergency services and surveillance in sparse areas mean long distances. Drones can fly be patrol over these areas fully autonomously in a much shorter time. By combining the latest technologies of AI, deep learning and robotics, we are working towards optimizing search-and-rescue misions.</p><p>By combining AI and autonomation, a drone can be flying on its own above remote areas. The area could even be GPS-denied, the drone would still be able to autonomously navigate. We trained a detection algorithm which is running on the drone’s onboard computer and can detect in real time whatever we want it to detect. In this case it is people.</p><p>While the drone is autonomously patrolling, it can also be checking if there are any people on the ground. According to how we have programmed the drone, when there is a detection, we can instruct it to send a signal to the local authorities, track the target or even fly low towards the person and play a prerecorded audio message that provides help.</p><p>AI and autonomous solutions are the future of growth. Technology-enabled innovation should be embraced and utilized.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4eb722485d71" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>