frank26080115 / alpha-fairy

Wi-Fi Remote for Sony Cameras
https://eleccelerator.com/alpha-fairy-wireless-camera-remote/
MIT License
119 stars 10 forks source link

Some ideas for the photostacking feature #19

Open my1sec opened 1 year ago

my1sec commented 1 year ago

Hello Frank, thank you for allowing me to experience this wonderful project. First of all, please understand that I am not familiar with the documentation format on GitHub.

A7R4, photo stacking The number of times the big button was pressed was the same as the number of shots.

I thought that if you press it once, it will shoot continuously even if you release your hand after that, and then press it again to stop shooting, but that didn't work.

(I don't know if the toggle hold function has already been implemented, but it doesn't work on the A7R4.)

(The same is true for the 9-focus function. While the big button is held down, the shooting proceeds by moving through the 9 zones in turn. If the button is accidentally missed in the middle, it goes back to the beginning and starts shooting from the center zone.)

I would like to suggest the toggle hold function of the Big Button and the setting of the total number of stacking shots as ideas.

(It would be nice if the shooting interval could be set as short as possible, but I think it will be difficult because there is a physical difference in the focus motor for each lens.)

frank26080115 commented 1 year ago

A few things I just added (because of your previous suggestions submitted to my blog):

I don't want the button-toggle mode to be a default, and I don't really want it to be a run-time-configurable or compile-time-configurable option, so I feel like this is a good compromise.

From a design point of view, the apps that I added button-toggle-mode to are not ones that should be "unattended", hence why I would not implement this as the default behavior.

Please do a full update, including data-upload (there are new image files). Try it out and let me know what you think.

my1sec commented 1 year ago

Frank, Thank you for reviewing my idea.

- Photostacking test with A7R4

https://youtu.be/HRqdWYNYITU

- 9 point test with A7R4

https://youtu.be/pZPldXbgRNE

- Shutter step test with A7R4

https://youtu.be/nSeLXqRe8zI

In S mode, I pressed the shutter button halfway to confirm autofocusing, and then started shooting.

frank26080115 commented 1 year ago

please try out v1.0.12 , I added a new wait state that waits until the camera completely saves the image from buffer to SD card, which makes the shutter speed change much more reliable

my1sec commented 1 year ago

I just installed v1.0.12 and tested it. There is a new counter at the bottom of the shutter step menu, and the problem mentioned in the previous v1.0.11 report has not been improved. The camera locks with MF until the M5StackC plus is powered off was also the same.

I found something new while testing the slow shutter in the focusstacking menu.

my1sec commented 1 year ago

For an accurate test, I tested with a telephoto lens, shutter speed of 1 second, and aperture value in the range of f/4 to f/22. Very rarely, a shot was missed or two overlapped shots were taken. However, this did not affect the actual photography work.

It was tested only in the focus stacking menu, but it is expected that there will be no problems with the focus movement section in other menus.

ik-ne commented 1 year ago

Some testing notes with the latest code version with the A74;

The biggest problem I was having was getting the "9-point" function to even focus before taking the photos. It would move the focus point around just fine and take the photos just fine too.

Side note here; the spacing options work fine, the toggle function works great across all the functions it can be used on.

I was wracking my brain trying to figure out what was going wrong when something @my1sec said stuck out to me: The 9-Point focus setting doesn't pull focus unless you have AF with Shutter turned on. So for me, I use back button focus as my preferred way of triggering auto-focus, which doesn't work with "9-Point", but does work with all the other focus pull methods, I'm assuming because the other modes shift into 'MF' to focus and therefore negates the problem.

Maybe worth adding this as a note under this function on the Features page?

frank26080115 commented 1 year ago

I got a busy weekend ahead, can't update the code nightly like usual for a bit

The MF getting stuck I think I see the bug on line 161 of ShutterStep.ino , where a true needs to be false for cmd_ManualFocusMode

The instructions for "AF with Shutter" will be added to docs, thanks!

As for the MF focus stepping being not regular, I'm not very clear what to do. The code is allowed to send three different step sizes, 1, 3, or 7. 1 is useless, 3 is a bit useless but the best, and 7 is huge. From my testing, one "size 7" step is equal to about 50 "size 3" step. There is a configurable delay between sending each step command, regardless of step size. The focus stacking function can also send consecutive commands. The code looks like

            case 1:
                step_size = SONYALPHA_FOCUSSTEP_FARTHER_SMALL;
                step_cnt = 1;
                break;
            case 2:
                step_size = SONYALPHA_FOCUSSTEP_FARTHER_MEDIUM;
                step_cnt = 1;
                break;
            case 3:
                step_size = SONYALPHA_FOCUSSTEP_FARTHER_MEDIUM;
                step_cnt = 3;
                break;
            case 4:
                step_size = SONYALPHA_FOCUSSTEP_FARTHER_MEDIUM;
                step_cnt = 6;
                break;
            case 5:
                step_size = SONYALPHA_FOCUSSTEP_FARTHER_LARGE;
                step_cnt = 1;
                break;

