|
What image? What is "piggy backed or overlapped"?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I know you can make a icon using
'Icon k = Icon.FromHandle(WorkingImage.GetHicon());'
how do you add more than one icon to the icon file
When you take a Nerd and a Jock and put them together you get a Nock
|
|
|
|
|
There is only one way to have more than one Icon in the file.
Write the file using bytes yourself.
When you take a Nerd and a Jock and put them together you get a Nock
|
|
|
|
|
I am having trouble With drawing to an image using the Graphics class. I have tried
'...
void somebutton_click(...)
{
Graphics g = Graphics.FromImage(checkbox1.Image);
...
g.Draw...(...'
and
'Graphics g = checkbox1.CreateGraphics()'
the end result is a unchanged picture
please help, I am new
also if you did not see, the language C# and .Net framework
When you take a Nerd and a Jock and put them together you get a Nock
|
|
|
|
|
Since no one answered my question, the question was
1. A question so stupid that no one bothered to answer
2. No one knows
In the case of the second answer I will be answering my own question.
The answer was simple, The Graphics will not draw on a null image (I never assined the checkbox a image).
So to fix this problem you just give the checkbox a Bitmap in the beginning.
The weird thing is that the Graphics class gave no exceptions or errors other that the fact that it would not draw.
When you take a Nerd and a Jock and put them together you get a Nock
|
|
|
|
|
Hi
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 is whith selected colors, textile is gained.
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
|
|
|
|
|
For the graphics, all of that can be done with GDI+[^]
which can be accessed in C# using classes in the System.Drawing Namespace[^].
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi
I am developing an application where i want to display live video and also do some image processing.
I tried:
1. Video for Windows API : easy but not quite comprehensive and not able to use overlay
2. 3rd Party SDK: nice quality still no overlay support, no single frame capture fn.!
3. GDI+ is an option but not quite preferable for fast video display and capture where I think DirectX goes well. Thus selected latest DirectX v9 which is latest for WinXP.
4. searched for DirecX but got DirectShow links which is deprecated in DirectX 9. also could not find suitable code for capturing single frame.
I've been searching for quite a while now. searched through CodeProject, MSDN, Google; but could not get exactly what i wanted.
Thus can you guide/suggest in the following area:
How to easily use DirectX 9.0 for displaying video from devices and capturing frames
I want to achieve this with very simple ( minimalistic) coding as i am beginner in this area and would not like to indulge with the complexity of DirectX (one of the most complex API's by Microsoft) for that purpose please suggest how to use Windows Media Player SDK or Windows SDX.
How to use DirectX 9.0 API's in -
1. Live video: display live video from digital camera / (analog camera + framegrabber card).
2. Overlay: displaying informative data over(on top of) the video (i guess this is what they call Overlay)
3. Capture Frame : capturing Current frame(image) for Image processing
platform: C#.NET, Visual Studio 2005, .Net Framework 2.0, WinXP Prof. SP2 on Pentium Core 2 duo 2GHz , 1GB Ram PC with Intel onboard graphics accelerator.
any help/suggestion or links highly appreciated ...
thanks.
|
|
|
|
|
LoneInvader2007 wrote: searched for DirecX but got DirectShow links which is deprecated in DirectX 9.
It's not deprecated. In fact DirectShow is so not deprecated
that its SDK was rolled into the platform SDK because it's a standard
part of the operating system.
The next generation (Vista+) Windows multimedia platform is Media Foundation[^]
You are, of course, free to use whatever capture and render methods you choose...
just keep in mind DirectShow has taken care of a LOT of the render/capture work
for you
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
@ Mark Salsbery
- Thanks for your reply.
Mark Salsbery wrote: DirectShow has taken care of a LOT of the render/capture work
provided DirectShow is well documented/supported on MSDN or elsewhere;
can DirectShow help in drawing graphics over the video (live video from camera)?
As these lines from Wikipedia Article http://en.wikipedia.org/wiki/DirectShow[^] imply it does'nt -
"Windows XP introduced a new filter called the Video Mixing Renderer 7 (VMR-7 or sometimes just referred to as VMR). The number 7 was because VMR-7 only used DirectDraw version 7 to render the video and did not have the option to use GDI drawing. The main new feature of VMR-7 was the ability to mix multiple streams and graphics, allowing applications to draw text and graphics over the video "
due to WinXP OS constraint, Thus I selected Direct3D (DirectX 9) over previous DirectDraw and DirectShow. (added to it the complexity of DirectX and the simplicity of me as a beginner in this field , i would really prefer the Managed DirectX or XNA as these API's provide simplified access through .NET.
keeping in mind that my current application is a machine vision application which only demands simple video capture display and capturing single frames for Image Processing.
For DirectX, web is full with help/guidance for game development and no such serious help is available for unique applications such as this one.
Thread like this is pretty much needed for such type of applications which will then prosper on DirectX technology.
On behalf of many I have just started the thread. I request everyone to take a note of this and contribute to this thread by answering the questions raised here and similarly wherever.
Thanks.
any help/guidance/feedback will really be appreciated
Question:
How To use DirectX 9.0 For Machine Vision Application:
How to use DirectX 9.0 API's in -
1. Live video: display live video from digital camera / (analog camera + framegrabber card).
2. Overlay: displaying informative data over(on top of) the video (i guess this is what they call Overlay)
3. Capture Frame : capturing Current frame(image) for Image processing
platform: C#.NET, Visualt Studio 2005, .Net Framework 2.0, WinXP Prof. SP2 on Pentium Dual Core 3GHz PC with Intel on-board graphics accelerator.(graphics card can be considered for DirectX)
|
|
|
|
|
LoneInvader2007 wrote: can DirectShow help in drawing graphics over the video (live video from camera)?
Yes. Whether it does what you need it to do or not, I don't know.
I do know Wikipedia isn't the ultimate source of info on DirectShow.
Using the Video Mixing Renderer[^]
Rendering is just one part. Acquisition also need to be considered.
Does the device have a WDM driver? If you've got capture covered already,
you can do rendering however you want to.
I personally use DirectShow for capturing from WDM and legacy VFW devices.
I do my own custom rendering for drawing on the video frames before they are
rendered, using GDI, not Direct3D (I personally found no benefit from the added
complexity of Direct3D, since all I'd use it for is back-buffers that don't need
to be on hardware).
The DirectShow SDK is freely available and includes enough sample code to create working
apps by mostly copy/paste - check it out, see if it's what you need.
Use whatever is best for your application.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Yes. Whether it does what you need it to do or not, I don't know.
I do know Wikipedia isn't the ultimate source of info on DirectShow.
Thanks for your recommendation. application needs basic drawing on the live video display.
thanks for the msdn link, how could'nt i get that link
need to check.
will convey the status...
meanwhile (if there is a need for a good text) could you suggest a good one for DirectShow 9
|
|
|
|
|
LoneInvader2007 wrote: could you suggest a good one for DirectShow 9
I'm still using the Server® 2003 R2 Platform SDK[^]
but the newest SDK is the Windows SDK[^].
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi
very interesting thread about DirectShow,
I really liked it;
I myself use Platform SDK 2003, don't you think Microsoft to make the DirectShow as a separate SDK, they are moving it from DirectX SDK to Platform SDK now in Windows SDK. Because for newer people it is sometimes awkward to see this that DirectShow is being placed here and there. And our newsgroups are swarming with questions like,
DirectShow is not in DirectX SDK ?
Where to find DirectShow SDK ?
Which version to use ?
Another thing is this that they are not calling it deprecated, but behaving like that, I think so. Although I myself still programming in DirectShow.
thanks for the patience.
|
|
|
|
|
Moving the DirectShow SDK is definitely awkward.
I'm not sure what the benefit was supposed to be,
but it was moved and that's where it's at.
All we can do is spread the word.
tanvon malik wrote: they are not calling it deprecated, but behaving like that,
I would say "matured", not deprecated. There's no further
development going on for pre-Vista OS versions, so continued
development will be for the new technologies introduced in Vista.
Microsoft Media Foundation[^] is the next generation
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
LoneInvader2007 wrote: due to WinXP OS constraint
What do you mean? Do you need to support OS versions
older than XP?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: What do you mean? Do you need to support OS versions
older than XP?
Application needs to be developed only for Win XP variants and not targeting any other versions of Windows.
Platform is as specified below:
platform: C#.NET, Visual Studio 2005, .Net Framework 2.0, WinXP Prof. SP2 on Pentium Dual Core 3GHz PC with Intel on-board graphics accelerator.(graphics card can be considered for DirectX)
I will see if there is a Managed way (XNA, Managed DirectX) since that (managed code) will be better for the .NET application we are developing. Need to check if XNA can be used for DirectShow 9 (i guess not).
|
|
|
|
|
LoneInvader2007 wrote: the complexity of DirectX (one of the most complex API's by Microsoft)
Nah. The mixer APIs are infinitely more of a PITA to work with
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hey guys, first post on the forums (Hopefully I'm posting in the right section). I'm fairly new to the Direct3D World, so I'm making the "Hello world" program (aka, the rotating triangle).
Well, I wanted to take it a bit further, and rotate my triangle on the Y axis, but translate the position using the mouse position. For instance, if my mouse was at screen coordinates, (15,15), I would want the triangle to rotate, with the top point of the triangle at the coordinates (15,15).
The problem is:
POINT pos;
GetCursorPos(&pos);
D3DXMATRIX Trans;
D3DXMatrixTranslation( &Trans,(FLOAT)pos.x,(FLOAT)pos.y, 0.0f);
Doesn't work in screen coordinates .
How can I do this? Thanks!
|
|
|
|
|
clicking select one point on the screen as the start point, the moving mouse on the screen as the end point, how to draw the line with the two points dnamically using OpenGL,every moment of the mouse moveing,there is only one line drawed and displayed on the screen.
thanks.
|
|
|
|
|
Where are you stuck exactly ? What you'll need to do is to keep track of two points: the begin and the end of your line. When the user clicks, you save the point coordinate in the 'begin point' and whenver he moves the mouse, you save the new mouse position in the 'end point'. Then, whenever you need to draw a new frame you draw a line using this pseudo code:
glBegin(GL_LINE);
glVertex2f(startPoint);
glVertex2f(endPoint);
glEnd();
Of course, you will need a conversion for the points depending on your OpenGL settings.
|
|
|
|
|
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?
|
|
|
|
|