Questions tagged [cielab]

In CIE LAB, LAB stands for Lightness, position between red and green, and position between yellow and blue. It is a colour space designed as more related to human perception than RGB or HSV spaces. It was proposed by the International Commission on Illumination (CIE).

CIE LAB (strictly speaking L*a*b*, as opposed to LAB in Hunter LAB) is a chromatic value colour space and is said to be the most complete colour space specified by the International Commission on Illumination (Commission internationale de l'éclairage - CIE). It describes all the colors visible to the human eye and was created to serve as a device-independent model to be used as a reference.

57 questions
18
votes
3 answers

What are the ranges of coordinates in the CIELAB color space?

I have the following piece of code: public List> GetNormalizedPixels(Bitmap image) { System.Drawing.Imaging.BitmapData data = image.LockBits( new Rectangle(0, 0, image.Width, image.Height), …
BartoszKP
  • 34,786
  • 15
  • 102
  • 130
8
votes
2 answers

CIELAB color range for Scikit-image?

I am working on CIELAB colour space but cannot find any information about the range of each channel produced by skimage.color.rgb2lab . Thanks.
TinyEpic
  • 541
  • 1
  • 11
  • 18
7
votes
2 answers

How to discern which color is "lower" and/or "higher" in CIE-L*a*b* colorspace for ordered dithering?

I have implemented several functions to convert sRGB to the CIE-L*a*b* color space. Now, I'd like to use that for dithering, but I'm unsure how to exactly discern which color is the "lower" color, and which one is the "higher" color. When dithering…
polemon
  • 4,722
  • 3
  • 37
  • 48
4
votes
1 answer

How to convert RGB image to CIELAB using raster package in R?

I have read an RGB image using the following code library(raster) #Load an image logo <- stack(system.file("external/rlogo.grd", package="raster")) plot(logo) Now, I want to convert the RGB image to CIELAB image. How to do it using raster R…
UseR10085
  • 7,120
  • 3
  • 24
  • 54
4
votes
2 answers

Similar color detection in Python

Given a color either in RGB or Hex, how do I find colors that are similar to it? By similar I mean they should be distinguishable by small values.
Jp Reddy
  • 366
  • 1
  • 4
  • 15
4
votes
1 answer

cv.COLOR_BGR2LAB gives wrong range

within the following code, I use a png image 4096*4096 pixels which includes every possible RGB colors (not twice the same pixel, can be found here http://allrgb.com/starry-night) Then I convert the RGB values to LAB values and I check the range of…
abitbol
  • 53
  • 1
  • 3
3
votes
1 answer

Tensorflow CIELAB color space bounds

I have the following script that takes an image in RGB and converts it to Lab color space: import tensorflow as tf import tensorflow_io as tfio img = tf.io.read_file(tf.keras.utils.get_file("tf",…
pierDipi
  • 1,388
  • 1
  • 11
  • 20
3
votes
2 answers

Convert Lab colour values in RGB and HEX in R

Conversion of RGB values into HEX values is easy with R: x <- c("165 239 210", "111 45 93") sapply(strsplit(x, " "), function(x) rgb(x[1], x[2], x[3], maxColorValue=255)) #[1] "#A5EFD2" "#6F2D5D" How can I convert CIELab values into…
Borexino
  • 802
  • 8
  • 26
2
votes
1 answer

Is it possible to use Lab color space to segment certain colors?

I know that the easiest way to segment certain color is using the HSV color space, but I have a task to do it in HSV, RGB and Lab... I am really confused how to do it in Lab. I did it in HSV and it's really simple. Here's the function that segments…
gkvski
  • 43
  • 6
2
votes
2 answers

Do you need to divide with white point, for emissive sources, when converting from XYZ to CIELAB?

When converting from XYZ (CIE 1931 color space) to L*a*b* (CIELAB) the formulas, that you'll find e.g. here https://en.wikipedia.org/wiki/CIELAB_color_space, specify you should divide by the XYZ values of the white point of the "reference…
2
votes
1 answer

RGB / XYZ and XYZ-LAB color space conversion algorithm

I tried to convert RGB color space to CIE-LAB color space. But there is a mistake. input RGB values = (50,125,50) received result LAB vaues = (41,-38,34) LAB values should be (46.41,-39.24,33.51) I checked this values from …
erncncbk
  • 59
  • 1
  • 7
2
votes
1 answer

What is the math behind white balance algorithms?

I have an image in CIELab color space. I need to do some processing on it. So, there are two questions: Given an array of Lab values, how would one get overall image temperature in Kelvins? (Like in camera settings or in Lightroom) Having…
2
votes
0 answers

Non-normalized colour-conversion Yxy colour space

I'm doing a psychology experiment involving colour. Before I start my analysis I have to convert three colours in Yxy colour space into CIELAB. I used a colour spectrometer gun, but my luminances in Yxy space are non-normalized (in 1000s, up to…
Emma Dean
  • 21
  • 1
2
votes
1 answer

Accessing elements in a multi-channel OpenCV Mat

this is my first post on stackoverflow, so I hope to do everything right, sorry if I don't. I'm writing code for a function to convert a single RGB value into CIE L*a*b* color space. The function is supposed to take a 3 floats array (RGB channels…
Francesco V.
  • 119
  • 2
  • 10
2
votes
1 answer

How to compute the cubehelix color scheme in Less.js?

I want to compute the cubehelix color scheme in Less so I can tweak some variables. I believe this necessitates CIE L*a*b color system. I ran across Chroma.js which seems like it would work for computing colors, but now I'd like to integrate this…
Chet
  • 18,421
  • 15
  • 69
  • 113
1
2 3 4