The case number is what's displayed on the screen

my1sec commented 1 year ago

Frank, I have no doubt that your project will be of great help to me and other thirsty alpha users. Every time I leave a comment here, my gratitude for you grows deeper.

Today, I tried using Alpha Fairy for real landscape photography. The 9point function and shutter step function did not work on the A7R4, so I couldn't test it. So this time, I only tested the focus stacking function.

I thought that the focus stacking function was good enough as it is now, as the irregular focus shift problem that occurs very rarely does not interfere with actual use.

frank26080115 commented 1 year ago

I just fixed the MF getting stuck

I'm looking at my code and the 9-point function explicitly engages AF and waits up to 5 seconds to obtain a lock

I disabled "AF with shutter" on my A1, and the AF activation stopped working. I used Wireshark to sniff this while trying the same thing with Sony's Imaging Edge Remote running on my PC. It also is not able to engage AF. This also means I can't make an effective fix, since Sony themselves can't do it.

I think this is an actual camera bug. Sony wouldn't put an AF button on the GUI if it literally does nothing.

I added a clear error message screen for the 9-point app, if the AF fails to engage, it will say that "AF w shutter is off". I also added the instructions to the github documentation.

NOTE: it does seem like the same command engages AEL though

my1sec commented 1 year ago

- [ alpha-fairy ver 1.0.13 ] 9 point test with A7R4

https://youtu.be/LDKPjD07m_g

There are no more problems with MF locking or the focus cursor getting stuck when 9point work is finished. But the A7R4 didn't shoot.

frank26080115 commented 1 year ago

That video is super helpful, I was wondering why the green dot for focus lock looked different from mine, mine is always the green dot with some circles around it. I realized that you are using AF-S and AF-C.

My mistake is that in AF-C mode, if I just get the green dot, it actually means the subject tracking has lost the target, so in my code it's labelled as SONYALPHA_FOCUSSTATUS_LOST, but AF-S mode uses the same value for the focus status to indicate lock has been achieved.

To fix it, I added an equivalent enum definition SONYALPHA_FOCUSSTATUS_AFS_FOCUSED and made sure the focus status takes into account whether the user is in AF-S or AF-C

Fix is in the following commit (and is available to be pulled from main branch):

https://github.com/frank26080115/alpha-fairy/commit/ff5b84bd157ffafbd7b3cd3efd70c2d69a85a851

I forgot to change branches before editing the code so there's no pull request to link, oops

my1sec commented 1 year ago

- [alpha-fairy ver 1.0.13_2 ] 9 point test with A7R4

https://www.youtube.com/watch?v=7psqoeQXQxQ

A test was conducted with the newly updated code applied. The action was quickly and without stalling, and the A7R4 fired the shot. However, if you look at the video from the 14th second, it seems that something has started to stagnate, and the A7R4 has not worked since. Of course, there was no problem with MF lock and focus cursor movement.

my1sec commented 1 year ago

Frank, I sincerely thank you for giving me the opportunity to use such a wonderful tool.

Alpha-fairy has always been with me this fall shooting season. I discovered a few new things.

frank26080115 commented 1 year ago

For all of the buffering problem (images not being saved and then getting stuck), please double check your camera settings to use "save to camera only", once for PC mode and once for smartphone mode as well.

For example, 5 cuts to infinity in some cases and 3 cuts in other cases. Even when the same scene was shot with the same camera settings, there were times when the number of shots was different.

yes I know, I can't do much about this, the steps sizes seem to vary depending on both the lens model and also where the focus started from

As alpha-fairy was used for a long time, it was found that the delay in the shooting interval gradually increased as if buffering occurred, and the problem was temporarily solved by rebooting alpha-fairy.

I can't debug this, I don't know if the source of the problem is the LWIP implementation, and if it is, I don't really know how to solve it. Months ago I had an entirely different backend using AsyncTCP instead, hoping it wouldn't allow anything to buffer up and choke, it didn't help and was harder to keep stable.

When using the focus stacking function, I would like to suggest what it would be like if a function to stop shooting when reaching infinity was added.

I will probably work on this next.

my1sec commented 1 year ago

- [alpha-fairy ver 1.0.13_2 ] shutter timer test with A7R4

https://www.youtube.com/watch?v=AFI1AOlZy1Y

I tested again today and discovered something new.

Saving failed in toggle mode with shutter timer set. On the other hand, the normal mode was saved but the focus did not move.