Git Product home page Git Product logo

theta-termux-node's Introduction

oppkey node server

THETA Termux Node - Run an image server inside your THETA

This is a technology demonstration and not usable in production. The code is for education only to learn fundamental concepts about the RICOH THETA camera and 360 image processing.

Access Image Filesystem Directly

Program running on the camera can access /sdcard/DCIM/100RICOH/ files directly.

Thumbnails Thumbnails created by accessing camera filesystem and reducing from 8.8MB to 4kB.

Access Camera Wi-Fi API from Inside the Camera

Node has can access the default internal web server of your THETA at localhost:8080 (only accessible from plug-in running inside the camera)

Image Listing

Run a node server inside of the RICOH THETA V and Z1

See these articles:

Use Bootstrap and CSS to Create Buttons to Control the Camera

Access CSS, JavaScript, and HTML snippets.

gui

gui2

Image Processing with gm

The graphics processing is handled with GraphicsMagick. See gm node module for more information.

Cartoon transform

Oil paint transform

Negative transform

Image File Size Reduction

Image Use Case File Size Dimensions Compression
Original file from Z1 8.8MB 6720x3360px Original JPG
Web gallery 750kB 6720x3360px Lossy JPEG 30% quality
thumbnail 4kB 200x100px JPEG

Example:

Reduce quality to 30%.

	gm('/sdcard/DCIM/100RICOH/FILENAM.JPG')
	.quality(30)

Autostart Node

Get Termux:Boot from F-Droid

Create a new file ~/.termux/boot/startup and add add these lines:

#!/data/data/com.termux/files/usr/bin/sh
/data/data/com.termux/files/usr/bin/node /data/data/com.termux/files/home/Development/theta-termux-node/index.js

Make sure you have the full path of node index.js. The node command and the index.js file name need to be on the same path.

Adjust the path to the location of your index.js file

.bashrc

sshd
alias l='ls -F'
alias la='ls -a'
alias ll='ls -l'
array=$(ip -4 a | grep inet | grep wlan0 | grep -oP '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+(?=\/)')
echo $array
am broadcast -a com.theta360.plugin.ACTION_OLED_TEXT_SHOW -e text-middle 'Oppkey Node Server'
am broadcast -a com.theta360.plugin.ACTION_OLED_TEXT_SHOW -e text-bottom $array

theta-termux-node's People

Contributors

codetricity avatar

Watchers

 avatar  avatar  avatar

Forkers

fecori

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.