depth-buffer

Android Q - Get depth map from portrait mode photos

冷暖自知 提交于 2021-02-18 03:39:28
问题 I'm trying to build a sample Android App to extract the depth map of portrait mode photos taken with the google camera app. I know that it's saved along the blurred photos. I read the Dynamic Depth Format documentation coming from Google : https://developer.android.com/training/camera2/Dynamic-depth-v1.0.pdf It's pretty new and I don't find any resource related to this subject or how to manage the extraction of an android portrait's depth map. I used metadata-extractor library to read file's

Android Q - Get depth map from portrait mode photos

笑着哭i 提交于 2021-02-18 03:39:08
问题 I'm trying to build a sample Android App to extract the depth map of portrait mode photos taken with the google camera app. I know that it's saved along the blurred photos. I read the Dynamic Depth Format documentation coming from Google : https://developer.android.com/training/camera2/Dynamic-depth-v1.0.pdf It's pretty new and I don't find any resource related to this subject or how to manage the extraction of an android portrait's depth map. I used metadata-extractor library to read file's

Is it possible to create a DepthMask effect in Unity's HDRP?

假装没事ソ 提交于 2021-01-28 08:47:05
问题 I've been banging my head against this for a while but I cannot figure out if it is possible to create a DepthMask shader for HDRP (as descibed here). For my exact use, I'm trying to create a "hole" in the shape of whatever I have the material applied to, that shows the contents of a different camera rendered behind everything. I tried messing around with the render queue within the shader, different ZTest and ZWrite combinations, as well as some variations of the shader I found. On top of

Pack depth information in a RGBA texture using mediump precison

陌路散爱 提交于 2020-02-24 21:53:16
问题 Trying to understand the many issues related to the WebGL development for a generic mobile target, now I need to store depth information in a texture attachment for later retrieval and post-processing. JavaScript: var depthRB = gl.createRenderbuffer(); gl.bindRenderbuffer(gl.RENDERBUFFER, depthRB); gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, w, h); gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthRB); gl.bindRenderbuffer(gl.RENDERBUFFER,

Pack depth information in a RGBA texture using mediump precison

做~自己de王妃 提交于 2020-02-24 21:51:33
问题 Trying to understand the many issues related to the WebGL development for a generic mobile target, now I need to store depth information in a texture attachment for later retrieval and post-processing. JavaScript: var depthRB = gl.createRenderbuffer(); gl.bindRenderbuffer(gl.RENDERBUFFER, depthRB); gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, w, h); gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthRB); gl.bindRenderbuffer(gl.RENDERBUFFER,

Pack depth information in a RGBA texture using mediump precison

ぐ巨炮叔叔 提交于 2020-02-24 21:50:21
问题 Trying to understand the many issues related to the WebGL development for a generic mobile target, now I need to store depth information in a texture attachment for later retrieval and post-processing. JavaScript: var depthRB = gl.createRenderbuffer(); gl.bindRenderbuffer(gl.RENDERBUFFER, depthRB); gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, w, h); gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, depthRB); gl.bindRenderbuffer(gl.RENDERBUFFER,

Matlab z buffer for simulating kinect

廉价感情. 提交于 2020-01-21 12:49:31
问题 We are trying to simulate simple kinect output. I have rendered a triangle mesh in Matlab and now I want to get at the depth buffer of the figure/axis where the shape has been rendered. How do I do that in matlab? i.e. how do I access the depth buffer of a figure? 回答1: You could try this. 来源: https://stackoverflow.com/questions/5963193/matlab-z-buffer-for-simulating-kinect

Create depth buffer histogram texture with GLSL

旧城冷巷雨未停 提交于 2020-01-12 02:36:52
问题 I'm using the depth buffer of the current context to influence a texture I am displaying. The texture is 1 dimensional and in grayscale. From left to right represents from near to far. The more pixels are at a certain depth the brighter the texture is at that point with black being no pixels are at that depth and white being all pixels are at that depth. Now I have a solution that does glReadPixels() on the depth-buffer, analyzes it on the CPU and then writes it back to the texture. Naturally

Create depth buffer histogram texture with GLSL

别等时光非礼了梦想. 提交于 2020-01-12 02:36:05
问题 I'm using the depth buffer of the current context to influence a texture I am displaying. The texture is 1 dimensional and in grayscale. From left to right represents from near to far. The more pixels are at a certain depth the brighter the texture is at that point with black being no pixels are at that depth and white being all pixels are at that depth. Now I have a solution that does glReadPixels() on the depth-buffer, analyzes it on the CPU and then writes it back to the texture. Naturally

Copy depth buffer with non-lockable format (D24S8) to system memory with Direct3D9, Win 8.1

纵饮孤独 提交于 2020-01-07 05:48:06
问题 EDIT: As ozeanix points out in the comments it is not possible to copy a D24S8 surface to system memory. Unfortunately you also cannot bind the surface (or rather its containing texture) to a pixel shader. I ended up going the reimplementation way, intercepting all D3D9 calls. If the graphics card supports it - all cards with DX10+ should do - it is sometimes possible to exchange the D24S8 format with FOURCC INTZ, which has the same memory layout, but can be bound to a pixel shader's texture