bokeh

高品质后处理:十种图像模糊算法的总结与实现

只愿长相守 提交于 2020-08-04 11:58:46
后处理(Post-Processing),在图形学和游戏开发等领域是提升最终画面呈现品质的重要渲染技术。后处理渲染技术的好坏,往往决定了游戏画面是否能够达到令人惊艳的级别。 图像模糊算法在后处理渲染领域中占据着重要的地位。很多产品级后处理的实现,都会直接或间接依赖于图像模糊算法中的一种或多种。无论是基于高斯模糊(Gaussian Blur)或其改进算法的Bloom特效,还是基于径向模糊(Radial Blur)的Sun Shaft(God Ray),或是基于方向模糊(Directional Blur)的镜头眩光光晕(Glare Lens Flare),抑或是景深(Depth of Field)特效中摄影级失焦感的散景模糊(Bokeh Blur),都以模糊算法作为重要的支撑。所以说,后处理中所采用模糊算法的优劣,决定了后处理管线最终的渲染品质和消耗性能的多少。 本文将对后处理管线中会使用到的如下十种模糊算法进行总结、对比和盘点,以及提供了这十种模糊算法以及其衍生算法对应的Unity Post Processing Stack v2版本的实现: 高斯模糊(Gaussian Blur) 方框模糊(Box Blur) Kawase模糊(Kawase Blur) 双重模糊(Dual Blur) 散景模糊(Bokeh Blur) 移轴模糊(Tilt Shift Blur) 光圈模糊(Iris

plot a groupby object with bokeh

泪湿孤枕 提交于 2020-08-03 10:21:51
问题 Consider the following MWE. from pandas import DataFrame from bokeh.plotting import figure data = dict(x = [0,1,2,0,1,2], y = [0,1,2,4,5,6], g = [1,1,1,2,2,2]) df = DataFrame(data) p = figure() p.line( 'x', 'y', source=df[ df.g == 1 ] ) p.line( 'x', 'y', source=df[ df.g == 2 ] ) Ideally, I would like to compress the last to lines in one: p.line( 'x', 'y', source=df.groupby('g') ) (Real life examples have a large and variable number of groups.) Is there any concise way to do this? 回答1: I just

plot a groupby object with bokeh

大憨熊 提交于 2020-08-03 10:20:02
问题 Consider the following MWE. from pandas import DataFrame from bokeh.plotting import figure data = dict(x = [0,1,2,0,1,2], y = [0,1,2,4,5,6], g = [1,1,1,2,2,2]) df = DataFrame(data) p = figure() p.line( 'x', 'y', source=df[ df.g == 1 ] ) p.line( 'x', 'y', source=df[ df.g == 2 ] ) Ideally, I would like to compress the last to lines in one: p.line( 'x', 'y', source=df.groupby('g') ) (Real life examples have a large and variable number of groups.) Is there any concise way to do this? 回答1: I just

bokeh server get mouse position

我的未来我决定 提交于 2020-08-01 08:16:43
问题 I am developing an interactive app with bokeh (0.12.2) that updates plots based on specific interactions. For now I use sliders to change positions of a glyph in a plot, but I actually want to access the position of my mouse within a specific plot. The dataset is a multidimensional matrix (tensor), dense data, and each plot displays one dimension at a specific location. If I change the position of the marker glyph on one plot, the other plots need to be updated, which means I have to slice my

Use image_url in a standalone bokeh server by running python with the -m option

廉价感情. 提交于 2020-07-23 06:41:47
问题 This is a follow up of my previous question. The structure of the files is shown below. I have to run the scripts using python -m bokeh_module.bokeh_sub_module from the top directory . ├── other_module │ ├── __init__.py │ └── other_sub_module.py ├── bokeh_module │ ├── __init__.py │ ├── image.png # not showing │ └── bokeh_sub_module.py └── image.png # not showing either The bokeh_sub_module.py is using the standalone bokeh server. However the image will not show no matter where it is placed.

Use image_url in a standalone bokeh server by running python with the -m option

孤人 提交于 2020-07-23 06:40:32
问题 This is a follow up of my previous question. The structure of the files is shown below. I have to run the scripts using python -m bokeh_module.bokeh_sub_module from the top directory . ├── other_module │ ├── __init__.py │ └── other_sub_module.py ├── bokeh_module │ ├── __init__.py │ ├── image.png # not showing │ └── bokeh_sub_module.py └── image.png # not showing either The bokeh_sub_module.py is using the standalone bokeh server. However the image will not show no matter where it is placed.

Use image_url in a standalone bokeh server by running python with the -m option

☆樱花仙子☆ 提交于 2020-07-23 06:39:31
问题 This is a follow up of my previous question. The structure of the files is shown below. I have to run the scripts using python -m bokeh_module.bokeh_sub_module from the top directory . ├── other_module │ ├── __init__.py │ └── other_sub_module.py ├── bokeh_module │ ├── __init__.py │ ├── image.png # not showing │ └── bokeh_sub_module.py └── image.png # not showing either The bokeh_sub_module.py is using the standalone bokeh server. However the image will not show no matter where it is placed.

How to control (active) tools in holoviews with bokeh backend

梦想与她 提交于 2020-07-10 01:06:23
问题 How do I control which tools are used / active in a holoviews plot with the bokeh backend? I've seen this SO answer, but that only adds a new active tool; it doesn't keep any other tools (e.g. pan) from being active. For a specific example, suppose I only want the hover tool. I would try doing this: import holoviews as hv hv.extension("bokeh") hv.Curve([1, 2, 3]).opts(tools=["hover"]) but then I end up with a plot that has hover in addition to the default tools. How do I specify the list of

How to control (active) tools in holoviews with bokeh backend

核能气质少年 提交于 2020-07-10 01:03:52
问题 How do I control which tools are used / active in a holoviews plot with the bokeh backend? I've seen this SO answer, but that only adds a new active tool; it doesn't keep any other tools (e.g. pan) from being active. For a specific example, suppose I only want the hover tool. I would try doing this: import holoviews as hv hv.extension("bokeh") hv.Curve([1, 2, 3]).opts(tools=["hover"]) but then I end up with a plot that has hover in addition to the default tools. How do I specify the list of

Aligning a Bokeh plot. (Python)

ぃ、小莉子 提交于 2020-07-08 02:32:32
问题 I am actually a beginner to Python's Bokeh library. I am plotting a simple scatter plot as follows: from bokeh.io import show from bokeh.plotting import figure plot = figure() plot.circle(x=[1,2,3,4,5],y=[10,7,2,5,9],size=10) show(plot) The code above opens a html page, with that plot aligned to the left of the screen. Is there a way to align the plot to the center ? I actually saw an attibute align of the method figure . I set it to 'center', but nothing happened. Can anyone help ? 回答1: Well