rgb

Convert RGB to light frequency

南笙酒味 提交于 2019-12-19 02:55:13
问题 Is it possible to obtain the light frequency of a colour from a RGB representation? I've found the opposite process [1] but I don't know if it's possible this way. [1] http://www.fourmilab.ch/documents/specrend/ 回答1: AFAIK, there is no direct answer because multiple wavelengths can combine to give the same color right? So you have the wavelengths that map to pure colors and then their combinations can give many other and the same colors. And there are several combinations that can give the

Is there any client-side technology able to convert sRGB to CMYK through an ICC color profile?

百般思念 提交于 2019-12-18 20:01:19
问题 Is there any technology available in a browser (client-side) able to convert sRGB colors to CMYK and vice versa using a specified ICC color profile? I'm currently using a hidden Java applet for the conversions (Java has a built-in class for this), but I'm trying to find an alternative, since java applets are slow and outdated. SVG would be ideal if browsers supported ICC colors in SVG, but no-one does. Flash or Silverlight would also be good, but I can't find anything relevant. 回答1: Am I

How to pull out the ARGB component from BitmapContext on iPhone?

浪尽此生 提交于 2019-12-18 13:54:18
问题 I'm trying to get ARGB components from CGBitmapContext with the following codes: -(id) initWithImage: (UIImage*) image //create BitmapContext with UIImage and use 'pixelData' as the pointer { CGContextRef context = NULL; CGColorSpaceRef colorSpace; int bitmapByteCount; int bitmapBytesPerRow; bitmapBytesPerRow = (image.size.width * 4); bitmapByteCount = (bitmapBytesPerRow * image.size.height); colorSpace = CGColorSpaceCreateDeviceRGB(); pixelData = malloc( bitmapByteCount ); //unsigned char*

Create image from RGB data?

元气小坏坏 提交于 2019-12-18 12:37:15
问题 I'm having real trouble with this. I have some raw rgb data, values from 0 to 255, and want to display it as an image on the iphone but can't find out how to do it. Can anyone help? I think i might need to use CGImageCreate but just don't get it. Tried looking at the class reference and am feeling quite stuck. All I want is a 10x10 greyscale image generated from some calculations and if there is an easy way to create a png or something that would be great. 回答1: a terribly primitive example,

Lossless RGB to Y'CbCr transformation

蹲街弑〆低调 提交于 2019-12-18 11:57:21
问题 I am trying to losslessly compress an image, and in order to take advantage of regularities, I want to convert the image from RGB to Y'CbCr. (The exact details of what I mean by RGB and Y'CbCr are not important here; the RGB data consists of three bytes, and I have three bytes to store the result in.) The conversion process itself is pretty straightforward, but there is one problem: although the transformation is mathematically invertible, in practice there will be rounding errors. Of course

Lossless RGB to Y'CbCr transformation

ε祈祈猫儿з 提交于 2019-12-18 11:57:01
问题 I am trying to losslessly compress an image, and in order to take advantage of regularities, I want to convert the image from RGB to Y'CbCr. (The exact details of what I mean by RGB and Y'CbCr are not important here; the RGB data consists of three bytes, and I have three bytes to store the result in.) The conversion process itself is pretty straightforward, but there is one problem: although the transformation is mathematically invertible, in practice there will be rounding errors. Of course

Converting Bitmap in memory to Bitmap with Bitmap.Config.RGB_565

白昼怎懂夜的黑 提交于 2019-12-18 11:25:51
问题 I have a loaded Bitmap which I would like to convert to set the config to Bitmap.Config.RGB_565 . Is there a simple way of converting a Bitmap to this configuration after the Bitmap is already loaded into memory? For example, below I have a bitmap being decoded from the application resources, however, how would I convert an already loaded Bitmap to RGB_565 ? I'm sure it's something simple, however, I'm fairly new to working with Bitmaps and after a few hours of looking online, unfortunately I

Convert Android camera2 api YUV_420_888 to RGB

拜拜、爱过 提交于 2019-12-18 11:25:42
问题 I am writing an app that takes the camera feed, converts it to rgb, in order to do some processing. It works fine on the old camera implementation which uses NV21 Yuv format. The issue I am having is with the new Yuv format, YUV_420_888. The image is no longer converted correctly to RGB in the new Camera2 Api which sends YUV_420_888 yuv format instead of NV21 (YUV_420_SP) format. Can someone please tell me how should I convert YUV_420_888 to RGB? Thanks 回答1: In my approach I use OpenCV Mat

how to plot rgb color histogram of image with objective c

和自甴很熟 提交于 2019-12-18 09:46:22
问题 i want to show image RGB colour histogram in cocoa application. Please suggest possible way to do it with objective c or any third party library available to achieve this. 回答1: well this is a problem as RGB colors are 3D space so their histogram would lead to 4D plot which is something we do not really comprehend. So the solution to this is to convert the 4D plot to 3D plot somehow. This can be done by sorting the colors by something that has some meaning. I will not speculate and describe

Get RGB pixels from input image and reconstruct an output image in opencv

房东的猫 提交于 2019-12-18 09:45:41
问题 I want to load the image in opencv and split the image into channels(RGB) and i want to increase any one of the colors and getting that corresponding output image.is there any easiest way to do this problem? 回答1: Well to add any scalar to an RGB image you can use cvAddS(srcImage, scalarToAdd, dstImage). Here is an example: int main(int argc, char** argv) { // Create a named window with the name of the file. cvNamedWindow( argv[1], 1 ); // Load the image from the given file name. IplImage* img