Skip to content

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