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

Median filter in long exposure mode #5

Open
vwueest opened this issue May 19, 2024 · 9 comments
Open

Median filter in long exposure mode #5

vwueest opened this issue May 19, 2024 · 9 comments

Comments

@vwueest
Copy link

vwueest commented May 19, 2024

Hi @danopdev
Thanks a ton for your work. Really like your app. Have used it lots for panoramas. Just great!

I have a tiny feature request that would help me a lot. You have a "nearest to average" mode, which supposedly gets rid of things that change. For me it kind of works but many objects don't disappear completely (see attached photo). However, I have previously done some tests with applying a median instead and that completely got rid of all objects. What do you think, could you implement that as well? It would be super useful to remove people in crowded areas, for example in touristy place. If I understand correctly it shouldn't be to much effort to code that, but let me know what you think :)
Screenshot_20240519-105234

@vwueest
Copy link
Author

vwueest commented May 19, 2024

Something similar to this :)

@danopdev
Copy link
Owner

Hi @vwueest

I'll have a look.
If possible can you attach the original photos ?

Regards,

@vwueest
Copy link
Author

vwueest commented May 24, 2024

Sweet, very glad to hear :) sure thing, here you go! Hope that helps

PXL_20240519_004359584
PXL_20240519_004356680
PXL_20240519_004355677
PXL_20240519_004354344
PXL_20240519_004357687

@danopdev
Copy link
Owner

Hi
I did some test and it does not improve much the output.
It's not easy to compare "colors". Maybe it work better when colors are more different.
Regards,

@vwueest
Copy link
Author

vwueest commented Jun 3, 2024

Hey, thanks for the update! Ah really? That's surprising. I'm sorry if that means I wasted some of your time. I could have a look as well on my side. Unfortunately I'm much more comfortable with python. Any chance you can export the aligned images easily? Or can I do that myself with the "align" mode in the app? Sorry, I never quite figured out how that mode works

@danopdev
Copy link
Owner

danopdev commented Jun 6, 2024

Hi, yes you can with the align from the app.
Just in case I attach the images aligned (ignore the black regions, they are caused by the rotation needed for alignment).
If you find a decent solution I happy to use it.

My tested was based on:

Regards

2_align
2_align_001
2_align_002
2_align_003
2_align_004

@vwueest
Copy link
Author

vwueest commented Jun 20, 2024

Hey @danopdev, thanks for the pictures! And sorry for the delay.

I did some testing on my side. And from what I see it seems that the filters for the pictures with the sand didn't work well because the alignment of the pictures was not so great.
So I did some testing with an easier case, where the pictures are taken from the same spot to see (a) if median filter works to get rid of moving objects, (b) if 'median' or 'closest to average' works better in such a case.

The pictures I used as a source are these 3:
1
2
3

(a) And here is the result of the median filter:
median_img

(b) And the result of the nearest to average filter:
closest_to_average_image

In both, we see some ghosting of the hand on the right. I assume this effect would disappear if there were more pictures.
Overall, both images are very similar. And thinking about it a bit more, this makes total sense. Since nearest to average often is the same value as median. Maybe median could be a bit more robust to outliers, where for example one of the pictures does not get aligned well or similar. But my conclusion is, that your implementation of closest to average seems to be as good as median and I would therefore leave the code as it was. Let me know if you have any other inputs :)

@danopdev
Copy link
Owner

danopdev commented Jul 5, 2024

I'll try to see if the median helps a little or not.
If it does (even a little bit) I'll used it :)

@vwueest
Copy link
Author

vwueest commented Jul 14, 2024

Awesome, would be happy to hear about any findings and let me know if I can help

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

No branches or pull requests

2 participants