Imagine I have a video playing.. Can I have some sort of motion graphics being played 'over' that video.. Like say the moving graphics is on an upper layer than the video, which would be the lower layer..
I am comfortable in a C++ and Python, so a solution that uses these two will be highly appreciated..
Thank you in advance,
Rishi..
I'm not sure I understand the question correctly but a video file is a sequence of pictures that you can extract (for instance with the opencv library C++ interface) and then you can use it wherever you want. You can play the video on the sides of an opengl 3D cube (available in all opengl tutorials) and other 3D elements around it.
Of course you can also displays it in a conventional 2D interface and draw stuff on top of it, but for this you need a graphical ui.
Is it what you thought or am I completely lost?
Related
If I want a 3D animated/rigged character in OpenGL game how i would have it in OpenGL?If i make a animated/rigged character in 3Ds max is it possible to have that character in OpenGl?would be helpful if someone gives a proper way or a tutorial link to export animated model from 3d software to open GL
OpenGL is a very simple 3D framework which only offers the bare bones. OpenGL can display triangles and fill them with color and that's about it. It comes with some helper functions to manipulate point clouds but it's really very basic.
Animation and rigging are way beyond what it can do. What you need is a framework which supports animation and rigging which then uses OpenGL to display the result.
Since you don't specify any requirements, it's hard to say which one would be good for you. Blender is probably a good place to start. It's game engine runs on many platforms, supports OpenGL, animation and rigging.
I am extending an existing OpenGL project with new functionality.
I can play a video stream using OpenGL with FFMPEG.
Some objects are moving in the video stream. Co-ordinates of those objects are know to me.
I need to show tracking of motion for that object, like continuously drawing a point or rectangle around the object as it moves on the screen.
Any idea how to start with it?
Are you sure you want to use OpenGL for this task? Usually for computer vision algorithms, like motion tracking one uses OpenCV. In this case you could simply use the drawing functions of OpenCV as documented here.
If you are using OpenGL you might have a look at this question because in this case I guess you draw the frames as textures.
I'm trying to make a program that handles graphics and I am not quite sure how to implement zooming. I have done a zooming effect with primitive shapes such as lines and circles (with SDL_gfxPrimitives) by scaling them down but that wont work for a picture. How would I implement zooming?
There is a SDL library that supports zooming:
SDL2_gfx Library
The SDL_gfx library evolved out of the SDL_gfxPrimitives code which
provided basic drawing routines such as lines, circles or polygons and
SDL_rotozoom which implemented a interpolating rotozoomer for SDL
surfaces.
The current components of the SDL_gfx library are:
Graphic Primitives (SDL_gfxPrimitves.h)
Rotozoomer (SDL_rotozoom.h)
Framerate control (SDL_framerate.h)
MMX image filters (SDL_imageFilter.h)
Custom Blit functions (SDL_gfxBlitFunc.h)
Your question is not specific enough to produce a specific answer that is likely to get you what you appear to be looking for.
What I can offer you is the suggestion that you first come up with a way to represent zooming.
If you already know how to draw a picture, consider the fact that when it comes to computer graphics, it is almost always the case that "zooming in" or "zooming out" is nothing more than drawing your picture at a progressively larger or smaller size.
With that in mind, maybe you will begin to see that a reasonable way to represent the concept of zooming is with some form of Camera class that will unambiguously determine the size and location of the pictures you draw.
I am making a simple game for fun and learning using SFML for 2D stuff. The game is rather simple.. I loath to say it is a HoG (hidden object game) but I guess that would be a way to get my point across quickly. Basically I am using SFML to load and display 2D still art and capture mouse events.
Anyway... I would like to add video clips to my project. All the art is rendered and for example.. if my image is of a park with a fountain, I would like to have a looping video of the water running so the image has some life even though it is just a still.
All I need is the ability to play videos in the window, preferably compatible with sfml but I am in the planning projects I can swap to something else if needed. The project will have a set resolution (not scalable) and I just want to load the video and play them at a certain pixel location in x,y. So if I have a 1200x720 image I play a 100x100 pixel video on loop at a certain location to make the water of the fountain move.
Now then I am thinking I can just load 2D sprites onto of the video matching the background image to do simple masking. There are some formats like quicktime that can embed an alpha channel directly into the video and if that is supported awesome.. but some planning in the set design should mean that is not really needed. Though if that was supported more options open in set design.
I am pretty good with video as I am a 3D animator by profession, new to programming as a learning hobby. So the format and container of the video is not really an issue though I have been working with OGV a lot recently.
What I see as it needing is
Load multiple videos at once
Play with out any boarders or anything
Play at specific locations in a window.
loop seamlessly
Allow zdepth so I can place sprites onto of it
Dose anyone know were I would go to start looking into this? It seams like something that could possibly be a library I could use? Preferably an open source one as this is just a for fun project nothing commercial.
Thanks in advance for any ideas you may have.
is there anyway to build rich animation with C++?
I have been using OpenCV for object detection, and I want to show the detected object with rich animation, Is there any easy way to realize this?
I know flash can be used to easily build rich animation. But can flash be reliably integrated with C++ and How?
Also, Can OpenGL help me with this? To my knowledge, OpenGL is good for 3D rendering. But I am more interested in showing 2D animations in an image. So I am not sure whether this is a right way to go.
Another question, how are those animations in augmented reality realized? What kind of library are they using?
Thank you in advance.
Its difficult to tell if this answer will be relevant, but depending on what sort of application you are creating you may be able to use Simple DirectMedia Layer.
This is a cross-platform 2D and 3D (via OpenGL) media library for C, C++ and many other compatible languages.
It appears to me that you wish to produce an animated demo of your processing results. If I am wrong, let me know.
The simplest way to produce a demo of a vision algorithm is to dump the results to a distinct image file after each processed frame. After the processing session, these individual image files are employed to prepare the video using e.g. mencoder. I employed such procedure to prepare this.
Of course, your program can also produce OpenGL. Many people dealing with 3D reconstruction do that. However, in my opinion that would be an overkill for simple 2D detection. Producing flash would be an even greater overkill.