rgb

Why is there such a difference between RGB to XYZ color conversions?

≡放荡痞女 提交于 2019-12-20 02:49:06
问题 Recently I have been trying to understand code that converts between the RGB color space and the CIE-XYZ color space, but it seems like every different calculator I try gives me radically different results. For example, trying to convert (255, 100, 70) to XYZ yields the following result, even when explicitly using d50 for everything: EasyRGB gives (46.903, 30.817, 9.270) Wolfram Alpha gives (0.7493, 0.7245, 0.6308) Bruce Lindbloom.com gives (0.493910, 0.317574, 0.070047) Java gives (0

Convert from YUV to RGB in c++ (android-ndk)

醉酒当歌 提交于 2019-12-20 02:32:12
问题 Im developing in android, and want to convert the byte-array from the camera's previewCallback, which is in YUV-format, to rgb-format. I have used the function given in this answer: Getting frames from Video Image in Android It works perfectly in java, but my problem is that I want to make the function in c++ (I'm using the ndk, and not very familiar with c++). I have tried to create the function in c++, but it always makes strange results (eg the picture is all green). Does anyone have a

vary point color based on column value for multiple data blocks gnuplot

守給你的承諾、 提交于 2019-12-20 01:40:32
问题 My question is very similar to this one, from which I was able to learn a lot. However, I am working with multiple data blocks, like this: 1 2 3 4 5 6 7 8 0 4 3 0 4 5 7 2 3 0 4 5 0 5 6 7 and I am plotting them like this: plot "file.txt" index 0 u 1:2 w points pt 1,\ "file.txt" index 1 u 1:2 w points pt 2 which creates 2 different sets of points, each a different color. Now, my goal is to modify this script so that if the 3rd data column is 0, the color of the point will become black. I would

Image does not show completely white despite it's correctly white

心不动则不痛 提交于 2019-12-19 19:57:09
问题 For a splashscreen I use an image which contains a white background (pure white - checked in Photoshop). For some reason it shows a slight green bg vs. the activity's default white bg - as marked in the screenshot. Only in some devices, like the I add this as single view in a frame layout to the activity: <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" >

how to get rgb values for a color that's close to another color?

自闭症网瘾萝莉.ら 提交于 2019-12-19 11:17:48
问题 If I have a color in RGB. How can I create a javascript function that returns true when another RGB value is close to the initial RGB and false otherwise? 回答1: I've used this and it works very well for me: // assuming that color1 and color2 are objects with r, g and b properties // and tolerance is the "distance" of colors in range 0-255 function isNeighborColor(color1, color2, tolerance) { if(tolerance == undefined) { tolerance = 32; } return Math.abs(color1.r - color2.r) <= tolerance &&

Office 2007 [and higher] interop: retrieve RGB-color

元气小坏坏 提交于 2019-12-19 10:47:08
问题 UPDATE: If you need to determine rgb-color in office document (format 2007) look at my answer below. Have: Interop.Word.dll ver.14 from VS2010 PIA, VS2010 Express Edition MS Word 2010 (ver.14) .docx-file made in mentioned Word manually without Interop. File contains several tables with colored corner cells. Purpose: To build another .docx-file with Interop contained those tables filled with gradient color based on colors in its corners. Where problem appears: I need to transform colors in

How to convert a BufferedImage to a certain colour?

大憨熊 提交于 2019-12-19 10:09:25
问题 Speicifically I have images that are all solid black on transparent. I want to assign an abritrary colour to the images when they are drawn so that the black areas are changed to the new colour. I tried using a RGBImageFilter that just returned the colour I want but something's going wrong and nothing is being drawn at all. (ColourFilter extends RGBImageFilter and just returns the set colour in it's filterRGB() method.) BufferedImage tileImage = _tiles.get( tileID ); ColourFilter cFilt = new

Using Eigen Array-of-Arrays for RGB images

女生的网名这么多〃 提交于 2019-12-19 06:41:03
问题 I'm trying to use the Eigen library for some simple image processing. I'd use Array3f for an RGB triple and an Array to hold an RGB image. This seems to work partially, and I can conveniently do component-wise addition, multiplication and division of images. But certain operations (specifically involving subtraction or negation) seem to create compile errors. Here is a minimal example: #include <Eigen/Core> using namespace Eigen; int main(void) { typedef Array<Array3f, Dynamic, Dynamic>

Aligning captured depth and rgb images

 ̄綄美尐妖づ 提交于 2019-12-19 04:45:31
问题 There has been previous questions (here, here and here) related to my question, however my question has a different aspect to it, which I have not seen in any of the previously asked questions. I have acquired a dataset for my research using Kinect Depth sensor. This dataset is in the format of .png images for both depth and rgb stream at a specific instant. To give you more idea below are the frames: EDIT: I am adding the edge detection output here. Sobel Edge detection output for: RGB Image

Getting RGB values for each pixel from a raw image in C

血红的双手。 提交于 2019-12-19 03:14:55
问题 I want to read the RGB values for each pixel from a raw image. Can someone tell me how to achieve this? Thanks for help! the format of my raw image is .CR2 which come from camera. 回答1: Assuming the image is w * h pixels, and stored in true "packed" RGB format with no alpha component, each pixel will require three bytes. In memory, the first line of the image might be represented in awesome ASCII graphics like this: R0 G0 B0 R1 G1 B1 R2 G2 B2 ... R(w-1) G(w-1) B(w-1) Here, each R n G n and B n