-
-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement aesthetic options for "colour.plotting.RGB_chromaticity_coordinates_chromaticity_diagram_plot_*" definitions. #391
Comments
…gram_plot_CIE*" definitions. References #391.
So I have added a Defaults a = np.random.random((32, 32, 3))
RGB_chromaticity_coordinates_chromaticity_diagram_plot_CIE1931(a) and with some customisations: Custom Parameters RGB_chromaticity_coordinates_chromaticity_diagram_plot_CIE1931(
a,
scatter_parameters={'c': 'black', 'marker':'+', 'alpha': 0.5}
) This is available in latest develop branch. |
Nice. I've ended up temporarily editing the parameters in the module before, to make the points more visible. Probably not an advised approach! |
We might want to fine tune the defaults, the points were fine when plotting in Jupyter notebook but they are a tad big from command line right now. |
I've always thought that the CIE model in 2D could be enhanced in a few
ways. Namely, the thickness of the line of the diagram is proportional the
Y color matching function (brightness), as this says how much a color point
of that wavelength is needed to pull other color points toward it.
Also, X, Y, and Z appear on the diagram. X is at (1,0), Y is at (0,1) and Z
is (0,0).
Thank you for your time,
William Coulter
(559)-901-4788
"There is nothing noble in being superior to your fellow man. True nobility
is being superior to your former self" -Ernest Hemingway
…On Fri, Mar 2, 2018 at 1:17 AM, Nick-Shaw ***@***.***> wrote:
Nice. I've ended up temporarily editing the parameters in the module
before, to make the points more visible. Probably not an advised approach!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#391 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZGPY6eLsde4GIt887a3t6SEfYTAnQM9ks5taQ5CgaJpZM4SZb35>
.
|
@Willingo : Do you have an example image of what you are thinking about? Cheers, Thomas |
No but I can probably implement it myself in Matlab quickly. Imagine
weighting the thickness of the locus to the intensity of the y color
matching function for a given nanomenter of light. Like, 553nm would be
thickest.
I can draw the XYZ (1,0),(0,1),(0,0) it out and explain how I think it is
useful. It allows one to know where a color point moves if you imagined
increasing the intensity of an interval by a certain amount.
I'm heading to sleep now though.
Thank you for your time,
William Coulter
(559)-901-4788
"There is nothing noble in being superior to your fellow man. True nobility
is being superior to your former self" -Ernest Hemingway
…On Fri, Mar 2, 2018 at 1:38 AM, Thomas Mansencal ***@***.***> wrote:
@Willingo <https://github.com/willingo> : Do you have an example image of
what you are thinking about?
Cheers,
Thomas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#391 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZGPY5BeLv64DxGpOG18zLIipBONMUruks5taRMAgaJpZM4SZb35>
.
|
It effectively gives you lumen / radiant watt. 't help much except to
realThis is useful in the lighting industry for energy reasons as well as
interpreting reflective curves, but maybe it's not that useful in general.
Thank you for your time,
William Coulter
(559)-901-4788
"There is nothing noble in being superior to your fellow man. True nobility
is being superior to your former self" -Ernest Hemingway
On Fri, Mar 2, 2018 at 1:52 AM, William Coulter <wwcoulter6@gmail.com>
wrote:
… No but I can probably implement it myself in Matlab quickly. Imagine
weighting the thickness of the locus to the intensity of the y color
matching function for a given nanomenter of light. Like, 553nm would be
thickest.
I can draw the XYZ (1,0),(0,1),(0,0) it out and explain how I think it is
useful. It allows one to know where a color point moves if you imagined
increasing the intensity of an interval by a certain amount.
I'm heading to sleep now though.
Thank you for your time,
William Coulter
(559)-901-4788 <(559)%20901-4788>
"There is nothing noble in being superior to your fellow man. True
nobility is being superior to your former self" -Ernest Hemingway
On Fri, Mar 2, 2018 at 1:38 AM, Thomas Mansencal ***@***.***
> wrote:
> @Willingo <https://github.com/willingo> : Do you have an example image
> of what you are thinking about?
>
> Cheers,
>
> Thomas
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#391 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AZGPY5BeLv64DxGpOG18zLIipBONMUruks5taRMAgaJpZM4SZb35>
> .
>
|
@Willingo : Just to confirm, did you have something like that in mind? |
This is all working great! What is the best way to limit the number of
samples created by read_image to speed up performance?
…--
Tashi Trieu
720-206-4229
Tashi@TashiTrieu.com
On Fri, Mar 2, 2018 at 2:27 AM, Thomas Mansencal ***@***.***> wrote:
@Willingo <https://github.com/willingo> : Just to confirm, did you have
something like that in mind?
[image: image]
<https://user-images.githubusercontent.com/99779/36894696-1d6c6f92-1e71-11e8-815a-93d2f628f535.png>
[image: image]
<https://user-images.githubusercontent.com/99779/36894711-2bc09f1e-1e71-11e8-9981-acce6d2fe99f.png>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#391 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA1ex6u76Pgelm-iIbHXG0qmjQWdVoCrks5taR6UgaJpZM4SZb35>
.
|
You could try |
I'm getting the error "IndexError: index 3 is out of bounds for axis 2 with
size 3" when using "RGB[::4, ::4, 3]"
…--
Tashi Trieu
720-206-4229
Tashi@TashiTrieu.com
On Fri, Mar 2, 2018 at 11:20 AM, Thomas Mansencal ***@***.***> wrote:
You could try RGB[::2, ::2, 3], RGB[::4, ::4, 3] to take every second or
fourth pixels in the image, akin to nearest neighbour interpolation in Nuke
or Photoshop. The clean way would be to resample the array with
scipy.misc.imresize
<https://docs.scipy.org/doc/scipy/reference/generated/scipy.misc.imresize.html>
although I noticed it is on its way to deprecation.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#391 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA1exwcScRPeVmPjMoa5Ipj_wSNTtJVeks5taZuFgaJpZM4SZb35>
.
|
Sorry, my array slicing is incorrect, try something like that: |
I have updated the overall plotting and diagrams generation code, notable things:
|
Thanks! This is fantastic! |
Oh and I removed most (still a few to go through) of the unneeded hardcoded styling elements, thus you can override globally marker size, line width, etc...: import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
from colour.plotting import *
plt.style.use(['dark_background'])
mpl.rcParams['lines.linewidth'] = 1
mpl.rcParams['lines.markersize'] = 2
RGB = np.random.random((32, 32, 3))
RGB_chromaticity_coordinates_chromaticity_diagram_plot_CIE1960UCS(
RGB,
'ITU-R BT.709',
colourspaces=['ACEScg'],
spectral_locus_colours='white',
grid=False) |
Very cool. Is there a way to produce a diagram with alpha channel and with out the frame, header, or axes? |
Something like that should do: import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
from colour.plotting import *
plt.style.use(['dark_background'])
mpl.rcParams['lines.linewidth'] = 1
mpl.rcParams['lines.markersize'] = 2
RGB = np.random.random((32, 32, 3))
figure = RGB_chromaticity_coordinates_chromaticity_diagram_plot_CIE1960UCS(
RGB,
'ITU-R BT.709',
colourspaces=['ACEScg'],
spectral_locus_colours='white',
grid=False,
title='',
standalone=False,
legend=False)
figure.patch.set_visible(False)
figure.gca().axis('off')
figure.tight_layout()
with open('/Users/kelsolaar/Downloads/diagram.png', 'w') as png_file:
figure.canvas.print_png(png_file) |
Perfect! |
Closing this one for now! |
It would be great to have control over some parameters when plotting RGB samples on a CIE1931 diagram:
style (x, +, or circle)
fill color (black, white, rgb source color)
size (relative or width in pixels)
The text was updated successfully, but these errors were encountered: