All Projects → daleroberts → Tv

daleroberts / Tv

Quickly view (satellite) imagery directly in your terminal using Unicode 9.0 characters and true color.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tv

Icat
icat (Image cat) outputs images in 256-color capable terminals.
Stars: ✭ 106 (-69.45%)
Mutual labels:  command-line, image
Figures
Unicode symbols with Windows CMD fallbacks
Stars: ✭ 438 (+26.22%)
Mutual labels:  command-line, unicode
Bv
Quickly view satellite imagery, hyperspectral imagery, and machine learning image outputs directly in your iTerm2 terminal.
Stars: ✭ 215 (-38.04%)
Mutual labels:  command-line, image
Cmd2
cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
Stars: ✭ 342 (-1.44%)
Mutual labels:  command-line, unicode
Menyoki
Screen{shot,cast} and perform ImageOps on the command line 🌱 🏞️
Stars: ✭ 255 (-26.51%)
Mutual labels:  command-line, image
Go Tea
Tea provides an Elm inspired functional framework for interactive command-line programs.
Stars: ✭ 329 (-5.19%)
Mutual labels:  command-line
Bfs
A breadth-first version of the UNIX find command
Stars: ✭ 336 (-3.17%)
Mutual labels:  command-line
Tiny Utf8
Unicode (UTF-8) capable std::string
Stars: ✭ 322 (-7.2%)
Mutual labels:  unicode
Structopt
Parse command line arguments by defining a struct
Stars: ✭ 323 (-6.92%)
Mutual labels:  command-line
Frescoutils
Fresco 的封装,快速上手,图像后处理,超大图高清预览,缩小放大,双击放大等一一俱全。简书 http://www.jianshu.com/p/cd058a924288
Stars: ✭ 345 (-0.58%)
Mutual labels:  image
Tkimageview
An easy way to crop an image.
Stars: ✭ 342 (-1.44%)
Mutual labels:  image
Towel
Throw in the towel.
Stars: ✭ 333 (-4.03%)
Mutual labels:  command-line
Npm Gif
Replace NPM install's progress bar with a GIF!
Stars: ✭ 332 (-4.32%)
Mutual labels:  image
Encoding.js
Convert or detect character encoding in JavaScript
Stars: ✭ 338 (-2.59%)
Mutual labels:  unicode
Bcal
🔢 Storage and general-purpose calculator
Stars: ✭ 329 (-5.19%)
Mutual labels:  command-line
Mango
mango fun framework
Stars: ✭ 343 (-1.15%)
Mutual labels:  image
Fd
A simple, fast and user-friendly alternative to 'find'
Stars: ✭ 19,851 (+5620.75%)
Mutual labels:  command-line
Maxurl
Finds larger/original versions of images and videos
Stars: ✭ 332 (-4.32%)
Mutual labels:  image
Vue Lazy Image Loading
Vue lazy image and background loading plugin.
Stars: ✭ 335 (-3.46%)
Mutual labels:  image
Laravel Glide
Easily convert images with Glide
Stars: ✭ 333 (-4.03%)
Mutual labels:  image

tv ("textview") is a small tool to quickly view high-resolution multi-band imagery directly in your terminal. It was designed for working with (very large) satellite imagery data over a low-bandwidth connection. For example, you can directly visualise a Himawari 8 (11K x 11K pixel) image of the Earth directly from its URL:

It is built upon the wonderful GDAL library so it is able to load a large variety of image formats (GeoTiff, PNG, Jpeg, NetCDF, ...) and subsample the image as it reads from disk so it can handle very large files quickly. It has the ability to read filenames (or URLs) from stdin and load files directly from URLs without writing locally to disk. Command line options are styled after gdal_translate such as:

  • -b to specify the bands (and ordering) to use,
  • -srcwin xoff yoff xsize ysize to view a subset of the image,
  • -r to specify the subsampling algorithm (nearest, bilinear, cubic, cubicspline, lanczos, average, mode).

tv is completely implemented in Python 3 using only Numpy and GDAL 2.0.

My rendering approach is different from other tools such as hiptext as I use:

This means that you get amazingly better results as long as your terminal and font supports it. Here is a comparison between hiptext (left) and tv (right) using their benchmark image of Barack Obama using the standard MacOS font 'Menlo Regular' at size 11 in iTerm 2.0.

You can easily zoom in to get better detail or make the output smaller.

You can quickly view very large files over low-bandwidth connections (e.g., mobile). For example, visualising a 46GB single-band 176000 x 140000 pixel image using nearest neighbour subsampling located on the raijin supercomputer.

It can detect URLs on the standard input which allows you to use it in combination with other tools such as landsat-util to quickly visualise thumbnails before you perform a full download.

You can directly give a URL on the command line.

If you have a image with more than 3 bands (channels), you can specify the ordering and the bands that you would like to load into the RGB channels.

You can stack multiple images into the red/green/blue channel or handle multiple subsets of a NetCDF file.

If you really want to throttle back the number of unicode characters used (e.g., if your font or terminal doesn't support many unicode characters), you can do it with a command line option. The following example shows how to use only the block character or a half-height character as well.

Using a GNU parallel, you can do silly things like create a low-fi animation of the Earth viewed from the Himawari-8 satellite.

parallel --willcite --tty --header : tv -w 60 -urls http://himawari8-dl.nict.go.jp/himawari8/img/D531106/thumbnail/550/2016/06/{dy}/{hr}{tenmin}000_0_0.png  ::: dy 06 ::: hr 06 ::: tenmin {0..5}

FAQ

How do I install it?

tv is now a Python package so you can install it directly using pip if you have GDAL 2.x installed.

To install these dependencies on a Mac with homebrew do:

brew install gdal --with-complete --without-python --HEAD
brew install python3

pip3 install tv

On Ubuntu Linux do:

sudo apt install python3 libgdal-dev
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal

pip3 install tv

Does it work on Windows using PuTTY?

Yes if you install a patched version of PuTTY and use the Deja Vu Mono Book which has support for Unicode 9.0 block characters.

If you do not have administrator rights on you Windows machine, you can load the Deja Vu font for your login session using the regfont tool.

Does it support TMUX?

If you use TMUX, you'll need version >2.2 for true color support. Here is a description on how to enable true color in TMUX. Personally, I've found that the best way is to place these lines at the end of your .tmux.conf file:

set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].