PDA

View Full Version : WPF on Windows 8



Jerry
January 16, 2013, 16:24:57
Hi,

I have a working WPF application using the IC Imaging Control hosted in a WindowsFormsHost. This works fine on Win7 on multiple PCs and laptops.

Now I have been trying to install this application on a Windows 8 tablet (Acer Iconia Tab) and it does not run at all.

To debug this I created a simple WPF project (with a single empty window) it runs fine on the tablet.

If I add a single line to the MainWindow class, it no longer runs correctly (I see nothing) :-


Class MainWindow
Private WithEvents icImagingControl1 As TIS.Imaging.ICImagingControl = Nothing
End Class

If I remove the "=Nothing" then it works Ok. I get a window I can drag around ...

The following class definition also breaks. Any access to the IC control seems to break the application. There are no warning messages of any kind, no exceptions, nothing. (A WPF feature most likely).


Class MainWindow
Private WithEvents icImagingControl1 As TIS.Imaging.ICImagingControl ' this Ok now

Public Sub New()

' This call is required by the designer.
InitializeComponent()

' Add any initialization after the InitializeComponent() call.
icImagingControl1 = New TIS.Imaging.ICImagingControl ' this breaks it again
End Sub
End Class

Can you explain what is going on ?
Please dont tell me not to use WPF !

Jerry

Stefan Geissler
January 16, 2013, 16:59:18
Hi Jerry,

I do not dare to ask: IC Imaging Control is installed on the Windows 8 system? Including .NET framwork and necessary VC runtime files? You may receive a usable error message, you can post. Wrap the "New TIS.Imaging.ICImagingControl" into a try... catch block and show the exception message, if there is one.

Also, I must admit, I have not as much Windows 8 experiences right now.

Jerry
January 21, 2013, 11:31:04
Stefan,

After a little more exploration I have found that building against dot.net framework 3.5 (rather than 4.0 which I had used initially) makes things much much better.

On a Win8 64bit PC things are working 100%

On the Win8 tablet, the application now runs but I cannot acquire images, getting a Device Lost message quickly after application start.

Shame as I wanted to add some touch gestures for the tablet too, and I don't think 3.5 supports touch.

Jerry

Stefan Geissler
January 21, 2013, 11:41:58
Hi Jerry,

Which device do you use? If the device is lost, you have a power problem, as soon as the camera starts providing images. The USB CCD cameras (Dxx 21,31,41,51) are very power consumptive, they need the full 500mA the USB controller can provide. The CMOS cameras need less mA.

Jerry
January 21, 2013, 12:58:02
Its a DFK 72AUC02-F so CMOS

That's a good point, I will check this out.

Jerry
January 22, 2013, 10:56:16
I tried it with a powered hub but I still get Device Lost message.

Stefan Geissler
January 22, 2013, 14:00:53
Hi

Is is possible to install IC Capture on the tablet and try again? However, I expect, that the camera will behave in the very same way. I must admit, I have no tablet experiences, therefore, I do not know, whether the camera can be used on it at all.

Jerry
January 23, 2013, 10:47:43
I tried it on a ViewSonic Win7 tablet and Image acquisition seems to work. :-)

I have found that running in live video mode, the GUI becomes very slow to respond. I know its only a 1.6GHz Atom processor but is there a more efficient way of screen updating than using IC.DisplayImageBuffer inside ImageAvailable event. The constant screen update seems to slow processing of windows messages.

Jerry

Stefan Geissler
January 23, 2013, 16:42:04
Jerry,

The Atom CPU's processor architecture is not very suitable for the camera, especially in high frame rates, because it has an In-Order architecture. Desktop CPUs use an Out-Of-Order architecture, which allows more parallelization.
The time consuming process is the RGB color calculation, which is donw on in the computer, the camera sends raw data only. Therefore, you have a very high CPU load. You may use a lower frame rate.