 |
|
 |
Thank you very much for such a great work
|
|
|
|
 |
|
 |
hi Mr.hpAng
i am Morteza
i wanna take image by DirectX in C#.
i'd be very grateful, if you can help me.
best regards
Morteza Fakoorrad
|
|
|
|
 |
|
 |
This topic is very useful
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Excellent. Great project.
|
|
|
|
 |
|
 |
i need just one image .jpg when i click on the button (left side name: bttuon1)
i dont want callback becasue it saving one frame every second.
public void GrapImg()
i want one picture frame .jpg when i click on button.
can u help me thanks!!!
nicola
|
|
|
|
 |
|
 |
Hi,
thanks for this framework. It's really an amazing work.
Is there a way to get the list of all supported FrameSizes by a video device?
Thanks in advance,
dramirak
|
|
|
|
 |
|
 |
HI , First of all, thanks very much for this amazing project !
When I tried to use this project to preview the video and capture image when user click a button, I found the captured image is a little darker than in the video .
Can someone point me the way to solve this ?
Thanks
|
|
|
|
 |
|
 |
Hi
I m using Directx.Capture library in C#. In capture.cs one function named as GrapImg() which is used to capture image from video. When I call the method GrapImg() from button click event it works fine. Now I need to call it within thread from the main form. But it gives an error
Unable to cast COM object of type 'System.__ComObject' to interface
type 'DShowNET.ISampleGrabber'
public void GrapImg()
{
Trace.Write("IMG");
if (savedArray == null)
{
int size = videoInfoHeader.BmiHeader.ImageSize;
if ((size < 1000) || (size > 16000000))
return;
savedArray = new byte[size + 64000];
}
sampGrabber.SetCallback(this, 1);
}
Error comes from the line
sampGrabber.SetCallback(this, 1);
Plz help me to solve this problem.
Thanks in Advance
|
|
|
|
 |
|
 |
I've found that media.formatPtr always point to null so videoInfoHeader also pointed to null. This problem then makes GrapImg doesn't work properly because of size is zero.
Does anybody here have same problem with me? I use visual studio 2008 and i download it on Dec 22 2009.
I've tried SampleGrabberNet and it does work properly.
|
|
|
|
 |
|
 |
I have same problem
have u found the solution???
|
|
|
|
 |
|
 |
hi
at first thank you for your excellent program.
im working on a c# application that transfer images over internet
i have a problem that for on month i want to show to independent webcam synchronously i know that it is really easy for you so i beg you to help me please my job is depended to this action please help me and i will pray for you please please
|
|
|
|
 |
|
 |
When I Run The Program I have This Error
Error HRESULT E_FAIL has been returned from a call to a COM component.
Plzzzzzz I need Help
Thanks & Best Regards
|
|
|
|
 |
|
 |
Just wanted to say that i was pleasured to find this project, its a very good work!
The Capture Class works very fast, nothing to improve
|
|
|
|
 |
|
 |
hi friends ,,
in this code filename is displaying as watermark but where code has been written for this a??? and there is also a problem in media player it is not displaying it but in vlc player watermark is displaying what is the reason ???
|
|
|
|
 |
|
 |
First of all thanks a lot. It was really very helpful for me.
But, I have a problem=) And really hope somebody can help me.
I found one article that seems to be a bit newer (http://www.codeproject.com/KB/audio-video/videosav.aspx). This project allow to write video in wmv format. Unfortunantly I couldn't "merge" these 2 projects. I try to implement ISampleGrabberCB in Capture class as it is described here, but unfortunantly can't receive callback (ISampleGrabberCB.BufferCB), so I can't grab the image.
The other problem is that I need to make snapshot without preview starting. I need my app to be able to write video to file and make snapshot whenever I want, BUT without preview? Is it already possible?
And the last one=). Does somebody knows how to capture desktop as video from webcam. As I found it can be done using PushSource Desktop Filter. But I can't found any implementation of this functionality using C#.
Thanks.
|
|
|
|
 |
|
 |
Hi Ang,
Great job!!! I have finally completed my project based on your essential effort on the frame capturing features! it is really a High Speed Grabber.
|
|
|
|
 |
|
 |
Thank you for your work.
I am trying to use it to capture several images from a webcam. I started with the example with GrapImg() and it works fine for one still image. However I cannot succed to use this function in a loop to shoot for instance every second.
Is it possible to do several shoots ?
Thanks for any suggestion.
Code for one image :
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DirectX.Capture;
using DShowNET;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
private Capture capture = null;
private Filters filters = new Filters();
public Form1()
{
InitializeComponent();
capture = new Capture(filters.VideoInputDevices[0], filters.AudioInputDevices[0]);
capture.PreviewWindow = panel1;
capture.FrameEvent2 += new Capture.HeFrame(CaptureDone);
capture.GrapImg();
}
private void CaptureDone(System.Drawing.Bitmap e)
{
this.pictureBox1.Image = e;
capture.FrameEvent2 -= new Capture.HeFrame(CaptureDone);
}
}
}
|
|
|
|
 |
|
 |
hi
take a look at c#'s function: timer ..
should look something like this:
here is your button where you want to preform a screenshot:
private void btnScreenshot_Click(object sender, EventArgs e)
{
if (capture != null)
{
capture.FrameEvent2 += new Capture.HeFrame(CaptureDone);
capture.GrapImg();
}
}
you enable your timer, set the intervall (in millisec), then you add the tick event
timer1.Enabled = true;
timer1.Interval = 1000;
timer1.Tick += new EventHandler(timer1_Tick);
timer1.Start();
here your timer tick event )
private void timer1_Tick(object sender, EventArgs e)
{
btnScreenshot_Click(sender, e);
}
this now should every second make a screenshot from your camera
|
|
|
|
 |
|
 |
:~can not download the source code?
|
|
|
|
 |
|
 |
Hi I am trying to execute the Project i got the following Error " A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A) " Error Line : videoDeviceFilter = (IBaseFilter) Marshal.BindToMoniker( VideoDevice.MonikerString ); MonikerString : " @device:sw:{860BB310-5D01-11D0-BD3B-00A0C911CE86}\{80FDF9B0-32FD-457b-8BE7-D367F3854959}" Name : "Google Camera Adapter 0"
Please help me to solve this. I am using windows XP, Visual studio 2005 {.NET Framework 2.0}
|
|
|
|
 |
|
 |
i'm having the same problem
|
|
|
|
 |
|
 |
This problem seems to be caused google video&audio plugin thingy. Uninstalled it, and the video stream seems to work again.
|
|
|
|
 |
|
 |
I m using DirectX.Capture.
First time when I click on capture.start() it works fine.
but next time when click on capture.start() I m getting "Error HRESULT E_FAIL has been returned from a call to a COM component." error
If anyone has any idea, tell me please
Thanks
|
|
|
|
 |