Questions tagged [color-space]
Color-space addresses the interface between human perception of color and the means of rendering this in a visual interface by means of coding. Use this tag for questions about the structure of and converting between various schemes of color representation.
395
questions
1
vote
2answers
37 views
How do you convert ProPhoto RGB colorspace to RGB with scikit-image and/or PIL?
I have TIF files that are in the ProPhoto RGB colorspace. These are imported fine with scikit-image's "imload" method. However, when I try to use matplotlib to view the image data I receive ...
0
votes
1answer
43 views
selecting alpha for a color to be layered for largest gamut
a is the alpha value for a grayscale color:
rgba(0,0,0,a)
I want to stack this color up to z times on a white rgb background.
Given z, how do I determine what a will create the widest gamut of ...
1
vote
0answers
14 views
What exactly happens with sRGB and Display P3 colors in one iOS app?
I am unclear about what happens when I mix those two color spaces in one app. Will the sRGB colors just look paler than without mixing them with the colors of the larger Display P3 color space? Should ...
0
votes
1answer
25 views
While using opencv why one of my channel values became zero?
Where did I make a mistake during hsv conversion? why am I losing data in my array which is the correct way to convert to hsv image?
*Note: In my requirement, I need to feed PIL images to cvt.Color(), ...
0
votes
0answers
21 views
HSV colorspace conversion between opencv vs skimage
I was comparing the difference between skImage HSV color space and OpenCV hsv colourspace conversion methods, I found the below difference which I didn't understand:
from PIL import Image
from skimage ...
0
votes
1answer
34 views
RGB to HSV is same as BGR to HSV?
I am using OpenCV for colour space conversions. I was wondering if RGB to HSV conversion and BGR to HSV conversions will give me the same output?
cv2.cvtColor(np.float32(img),cv2.COLOR_BGR2HSV) # BGR ...
1
vote
0answers
37 views
Why modeling image's pixel with char instead of unsigned int?
I study different image processing project (in C\C++) to help me build a ColorGrading App. Including OpenColorIO, it seems that using char/unsigned char is part of the standard for saving image's ...
0
votes
0answers
9 views
Display colors on the web that are sensitive to dichromat
I want to display colors that are sensitive to dichromat to the web.
I m making use of concept of confusion lines (the lines that pass from co-punctual point to the spectral locus) in CIE xy ...
0
votes
0answers
61 views
Node js Sharp image colourspace transform from RGB to CMYK image color problem
I tried to convert colorspace an image from RGB to CMYK. I used sharp for this.
const sharp = require('sharp');
console.log('Converting...')
sharp('C:/Users/eyup_/Desktop/indir.jpg')
....
0
votes
1answer
81 views
Converting an image from RGB to CMYK with Node JS [closed]
My printer only work on CMYK colors. And I want to make a telegram bot with node js.
I searched on internet to directly transform image color space. But I cannot find.
For python; I find Image.convert(...
0
votes
0answers
7 views
How fuzzy colors works in digital pictures?
I cannot able to understand the concept of application fuzzy colors in digital pictures. I have the following doubts.
How the pixels of an digital image described using fuzzy colors ?
How can we ...
0
votes
2answers
63 views
Is it possible to control the conversion of RGB to YUV matrix in VideoToolBox?
I found that different Iphone hardware encoders have different matrices for converting input RGB to YUV.That is, in the function OSStatus VTCompressionSessionEncodeFrame(VTCompressionSessionRef ...
0
votes
2answers
50 views
How to get the color profile that the display is using?
I want to make a color looks consistent across different environment. I wonder if there is a way to know the color profile the system or the display is currently using, so that I can convert the color ...
0
votes
1answer
46 views
How to set the value of the V-channel of the HSV color space to a constant value
I'm working on an Object detection problem where i have to detect small colored cars. I used color as main feature representation of the target object and applied histogram back_projection.
However, ...
0
votes
0answers
48 views
Pixel range given by opencv on conversion to CIELUV and CIELAB is different from the standard
I am trying to use the CIELAB and CIELUV color space for doing some computer vision work. I used OpenCV to convert from RGB to the spaces
img = cv2.imread(PATH)
img_Lab = cv2.cvtColor(img, cv2....
1
vote
1answer
88 views
Converting CSS Lch to RGB
I wanted to convert a CSS Lch color string like:
--my-color: lch(20% 8.5 220.0);
To an RGB hex code. I tried using tools like chroma's Lch parser, but all of them seem to use absolute values for the ...
0
votes
0answers
38 views
How to differentiate between shades of gray in image below?
I need to check if the color of gray is similar to one group of buildings vs other group.
What is the best approach to take using OpenCV or python image library? I feel like I have to use LAB color ...
1
vote
1answer
42 views
Confusion regarding RGB colorspace conversions
I am confused about some aspects of RGB color space. I am working on tool which helps in converting colors in different color-spaces (targeted to digital graphics). One of the important feature I want ...
0
votes
1answer
62 views
Get contrast for each channel in an image opencv python
How to calculate each channel contrast in images?
Since they are lot of contrast definitions out there
Webar Contrast
Michelson Contrast
RMS contrast
I need to calculate these contrasts.
3
votes
1answer
39 views
How is VK_COLOR_SPACE_PASS_THROUGH_EXT meant to be used?
All other possible values of VkColorSpaceKHR specify a recognised colour space encoding, and I assume that creating a swapchain with those values would mean that the final pixel data submitted by the ...
0
votes
1answer
60 views
Get the bit depth or the color space of a mp4 file in Android
I'm currently working on a video player on Android. The video player should support 8 bit content and 10 bit content. Because the flow in the app is different, I need to know before playing the video ...
1
vote
2answers
48 views
sRGB constant luminance stripe
I want to create a color spectrum of constant perceived luminance.
This is my attempt so far (here's the codesandbox):
The code
goes through 8-bit RGB values of increasing hue and constant (and ...
1
vote
1answer
89 views
cv2 edited image saves with wrong colors
I'm working on a grayscale .tif file:
I convert it to BGR and try to draw some colorful stuff on it. If I save the result as .png, it's all still in shades of gray, including the drawn elements. If I ...
0
votes
0answers
58 views
Problem Applying Color Profile To PDFs Created By FPDF Library (PHP)
I am having problems adding a color profile to a pdf I create using FPDF. There is a manual process to apply a color profile to an image within Adobe inDesign that I am trying to do programmatically ...
12
votes
5answers
644 views
How to remove hidden marks from images using python opencv?
I wanted to work on a small project to challenge my computer vision and image processing skills. I came across a project where I want to remove the hidden marks from the image. Hidden here refers to ...
0
votes
0answers
179 views
Can't create bitmap without Color space android
I wanted to rescale a bitmap
I tried a lot of functions to do it and no one worked with me because of color space ,
The error is "can't create bitmap without color spacing"
I used the Bitmap....
0
votes
0answers
30 views
asymmetric blending/color interpolation that preserve whiteness
I'm using a software that is doing a kind of weird color interpolation. I find it very pleasant as it seems to preserve the whiteness of the input image in a better way than if I'm using a naive alpha ...
0
votes
0answers
34 views
image processing in color space
I am a newbie to Matlab and image processing. I want to understand the concept. I am using Color space (Derrington Krauskopf Lennie) DKL, so I was given a 3*3 matrix from my senior who did the project ...
1
vote
1answer
96 views
generate colors with the same perceived brightness and saturation
I want to generate a rainbow of colors, with the same perceived brightness, and same perceived saturation.
In essence, I am looking for a formula that takes three parameters: getRgbColor(hue, ...
0
votes
0answers
15 views
Jupiter Notebook not displaying colours
This is my code and it should be displaying colour graphs based on the image data, but instead I'm getting a blank figure. This is the Image I get when I pass the data
class plot_utils:
def ...
0
votes
1answer
16 views
How do colour spaces manage to represent different sized sections of the visible colour space?
I recently watched this YouTube video (link: https://youtu.be/iXKvwPjCGnY) that talks about colour spaces. Interested I looked it up. Turns out different colour spaces can represent different "...
0
votes
0answers
17 views
When I convert an image to greyscale, blues come out too dark
Here's a test pattern:
Here's that pattern converted to grayscale:
In color, I see the blue as lighter than the red. However, the grayscale conversion turns the red pixels to a lighter shade of ...
0
votes
0answers
163 views
Converting normalised CIELAB image tensor to RGB image
I trained an image to image translation model on pytorch and the input and output images are in CIELAB color space. How do I convert this to an RGB image? Simply converting the image causes some sort ...
0
votes
2answers
55 views
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 ...
1
vote
2answers
294 views
Using webgl to render high bit-depth textures to the screen
Our project uses images with bit depths higher than 8 bits, typically 10 bit. These are stored with 16bit PNGs, with P3 colorspace (so 1024 colors per channel).
I am trying to show these images in a ...
0
votes
0answers
33 views
Convert 16 bit color pallete index to 32 bit color
I have a file that contans 16 bit indicies for a "pallete". The "pallete" is not defined in the file. (The size of the image is known, that's not imporant though) I need to convert from an index (16 ...
0
votes
1answer
109 views
PPM wrong color display
I get weird results when displaying a PPM:
pixeldisplay
(this is actually an upscaled PNG)
And here's what the file looks like:
textdisplay
The dimensions are fine (10 rows, 8 columns), just the ...
1
vote
0answers
42 views
CSS color accuracy on different screens
The web site I'm working on makes heavy use of a single color through CSS. I'm trying to make this specific shade look the same on all screens (PC, tablets, and mobile). I'm just hoping that this very ...
0
votes
0answers
127 views
How to extract Color Space from jpg/jpeg image types in Javascript, Reactjs?
How to extract colorspace from an image, mostly jpg/jpeg. I've to validate the color space during image uploads on our ReactJS application. I only need to allow submission if the color space is RGB. I'...
1
vote
1answer
159 views
What is the difference between Display.HdrCapabilities and configuration.isScreenHdr
I want to know the HDR capabilities on Android, so I write the following code to check this.
Display display = getWindowManager().getDefaultDisplay();
Display.HdrCapabilities ...
0
votes
0answers
48 views
Value ranges of hue, saturation, brightness, for UIColor and Display P3 space?
The UIColor class uses an "Extended sRGB" space that allows values outside the usual [0, 1] range for the RGB components. Here is a link to Apple's documentation. This extended range presents a ...
0
votes
1answer
59 views
Am I specifying color-interpolation correctly in my SVG gradients?
I want to interpolate linearly in an SVG gradient. I guess that setting color-interpolation="linearRGB" is the way to do that. But this seems to have no effect in any of the several browsers I've ...
0
votes
0answers
60 views
Is there a way to render wide gamut colors (lch, lab etc.) directly through webGL?
Right now, I am rendering lch colors by converting them to sRGB and setting my fragment shader's gl_FragColor to the vector obtained from said conversion. This obviously does not render colors outside ...
0
votes
1answer
59 views
OpenCV - How to project RGB image to log (R/G) ~ log (B/G) space?
I am trying to project an RGB image to log (R/G) ~ log (B/G) coordinate system.
According to the definition here and here the log (R/G) ~ log (B/G) space is calculated like this:
Basically, I want ...
2
votes
1answer
205 views
R: getting hex colors from numeric values - how to define midpoint in gradient scale
I have a numeric vector and I would like to convert it to hex color codes. The colors should follow a gradient distribution from its possible minimum (red; 0), via a mid value which I define (the mean,...
0
votes
2answers
61 views
Is the colorspace R package part of the Tidyverse? (conflicting information)
Is the colorspace R package part of the Tidyverse? Looking at this list of Tidyverse included packages it appears the answer is "No".
However, when I load the tidyverse via library(tidyverse) it ...
3
votes
1answer
993 views
View a raw10 bit usb camera using OpenCV python
I am trying to view the output of an Omnivision OV7251 camera in OpenCV 4.2.0 Python 3.5.6. The camera output is 10 bit raw greyscale data, which I believe is right aligned in 16-bit words.
When I ...
0
votes
1answer
1k views
Color space conversion from YCbCr to RGB using PIL library?
How to do the following using python PIL library
Converting from rgb to YCrCb and vice versa
Creating images out of numpy arrays
Merging y, cr , cb component back into ...
0
votes
1answer
16 views
How to convert an image from YCRCB to RGB using PIL library?
I want to convert an image "from YCRCB" to "RGB" using PIL library
1
vote
1answer
185 views
Image color looks broken when being converted from BGR to HSV and back again
I have been trying to do data augmentation for image detection using deep learning framework.
I'm using Opencv3.3 in Python.
My framework is:
Convert BGR to HSV
Image transformation like (...