nagadomi / nunif

Misc; latest version of waifu2x; 2D video to stereo 3D video conversion
MIT License
1.39k stars 131 forks source link

TopBottom stereo format please ( + monovision depthmap video) #163

Closed MetaMind09 closed 2 months ago

MetaMind09 commented 2 months ago

Hey there, thanks for making this program, its appreciated!

I ve an LG 3D TV using polarized 3D technology...SBS format gives me low resolution. Please add a topbottom format (and maybe a monovision depthmap format).

nagadomi commented 2 months ago

Does LG 3D TV support only Half SideBySide and Full TopBottom?

I found a similar comment. Do you have the same opinion as this?

I recently purchased a passive 3D display, the LG 55LW5600. The major shortcoming of passive 3D displays is that each eye only sees half of the vertical resolution. So if you were watching full frame packed 1920x1080 3D content, each eye would effectively see 1920x540.

One common 3D format is side-by-side, where each frame contents the image for each eye in a side-by-side fashion. Each image is 960x1080, with the entire frame being 1920x1080. The problem with this format on passive 3D displays is that side-by-side format has already reduced the horizontal resolution in half only to be reduced vertically by the passive display. So each eye only sees 960x540!

The top-bottom 3D format on the other hand stacks the two eye images in a 1920x1080 frame, with each image being 1920x540. This has the advantage of at least not being further reduced by the passive 3D display. from https://www.avsforum.com/threads/top-bottom-3d-vs-side-by-side-on-passive-display.1364877/

If Full SideBySide is supported, it is essentially the same content as Full TopBottom.

MetaMind09 commented 2 months ago

Yes exactly that, full 3d resolution (within the limits of passive display technology that is halfing vertical resolution) is only granted in TopBottom format (of my LG TV which is only 1080p screen resolution, newer models with 4K such as LG C6 etc. do not come with this limitation as full 1080p can be displayed on 4K screen without degradation)

So TopBottom format is essential for getting 1920x540 instead of 960x540 in SBS format.

nagadomi commented 2 months ago

OK. I will add Full TopBottom and Half TopBottom support. My guess is that the device only supports Half TopBottom (1920x1080 resolution), but it should still play at 1920x540.

MetaMind09 commented 2 months ago

Thank you very much. :^ )

And yes 1920x540 is the max 3D resolution I can play on my passive 1080p LG screen. Its not because of the software...its hardware limitation (vertical resolution gets halfed to display each line in either left or right eye)

nagadomi commented 2 months ago

Added Full TB(Full TopBottom) and Half TB (Half TopBottom) Stereo Format https://github.com/nagadomi/nunif/commit/b6636689a1d938d145c8023a575105508a1c2151.

MetaMind09 commented 2 months ago

Added Full TB(Full TopBottom) and Half TB (Half TopBottom) Stereo Format b663668.

Sweet! Would it be possible to also add monovision depthmap format instead of SBS depthmap format?

nagadomi commented 2 months ago

I do not know what monovision depthmap format and SBS depthmap format refer to. iw3 works with monocular depth estimation, and format like SBS is not relevant there.

shuttittuppitt commented 2 months ago

It's probably the same thing as what these 2 sites describe/demonstrate. https://en.m.wikipedia.org/wiki/Depth_map

https://depthy.stamina.pl/ Mess with the sliders button on some of their example images to better see the result. Of course, for videos, the 3D probably uses the depth map but without the wobbling.

nagadomi commented 2 months ago

If you want per-frame or per-image depthmap, you can specify Export/Export disparity for Stereo Format field to output RGB images and 16-bit grayscale depthmaps.

MetaMind09 commented 2 months ago

I do not know what monovision depthmap format and SBS depthmap format refer to. iw3 works with monocular depth estimation, and format like SBS is not relevant there.

When I select output as: depthmap, an SBS depthmap video is generated. I wish a 2D/monovision depthmap though.

nagadomi commented 2 months ago

When I select output as: depthmap, an SBS depthmap video is generated

Do you mean Debug Depth (--debug-depth)? It is a test tool for development. If you wish to output depthmap, select Export or Export disparity as Stereo Format.

MetaMind09 commented 2 months ago

When I select output as: depthmap, an SBS depthmap video is generated

Do you mean Debug Depth (--debug-depth)? It is a test tool for development. If you wish to output depthmap, select Export or Export disparity as Stereo Format.

Ohh okay...I selected export once and a strange file (dunno file extension) was created. Anway I will try, thanks.

nagadomi commented 2 months ago

Export is an advanced feature for users who wish to process the depthmap with other software. I don't know what is your purpose for outputting depthmaps, the output format is described in https://github.com/nagadomi/nunif/issues/97#issuecomment-2027349722