|EyesWeb XMI Forum
|Page 1 of 1|
|Author:||fray [ 24 Jan 2009, 13:46 ]|
|Post subject:||get color|
I'm neewbes user of EyesWeb. I been trying to read out rgb code from a video input (streaming or from a file) with get color patch or get pixel, but I'm not able to get information I need. Can anyone help me?
Sorry for my english
|Author:||alessandro [ 25 Jan 2009, 13:43 ]|
|Post subject:||Re: get color|
The ImageAndVideo.Processing.GetPixel block extracts from input image the color components of one pixel. The pixel is selected by its (X,Y) cartesian coordinates.
This block can have tree or four parameters, but can be collapsed into three different groups :
When you selected "RGB color and alpha value (RGB + double)" the block output two values. The first output is the RGB color of the selected pixel also If the input image use a different color model (the pixel color is converted to RGB). The second output is the alpha channel value of the same pixel. The alpha value is normalized to the (0,1) range.
When you select "Normalized channels values (double)" the block output four values, one for each possible color channels. For "possible color channels" i mean that the maximum number of color channels is four, so if the input image format as four channel all the outputs are effectively used otherwise only the channel supported from the input image color model are effectively used. No color model conversion is done, if the input image is YUV you get Y on channel 0, U on channel 1 and V on channel 3. The values given as output are normalized into the (0,1) range.
When you select "Channels values (integer)" you get the same output vales of previous type but this values are integer and not normalized. As example if the input image is YUV and use 8 bit pixel model you get Y on channel 0, U on channel 1 and V on channel 3 and the values stay in (0,255) range. If use the 16 bit pixel model the values stay in (0,65535) range.
The second group of parameter is composed by the "Coordinates" parameter. With this parameter you can select different properties related with the coordinates of selected pixel.
You can select to provide the X, Y coordinates twogether using a bidimensional value or separated using one monodimensional value for X and another monodimensional value for Y.
When you select "integer" type of values the range of X coordinate is (0, width of input image) and the range of Y coordinate is (0, height of input image). Otherwise if you select "double" type of values the range is (0,1). The coordinate system is allways cartesian.
The third group of parameter refers to the coordinates of selected pixels.
When the pixel is selected using bidimensional value only one parameter Is present. This parameter is named "position" and specify the position of selected pixel using a single bidimensional (X,Y) value.
Otherwise two parameters are present. The first parameter is "X" and is used to specify the X coordinate of selected pixel. The second is named "Y" and is used to provide the Y coordinate of the selected pixel.
Attached to this reply you found a tutorial patch. This patch extract (from one video stram) the color channel value of selected pixel.
The video used to test this path is not attached to this reply. You can use any video file supported by eyesweb video player block.
Feel free to make any other questions,
|Author:||fray [ 01 Feb 2009, 19:58 ]|
|Post subject:||Re: get color|
Alessandro, thanks a lot!
I try with a static image and video stream. works very well!!!
Now I try to subtract the background with Brightness.Chromaticity.Distortion_1 which eliminate static parts of video stream before GetPixel_1 patch.
Can I convert in a RGB color video stream the output image from Brightness.Chromaticity.Distortion_1 patch?
I try with ImageConversion, bitonalToGray -->grayToColor but I can't do it.
How I can do it?
|Page 1 of 1||All times are UTC + 1 hour [ DST ]|
|Powered by phpBB® Forum Software © phpBB Group