the difference in color and light between parts of an image
Questions tagged [contrast]
281 questions
8
votes
2 answers
Converting Images to Black and White for Image Recognition in R
I'm trying to gain some experience with automatic text recognition and i'm using the package tesseract to perform ocr on some images (i.e. some screenshots I took).
To improve the performance of my program's recognition of the prices in the image…

Francesco Dal Pont
- 179
- 1
- 7
8
votes
2 answers
AA Level Accessibility - Colour Contrast boosted using text shadow
I have a site that I'm coding to WCAG 2.0 AA Level compliance and one of the buttons has a colour contrast that does not pass.
Background - #D57405
Foreground - #FFF
Is it possible to use text-shadow to boost the contrast – would that be seen as a…

Brent Dayman
- 83
- 1
- 7
8
votes
3 answers
How can I adjust contrast in OpenCV in C?
I'm just trying to adjust contrast/ brightness in an image in gray scale to highlight whites in that image with Opencv in C. How can I do that? is there any function that makes this task in opencv?
Original image:
Modified image:
Thanks in…

edsonlp1
- 453
- 2
- 9
- 22
7
votes
2 answers
Faster contrast algorithm for a bitmap
I have a tool with trackbar slider controls used to adjust an image's brightness, contrast, gamma, etc.
I am trying to get real-time updates to my image while the user drags the slider. The brightness and gamma algorithms are an acceptable speed…

Trevor Elliott
- 11,292
- 11
- 63
- 102
7
votes
1 answer
contrast enhancement of an image using neighbourhoood
Hi I want to enhance the contrast of an image using the neighbourhood pixel values.
Let the image be considered as u0. Then I want to enhance the image by using the formula
Here, M1 is the minima and M2 is the maxima of u0 among the neighbourhood…

roni
- 1,443
- 3
- 28
- 49
7
votes
1 answer
Default CSS filter values for brightness and contrast
Recently I've updated Chrome to v.26 and pictures which were displayed using HTML5 canvas were not visible anymore. As I found I had to change to brightness and contrast.
How are the values for BC for CSS filters different depending on the browser…

Jacob
- 3,580
- 22
- 82
- 146
7
votes
2 answers
Balancing contrast and brightness between stitched images
I'm working on an image stitching project, and I understand there's different approaches on dealing with contrast and brightness of an image. I could of course deal with this issue before I even stitched the image, but yet the result is not as…

JavaCake
- 4,075
- 14
- 62
- 125
6
votes
1 answer
Automatically contrasting text color based on background image color
I'm looking for a way to change the color of text to either #000 or #fff depending on the main color of a background image within a div called "banner". The background images are chosen at random on each page so I need to be able to do this…

Justin
- 69
- 1
- 3
6
votes
1 answer
partition of anova and comparisons (orthogonal single df) in r
I want to do single df orthogonal contrast in anova (fixed or mixed model). Here is just example:
require(nlme)
data (Alfalfa)
Variety: a factor with levels Cossack, Ladak, and Ranger
Date : a factor with levels None S1 S20 O7
Block: a…

SHRram
- 4,127
- 7
- 35
- 53
6
votes
2 answers
Why does changing contrast type change row labels in R lm summary?
With the default contrasts in R (contr.treatment), the summary of a linear model object gives row names according to the level names. When I change the contrasts to contr.sum, the summary of the linear model object gives row names according to made…

Jdub
- 589
- 5
- 14
5
votes
1 answer
Is there a standard sequence for gamma, brightness & contrast corrections?
In my application I'm doing gamma, brightness and contrast corrections defined by the user. Now I was wondering whether there is a standard order of doing this or not.
It may sound trivial but I couldn't find anything regarding this. I guess it's…
user238801
5
votes
1 answer
Convert from relative luminance to HSL
Given a certain color in HSL (let's say hsl(74,64%,59%)), I want to calculate what darker shade (with the same h and s values) gives me enough contrast to satisfy W3C color contrast requirements.
There are formulas to convert HSL to RGB (for example…

Peter
- 2,874
- 2
- 31
- 42
5
votes
4 answers
Mapping a list of numeric values to colors
I have a list of numeric values. I may normalize the values if needed.
I need to transform this list to a list of colors (in HSL, RGB or any other color model — I can always do conversion later).
For any given value the color must be the same every…

Alexander Gladysh
- 39,865
- 32
- 103
- 160
5
votes
1 answer
Illumination normalization in OpenCV
I am working on a face recognition project. I have pictures with different lighting so I need to do illumination normalization. I read a paper which which claims to do illumination normalization. The paper describe the following function and values.…

Shah
- 661
- 2
- 9
- 19
4
votes
1 answer
Contrasts for lm using contrast package
I'm using contrast package to construct contrasts for lm in R. With the following code I'm making contrast between Trt1 and Trt3.
Y <- c(10, 12, 14, 16, 9, 8)
Trt <- gl(n=3, k=2, length=3*2)
Data1 <- data.frame(Y, Trt)
Data1.lm <- lm(Y~Trt, data =…

MYaseen208
- 22,666
- 37
- 165
- 309