www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

index.html (3805B)


      1 <!DOCTYPE html>
      2 <html>
      3 	<head>
      4 		<title>banna - ramblings</title>
      5 		<meta name="viewport" content="width=device-width, initial-scale=1">
      6 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      7 		<link rel="stylesheet" href="/styles/style.css" />
      8 		<link rel="stylesheet" href="/styles/look.css" />
      9 		<link rel="stylesheet" href="/styles/codetheme.css" />
     10 		<script src="/scripts/highlight.js"></script>
     11 		<script>hljs.initHighlightingOnLoad();</script>
     12 	</head>
     13 
     14 	<body>
     15 		<div id="sidebar">
     16 			<div id="logo">
     17 				<a href="/">
     18 					<img src="/banna.png" alt="banna.tech" height="45" width="201" />
     19 				</a>
     20 			</div>
     21 			<div id="nav">
     22 				<a class="current" href="/post">blog</a>
     23 				<a class="" href="/things">things</a>
     24 				<a class="" href="/about">about</a>
     25 			</div>
     26 		</div>
     27 
     28 		<div id="wrapper">
     29 			<div id="content">
     30 <div class="post">
     31     <a href="/post/a_hacky_alternative_to_image_identification_using_grids" class="link"><h1 class="header">A Hacky Alternative to Image Identification Using Grids</h1></a>
     32     <span class="date">Posted on June, 24 2015</span>
     33     <div class="content">
     34 <p>Since my last post about R3CI, a whole lot of progress has been done on the project. The server side is up to par, implementing modular protocol type handlers. The client side is up to the bare minimum, supplying the baseline functions for the final test.</p>
     35 <p>As expected of one critical component of R3CI, classifying all of the robots could not be done within the time-span given to us. An unfortunate statement to make indeed, but this allows me to test how robots behave under a 'blindfold' per-se. The solution to this problem is to rely on the coordinate grid alone, and identifying robots based solely on the relative coordinates of robots in the grid. Of course, this is not ideal due to imperfections within accurately updating the robots coordinates. For now, we will assume the coordinate grid is accurate.</p>
     36 <p>The overview of the idea is to 'simulate' the area of vision the image would produce, using only the relative x,y coordinates of each robot. This can be implemented in many ways, but I chose to use a quadratic function inequality to render a robot 'in view' and 'out of view'. This may seem hacky, but- well, it's because it is.</p>
     37 <p>The quadratic function is simply</p>
     38 <pre><code>y &gt; x^2 + x_off*x + y_off
     39 </code></pre>
     40 <p>And it's output where <code>x_off</code> and <code>y_off</code> both equal 0 is</p>
     41 <p><img src="//i.banna.tech/140blog.png" style="box-shadow:0px 0px 3px #ffffff;" /></p>
     42 <p>On the coordinate grid, the robot trying to see what is in front of itself exists at 0,0 (This is why <code>x_off</code> and <code>y_off</code> are set to 0 in the example). Any coordinate in the light blue shaded region is where a robot will be 'seen'. This is great and all, but it has a shortfall- The angle of the robot trying to 'see' <em>must</em> be at 90 degrees.</p>
     43 <p>The step that must be done before you check whether a robot is in sight or not is to rotate the entire coordinate plane thus that the robot's angle is 90 degrees relative to every other robot. This can be done with two simple functions for x and y.</p>
     44 <pre><code>f(x) =  cos(angle)x + sin(angle)y
     45 
     46 f(y) = -sin(angle)x + sin(angle)y
     47 </code></pre>
     48 <p>What this produces is the coordinates of x,y translated by the angle specified. Translating the coordinate plane thus that the robot's angle is 90 degrees, and feeding in the quadratic equation should yield the desired results.</p>
     49 <p>Overall, this solution is a good way to roughly simulate what using image identification can do with much less processing power. For this to be implemented in the future though, keeping the coordinate grid accurate is a must.</p>
     50     </div>
     51 </div>
     52 
     53 
     54 			</div>
     55 		</div>
     56 	</body>
     57 </html>