rgb

Integer array or struct array - which is better?

安稳与你 提交于 2019-12-10 13:43:44
问题 In my app, I'm storing Bitmap data in a two-dimensional integer array ( int[,] ). To access the R, G and B values I use something like this: // read: int i = _data[x, y]; byte B = (byte)(i >> 0); byte G = (byte)(i >> 8); byte R = (byte)(i >> 16); // write: _data[x, y] = BitConverter.ToInt32(new byte[] { B, G, R, 0 }, 0); I'm using integer arrays instead of an actual System.Drawing.Bitmap because my app runs on Windows Mobile devices where the memory available for creating bitmaps is severely

C, GTK: display stream of RGB images at < 60 fps

末鹿安然 提交于 2019-12-10 13:16:36
问题 I'm developing an application that shall receive images from a camera device and display them in a GTK window. The camera delivers raw RGB images (3 bytes per pixel, no alpha channel, fixed size) at a varying frame rate (1-50 fps). I've already done all that hardware stuff and now have a callback function that gets called with every new image captured by the camera. What is the easyest but fast enough way to display those images in my window? Here's what I already tried: using gdk_draw_rgb

Converting RGB images to grayscale

孤者浪人 提交于 2019-12-10 12:26:56
问题 I'm new on programming. I'm a student in a univesity. Is it possible to use visual studio for converting RGB images to grayscale with C#? There is a specific folder that includes RGB jpeg images and every day it has new jpg files too. I need to make an exe file for converting them to grayscale. Do I have to install new libraries for this work or are standard libraries of VS2013 enough for this? 回答1: The standard libraries are enough. I once used this code: public static Bitmap GrauwertBild

How to add colors to every point in gnuplot from inside the point file

自作多情 提交于 2019-12-10 10:38:40
问题 Reading this and this answer I understood that changing the colours of every point is possible, but: it has to be defined using set palette model RGB defined () , hence if I want 100 different colours I will have to define all of them the colour of the point is specified just before it is drawn. My question is, is there a way to avoid all of the above, for example modify my data file as follows: x y z R G B 1 2 3 0 255 255 5 6 2 255 0 0 And have the according point drawn with the specified

anyone know 10-bit raw rgb? about omnivision

房东的猫 提交于 2019-12-10 10:13:33
问题 i'm using Omnivision ov5620 http://electronics123.net/amazon/datasheet/OV5620_CLCC_DS%20(1.3).pdf this is datasheet. than, you can see the Output Format 10-bit digital RGB Raw data. first, i know RGB raw data is bayer array. so, 10-bit RGB mean each channel of 1024 scale? range is 0~1023? or 8-bit RGB each channel and four-LSB[2:0] is new fifth pixel data? please refer the image which is correct? 回答1: They pack every four adjacent 10-bit pixels (0..1023) of the line into 5 sequential bytes,

Matlab paint an excel cell

时光总嘲笑我的痴心妄想 提交于 2019-12-10 09:26:40
问题 can someone help me please in painting an excel cell through rgb in matlab? I want that the 10th cell will painted by rgb. values{1}(1,:) = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '10'}; headers = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'}; xlswrite('example.xls', [headers; values{1}]); thank you a lot :] 回答1: You can color cells in an existing file with a procedure like this: values = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '10'}; headers = {'A', 'B', 'C', 'D', 'E', 'F',

Alpha blending a red, blue, and green image to produce an image tinted to any rgb value?

坚强是说给别人听的谎言 提交于 2019-12-10 00:03:21
问题 Basically, I have a context where I can't programatically tint an image, though I can change it's alpha value. With some experimentation, I've found that I can layer a red, blue, and green version of the image, with specific alpha values, to produce a wide range of colors. However, I am wondering if it's possible to achieve a true RGB representation through this method? If so, what is the formula for converting an RGB value into different alpha values for the red, blue, and green layers. 回答1:

How can I convert between RGB565 and RGB24 image formats in MATLAB?

自作多情 提交于 2019-12-09 17:00:45
问题 I am getting an RGB matrix from a microprocessor that outputs an image in RGB565 format. I want to read this into MATLAB, convert it to RGB24 format, and output the image. How do I do this? 回答1: You first have to read your data from the text file into a matrix in MATLAB. Since I don't know what format your text file is in, I can only suggest that you will probably need to use the function fscanf to read in all of your values (probably of type uint16), then you will likely have to reshape the

Help with the theory behind a pixelate algorithm?

假如想象 提交于 2019-12-09 13:15:51
问题 So say I have an image that I want to "pixelate". I want this sharp image represented by a grid of, say, 100 x 100 squares. So if the original photo is 500 px X 500 px, each square is 5 px X 5 px. So each square would have a color corresponding to the 5 px X 5 px group of pixels it swaps in for... How do I figure out what this one color, which is best representative of the stuff it covers, is? Do I just take the R G and B numbers for each of the 25 pixels and average them? Or is there some

Correct Pixel Processing Logic for DICOM JPEG(RGB) for Applying Window Width and Level Filter

本秂侑毒 提交于 2019-12-09 07:44:53
问题 I am trying to apply widow width and level filter to JPEG Image which I extracted from DICOM file. Here is logic I use to process Each Channel of RGB Image fore example I manipulate Red Channel Like below code in Render-Script in android Example code where I shown how I manipulate Red Channel of Image. (I do same for Green and Blue Channels) It does manipulate the JPEG Image Widow Width and Level but not sure if its correct way to manipulate DICOM JPEGS if some body know correct way to