|
I am looking for a third part control/DLL to run a series of virtual camera's so I can analysis a series of pre-recorded video streams simultaneously. I have downloaded several virtual web cam products, some of which work well for single camera simulation and have send E-mail inquiries on purchasing a control but have only gotten back bounced e-mail messages or nothing at all.
Can anyone point me to a control for sale or even better, free?
|
|
|
|
|
Dear All,
I have already have some problem with Crossbar device and got some clues from this message board (my previous post) and finally fixes it.
Now I have another issue, when I want to change the standard of the video in the Crossbar device I cannot change it. I tried with some codes given in MSDN but when I use it my program gets hanged. Please help me. My code snippet is given below :
AM_MEDIA_TYPE *pmt = NULL;
IAMStreamConfig *pConfig = NULL;
hr = pBuilder->FindInterface(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, VideoSourceFilter, IID_IAMStreamConfig, (void**)&pConfig);
int iCount, iSize;
BYTE *pSCC = NULL;
hr = pConfig->GetNumberOfCapabilities(&iCount, &iSize);
pSCC = new BYTE[iSize];
if (pSCC == NULL)
{
}
hr = pConfig->GetStreamCaps(typ, &pmt, pSCC);
if (hr == S_OK)
{
hr = pConfig->SetFormat(pmt);
if (FAILED(hr))
{
}
DeleteMediaType(pmt);
}
delete [] pSCC;
Also, I study something about AnalogVideoStandard Enumeration in MSDN http://msdn.microsoft.com/en-us/library/ms779296(VS.85).aspx[^], but I dont get any clues on how to implement according to my program.
modified on Friday, August 22, 2008 9:55 AM
|
|
|
|
|
Hello, i have some problems with my camera class. I need to rotate around a point, especially in my
case the origin (0,0,0).
I have a camera class that holds the up,view and right vector.
This is, how i zoom in and out.
void CCamera::ZoomCamera(float fMag)
{
m_vPosition = m_vPosition + (m_vViewVector * fMag);
}
Well im posting the code i used for rotation around the origin
void CCamera::RotateCameraX(float fArgument)
{
m_mRotationMatrix.SetXRotationMatrix(fArgument);
m_vPosition = m_mRotationMatrix * m_vPosition;
}
next method sets the current camera position and is called by the timer from my dialog.
void CCamera::SetCameraPosition()
{
Vector3f vViewPoint = m_vTargetPos - m_vPosition;
gluLookAt(m_vPosition.X(),m_vPosition.Y(),m_vPosition.Z(),
vViewPoint.X(),vViewPoint.Y(),vViewPoint.Z(),
m_vUpVector.X(),m_vUpVector.Y(),m_vUpVector.Z()
);
}
SO, first ill explain what will work correctly.
When I start the application and rotate only on one axis. for instance x then it rotates perfectly
around. Same for y and z. But if i mix the rotations like at first a little bit x rotation then y
and then z i can see strange rotations.
For instance when i first rotate x and then y. Y wont rotate fully 360 degrees. It looks like when
you skater drives through a half pipe. Hope you understand what im trying to explain
And sometimes it happens, when i mix the rotations that at the x rotation, the rotation stops at a
certain degree and then it rotates the opposite direction.
Some words about the idea i had solving this problem.
My first idea was to compute the distance vector from camera position to origin and then move the
camera position to 0,0,0, then rotate the camera vectors and then
normalize the view vector and move back the camera along this vector with the magnitude of the
distance vector multiplied.
second idea was almost similar. I rotate the camera position around the origin and then compute the
new view direction for setting in the gluLookAt function.
So the camera should rotate arount the origin and everytime gluLookAt has been called i compute the
new view point. With view point i mean the 2n parameter in gluLookAt
The main idea behind was, the the up and view vector are realtive to the camera position.
gluLookAt(eye,eye,eye,view,view,view,up,up,up)
the origin along the x axis.
Any suggestions to solve this problem ?
greetings,
cmos
|
|
|
|
|
Hello.
I'm using opengl to draw some objects like a cube, a teapot, etc.
and i want to measure refresh rates(fps) like in 3DMark.
But although i draw only a simple cube, i couldn't get high refresh rates
over 65Hz by following codes.
QueryPerformanceCounter(¤tTime);<br />
fps = (float)nFrames/((float)(currentTime.QuadPart-startTime.QuadPart)/(float)timerFrequency.QuadPart);<br />
float period = (float)(currentTime.QuadPart-startTime.QuadPart)/(float)timerFrequency.QuadPart/(float)nFrames;<br />
str_fps.Format("[ %0.2f FPS, %0.4f sec/frame ]", fps, period);<br />
QueryPerformanceCounter(&startTime);
Is this problem concerned with LCD hardware whose rate is 60hz?
or How can I measure ideal refresh rates when i draw objects by opengl?
Addtional Question.
What is the most important factor about the refresh rates?
kinds of GPU or CPU?
|
|
|
|
|
What is the fastest way to capture the entire screen or a single window?
It's simple to do with GDI but I feel that there must be faster ways to
do this. I want to capture at least 30 images per second without affecting
the computers performance to much.
Any ideas? Is it possible to use directx to directly access the buffer on
the graphics card?
Language: Preferably .net and C# but c++ will do as well.
|
|
|
|
|
|
Thank you, that was a really interesting article.
Can´t figure out why I didn't find it when I searched
However, GDI as mentioned in the article is to slow and
according to the author (not tried it myself yet though),
directx is to slow as well ("GetFrontBufferData() is a
slow operation by design")
That leaves me with the WMEncoder solution which seems
great but it requires the Windows Media Encoder to be
distributed with the application, and I don't want to do
that.
Anyone seen another approach to this?
|
|
|
|
|
You can only do so much.
Reading from a display adapter is slow no matter what you do.
The best you could hope for is full read/write access directly to
video RAM, which you're not going to get in a generic way that works
on all machines.
Your frame rate is pretty much unrealistic - especially for full screen.
For example, just one of my screens at 30fps would require over 200MB of
pixel data to be copied per second, and that's just getting the raw data.
Then you probably need to do something with all that data. I've found GDI
to be the most efficient, and the capture time is pretty insignificant compared
with actually processing the data (compressing, saving, etc.).
Good luck
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Here is link http://www.assol.mipt.ru/isr/catalog_en.html . Here if u click on an photo, a new page will be opened with that photo enlarged, and there u can choose textile material, color for that photo, and new photo gained with selected colors, textile .
I just want u to show me the way, programming language(easy to write program analog to this),which programming section i should learn(image processing or something like this). I want to write program similar to this, but a desktop program,
Now i'm programming on C#.but have no idea,experience in image like programming
thanks in advance
|
|
|
|
|
when ever i try to run the installer i get an error message saying: 'this setup executable has not been packed with files and settings. Please use the packer tool to setup this executable. error code:S1001'
any idea what to do?
|
|
|
|
|
Sounds like it might have gotten corrupted when you downloaded it. Have you tried downloading it again?
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
I get this same error message. On Microsoft's website is says the download is about 435mb. After downloading it was only 183mb. What's bugging me is the fact that according to my browser, the download was completed. 100%. No errors.
Strange eh?
The really sad part is that I can't seem to find an alternative mirror for it, and Microsoft doesn't even seem to have technical support for it.
Would someone who has the file maybe upload it to a torrent site or something so we can get our greedy little mitts on it please?
Thanks and later!
Jack
|
|
|
|
|
Hi, I wasn't sure where to put this, but this seems the most appropriate place.
I'm trying to load an image from a 2 Dimensional array into the main screen DC, like so.
for(int y = 0; y < height; y++){
for(int x = 0; x < width; x++){
SetPixel(imgDC, x, y, RGB(imgarray[x][y], imgarray[x][y], imgarray[x][y]));
}
}
StretchBlt(hdc, 0,0, 640, 480, imgDC, 0, 0, width, height, SRCCOPY);
But this becomes too slow for my needs if the image if larger than about 256x256.
I have also tried using do while loops, which were a fraction faster.
Is there a better way to do this?
"Sir, I protest. I am NOT a merry man!"
|
|
|
|
|
There is an incredibly fast way of doing this... LockBits; the first time I needed to do something like this it took me a while to get the indexing right... but it pays off in the end.
The MSDN page on it...
http://msdn.microsoft.com/en-us/library/5ey6h79d.aspx[^]
A good example...
http://blog.paranoidferret.com/index.php/2007/08/31/csharp-tutorial-convert-a-color-image-to-greyscale/[^]
Bitmap image = (Bitmap)oldimage.Clone();
BitmapData bmpData = image.LockBits(new Rectangle(0, 0, image.Width, image.Height), ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb);
unsafe
{
byte* ptr = (byte*)bmpData.Scan0.ToPointer();
for (int Y = 0; Y < image.Height; Y++)
{
for (int X = 0; X < image.Width; X++)
{
*ptr++ = 0;
*ptr++ = 0;
*ptr++ = 0;
}
ptr += bmpData.Stride - image.Width * 3;
}
}
image.UnlockBits(bmpData);
*ptr++ is the current byte representing a 'sub-pixel' of the current pixel at image position [x, y]: the reason why the pointer is incremented three times.
Hope this helps.
Matthew Butler
|
|
|
|
|
Hi, thanks for your reply.
Is there a way to set the pixels of a DDB with this? I had thought it was DIB only?
"Sir, I protest. I am NOT a merry man!"
|
|
|
|
|
Naturality wrote: Is there a way to set the pixels of a DDB with this? I had thought it was DIB only?
LockBits is GDI+ and works great.
In addition to that...
With GDI, a DIBsection gives you a bitmap you can use like a DDB
but with a pointer to the pixel bits array. See CreateDIBSection().
A DIBSection (like a GDI+ Bitmap object) is also more flexible than
a DDB, since it can be created it with the same pixel format as your
data and still be selected into into a memory DC that is not the same
format as the screen.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks, I've been looking into it and it seems like it's the answer for me
"Sir, I protest. I am NOT a merry man!"
|
|
|
|
|
Hello,
given the vertices's of initial and resultant plane.
I need to transform a plane(i.e. triangle) from one plane to other in which rotation, scaling and translation has to occur. I just need that transformation matrix if applied to the initial plane it will give resultant plane.
i am trying to
1> rotate the plane first to the normal of the resultant plane.
2> scale the matrix requred
3> translate the points...
dont know the approach is correct upto what extent? also it would be to know that can the rotation o the plane be replaced by transalation.
|
|
|
|
|
I've been experimenting with XNA a little. I have a CAD program I can draw models in with a lot of different formats you can export to but unforunately it doesn't have .fbx or .x. I was wondering can the content piplelines use any other formats? I wasn't able to find any list of acceptable 3d CAD file formats. Thanks.
|
|
|
|
|
Hi all,
I'm new to Direct3D programming, but made some simple examples.
I'm actually working on a WPF project in C#, but I'm exploring the new 3.5SP1 D3DImage imagesource to solve a performance issue.
I already have made a working example of some aplha-blended d3d projected on a WPF window, and it performs and antialiases very smooth.
The d3d code is Visual C++ , put in an unmanaged dll. I'd like to keep it that way, it's the method suggested for optimal performance.
What I want to can't be very hard - I want to draw about 200-300 rectangles on the 2D screen which size independantly of eachother. The rectangles are a simple top to bottom gradients. The rest of the rendered output is transparent.
- from here on I'd like your advice -
Do draw the rectangles, I'll use an array of four-vertices vertexarrays, stored on the d3ddevice memory. (Is that a good starting point?). I render them with trianglefan.
The rectangles get sized (scaled?) each 20 milliseconds, individually from oneanother (an array of floats is sent from the WPF app). What methods should I look for? Is it correct that matrices only apply to the whole scene, so I should do it differently?
It would be nice if I could "slow down" the sizing. For example, a rectangle goes from 0.1 to 0.9, and I want it to progress at a maximum speed of 1/500ms . Any ideas? Which part/methods of the DirectX documentation is good reading material for this?
Any help appreciated
|
|
|
|
|
Dear All,
I am developing an application to preview the video from a Capture device. I have developed the application and it is working fine, but the problem is that it is playing two times correctly but for the third time i got error while connecting with video renderer. Please help me. Code snippet is given below :
void DialogPlayer::OnBnClickedButton12()
{
bool x= CreateVideoGraph();
}
BOOL DialogPlayer::CreateVideoGraph()
{
hr = CoCreateInstance(CLSID_FilterGraph, NULL,CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&amp;pGraph);
if(FAILED(hr))
{
return FALSE;
}
if (SUCCEEDED(hr))
{
hr = CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL,CLSCTX_INPROC_SERVER, IID_ICaptureGraphBuilder2,(void **)&amp;pBuilder);
if(FAILED(hr))
{
return FALSE;
}
if (SUCCEEDED(hr))
{
hr=pBuilder-&gt;SetFiltergraph(pGraph);
if(FAILED(hr))
{
return FALSE;
}
}
}
hr= pGraph-&gt;QueryInterface(IID_IMediaControl,(LPVOID *) &amp;(pControl));
hr=pGraph-&gt;QueryInterface(IID_IVideoWindow, (LPVOID *) &amp;(VideoWindow));
ICreateDevEnum *pSysDevEnum = NULL;
hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, (void **)&amp;pSysDevEnum);
if(FAILED(hr))
{
return FALSE;
}
IEnumMoniker *pEnumCat = NULL;
hr = pSysDevEnum-&gt;CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &amp;pEnumCat, 0);
if (hr == S_OK)
{
IMoniker *pMoniker = NULL;
ULONG cFetched;
while(pEnumCat-&gt;Next(1, &amp;pMoniker, &amp;cFetched) == S_OK)
{
IPropertyBag *pPropBag;
hr = pMoniker-&gt;BindToStorage(0, 0, IID_IPropertyBag, (void **)&amp;pPropBag);
if (SUCCEEDED(hr))
{
VARIANT varName;
VariantInit(&amp;varName);
hr = pPropBag-&gt;Read(L"FriendlyName", &amp;varName, 0);
BSTR name2=varName.bstrVal;
if((wcscmp(name2, "Video Capture AV")==0))
{
hr=pMoniker-&gt;BindToObject(0,0,IID_IBaseFilter, (void**)&amp;(VideoSourceFilter));
hr=pGraph-&gt;AddFilter(VideoSourceFilter,L"Video Source");
check1=1;
}
if(check1==0)
{
return FALSE;
}
pPropBag-&gt;Release();
}
pMoniker-&gt;Release();
}
pEnumCat-&gt;Release();
}
else
{
return FALSE;
}
pSysDevEnum-&gt;Release();
hr = CoCreateInstance(CLSID_VideoRenderer, 0, CLSCTX_INPROC_SERVER,IID_IBaseFilter, (void**)(&amp;VideoRenderer));
IPin *outPin;
IPin *inPin;
hr = pBuilder-&gt;FindInterface(&amp;PIN_CATEGORY_CAPTURE, &amp;MEDIATYPE_Video, VideoSourceFilter,IID_IAMCrossbar, (void **)(&amp;CrossbarFilter));
hr = pBuilder-&gt;FindPin(VideoSourceFilter,PINDIR_OUTPUT,NULL,NULL,FALSE,0,&amp;outPin);
hr = pGraph-&gt;Render(outPin);
return TRUE;
}
|
|
|
|
|
You didn't say what kind of error you were getting. Is it possible that on one of your previous runs you aborted the program or took a path that didn't close everything? I had a problem with an OpenCV app I wrote that got very unhappy if I exited without properly releasing everything. COM is funny that way.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
Hi
are you releasing the reference count on the
CrossbarFilter
IPin *outPin;
these two interfaces when done.
|
|
|
|
|
I tried releasing everything and nothing happens. Finally I remove all the filters in the graph using IEnuFilters and this works for me. Thanks for your kindness and reply.
|
|
|
|
|
Does anybody know where I can get a control like the picture control in Microsoft Word or PhotoDraw? I am in need of that type of image control that floats above another image (using layers), rotates freely and is resizable.
|
|
|
|
|