<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Track object in movie file and transform into data to be used with arduino servos</title><link>/products/arduino/b/blog/posts/track-object-in-movie-file-and-transform-into-data-to-be-used-with-arduino-servos</link><description>Hello, After doing some research I haven’t found exactly what i’m looking for. Basically I looking for a way to translate movement of an object in a video file (like a recording of a ball jumping up a down) to values that I can use to move servo...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Track object in movie file and transform into data to be used with arduino servos</title><link>https://community.element14.com/products/arduino/b/blog/posts/track-object-in-movie-file-and-transform-into-data-to-be-used-with-arduino-servos</link><pubDate>Thu, 06 Feb 2020 15:29:31 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:537cdd2d-2fe5-4a80-a11f-6b1a8f71858d</guid><dc:creator>Sean_Miller</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;If you solely need the coordinate data that you will later do some math on to get your servo values , here&amp;#39;s how I&amp;#39;d do it:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Shoot your footage with a tripod.&amp;nbsp; Be perpendicular to the action being video&amp;#39;d to avoid &amp;quot;into the plane&amp;quot; movement.&lt;/li&gt;&lt;li&gt;Download, install, and open &lt;a class="jive-link-external-small" href="https://www.blender.org/download/" rel="nofollow ugc noopener" target="_blank"&gt;Blender&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Click the icon by the View Menu to change the Editor Typeto Movie Clip Editor&lt;/li&gt;&lt;li&gt;Click open to load in your movie.&lt;/li&gt;&lt;li&gt;Find something on what you want to track that stands out.&amp;nbsp; Hold CTRL and left click it.&amp;nbsp; This will add our tracker.&lt;/li&gt;&lt;li&gt;Hit the track ahead button or CTRL t so it will advance the movie and track your object.&lt;/li&gt;&lt;li&gt;You can now scrub the view with the icons on the bottom of the page and get the coordinates on the right.&amp;nbsp; I&amp;#39;d record time, x, and y in a spreadsheet and then make a function to translate that to servo values.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here is a picture where I just tracked my lawn mower as the camera moved.&amp;nbsp; You can see a white box at its wheel, a red line showing where the box was, and a blue line where the box is going in time.&amp;nbsp; The other red dotted sections the track forward button (left) and the coordinates (right).&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x336/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-537cdd2d-2fe5-4a80-a11f-6b1a8f71858d/6136.contentimage_5F00_205985.png:620:336]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Sounds like you have a fun project.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;See ya&amp;#39;,&lt;/p&gt;&lt;p&gt;Sean&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=8679&amp;AppID=145&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Track object in movie file and transform into data to be used with arduino servos</title><link>https://community.element14.com/products/arduino/b/blog/posts/track-object-in-movie-file-and-transform-into-data-to-be-used-with-arduino-servos</link><pubDate>Thu, 06 Feb 2020 10:59:26 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:537cdd2d-2fe5-4a80-a11f-6b1a8f71858d</guid><dc:creator>BigG</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Before you even get to image recognition you need to consider how much memory resource is required just to capture and store one image. Then with a video you need to then recognise that a new image will arrive every 1/24th of a second (if 24 frames per sec) or even 1/30th of a second (if 30 frames per second). So MCU processing speed and run time memory need to match the camera and image resolution to start things off and then you need additional resource for the image processing to determine if the object you are looking for is present etc.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So, you may be quite limited on options with a standard Arduino - there are new Arduino models just out that should work (e.g &lt;a class="jive-link-external-small" href="https://www.arduino.cc/pro/hardware" rel="nofollow ugc noopener" target="_blank" title="https://www.arduino.cc/pro/hardware"&gt;https://www.arduino.cc/pro/hardware&lt;/a&gt; ). Adafruit&amp;#39;s Metro M4 (or any decent ARM Cortex M4 with fpc) should also work too in simpler image recognition cases (&lt;a class="jive-link-external-small" href="https://www.adafruit.com/product/3382" rel="nofollow ugc noopener" target="_blank" title="https://www.adafruit.com/product/3382"&gt;https://www.adafruit.com/product/3382&lt;/a&gt; ). SBC&amp;#39;s like Raspberry Pi, Beaglebone etc. are probably the better choice here if minimal latency is a requirement for servo movement.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="https://www.tensorflow.org/" rel="nofollow ugc noopener" target="_blank" title="https://www.tensorflow.org/"&gt;https://www.tensorflow.org/&lt;/a&gt;&amp;nbsp; or &lt;a class="jive-link-external-small" href="https://www.tensorflow.org/lite" rel="nofollow ugc noopener" target="_blank" title="https://www.tensorflow.org/lite"&gt;https://www.tensorflow.org/lite&lt;/a&gt;&amp;nbsp; are popular choices for SBC&amp;#39;s.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Then there are some popular Python based options, which could work on an M4: &lt;a class="jive-link-external-small" href="https://opencv.org/" rel="nofollow ugc noopener" target="_blank" title="https://opencv.org/"&gt;https://opencv.org/&lt;/a&gt;&amp;nbsp; and &lt;a class="jive-link-external-small" href="http://simplecv.org/" rel="nofollow ugc noopener" target="_blank" title="http://simplecv.org/"&gt;SimpleCV&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Others picked up from online search include: &lt;a class="jive-link-external-small" href="https://github.com/jesolem/PCV" rel="nofollow ugc noopener" target="_blank" title="https://github.com/jesolem/PCV"&gt;https://github.com/jesolem/PCV&lt;/a&gt;&amp;nbsp; and a c++ option &lt;a class="jive-link-external-small" href="https://github.com/dtschump/CImg" rel="nofollow ugc noopener" target="_blank" title="https://github.com/dtschump/CImg"&gt;https://github.com/dtschump/CImg&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Otherwise you may be better off using the cloud for the image recognition grunt work. All the major players, like Google, AWS, Azure, IBM offer image recognition api&amp;#39;s.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;PS. Another consideration/idea is to use a mobile phone to handle the image capture and processing (using tensor flow) and then link with an arduino via BLE to push coordinates across for servo movement... so, basically there are other ways to skin this cat...&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=8679&amp;AppID=145&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Track object in movie file and transform into data to be used with arduino servos</title><link>https://community.element14.com/products/arduino/b/blog/posts/track-object-in-movie-file-and-transform-into-data-to-be-used-with-arduino-servos</link><pubDate>Thu, 06 Feb 2020 09:46:45 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:537cdd2d-2fe5-4a80-a11f-6b1a8f71858d</guid><dc:creator>dubbie</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;An interesting idea. Maybe you could re-use some ideas from the PixyCam device as it is open source and replace the live input video stream with the recorded video stream.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Dubbie&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=8679&amp;AppID=145&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>