Questions tagged [color]
Questions about the visual perceptual property deriving from the spectrum of light, usually expressed numerically according to a color model.
131
questions
3
votes
2
answers
257
views
Why does _ray_ tracing work?
Perspective projection (or at least non-orthogonal) is by far the most common in photo-realistic graphics. When we use perspective projection, the (equally thick) slices of volume visualized by each ...
3
votes
2
answers
170
views
Algorithm to reduce number of colors used on an image. (sRGB)
Introduction:
I have a program that receives an image as input and does stuff.
The more colors the image has the longer it takes for the program to finish and the less visible the difference between ...
3
votes
1
answer
1k
views
How to detect a screen in a photo
Is there a way to make a difference between a photo of an actual object and a photo of an object through a computer or smartphone screen.
For example: how can I detect that the second image is taken ...
3
votes
1
answer
265
views
map 16-bit integers to RGB colors with monotonic relative luminosity
Red, Green and Blue apparently contribute differently to the luminosity perceived by humans:
https://en.wikipedia.org/wiki/Relative_luminance
I am trying to find an algorithm to map unsigned 16 bit ...
3
votes
1
answer
544
views
Can someone explain this formula for parse RGB to HSL?
Im trying to complain the algorithm to calculate the HSL value form a RGB color. I understand the algorithm for the Hue, but im lost with the Lightness and saturation. Someone can explain why?
There ...
3
votes
1
answer
296
views
What graphics techniques can be used to simulate a color nebula effect?
I've been playing around with more advanced graphics these days (beyond the basic 2D UI and image effects that the iOS platform offers), and I'm wanting to implement a visual effect similar to how iOS'...
3
votes
1
answer
210
views
Tiled Image Palettization Algorithm?
In most cases today, image palettization consists of reducing the overall number of colors in an image to some fixed number globally. This is typically solved as a straightforward but computationally ...
3
votes
1
answer
236
views
Preserving luminance
I am writing an application with multiple colored surfaces. I would like to preserve luminance, i.e. a blue surface would appear as bright as a green one, are there tools to help for this?
3
votes
2
answers
165
views
Matching an HSV color with a blended color
This is hard to explain but I am going to try, then I will explain it as pure mathematics.
Look at this image.
So basically this is a moving line, each frame a new segment is added and the previous ...
3
votes
1
answer
67
views
Repeating alpha over/under operation multiple times
I have two RGBA colors in linear [0..1] space, src and dst and I want to alpha blender src ...
3
votes
2
answers
442
views
Suggested image preprocessing before applying threshold
I am trying to vectorize the contours (skewed rectangle) of the TV in the following original image.
My first step is applying threshold. Tried selection of threshold values based on what skimage has ...
3
votes
2
answers
461
views
How to determine RGB values given a display spectral response curve?
I am reading Physically Based Rendering section 2.2.2 on RGB color.
I am trying to understand how, given a display spectral response curves for rgb intensities, we can choose the intensities so that ...
3
votes
2
answers
208
views
Determining input color space primaries from spectrum data
If I have an output device, for which I have a known spectrum data for each of it's primaries, I should be able to calculate the CIEXYZ of its primaries using using the integral equations together ...
2
votes
1
answer
1k
views
Spectral path tracing - image color/brightness incorrect
I implemented a spectral path tracing using physically base BRDF models such as Oren-Nayar,Specular Reflection and Transmission, Lambertian. All calculation in the path tracer uses standard illuminant ...
2
votes
2
answers
300
views
Why do computers more efficiently store black colors than white colors in computer graphics?
I have a question about how colors are stored in computer graphics. I had watched this video previously which had explained about why colors are stored and displayed differently than one would assume ...
2
votes
4
answers
233
views
Question about function for color
I would like a help to understand the following line of code:
return float3(pow(color.r, 2.2), pow(color.g, 2.2), pow(color.b, 2.2));
I've seen some places calling ...
2
votes
1
answer
178
views
Why do some texture data formats only have the red channel?
While programming something in Rust with the BevyEngine, I came across TextureFormats. My understanding is that those are used to define how the pixel data is handled. So Rgba8Unorm means that there ...
2
votes
1
answer
2k
views
ACES tonemapping confusion
In different sources I see ACES tonemapping, but I see one of two possible sets of formulas:
https://www.shadertoy.com/view/XsGfWV this one
https://www.shadertoy.com/view/tdffDl or this
I compared ...
2
votes
1
answer
160
views
What is the name of the RGB thing I want to be able to do, and what free program(s) can do it automatically?
I'm gonna start this off with an... "indexed image"? If that's the proper term for it?
If this 384x144 image were actually only the top-left 192x48 pixels (I'll refer to that portion as "0,0"), I ...
2
votes
2
answers
399
views
Can I have lower color bit depth in sample buffer than target framebuffer?
I´m looking into uses of high amount of samples in multisampling. If I have an RGBA8 framebuffer and render to it using multisample with many samples, say 32, dithering on per-sample level should ...
2
votes
1
answer
145
views
Interpolating HSV color with black
I'm interpolating RGB values by transforming them into HSV space and then back into RGB. I have trouble figuring out how to achieve ...
2
votes
1
answer
1k
views
Shader code for putting an atmosphere over a planet
I'm working on a game set in space with procedurally generated planets, and I'm trying to write a shader that puts an atmosphere over a planet given the color of the atmosphere and the strength of the ...
2
votes
1
answer
100
views
Mixing HSV Channel
I have a question about the saturation channel.
1.) So far I know, that saturation channel only give intensity to Hue channel, but I do not understand, how saturation channel can be dark and what is ...
2
votes
1
answer
390
views
Computing sRGB color from SPDs
I'm trying to write my own spectral path tracer and a bit stuck with converting computed SPDs to LDR RGB values. What I'm doing right now is convert sampled SPDs (in ...
2
votes
1
answer
282
views
How can I implement GIMP's "Colorize" function?
I have an RGB pixel that I'd like to colorize in my program (I'm using GLSL) very similar to how the GIMP "Colors > Colorize" function works.
In my program, I can easily convert between RGB and HSV. ...
2
votes
1
answer
215
views
Painter's algorithm test 2 and test 3?
TEST #2:
Surface S is completely behind the
overlapping surface relative to the viewing
position.
S1 is completely behind/inside the overlapping surface S2
How to check these conditions?
i) Set the ...
2
votes
1
answer
160
views
Will sRGB color space get replaced by wider gamut [closed]
in future, will sRGB which is a common standard monitor color space nowadays be taken the place by the wider gamut color spaces?
since wide gamut monitor keep publishing in the market and may be ...
2
votes
1
answer
661
views
YUV to HSV to RGB issues
As per this resource, there is an easy way to convert from YCbCr to HSV. Saturation is sqrt(Cb^2 + Cr^2). Now here is my issue. If I take pure red (1,0,0), green(0,1,0), and blue(0,0,1) colors, ...
2
votes
1
answer
45
views
Fading an object in add mode with correct color math
I have a scene rendered entirely with objects with additive blend mode. I have a value that is oscillating from 0, to 1. When it is 1 the object is supposed to be invisible, 0 should be entirely ...
2
votes
1
answer
46
views
value range in CIEXYZ space
When converting from sRGB to CIEXYZ I seem to be off by a factor of 100
I'm trying to convert from sRGB to CIELAB.
Calculation
First I need to go from sRGB to CIEXYZ. Using this formula I get i.e. ...
2
votes
0
answers
36
views
How to add HemisphereLight to a simple threejs scene?
I'm trying to add light and see its changes in a simple scene in threejs but no matter the intensity or the color I set for the light, I see no change in a scene. Actually, if I don't include the ...
2
votes
0
answers
98
views
Why do materials have both an ambient color and a diffuse color?
One of the first things I learned about computer graphics lighting (and light in general) is that when a ray of light hits a surface, the surface absorbs certain colors and the light retains the rest. ...
2
votes
0
answers
101
views
What is the CMYK color profile used by pantone.com
Pantone spot colors are specified in the RGB and CMYK color models on the https://pantone.com website. For example, the Pantone 122 spot color as it appears when printed on coated paper is specified ...
2
votes
0
answers
207
views
Calculating Luminance From Y'CbCr
I have a video feed generating a stream of of Y'CbCr frames (specifically 8-bit component Y'CbCr 4:2:0, luma range of 16-235, chroma range of 16-240) from which I'd like to calculate relative ...
2
votes
1
answer
146
views
Reddish tint with spectral renderer
I'm trying to implement a spectral path tracer and comparing results from my program with renders of the same scene done with pbrt and ...
1
vote
3
answers
3k
views
How can I draw this style of grid?
I'm trying to write code (in any language) to render this 3D grid, matching the look and colors as closely as possible:
1
vote
2
answers
1k
views
Change particular color in an image
Suppose i have a image and I want to convert the portion of image that is red to blue(or any other color). One way to do this is extract red part of image using HSV or other color values and convert ...
1
vote
2
answers
321
views
How are colors really mixed?
I'm kind of stuck on this one. When following a conventional, high-level shading tutorial, you'll come across these images that are like ambient + diffuse + specular = result, but I can tell that it's ...
1
vote
1
answer
64
views
Name and influence of style used for futuristic line patterns?
What is the name of the style of the line graphics used in the image below? The line patterns seem to envelope the shape of the woman maybe algorithmically somehow, becoming denser and yellow on the ...
1
vote
1
answer
654
views
Some questions about working in 0-255 integers instead of single precision floating point colors
I have many objects that store their color values. At the moment I'm storing them as vec4 values, that is four 4-byte values for RGBA, mainly because this is how the shader reads them. I was thinking ...
1
vote
1
answer
55
views
Colour Depth in Hardware
I hope this is the correct place to ask this question. It feels to me that I should ask people who have had to program graphics as there’s a lot of confusion about color depth in general.
I’m sure a ...
1
vote
2
answers
56
views
splitting hue & saturating and leaving value behind
In an HSV model, the Hue is the color model. So when we split the image or remove H, should we get an image without rgb colors?
Similarly, saturation is the gray shade. I read that images become more ...
1
vote
1
answer
177
views
Weird glColor3f results in framebuffer objects
The code is
glColor3f(1, 1, 1);
gluSphere(gluq, 0.2, 10, 10);
glColor3f(1, 0, 0);
glTranslatef(1, 0, 0);
gluSphere(gluq, 0.2, 10, 10);
In short, when I draw ...
1
vote
1
answer
78
views
Using the Preetham/Shirley/Smits daylight model to get practical (s)RGB values
I have implemented Preetham, Shirley, and Smits’s daylight model using Aubrey Jaffer’s Scheme implementation as a reference and confirmed that my implementation produces the same results in the xyY ...
1
vote
1
answer
385
views
How to change a RGB value using a radiance value?
I am new to this awesome community, I am currently writing a ray tracer but I hit a problem...
Let's say I have a surface(material doesn't matter) of colour [1, 0, 0] in RGB, and the radiance reaching ...
1
vote
2
answers
298
views
Can I get numeric data from a color map?
In my class I often need to work with color map images. I would show the image and try to make inferences/observations about different subjects. Often times I need to actually quantify some aspects, ...
1
vote
2
answers
228
views
Applying Phong illumination to a colored surface
The formula for Phong illumination as given on Wikipedia (see there for the variable definitions) is:
$$I_\text{p} = k_\text{a} i_\text{a} + \sum_{m\;\in\;\text{lights}} (k_\text{d} (\hat{L}_m \cdot \...
1
vote
1
answer
78
views
Is spectral response curve and spectral power distribution the same thing?
I'm reading section 5.2 of pbrt 3rd edition and came across the part where they explain the concept of RGB colors.
When we display an RGB color on a display, the spectrum that is
actually displayed ...
1
vote
1
answer
56
views
How to blend a segment of an image with another image
I want to put a segment of an image to another image. But to make it realistic I applied poisson blending. But the output is not good at all.
Output without poisson blending. The kid was cropped ...
1
vote
1
answer
405
views
Understanding material .mtl files
I am reading this piece of documentation to understand mtl files
So far I am stuck trying to understand the difference between ambient, diffuse and specular reflectivity (Ka, Kd, Ks).
If I am ...