PDA

View Full Version : Image on display different to saved image



Bestbier
May 25, 2006, 00:16:30
I have a app that does the following.

1 display live vidoe with overlay at 1.2 zoom
2 capture 40 frames in buffers
3 glue the 40 frames on top of each other to form 1
4 perform contrast stretching
5 display processed image
6 save image form display.

Hope that makes sense. I know VB is way to slow for this but its all I know and to not have time to learn C#.

The processed image that is displayed is of slightly lower quality if you compare it to the saved image - jagged edges, harder edges, etc.

I don't see why this should be because the saved image and displayed image come from the same buffer.

Thanks
Bestbier

Stefan Geissler
May 30, 2006, 08:12:00
Hello Bestbier,

First of all, Visual Basic .NET would be fast enough for this issue and it differs not so much to VB 6. You would use the IC .NET component instead of the ActiveX.

I would like to know, how do you save the processed image to a file. I think you save an image buffer and not the processed image, but i am not sure about this.

Bestbier
May 30, 2006, 11:21:40
The processed image is copied back to buffer 1.

A jpeg is then saved from the buffer and then the buffer is displayed.

I am thinking of changing to .Net in near future.

I will post the processing part of the code later today.

Regards
Bestbier

Shih-Schon Lin
May 10, 2007, 12:53:46
The processed image is copied back to buffer 1.

A jpeg is then saved from the buffer and then the buffer is displayed.

I am thinking of changing to .Net in near future.

I will post the processing part of the code later today.

Regards
Bestbier


VB is not slow if you compile it into EXE file and then run the EXE file directly.

.NET is REALLY SLOW in controlling hardware because all hardware like cameras must run in native machine code while .NET runs in its own virtual machine. The data exchange between the .NET virtual machine and the native machine would only slow down significantly your applicaiton.

So if you want speed, switching to .NET would only make it worse.

Stefan Geissler
May 10, 2007, 13:33:21
Hi Shih-Schon Lin,

are you sure about .NET is slow? Especially in comparision to VB6? In our experiences .NET (VB and C#) is fast enough for realtime image processing. And much faster than VB6 in any case.

Shih-Schon Lin
May 10, 2007, 16:14:17
Hi Shih-Schon Lin,

are you sure about .NET is slow? Especially in comparision to VB6? In our experiences .NET (VB and C#) is fast enough for realtime image processing. And much faster than VB6 in any case.


What kind of computer (CPU, RAM, Video card) and OS are you using?

On my old Pentium-M laptop, VB6 programs run way faster than .NET programs. .NET program is super slow even if you use C++. I see delay in a simple program that does only simple computation (no imaging) and you see delay in button clicking and user interface responses.

Stefan Geissler
May 10, 2007, 16:17:11
Hi,

I use a five year old AMD 1400 CPU with Windows XP. And my VB6 image processing programs are not usable for realtime image processing like debayering. But VB.NET 2005 and 2003 will do fine. You may start your .NET application from the Windows Explorer and not from within Visual Studio. This makes a big difference especially in Visual Studio 2003.