{"id":2310,"date":"2021-08-15T20:37:42","date_gmt":"2021-08-15T18:37:42","guid":{"rendered":"https:\/\/aerospaceresearch.net\/?page_id=2310"},"modified":"2021-08-16T21:26:57","modified_gmt":"2021-08-16T19:26:57","slug":"optical-satellite-detection-with-python-or-how-to-find-all-spacex-transporter2-mission-satellites-with-a-sony-a7s","status":"publish","type":"page","link":"https:\/\/aerospaceresearch.net\/?page_id=2310","title":{"rendered":"Optical satellite detection with Python or how to find all SpaceX #Transporter2 mission satellites with a Sony A7S camera"},"content":{"rendered":"\n<p>This is the next step of the tutorial series that started with &#8222;<strong><a href=\"https:\/\/aerospaceresearch.net\/?page_id=1874\">Can a GoPro camera be used to optically track satellites?<\/a><\/strong>&#8222;. Due to the fact we found out the GoPro cannot be controlled from a PC with Gphoto or a similar software, the focus shifted to other cameras. Luckily a nice community member at the <a href=\"http:\/\/www.satobs.org\/seesat\/seesatindex.html\">SeeSat<\/a> mailinglist posted a video of the SpaceX Transporter2 mission that launched 30th of June 2021. he recorded it with a Sony Alpha A7S (first mark) and, without any exagration, it was a great video showing many of the 88 satellites the SpaceX Falcon9 did release.<\/p>\n\n\n\n<p>So this new tutorial is showing what you can do with such low light astrophoto videos. It will show how simple Digital Image Processing (DIP) functions will help you detect star-like objects such as satellites. Also it shows how slow mowing stars and bright clouds will be compensated to allow faster moving objects to be detected.<\/p>\n\n\n\n<p>Basically it should work with other cameras as well, but here it was just tested with the Sony A7S which is known for her low light capabilities. Unfortunetaly, the <a href=\"https:\/\/www.reddit.com\/r\/SonyAlpha\/comments\/p3ptix\/a7s_stareating_only_with_the_a7s_iii\/\">A7S ii and iii are said to eat stars<\/a>. So if you test it with your camera, please leave a comment here.<\/p>\n\n\n\n<p>So, let&#8217;s start with what we did and let&#8217;s find the many satellites of the SpaceX trasporter2 mission that were visible the night of the 1st of July near London UK&#8230;<\/p>\n\n\n\n<ul><li>Astrophoto video<\/li><li>Pre-Processing<\/li><li>Python code<ul><li>Difference of two consecutive frames<\/li><li>Keeping the image parts over a threshhold<\/li><li>closing the holes in the pixel clusters<\/li><li>Dilation and erosion of the pixel clusters<\/li><li>Clustering the pixel clusters<\/li><li>Find star like objects at the locations of the clusters<\/li><li>Finding the nearest cluster in the next, and next next frame<\/li><li><strong>Detecting of objects that are found in 3 frames with the expected speed and direction<\/strong><\/li><\/ul><\/li><li>Single photos to video<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Tracking SpaceX Transporter2 Mission and other satellites with Sony Alpha A7S (2nd test)\" width=\"840\" height=\"473\" src=\"https:\/\/www.youtube.com\/embed\/jV9u9WspsI4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">0. Astrophoto video from the night sky<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">1. Pre-Processing<\/h2>\n\n\n\n<p>The original video is pre-processed with FFMPEG to stretch the contrast. This is done because the starlike objects we are looking for are faint and . For that we used the &#8222;colorlevels&#8220; function and best resulst we had with the max levels of 50% (0.5) for each RGB color channel.<\/p>\n\n\n\n<p>We used the Windows version from FFMPEG from <a href=\"https:\/\/ffmpeg.org\/download.html#build-windows\">https:\/\/ffmpeg.org\/download.html#build-windows<\/a> but the Linux versions will do the same.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ffmpeg.exe -ss 00:00:00 -i VIDEOFILE.MP4 -crf 25 -pix_fmt yuv420p -vf \"colorlevels=rimax=0.50:gimax=0.50:bimax=0.50\" VIDEOOUT.MP4\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2. Python code<\/h2>\n\n\n\n<p><a href=\"https:\/\/github.com\/aerospaceresearch\/satobserve\">https:\/\/github.com\/aerospaceresearch\/satobserve<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Single photos to video<\/h2>\n\n\n\n<p>As an extra step the single images are bundled as a video also with FFMPEG.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ffmpeg.exe -r 60 -f image2 -s 1920x1080 -start_number 6764 -i box_%d.jpg -vcodec libx264 -crf 15  -pix_fmt yuv420p test1.mp4<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is the next step of the tutorial series that started with &#8222;Can a GoPro camera be used to optically track satellites?&#8222;. Due to the fact we found out the GoPro cannot be controlled from a PC with Gphoto or a similar software, the focus shifted to other cameras. Luckily a nice community member at &hellip; <a href=\"https:\/\/aerospaceresearch.net\/?page_id=2310\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eOptical satellite detection with Python or how to find all SpaceX #Transporter2 mission satellites with a Sony A7S camera\u201c<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/pages\/2310"}],"collection":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2310"}],"version-history":[{"count":6,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/pages\/2310\/revisions"}],"predecessor-version":[{"id":2320,"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=\/wp\/v2\/pages\/2310\/revisions\/2320"}],"wp:attachment":[{"href":"https:\/\/aerospaceresearch.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}