Click here to Skip to main content
15,886,055 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi Everybody.

I'm working on something with a camera. I use DirectX.Capture and DShowNET libraries to look at my camera view into a picturebox. My problem is that i need to rotate my camera view at 270° before the view is in a correct position.

I've searched for that matter in a lot of posts but nothing. Is is someone here who has ever done it in Vb.Net or even in C# ? If yes, could you please help me to find a solution ?

Thanks for your help.
Posted
Updated 12-May-14 1:06am
v2

Brian Low and Blas5 wrote articles about the DirectX.Capture Class Library.
DirectX.Capture Class Library[^]
Capture Sample with DirectX and .NET[^]
You can maybe send them a PM about your request.
 
Share this answer
 
Comments
Olayèmi Ouabi 13-May-14 4:48am    
Thank you. I'll do that.
Here is what i've finally found. Not perfect but it helps me for a while.
References : DirectX.Capture.dll and DShowNET.dll

Public Class Prise_Image

' Just for the streaming
Dim Camera As DirectX.Capture.Filter
Dim CaptureInfo As DirectX.Capture.Capture
Dim CamContainer As DirectX.Capture.Filters = New DirectX.Capture.Filters()
Dim CaptureImage As Image

Private Sub Prise_Image_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
CaptureInfo.Stop()
End Sub

Private Sub Prise_Image_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
' Activation de la vidéo
Initialiser_Streaming_Camera()
End Sub

Private Sub Initialiser_Streaming_Camera()
Dim nb_of_cam As Integer = CamContainer.VideoInputDevices.Count
For i As Integer = 0 To nb_of_cam
Try
Camera = CamContainer.VideoInputDevices(i) 'get the video input device
CaptureInfo = New DirectX.Capture.Capture(Camera, Nothing) 'initialize the Capture using the video input device
CaptureInfo.PreviewWindow = Me.Pic_Pic 'set the input video preview window (a picturebox here)
'CaptureInfo.FrameRate = 29.997 'set the input video rate
'CaptureInfo.FrameSize = New Size(640, 480) 'set the input video size
CaptureInfo.Start()
Catch ex As Exception
End Try
Next
End Sub

End Class
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900