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
1 answer

How to create a new image from the Y channel of 1 image, and the U,V channels of another image?

I have two images, content and generated. I want to create a new image with the Y channel of generated and the U and V channels of content. With PIL, I think that I should be able to use .convert('YCbCr') to convert my RGB input images to YUV. Then…
ProGamerGov
  • 870
  • 1
  • 10
  • 23
1
vote
1 answer

LAB to RGB using Lcms2 gives odd result

I am doing a project where I need to do lab->rgb. I am using a color management library called lcms2, link: https://github.com/mm2/Little-CMS My project is in c#, I use interop to communicate with the dll. The project will have to run on linux…
Nattfrosten
  • 1,999
  • 4
  • 16
  • 21
1
vote
2 answers

List of all RGB combination (Python)

I want to make a list of lists. These lists must contain all the combination (16 milion) of RGB palette. Something like this: all_colours = [[0,0,0],[0,0,1],[0,0,2],[0,0,3] ... [255,255,253],[255,255,254],[255,255,255]] How can I achieve this…
lucians
  • 2,239
  • 5
  • 36
  • 64
1
vote
2 answers

map grayscale values to RGB values in image

Let us consider a grayscale value with values in the range of [0, 255]. How can we efficiently map each value to a RGB value? So far, I have come up with the following implementation: # function for colorizing a label image: def…
Majid Azimi
  • 907
  • 1
  • 11
  • 29
1
vote
0 answers

Diiferent rgb value between Android and Photoshop?

I have a jpg format picture: And I want to extract the rgb value from every pixel , but I found that the values are diiferent from Android and Photoshop . Like the first pixel(x=0,y=0) , the rgb value which androidTest got is 216,231,238 while…
JDChi
  • 240
  • 3
  • 18
1
vote
1 answer

Save multiple PNG from RGB data frame in R

I have a data frame which looks like below. I want to save two png files out of this data frame, named based on sample column, 1.png and 2.png both being 2x3 pixel large using the rgb values on respective columns. As far as I can tell, I need to…
Alper Yilmaz
  • 319
  • 2
  • 11
1
vote
1 answer

When processing an image, it gets weird colors in GTK

Hello people from stackoverflow, what I want to do is to process an image with a transformation pixel by pixel to make it darker. The idea is really simple, I have to do something like this: R *= factor G *= factor B *= factor Where "factor" is a…
Agustín
  • 23
  • 4
1
vote
0 answers

Align depth/point cloud to RGB scene

I have a setup of a hybrid stereo system. One camera is 3D ToF from which I can export depth map or greyscale point cloud and the other camera is PI V2 RGB camera. I have done stereoCalibration using Matlab stereo calib tool. How can I estimate a…
Kuchx
  • 21
  • 3
1
vote
2 answers

Python: Perform Grey Image to RGB

I have a grey image and I want to convert it into RGB. How will I do it in OpenCV? image = cv2.imread("image.jpg", cv2.IMREAD_GRAYSCALE) cv2.imshow('Grey Scale Image', image) cv2.waitKey() backtorgb =…
alyssaeliyah
  • 2,214
  • 6
  • 33
  • 80
1
vote
1 answer

hexa string array editting in php

I am trying to get RGB-values to a tablet from my website. The tablet only accepts SICP commands. Currently I am using netcat to establish connection like this: $cmd = 'echo -n -e "\x09\x01\x00\xf3\x01\xff\x80\x00'.$checksum.'" | nc '.$ip.'…
Polpo
  • 85
  • 6
1
vote
4 answers

Python -- change the RGB values of the image and save as a image

I can read every pixel' RGB of the image already, but I don't know how to change the values of RGB to a half and save as a image.Thank you in advance. from PIL import * def half_pixel(jpg): im=Image.open(jpg) img=im.load() print(im.size) …
lwf
  • 85
  • 2
  • 2
  • 6
1
vote
1 answer

How can i detect silver pixels in an image?

I'm trying to detect all the pixels with silver colors in my image. I tried to convert the image from RGB to HSV but I saw that every silver pixel is very different from another and therefore we couldn't identify all the silver pixels. I'm trying…
1
vote
1 answer

convert BGR to Lab without OpenCV

With little experience in color spaces, I used the following code to convert BGR image (array of unsigned characters where each channel ranges from 0 to 255) to lab color space: double F(double input) // function f(...), which is used for defining…
Hanaa Ibrahim
  • 35
  • 1
  • 6
1
vote
1 answer

How can I make the cell colour RGB value change based on cell's value? (in Excel)

I'm new to VBA and have tried the below which doesn't work. Could you help me fix it. I'm trying to make each cell have a different RGB colour based on it's value: Sub ColorCells() Dim rwIndex As Integer Dim colIndex As Integer Dim r As…
emma frost
  • 19
  • 1
1
vote
1 answer

How can I use openimageIO to store RGB values in arrays? (using C++, OpenGL)

I am using openimageIO to read and display an image from a JPG file, and I now need to store the RGB values in arrays so that I can manipulate and re-display them later. I want to do something like this: for (int i=0; i
elan95
  • 9
  • 3