-
Notifications
You must be signed in to change notification settings - Fork 19
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
large microlens artifacts using render_view_3g and Raytrix R5 #5
Comments
Thanks for the notification! The code is the following
So the disparity is divided into three slices. In this case t1 is for small disparities, t2 medium and t0 for larger values. I will work on a small method that reads these values from the .xml file.
And they also have some overlapping. The mapping between virtual depth and disparity is also calibration depending, so it may be tricky. But a linear mapping could be enough to render without artifacts. |
Thanks for getting back to me! Yeah, my .xml looks pretty much identical to that. I ended up trying this:
which gave about the best results I could get, but still pretty significant artifacts. I assume this is what you meant by a linear mapping? |
Hey. Sorry for getting back later. About the scaling, I believe this is relative to the configuration. |
I compared the lens types you assign with the output type per lens from RXLive, and they do match. However, I suppose it's possible Raytrix changed the focus distance definition per lens type, but this seems very unlikely. I'm not entirely sure what to try changing. I understand the virtual depth concept, not where it comes to play in the rendering code, though maybe the trick is to just go through the code finely once I have the time. The old code works alright, but it seems like so much work's been put in to the current version it'd be a shame to not use it. edit: do you mean scaling the disparity map? |
Ok. If the microlens type match, it should work. the disparity scaling should be just a minor effect.
This part assumes that lenses considered in the code as t0 (lens type 0) should be used to render the part of the image with large disparities, so with small virtual depth. So in the .xml code you should find lens type 0 with virtual depth 1 to 3 or similar. Lens type 1 is good for small disparities, so high virtual depth, so in the .xml should be virtual depth 5 to 100 or similar. Lens type 2 is in the case the midlde one, so virtual depth 3 to 5? If this is actually the case, then I don't know why this is wrong, it should work. Can you share the image and the .xml file (if you have?), that would help |
Hope that worked, assuming github doesn't apply some drastic compression. The xml looks nearly exactly like the one you posted, so I'm curious to see where you're gleaning information from/how you modify the code with that information. (proc.pdf is the xml code, github wouldn't let me upload it otherwise) |
thanks. I hope there won't be compression,otherwise it may not work. I will try my best to find some time to make it work |
Thanks! If it does compress, let me know and I can email it to you. |
Same issue here. Looking foward to a good solution! |
I took a quick look, I think the size of the patch chosen is related to the maximum disparity that the algorithm used, and it should not be that way. It should be related to the lens diameter. Otherwise different executions may get different results. Sorry for that. By changing the maximum disparity value, I was able to obtain one image with almost no artifacts. But it should be corrected, and I am also not sure about the lens types. I am working on that, hopefully soon I can give you an updated code and some images. |
Wait... I thought the patch size is supposed to be related to disparity (not the maximum disparity) according to the focused plenoptic camera theory? |
Yes. That's why you need the disparity as input for the rendering script. I tried to explain above and in the sample page the relationship between disparity and patch size. Patch size is related to the disparity per each lens (if it would be ONLY related to the maximum disparity all patches would the same!), but there has to be a value for that relationship (disparity -> patch size) It ideally would depend on a metric calibration, but without that I have to rely on some other values, that was in this case the maximum disparity or the diameter lens. |
I tried to make a notebook out of my thoughts on the problem and uploaded here, hope this helps. Issue is not solved, but image does not have huge artifacts, only some imperfections in the upper part. I have the feeling also the image uses only a part of the depth of field, making it harder for disparity estimation and rendering. (it may take some time to load, because there are a lot of images, but should work - maybe take a look at it online that you already have all the output and then try to use it locally) |
Hi thanks for that! I'm trying it on my local system. I thought I'd raise the issue that when running render_SI with sample_per_lens = 7, I get the error: line 1380, in render_SI And when I change to sample_per_lens = 8 I haven't tracked it yet, but it looks like something is pulling the wrong diameter or rounding differently. Did you not encounter this? |
it is a problem in the rounding, that I thought I already solved. I had two different ideas, and was not sure which one to follow. Maybe I got the wrong one. I will try to correct it soon, thanks for letting me know. |
I pushed a little change to fix the rounding. The notebook should work fine, since now local and remote version are synchronized. |
Awesome, thanks for doing that. I'll give it a try! |
With a good depth and confidence map, foregrounds in rendered images show full microlens, seemingly independent of available arguments.Tried feeding an inverted depth map as the artifacts are only in the foreground, this didn't work. Problem is specific to new view renderer as previous versions did not show these artifacts.
The text was updated successfully, but these errors were encountered: