Automatic focus stacking with Sony - It can be done (software inside)

Status
Not open for further replies.
The same approach works on the Mac. This is a very quick and dirty app to show the principle. Code is on GitHub if anyone wants it. I'll put a built app there as well

https://github.com/paulrbarnard/stacker
Awesome!

It seems to be true what many people say: Apple is better at API design than Microsoft.

The fact that I have to import 20+ year old WinAPI functions to make the idea work on Windows is a joke.
 
A couple of weeks ago I noticed that the Sony Imagine Edge software supports shifting the focus of my A7R3. Unfortunately the software itself does not provide sufficient means of automation to make focus stacking possible. I work as a software developer so I decided to build a small tool to fill the gap. The program simulates a user pressing the "shift focus"-button and "take picture"-button over and over again. In a way its a remote for a remote.
My highest admiration! Thank you.

A few months ago I started a thread on app development for Sony cameras, and the A7R iii specific. There was good discussion on the Play Memories API (and its lack of support on the A7R iii), and the SDK. Other life events have prevented me putting any effort into that since then. But, that forum has links and discussions that might be a good starting point for developers.

https://www.dpreview.com/forums/post/60952074
From their site:

From now on, updates and active support for Camera Remote API at Developer World are no longer available.

They seem to have abandoned the entire idea, so we are stuck with whatever USB protocol Sony uses in the own applications.

Our best chances are that somebody reverse engineers the usb traffic and puts all discovered functions into libgphoto2.
 
Keep up the good work! I’ll follow this thread. Thnxs!

