farhi / matlab-sonyalpha

Control a Sony Alpha Camera. :warning: This project has been moved to Gitlab at https://gitlab.com/astrophotography/matlab-sonyalpha
GNU General Public License v2.0
6 stars 0 forks source link

matlab-sonyalpha

Control a Sony Alpha Camera

:warning: This project has been moved to Gitlab at https://gitlab.com/astrophotography/matlab-sonyalpha This Github repo will be kept rather inactive.

Image of A6000

SONYALPHA: A class to control a Sony Alpha Camera (NEX, Alpha, ...) compatible with the Camera Remote API by Sony.

Usage

>> camera = sonyalpha;
>> plot(camera)
>> capture(camera)

The LiveView image, that is shown with the "plot" method, is updated continuously, and is rather slow (e.g. every 2s).

Connecting the Camera

Start your camera and use its Remote Control App (e.g. Play Memories App) from the Camera settings. This starts the JSON REST HTTP server, used to control the camera. The Network SSID is shown on the Camera screen. Connect from your PC on that network. The usual associated IP is then 192.168.122.1 (port 8080)

The connection must be a dedicated ad-hoc, e.g. can NOT use an intermediate router. If you are already connected to the Internet, you have to drop your current connection, or use an additional Wifi adapter (e.g. USB-Wifi).

If you need to specify the camera IP, use:

>> camera = sonyalpha('http://192.168.122.1:8080');

You may as well use the simulation mode with: camera = sonyalpha('sim')

Using the Plot Window

Image of SonyAlpha

The Plot window is shown when shooting still images or updating the LiveView. It contains the File, View, Settings and Shoot menus. It also shows the main settings, as well as a focus quality measure (higher is better).

The View menu allows to add Pointers and Marks on top of the current image. These can be used for e.g. alignment. You can equally add Pointers directly right-clicking on the image.

The Settings menu allows to change the most important camera settings, including the zoom level (when available).

The Shoot menu allows to take a single picture, update the live view (lower resolution), as well as start a continuous or timelapse shooting. To stop the continuous/timelapse session, select the Shoot item again.

Methods

Monitoring the camera

The captureStart and captureStop events are triggered when a capture is initiated/finalised. You may then monitor these events with e.g. so = sonyalpha; addlistener(so, 'captureStop', @(src,evt)disp('capture just ended'))

For instance, for astrophotography you may automatically annotate new images:

Requirements/Installation

Just copy the files and go into the directory. Then type commands above, once the camera is configured (see above).

The list of officially supported Sony cameras is:

You may alternatively control the camera via a USB connection with the GPhoto2 interface from https://github.com/farhi/matlab-gphoto

Credits

(c) E. Farhi, GPL2, 2019.