Skip to content

More visualization options: black default and gamma color scaling#11

Open
Timdnb wants to merge 2 commits intotomrunia:masterfrom
Timdnb:feat/add-visualization-options
Open

More visualization options: black default and gamma color scaling#11
Timdnb wants to merge 2 commits intotomrunia:masterfrom
Timdnb:feat/add-visualization-options

Conversation

@Timdnb
Copy link

@Timdnb Timdnb commented Nov 22, 2025

For some figures I was working on I preferred to have black for (0,0) flow, so I added that option. Also added a gamma value to scale how fast the color changes, such that small flow values pop out better. For reference I also added a function to visualize the colorwheel (also helps understand the effect of the gamma value).

Thought it might be useful for someone else!

For reference, the black colorwheel with gamma=1.0
black_colorwheel_gamma_1

And the black colorwheel with gamma=0.5
black_colorwheel_gamma_0 5

Code used for these:

import flow_vis
import matplotlib.pyplot as plt

img = flow_vis.render_colorwheel(size=512, black=True, gamma=0.5, convert_to_bgr=False)

plt.imshow(img)
plt.axis('off')
plt.savefig('colorwheel.png', bbox_inches='tight', pad_inches=0)

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

Successfully merging this pull request may close these issues.

1 participant