Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, May 10, 2006 2:15:29 AM(UTC)

Amit  
Amit

Groups: Registered
Posts: 101


I am using LT14 with visual basic 6

I have 25 jpg images saved on my machine (758 X 576 capture size, approximate size of each image is 300 kb to 500 kb)

To display these images, I am using LEADRasterView control.

My need is to load these 25 images in 1 second to view as animation or movie.

I donot want to build their AVI.

Right now, applying all the optimizations and setting all necessary properties mentioned in leadtool help file (AutoRedraw, ForceRepaint), I am able to load only 8 to 9 images per second.

Machine is with high configuration and that is not the problem.

I need this speed to be improved.

Thanks in advance

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, May 11, 2006 11:09:39 AM(UTC)

Ali  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

Try to load all images in BitmapList  (using temp Raster object and InsertBitmapListItem), then there 2 options that you can try:
1. Create animation in control (Read Playing an Animation topic in the help file)
2. Or by moving between them using bitmaplistindex


If you need any further assistance, please feel free to contact me.

Thanks,
Ali Abo Al-Rob
LEADTOOLS Technical Support
 
#3 Posted : Friday, May 12, 2006 2:22:58 AM(UTC)

Amit  
Amit

Groups: Registered
Posts: 101


Thanks Ali,

The solution you have given is working. but my case is somewhat different.

I was said like that just for simplicity.  Sorry for that.

Sorry, but the actual case is not like I have mentioned in first mail.

In actual case, no any image is saved on hard disk currently.  I capture image and display it in LEADRasterView.  And actual implimentation needs this only.  I cannot capture video, because I need to average the image captured.

In fact, four operations takes place in loop.

1) Capture image (While capturing, I take image in invisible raster object.  Hence it is not displayed.)

2) Average image

3) Save image on hard drive

4) Load image in LEADRasterView (View image to user on screen.)

I examined the time required for each of this operations.  Operations 1, 2, 3 donot take much time.  Only operation 4 i. e. Load image in leadrasterview takes about 60 % of time.

As your suggestion, I cannot load all these images in bitmap list as I donot have images to load in it right now.  I will capture them at run time.

This loop should be executed atleast 25 times in one second.

Please reply.

Thanks.

 
#4 Posted : Wednesday, May 17, 2006 1:40:57 AM(UTC)

Ali  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

First of all, you can actually use high-speed multimedia capturing and image processing without having to do it one still image at a time. We have a multimedia toolkit and different video processing multimedia filters that can be used for that. If you are interested in this option, you can check the Video Callback multimedia demo shipped with our toolkit.

About the approach you use now, if the object you use to store the image in the beginning (before saving) is inside the same program that later loads the image, you can eliminate the slow step of loading by simply copying the image from the first object to the display object.
Even if you need to save, keep on saving, but don't re-load from disk.

If you must load from disk, tell me why exactly and I will try to suggest another solution.


Thanks,
Ali Abo Al-Rob
LEADTOOLS Technical Support

 
#5 Posted : Wednesday, May 17, 2006 8:43:25 PM(UTC)

Amit  
Amit

Groups: Registered
Posts: 101


Good morning Ali (its morning here now)

Thanks for reply.

ABOUT YOUR FIRST PARAGRAPH

I am using high speed capture card with supported frame rate of 30 Frames Per Second.  If I capture video with this card, its frame rate is about 25 - 30 FPS

But as I told, I cannot capture video as I need to average the image.  The source I get is full with XRay noise.  User donot want this noise.  To remove noice I am using AddBitmaps function with BC_AVG argument passed to it.  How many frames to be averaged is decided by user.  I take that number as input from user.  Load these images in invisible leadRasterAveraging and apply AddBitmaps method.  The averaging frames number may also vary.  It is not fixed.

In this case I donot thind video processing multimedia filters you are saying in your reply will work.

'-------------------------------------------------------------------------------------------------

ABOUT YOUR SECOND PARAGRAPH

As you told, I am already copying the image in my current code and not loading from hard disk.

