View unanswered posts | View active topics It is currently 10 Nov 2024, 17:17



Reply to topic  [ 3 posts ] 
get color 
Author Message

Joined: 24 Jan 2009, 13:19
Posts: 2
Reply with quote
Hello all,
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 :|

Fabio


24 Jan 2009, 13:46
Profile

Joined: 13 Nov 2008, 17:50
Posts: 12
Reply with quote
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 :
  1. "Output" : Discriminate between the format of output information
  2. "Coordinates" : Discriminate between different modes to specify the position of selected pixel
  3. "(X,Y)" or "X", "Y"
The first group is composed by one parameter. This parameter is named "Output" and permit to select between three different type of output.
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,
bye


Attachments:
File comment: This patch extract (from one video stram) the color channel value of selected pixel.
Get_Color_Information.zip [6.04 KiB]
Downloaded 65785 times
25 Jan 2009, 13:43
Profile

Joined: 24 Jan 2009, 13:19
Posts: 2
Reply with quote
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?

Thank you,
Fabio


01 Feb 2009, 19:58
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.