Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some ideas for the photostacking feature #19

Open
my1sec opened this issue Oct 26, 2022 · 15 comments
Open

Some ideas for the photostacking feature #19

my1sec opened this issue Oct 26, 2022 · 15 comments
Assignees
Labels
enhancement New feature or request

Comments

@my1sec
Copy link

my1sec commented Oct 26, 2022

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.)

@my1sec my1sec added the enhancement New feature or request label Oct 26, 2022
frank26080115 added a commit that referenced this issue Oct 26, 2022
mostly for issue #19

* auto Tv delay for focus stack, adj spacing for 9pt focus

* added button toggle mode when upside down

* added err when tv step wrong expo mode
@frank26080115
Copy link
Owner

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

  • the spacing for the 9-point mode can now be adjusted right from the app by rotating the remote
  • the focus stepping pause time now takes the shutter speed into account, it will wait until the shutter has opened and closed
  • I added button toggle mode, if you tried to do focus-stacking/9-point/shutter-stepping while holding the remote upside-down, then the big button is in toggle mode, instead of hold-down mode

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
Copy link
Author

my1sec commented Oct 26, 2022

Frank, Thank you for reviewing my idea.

- Photostacking test with A7R4

https://youtu.be/HRqdWYNYITU

  • The toggle function of the big button is perfectly performed.
  • Sometimes the picture is taken while the focus is not completely shifted.
    (I was testing at relatively fast shutter speeds, so I wasn't sure if this would affect the photo results.
    I'll see if that has any effect on slow shutters later.
    )

- 9 point test with A7R4

https://youtu.be/pZPldXbgRNE

  • The toggle function worked perfectly.
  • It seems to work at a relatively slow speed, but it worked just fine.
  • If you look at the 2 minute 30 second section of the test video, if the camera loses focus, it has not been able to shoot normally since then.
    (An idea came to mind for a moment here. What if a function that shoots like a clockwork is added while gradually narrowing the range toward the center when it is set to a wide section?)

- 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.

  • The toggle function worked perfectly.
  • After the shutter speed was changed by 1 step, it did not change any more.
  • After 35 seconds of the test video, the AF mode could not be activated because the focus mode was locked to MF after the work was completed. This issue was only resolved after powering off the M5Stack.

@frank26080115
Copy link
Owner

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
Copy link
Author

my1sec commented Oct 27, 2022

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.

  • The focus did not shift at regular intervals.
  • The higher the aperture of the lens, the more it shifts the focus.

@my1sec
Copy link
Author

my1sec commented Oct 27, 2022

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
Copy link

ik-ne commented Oct 27, 2022

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
Copy link
Owner

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
Copy link
Author

my1sec commented Oct 28, 2022

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.

  • The interval at which the focus shifted showed irregular movements, sometimes moving rapidly or slowly. There was also occasional erratic delay in shutter timing. When the delay was too severe, I was able to solve the problem by turning the power back on.

    (I guess that the difference in the physical motor for each lens and the unknown interference of the WIFI signal have a complex effect. Various delays also appear occasionally in the Sony app.)

  • The effect on each shot data and the final merged photo result was negligible.

    (In most cases, when shooting focus stacking, the aperture value is set high, so I think that even if the focus distance is not uniformly shifted, the result will be less affected.)

  • Big button toggle function was perfect.
    (During continuous shooting, the branches were swaying in the wind, so I had to stop the stacking shooting and start again from the first focus section. This is entirely a problem with my lack of skill.)

    When using the toggle function, it would be nice to add a function to stop continuous shooting when focus is reached in the infinity section.

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 added a commit that referenced this issue Oct 30, 2022
fixing MF lock after shutterstep, added err msg for "AF w/ shutter" disabled

#19
@frank26080115
Copy link
Owner

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
Copy link
Author

my1sec commented Oct 30, 2022

- [ 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
Copy link
Owner

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):

ff5b84b

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

@my1sec
Copy link
Author

my1sec commented Oct 30, 2022

- [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
Copy link
Author

my1sec commented Nov 15, 2022

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.

  • I found that if I use alpha-fairy with the timer function enabled in the camera, the file is not saved. At this time, alpha-fairy didn't work any buttons, and the review button on the camera didn't work.

  • 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.

  • 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.

  • 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.

@frank26080115
Copy link
Owner

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
Copy link
Author

my1sec commented Nov 18, 2022

- [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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants