Draw over VideoCaptureElement

Mar 4, 2012 at 1:59 PM

I'm using VideoCaptureElement to show video and to take frames to detect faces in the video, I need to draw rectangles around the faces in this video...

I tried to draw over the frame that come from "NewVideoSample" event but it's readonly !!

how can I do that...

thanks in advance.

Mar 16, 2012 at 2:27 PM

you can put VideoCaptureElement in canvas and draw in that canvas like this

<Canvas Grid.Column="1" Grid.Row="1" Background="Red" >

            <MediaKit:VideoCaptureElement Name="videoCaptureElement" Canvas.Left="50" Canvas.Right="50"  Width="300" Height="300"/>
            <Line Canvas.Top="50" Canvas.Right="50" X2="100" Y2="100" Fill="Black"  />
            <Rectangle Canvas.Top="50" Canvas.Left="50" Width="100" Height="100" Fill="Black" />