But...does it also work with the A7RII?
If the Imagine Edge Remote software allows you to shift focus on your A7RII then yes, it will work.
RAW Development, Remote Shooting and Display Live View seem to work on A7RII....no Pixel Shift Multi Shooting....:-(
 
Last edited:
The same approach works on the Mac. This is a very quick and dirty app to show the principle. Code is on GitHub if anyone wants it. I'll put a built app there as well

https://github.com/paulrbarnard/stacker
Awesome!

It seems to be true what many people say: Apple is better at API design than Microsoft.

The fact that I have to import 20+ year old WinAPI functions to make the idea work on Windows is a joke.
I did have to use Apple script calls which are probably from the same era. But at least they are fully supported by the latest OS. That reminds me I didn’t set a backward comparability in the build I did. I’ll update the app in case people are using older OS.

Hopefully someone can contribute nice UI and things.
 
A couple of weeks ago I noticed that the Sony Imagine Edge software supports shifting the focus of my A7R3. Unfortunately the software itself does not provide sufficient means of automation to make focus stacking possible. I work as a software developer so I decided to build a small tool to fill the gap. The program simulates a user pressing the "shift focus"-button and "take picture"-button over and over again. In a way its a remote for a remote.
My highest admiration! Thank you.

A few months ago I started a thread on app development for Sony cameras, and the A7R iii specific. There was good discussion on the Play Memories API (and its lack of support on the A7R iii), and the SDK. Other life events have prevented me putting any effort into that since then. But, that forum has links and discussions that might be a good starting point for developers.

https://www.dpreview.com/forums/post/60952074
From their site:

From now on, updates and active support for Camera Remote API at Developer World are no longer available.

They seem to have abandoned the entire idea, so we are stuck with whatever USB protocol Sony uses in the own applications.

Our best chances are that somebody reverse engineers the usb traffic and puts all discovered functions into libgphoto2.
I did sniff the USB while looking at the Mac app but it’s flooded with the live view data so difficult to find the individual commands. With a bit of time, unfortunately not something I have in abundance, it should be possible to workout the protocol.
 
Thank you very much for your generosity in devising and sharing this. It does make one wonder why Sony hasn’t provided it.
 
I did sniff the USB while looking at the Mac app but it’s flooded with the live view data so difficult to find the individual commands. With a bit of time, unfortunately not something I have in abundance, it should be possible to workout the protocol.
I have not yet had time to do this stuff myself, so I apologize if I don't have my fact straight. If I recall correctly from the "Are there App Developers out there" thread, Sony uses Stackoverflow for developer support. They post "official" responses to questions there - although the ones I looked at were not very informative.

Nonetheless, see

https://stackoverflow.com/questions...ras-support-i-e-a9-ilce-9-a7r2-ilce-7rm2-a7m3

In particular, the 2nd answer there discusses how to use the "getAvailableApiList()" API. It lists results for 3 cameras, including the A7 iii. I've been meaning to try that with my A7R iii. I may have time to try this next week. I have not checked for more recent Stackoverflow posts.

Also, note that some of the cameras in the Stackoverflow post are NOT on Sony's list of cameras that support the remote API. Sony's documentation cannot be trusted.

Anyway, Stackoverflow may be the best resource we have for digging into the API.
 
Last edited:
Keep up the good work! I’ll follow this thread. Thnxs!

But...does it also work with the A7RII?
If the Imagine Edge Remote software allows you to shift focus on your A7RII then yes, it will work.
RAW Development, Remote Shooting and Display Live View seem to work on A7RII....no Pixel Shift Multi Shooting....:-(
There is an app supported by the A7rII but it only offers 3 steps which is not enough for macro though could work on larger subjects such as landscapes and the like

 
Keep up the good work! I’ll follow this thread. Thnxs!

But...does it also work with the A7RII?
If the Imagine Edge Remote software allows you to shift focus on your A7RII then yes, it will work.
RAW Development, Remote Shooting and Display Live View seem to work on A7RII....no Pixel Shift Multi Shooting....:-(
There is an app supported by the A7rII but it only offers 3 steps which is not enough for macro though could work on larger subjects such as landscapes and the like

https://www.playmemoriescameraapps.com/portal/usbdetail.php?eid=IS9104-NPIA09014_00-000001
 
Keep up the good work! I’ll follow this thread. Thnxs!

But...does it also work with the A7RII?
If the Imagine Edge Remote software allows you to shift focus on your A7RII then yes, it will work.
RAW Development, Remote Shooting and Display Live View seem to work on A7RII....no Pixel Shift Multi Shooting....:-(
There is an app supported by the A7rII but it only offers 3 steps which is not enough for macro though could work on larger subjects such as landscapes and the like

https://www.playmemoriescameraapps.com/portal/usbdetail.php?eid=IS9104-NPIA09014_00-000001
Thnxs Jim. I know of this app. Haven’t tried it yet, but I think 3 steps is not enough. Might give it a try though.
It is a pity that they only gave us 3 steps
 
I did sniff the USB while looking at the Mac app but it’s flooded with the live view data so difficult to find the individual commands. With a bit of time, unfortunately not something I have in abundance, it should be possible to workout the protocol.
I have not yet had time to do this stuff myself, so I apologize if I don't have my fact straight. If I recall correctly from the "Are there App Developers out there" thread, Sony uses Stackoverflow for developer support. They post "official" responses to questions there - although the ones I looked at were not very informative.

Nonetheless, see

https://stackoverflow.com/questions...ras-support-i-e-a9-ilce-9-a7r2-ilce-7rm2-a7m3

In particular, the 2nd answer there discusses how to use the "getAvailableApiList()" API. It lists results for 3 cameras, including the A7 iii. I've been meaning to try that with my A7R iii. I may have time to try this next week. I have not checked for more recent Stackoverflow posts.

Also, note that some of the cameras in the Stackoverflow post are NOT on Sony's list of cameras that support the remote API. Sony's documentation cannot be trusted.

Anyway, Stackoverflow may be the best resource we have for digging into the API.
Their published API is for WiFi only. The SDK also seems to be depreciated. I had a look at it a year ago when I had my A7Rii but really didn’t find it very useful.
The USB support, at least from looking at the remote app functionality, looks quite useful. Unfortunately Sony have not published the API.
 
Keep up the good work! I’ll follow this thread. Thnxs!

But...does it also work with the A7RII?
If the Imagine Edge Remote software allows you to shift focus on your A7RII then yes, it will work.
RAW Development, Remote Shooting and Display Live View seem to work on A7RII....no Pixel Shift Multi Shooting....:-(
There is an app supported by the A7rII but it only offers 3 steps which is not enough for macro though could work on larger subjects such as landscapes and the like

https://www.playmemoriescameraapps.com/portal/usbdetail.php?eid=IS9104-NPIA09014_00-000001
Thnxs Jim. I know of this app. Haven’t tried it yet, but I think 3 steps is not enough. Might give it a try though.
It is a pity that they only gave us 3 steps
 
I did sniff the USB while looking at the Mac app but it’s flooded with the live view data so difficult to find the individual commands. With a bit of time, unfortunately not something I have in abundance, it should be possible to workout the protocol.
I have not yet had time to do this stuff myself, so I apologize if I don't have my fact straight. If I recall correctly from the "Are there App Developers out there" thread, Sony uses Stackoverflow for developer support. They post "official" responses to questions there - although the ones I looked at were not very informative.

Nonetheless, see

https://stackoverflow.com/questions...ras-support-i-e-a9-ilce-9-a7r2-ilce-7rm2-a7m3

In particular, the 2nd answer there discusses how to use the "getAvailableApiList()" API. It lists results for 3 cameras, including the A7 iii. I've been meaning to try that with my A7R iii. I may have time to try this next week. I have not checked for more recent Stackoverflow posts.

Also, note that some of the cameras in the Stackoverflow post are NOT on Sony's list of cameras that support the remote API. Sony's documentation cannot be trusted.

Anyway, Stackoverflow may be the best resource we have for digging into the API.
Their published API is for WiFi only. The SDK also seems to be depreciated. I had a look at it a year ago when I had my A7Rii but really didn’t find it very useful.
The USB support, at least from looking at the remote app functionality, looks quite useful. Unfortunately Sony have not published the API.
Oh - that's right - that was the WiFi API. Good thing I apologized in advance. :-)
 
That is incredible. I'm too dumb to use it. I would certainly buy it if you get it to a marketable form. Please keep us up to date.
If you experience any problems or don't know what to do please tell me. Its quite difficult to write an thorough usage guide for something that you created yourself. ;)

In addition, the software was only tested on two computers. It may not work for you for unknown reasons.
 
Thank you very much for your generosity in devising and sharing this. It does make one wonder why Sony hasn’t provided it.
can anyone tell an average person how to get this installed on a Mac and use it and how to use it?
 
Thank you very much for your generosity in devising and sharing this. It does make one wonder why Sony hasn’t provided it.
can anyone tell an average person how to get this installed on a Mac and use it and how to use it?
Terry you need to use the Mac version rather than the PC version. It's on GitHub but if you don't want to pull the source and everything down you can get just the application from my DropBox

Once you have the app you can drag it into your applications folder or just run it from wherever you like. When you run it you have very few options. Select the number of frames to capture, Select the Shutter delay between frames and select the time to wait for the focus to move. The defaults are probably fine I tested them with my A7Riii with a Batis 25 attached. The delay between shutter actuations is to give the Remote app time to do it's stuff with downloading the captured preview etc. If you can find a way to configure remote to not download the previews then you can set the delay much shorter. Conversely if your Mac is slow you might need to increase the Shutter delay

There is a check box marked Home which if selected makes the focus move to the minimum focus before starting. If you want to focus somewhere else and step from there uncheck the box.

The radio buttons let you select the granularity of the steps. Fine takes about 300 images from closest to infinity on my Basis 25. Medium takes about 80 and coarse about 20. These were just random choices. Please let me know you thoughts on granularity. Its not possible to do it by distance but it can easily be changed to let you put in a number rather than the radio buttons.

Once your set just press Go and if Remote isn't running it will launch and then it will start taking images moving the focus point between each one.
 
Last edited:
Keep up the good work! I’ll follow this thread. Thnxs!

But...does it also work with the A7RII?
If the Imagine Edge Remote software allows you to shift focus on your A7RII then yes, it will work.
RAW Development, Remote Shooting and Display Live View seem to work on A7RII....no Pixel Shift Multi Shooting....:-(
There is an app supported by the A7rII but it only offers 3 steps which is not enough for macro though could work on larger subjects such as landscapes and the like

https://www.playmemoriescameraapps.com/portal/usbdetail.php?eid=IS9104-NPIA09014_00-000001
Thnxs Jim. I know of this app. Haven’t tried it yet, but I think 3 steps is not enough. Might give it a try though.
It is a pity that they only gave us 3 steps
And the Play Memories stacking app not available on the A7RIII - which is why the binarycamera is so interesting.
And probably much better (?)
 
Last edited:
Thank you very much for your generosity in devising and sharing this. It does make one wonder why Sony hasn’t provided it.
can anyone tell an average person how to get this installed on a Mac and use it and how to use it?
Terry you need to use the Mac version rather than the PC version. It's on GitHub but if you don't want to pull the source and everything down you can get just the application from my DropBox

Once you have the app you can drag it into your applications folder or just run it from wherever you like. When you run it you have very few options. Select the number of frames to capture, Select the Shutter delay between frames and select the time to wait for the focus to move. The defaults are probably fine I tested them with my A7Riii with a Batis 25 attached. The delay between shutter actuations is to give the Remote app time to do it's stuff with downloading the captured preview etc. If you can find a way to configure remote to not download the previews then you can set the delay much shorter. Conversely if your Mac is slow you might need to increase the Shutter delay

There is a check box marked Home which if selected makes the focus move to the minimum focus before starting. If you want to focus somewhere else and step from there uncheck the box.

The radio buttons let you select the granularity of the steps. Fine takes about 300 images from closest to infinity on my Basis 25. Medium takes about 80 and coarse about 20. These were just random choices. Please let me know you thoughts on granularity. Its not possible to do it by distance but it can easily be changed to let you put in a number rather than the radio buttons.

Once your set just press Go and if Remote isn't running it will launch and then it will start taking images moving the focus point between each one.
Thank you very much Paul!
 
This works very well (A7r3, sony imaging edge remote, various lenses) Step size normal is too small for some situations and big is too large. Is it possible to insert a numeric variable?
 
Status
Not open for further replies.

Keyboard shortcuts

Back
Top