'---------------CODE-------------------

leadRasterFullScreen.Raster.Bitmap = leadRasterAveraging.Raster.Bitmap

'-----------END CODE-----------------

User view the image in leadRasterFullScreen.  This control is full screen control (height = screen.scaleheight AND width = screen.scalewidth).  I cannot reduce the size of control.

The live images I capture contain XRay noise.  I need to remove that noise while showing preview.  To do so, I donot use ltmmCapture control to show preview.  I render the output of ltmmCapture control to ltmmPlay control and capture image from ltmmPlay control using

SavePicture ltmmPlay.GetStillPicture(1000), . . . . . . . . .

This image I load in leadRasterAveraging and average the image to remove noise.  Then I copy averaged image in leadRasterFullScreen control.

All this process is very fast except the last step.  I had worked much on this process or flow to detect which step is taking maximum time.  I found, only last step i.e. displaying image form leadRasterAveraging to leadRasterFullScreen is most time consuming step (About 60 % of time compaired to one loop)

I also tried using other controls for fast display (eg. Visual Basics Image control, Picture box etc.) still it is not reducing the time.

User should be able to see live averaged display on screen.  My current code donot make it real time display.  When user moves hand infront of source, the display on screen is after user's hand is out of source.  There is some delay in live action and the preview.  It also looks like the the intermidiate frames are missing.  The preview is jurky.

I tried my best to keep things simple while explaining you the real needs.  If confusing, just concentrate over loading 25 images in 1 second.

Waiting for your reply.

Thanks.

 
#6 Posted : Wednesday, May 17, 2006 9:36:10 PM(UTC)

Amit  
Amit

Groups: Registered
Posts: 101


According to your suggestion, I tried LEAD VideoAdd Filter.

It gives me the same functionality that I want.  But some problems are there.

I set following properties

Enabled - Checked

Frames to add - 10

Factor of frame - 0 (100 %)

Preserve Frame Rate - Checked

Average - Checked

1)  After applying filter, the preview is ok for video captur size upto 352 X 288.  I want capture size 752 X 576.  At this captur size, the preview becomes jurky.  This is not acceptable at any cost.  (Imagine the case, Doctor is operating on patient and he see the jurky preview, how can he dignose.)

2)  "Frames to add" could set maximum upto 10 for this filter.  User may want it upto 32.  (In case of Chest or abdomen operation of very fat person, doctor need more KV of XRay intensity.  And more intensity means more noise.  More noise means more frames needs to be averaged.)

Look for these two problems.

Waiting for your reply

Thanks

 
#7 Posted : Monday, May 22, 2006 2:11:15 AM(UTC)

Amit  
Amit

Groups: Registered
Posts: 101


I found some help regarding this in IMAGING.hlp help file.

The statements are located under chapter "Display"

It says :-

"[DLL Only] Use to buffer to paint from"

"[DLL Only] Specify an option for Fast Painting (without device error checking)"

Please tell me if this is helpful for me.  If yes, explain it in details or suggest any help file for detailed information.  But remember, I am not using DLLs.  I am using Visual Basics Standard EXE Project with LT 14

Waiting for reply

Thanks

 
#8 Posted : Thursday, May 25, 2006 1:41:28 AM(UTC)

Ali  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

The fast painting feature is for single-bitmap display and rendering to printers. It can never be faster than the multimedia engine.

My colleague Amin posted a demo for you that uses the Video Callback filter with the Capture control (to save still images using the Raster IO object).

You can apply the same technique and store bitmaps into a bitmap list (in a LEAD Raster object) using the InsertBitmapListItem method, then use the Raster Process object to average them with the AddBitmaps method.


Thanks,
Ali Abo Al-Rob
LEADTOOLS Technical Support

 
#9 Posted : Thursday, May 25, 2006 2:58:36 AM(UTC)

Amit  
Amit

Groups: Registered
Posts: 101


Thanks Ali,

I think, I can implement the logic you have give.

Thanks again.

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.122 seconds.