View unanswered posts | View active topics It is currently 29 Mar 2024, 01:35



Reply to topic  [ 2 posts ] 
Alpha channel 
Author Message

Joined: 12 Jan 2009, 23:13
Posts: 6
Reply with quote
Hi everybody!
I've got a problem with alpha cannel. I have a video and i would use it like an alpha mask but the only block i found is "alpha blend" that works only with images.
Any suggestions?


12 Jan 2009, 23:19
Profile

Joined: 13 Nov 2008, 17:50
Posts: 12
Reply with quote
Hi,

currently the block operating on alpha channels are :
  • ImageSetAlpha : This block set a BW image as alpha channel of another image
  • ExtractChannel : This block is extract one channel as a single BW image (when the channel number is set to 3 and the input image have an alpha channel the alpha channel is extracted)
  • ComposeChannels : This block compose one image starting from its channels (the fourth input is the alpha channel if the image format support it)
  • PictureInPicture : This block is able to merge to images (one as foreground and the other as background) using a third image as alpha mask
you have two way to use a video (or a single image) as alpha mask :
  1. Use the block of tridimensional catalog (ImageAndVideo.Processing.ImageSetAlpha used in conjunction with ImageAndVideo.3DRendering.Generator.Obj3DGenerator and other ImageAndVideo.3DRendering blocks);
  2. Use the Picture in Picture Block (ImageAndVideo.Effects.PictureInPicture).
With the first way the masking operation is computed by the GPU leaving the CPU free to make other computations. But the result of this operation is a tridimensional object with the image applayed as texture and can only be displayed on the screen using the tridimensiona space display (is not possible to save as bitmap or video file).
Attached to this replay you find a tutorial patch named "AlphaMask3DDisplay.eywx" explaining all the operation needed to make an alpha masked video using the tridimensional catalog blocks.

With the second way the masking is done by the CPU and the result is an eyesweb image (you can display and save as bitmap or video file).
Attached to this replay you find another tutorial patch named "AlphaMaskPIP.eywx" explaining all the operation needed to make an alpha masked video using the PictureInPicture block.

The ExtractChannel and ComposeChannels blocks are ignored because the PictureInPicture and ImageSetAlpha block perform the same operation (only on alpha channel) in a optimized way.

:!: Only a note : The first solution (ImageSetAlpha and block of tridimensional catalog) transfer a lot of data between CPU and GPU. The second solution (PictureInPicture) make heavy computations on the images. So, if you want to process in realtime high resolution video, a PC system with very high computational power is required. If you do not want to make realtime processing, or you use low resolution video, a PC with medium computational power is able to do this work.

Feel free to make any other questions,
bye


Attachments:
File comment: This archive contains the two "Alpha masked video" patches realized using the first and second solution written in the related reply.
alphaMaskVideo.zip [20.34 KiB]
Downloaded 1023 times
22 Jan 2009, 03:59
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: Google [Bot] and 36 guests


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.