color-space

Function for creating color wheels

This is something I've pseudo-solved many times and never quite found a solution that's stuck with me. The problem is to come up with a way to generate N colors that are as distinguishable as possible where N is a parameter....

BGR Color Space

I understand RGB --- value (0-255)Red,(0-255)Green,(0-255)Blue to form a color. What is exactly BGR color space ? How is it different from RGB color space ? ...

How to set icc color profile in Java and change colorspace

First, I would like to say I'm not an image processing specialist. I would like to convert image colorspace from one to another, and change icc color profile at the same time. I managed to do it using JMagick (the ImageMagick Java port), but no way in pure Java (even using JAI). ...

Generate unique colours

I want to draw some data into a texture: many items in a row. They aren't created in order, and they may all be different sizes (think of a memory heap). Each data item is a small rectangle and I want to be able to distinguish them apart, so I'd like each of them to have a unique colour. Now I could just use rand() to generate RGB value...

How to isolate a single color in an image

I'm using the python OpenCV bindings and at the moment I try to isolate a colorrange. That means I want to filter out everything that is not reddish. I tried to take only the red color channel but this includes the white spaces in the Image too. What is a good way to do that? ...

How do I convert RGB into HSV in Cocoa Touch?

I want to set the background color of a label using HSV instead of RGB. How do I implement this into code? Code: //.m file #import "IBAppDelegate.h" @implementation IBAppDelegate @synthesize label; { self.label.backgroundColor = [UIColor colorWithRed:1.0f green:0.8f ...

Simulate Photoshop's saturation changes in Imagemagick

In Photoshop you can adjust the hue, saturation and lightness of an image with three sliders. ImageMagick you can modulate the brightness, saturation, and hue. Minimizing the saturation correctly produces a black and white image in both programs. Maxing out the saturation appears close, but ImageMagick appears to soften some of the blo...

How to read and modify the colorspace of an image in c#

I'm loading a Bitmap from a jpg file. If the image is not 24bit RGB, I'd like to convert it. The conversion should be fairly fast. The images I'm loading are up to huge (9000*9000 pixel with a compressed size of 40-50MB). How can this be done? Btw: I don't want to use any external libraries if possible. But if you know of an open sourc...

Converting JPEG colorspace (Adobe RGB to sRGB) on Windows (.Net)

I need to generate thumbnail and medium sized images from large photos. These smaller photos are for display in an online gallery. Many of the photographers are submitting JPEG images using Adobe RGB. I would like to use sRGB for all thumbnails and medium size images I am using dotnet (asp.net) and need a way to convert from Adobe RG...

Is there an algorithm for color mixing that works like mixing real colors?

The common mixing of RGB colors is very different from mixing colors for paintings, it's mixing of light instead mixing of pigments. For example: Blue (0,0,255) + Yellow (255,255,0) = Grey (128,128,128) (It should be Blue + Yellow = Green) Is there any known algorithm for color mixing that works like mixing real colors? I've alread...

CMYK + CMYK = ? CMYK / 2 = ?

Suppose there are two colors defined in CMYK: color1 = 30, 40, 50, 60 color2 = 50, 60, 70, 80 If they were to be printed what values would the resulting color have? color_new = min(cyan1 + cyan2, 100), min(magenta1 + magenta2, 100), min(yellow1 + yellow2, 100), min(black1 + black2, 100)? Suppose there is a color defined in CMYK: ...

convert rgb 2 black & white in opencv

i need to know the function that convert RGB image into black &white(binary image) & i need to know if i can save modified image after conversion on hard disk if so what's this function? ...

How to get OpenGL to display NV12 texture in Cocoa

I have a YUV:420 (aka NV12) frame data, how can I get OpenGL to recognize its format for glTexImage2D() rendering. I realize that I might have to perform colorspace transformation, but is there a way that I can tell openGl to command the graphic hardware to perform the colorspace transformation? ...

OpenGL Colorspace Conversion

Does anyone know how to create a texture with a YUV colorspace so that we can get hardware based YUV to RGB colorspace conversion without having to use a fragment shader? I'm using an NVidia 9400 and I don't see an obvious GL extension that seems to do the trick. I've found examples how to use a fragment shader, but the project I'm wor...

Adobe Color Profiles/Color Spaces, how is it possible that this works?

I'm learning about Color Profiles/Color Spaces/Monitor Color Management Profiles and I was just wondering how any of that justified considering the fact that I could throw the entire color anything off by adjusting the brightness and contrast of my monitor? Additionally there are things like lighting in the place where your monitor resi...

Need help creating ICC based CMYK colorspace on iPhone

I'm a newbie with iPhone programming, and I'm trying to create a custom ICC colorspace to create colors in. The "DeviceCMYK" is not accurate enough, so I need the ICC colorspace. I can't figure out how to get it to work... I've tried with 4 different version of CMYK profiles, but none seem to work. I've even tested by using the "Device...

Using CMYK colorspace in PCL XL, possible?

Is it possible to use PCL XL to print CMYK composite halftone (1-bit) data? Or do I have to somehow convert it to 8bit RGB data? ...

CIELab Colorspace conversion

Is there a canonical colorspace conversion library? I can't find any pre-existing solutions. Is CIELab conversion is too obscure? ...

Why does UIImageView "darken"/saturate PNG images, and can I stop it?

I have a PNG file in a UIImageView, and next to that I have an EAGLView which displays the continuation of that same image (long story) as a texture, carved from the same original PNG. The point is, that these images, which should match up flawlessly, actually have somewhat differing color saturation. Normally I'd blame my handling of t...

iPhone: CMYK Supported Pixel Formats woes

I am trying to create a image sized 1X1 in CMYK color space. as first step I am creating bitmapContext as CGColorSpaceRef cmykcolorSpace = CGColorSpaceCreateDeviceCMYK(); CGContextRef currentcontext = CGBitmapContextCreate(NULL, 1, 1, 8, //bitsPerComponent 4, // bytesPerRow cmykcolorSpa...