Questions tagged [rgb]

RGB stands for Red-Green-Blue and specifies a color using three values, which represent the respective amount of red, green, and blue in the color. RGB is the basis for the color model used by most color display devices nowadays.

The RGB color model is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors. The name of the model comes from the initials of the three additive primary colors, red, green, and blue. RGB is a color notation used in most computing devices nowadays.

RGB colors are represented by a tuple of three values (one per primary color), which are typically either bytes ranging from 0 to 255 or floating-point values ranging from 0.0 to 1.0.

3547 questions
1
vote
2 answers

FFMPEG: Decode video in h264rgb/libx264rgb error

I did a small program to encode raw images in h264rgb codec with ffmpeg. I use this codec because I needed to encode lossless rgb images (not possible with the classic h264 codec). But now, I have a problem. I'm not able to decode the video…
Furan
  • 21
  • 6
1
vote
1 answer

different ways to convert RGB2GRAY

I had a job interview recently about image processing stuff, in that interview they had a question about convert RGB space to Gray Space(it's an easy question in first thought) so I answered: we can performed this task by using below equation: Gray…
Saeed Masoomi
  • 1,703
  • 1
  • 19
  • 33
1
vote
1 answer

Setting A Form's backColor to a ARGB value

I've been working on a simple HEX to RGB (and vise versa) translator. Essentially the user can input the HEX value as a string and the textbox above will display the conversion. In addition to this, I would like the background of the form to change…
Luke Isitt
  • 103
  • 9
1
vote
1 answer

Converting RGB into LMS model using C++ and OpenCV

I'm trying to convert image with RGB colorspace into LMS model. The transformation matrix value I got from this paper. I read this Question : RGB to LMS color space conversion with OpenCV, we referred to the same paper and I already followed all the…
raisa_
  • 594
  • 2
  • 10
  • 28
1
vote
0 answers

How to export RGB data in UIImage?

I want to get byte (UInt8) array in UIImage. I think array size is width * height * 3 (because of R,G,B information) but most of this topic is using RGBA(not a RGB) so multiply 4. This is my question. What is difference between RGB and RGBA? I just…
cslee92
  • 93
  • 1
  • 1
  • 9
1
vote
1 answer

parse RGB values from a string with php

Is there a way to parse multiple RGB values from a string? In what way should the colours be coded? Eg. $string = "foobar [rgb:123abc] some other text and another color: [rgb:ffeecc]" I want [rgb:xxxxxx] to be replaced with something like
hnh
  • 13
  • 2
1
vote
1 answer

Best way to handle multiple checks ruby

So I'm trying to write a converter for HSL to RGB (and eventually into hex) I'm following this colorspace conversion theory and I seem to be stuck on step 6 Now we need to do up to 3 tests to select the correct formula for each color channel.…
1
vote
2 answers

JavaScript check if array contains modified values, count unique pixels in an image

var image = new SimpleImage("lena.png"); var col = []; var uniqcol = []; for (var px of image.values()){ col.push([px.getRed,px.getGreen,px.getBlue]); if(uniqcol.includes([px.getRed +- 1, px.getGreen +- 1, px.getBlue +- 1])…
Tom S
  • 57
  • 5
1
vote
2 answers

Swap RGB channel color using OpenCV C++

Naive question, I'm working with color processing for the first time. I want to swap RGB channel from Mat image. What I'm trying to do create another image from the original image and assign the R and G value as R. And then on another image, assign…
raisa_
  • 594
  • 2
  • 10
  • 28
1
vote
1 answer

How to Plot Image Log-Chromaticity Plot in Python OpenCV

I am trying to create a 2D log chromaticity plot in python with OpenCV. The same question was asked here How to compute 2D log-chromaticity? but it was never answered. (ASIDE: A guess was made that the axes must be log instead of linear, but this is…
adam.hendry
  • 4,458
  • 5
  • 24
  • 51
1
vote
3 answers

Java beginner: convert an image to a binary array

this is what I've gone so far and I can't seem to go further because I don't understand bitwise operations on the RGB // Read from a file File file = new File("src/a.gif"); image = ImageO.read(file); int[] rgbarr = image.getRGB(0, 0, 13, 15, null,…
Ismail Marmoush
  • 13,140
  • 25
  • 80
  • 114
1
vote
1 answer

Why we use a complex equation when do convert RGB to YCBCR instead of a simple one?

When I do implement RGB2YCBCR on verilog. I saw several ways to convert RGB to YCBCR. Some of it are very simple. But others are quite complex. For example, if we use y = (r >> 2) + (g >> 1) + (b >> 2); it is very easy to implement to hardware But…
1
vote
1 answer

How to get the RGB matrix from an image?

how to create matrix R,G,B from image in openCv . matSrcBRG is Mat variable . and my image is img_about try { matSrcBGR = Utils.loadResource(context, R.raw.img_about); } catch (IOException e) { e.printStackTrace(); …
saeedmpt
  • 144
  • 1
  • 7
1
vote
0 answers

How to create a list of colors for perlin-noise (2d)?

So I have a function, make-noise that gets the coordinates of a pixel and creates on that position the noise value. Now I want to create a map with four colors. Blue for water, yellow for sand, green for grass and grey for mountains... The generated…
Nime
  • 173
  • 1
  • 14
1
vote
1 answer

How to get the Color of a specific pixel of an Image? - Java

Is it possible to get the Color of a specific pixel of an Image? I know how to get it from a BufferedImage: Color color = new Color(bufferedImage.getRGB(x, y)); But that doesn't work with a java.awt.Image that looks for example like this: Image…
user8491933