Well, since art2d is based on zoom able drawings, a direct bitmap equivalent is 
not there, since the is fixed in pixels.
Also wxDc is horrible when it comes to displaying bitmaps at a certain size.

A2dImage object is what you can use best. (see canimage.cpp/h)
Now you need to compile Agg into wxart2d for sure.
Since in the wxDcDrawer I use that when it comes to drawing images at angles, 
or when zooming.
Look there to see how images are drawn.
The thing is that the a2dImage using an image inside needs to be scaled to be 
drawn on the view.
Agg is rather good at that.

Also there is a2dImageRGBA with a2dRgbaImage.
That often better fits the needs for Agg or OpenGl.
wxImage has the alpha stored seperately. While most of the time this does not 
fit blitting routines in OS to quickly blit a drawn/anotated buffer to the 
screen/openGl buffer etc.

So to reach the speed wanted there might be a need to cache stuff (like a view 
specific sized wxImage/wxBitmap from a a2dImage inside a document).
All is possible, just depends on what fits the application.

In principle one can draw on images within wxart2d without problem. If those 
images change underneath the surface (video frames), it is just a matter of 
setting the a2dImage pending, and the document will be redrawn in idle time. 
Even if you are busy drawing, this is no problem, because the tools in general 
are redrawn also as part of the document redraw. I.o.w the state of the 
application does not mind or get confused.
So if there is idle time ;-) it will happen.

Still not easy :-)

Klaas





From: damateem [mailto:damate...@gmail.com]
Sent: Friday, 29 April, 2011 15:03
To: wxart2d-users_dev@lists.sourceforge.net
Subject: Re: [Wxart2d-users_dev] Annotate live video

The video is coming to our application as a series of bitmaps, so it looks like 
wxArt2D is a good choice. What is the best way to implement this using the 
wxArt2D framework? I can think of three ways, but maybe there are others.

 1.  Draw the bitmaps on the background.
 2.  Draw the bitmaps as the fill for a rectangle.
 3.  Use a bitmap drawing object. Does this exist?
I'm just looking for a general description of the best method. I can look into 
the documentation for details.

What I'd like to do is run the video display in its own thread and have it 
constantly updating the displayed image. Then, as fast as possible in the main 
thread, I will grab frames from the stream, process them and annotate the video 
based on the processing. I know this means that the processing will lag the 
live display, but that is acceptable in this case.

You are right, video is complicated, especially if live video is a requirement. 
Hardware acceleration can help, but it brings it's own set of 
problems...hardware dependence and lack of support for complex annotation, to 
name a couple. I've always found the software-only solution to be the best 
choice.

Thanks,
David


On 4/28/2011 5:29 PM, klaas.holwerda wrote:
On 04/28/2011 08:30 PM, damateem wrote:
I want to use wxArt2D to draw on live video to mark features in the video. For 
instance, I might draw a line where an edge is detected and then update the 
line as that edge moves in the video.

wxArt2D can not play video, so live video is played how?
In case you mean you have a sequence of frames in some image format, and want 
to add stuff to that, I think  makes sense.

It would be great to have resizeable video objects in wxArt2d, but i don't know 
how to display a video into a rectangular area. I know all the software to 
handle video is available in linux "gstreamer ffmpeg etc.". But i don;t have 
the time to dive into that. In principle i think it is possible. But speed is 
always an issue. Even in  video editing apps, when editing they only display 
the video small/low resolution.

With or without wxart2d, video is complicated i think. The real solution is 
with hardware acceleration, without that, the software is to busy putting 25 
frames per second to the screen in order to be able to do anything else.
So a thread for each video displayed??

I made once an application to show slides as a slideshow with a transition, but 
with a walking ticker at the bottom.
The speed of the ticker walking is close to the framerate. Even with OpenGl and 
all that is complicated.

Hope this helps you.

Klaas



Before I spend a great deal of time understanding how to use wxArt2D, I thought 
I'd get some advice on feasibility.

 1.  Is this a good use of wxArt2D?
 2.  Any advice on how best to implement this feature using wxArt2D?




------------------------------------------------------------------------------------------------------------
Disclaimer:

If you are not the intended recipient of this email, please notify the sender 
and delete it. 
Any unauthorized copying, disclosure or distribution of this email or its 
attachment(s) is forbidden. 
Thales Nederland BV will not accept liability for any damage caused by this 
email or its attachment(s). 
Thales Nederland BV is seated in Hengelo and is registered at the Chamber of 
Commerce under number 06061578.
------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to