LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display ActiveX Image on LabVIEW Front Panel [method returns "handler" (IPictureDisp - stdole.Picture)]

Solved!
Go to solution
I'm acquiring images from a USB Microsoft Fingerprint Reader via ActiveX.  The BiometricDisplay method outputs "handler" which is a reference, whose wire type is "stdole.Picture".  I can create "Picture" property and invoke nodes using "handler" (in contrast to the "Pict" nodes used with LabVIEW picture indicator references) but do not see how they help.
 
The SDK (Software Development Kit) explains that the BiometricDisplay method "Returns a picture display handle (IPictureDisp) to the supplied raw grayscale fingerprint image with its minutiae, segments and minutiae direction drawn."  (Minutiae, segments, and direction are merely parts of the template, which is used for matching.)
 
A couple of KnowledgeBase links make me wonder if porting the image to a standard LabVIEW indicator is even possible due to thread problems:
 
 
Is it possible to port the image to a standard LabVIEW indicator?  Are there ActiveX controls that could house the image?  How would I find / install / use them?  I've seen "Tree View Control" and "ImageList" mentioned elsewhere, but don't know if they're even applicable.  Please speak slowly, as I am unfamiliar with the Picture data type.
 
Thank you!
 

Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 1 of 13
(8,601 Views)
The handle you got from ActiveX is an OLE Picture handle, which has nothing to do with LabVIEW Picture control.
You have to write a C dll/CIN to convert the handle to pixels with OLE functions.  Call the dll/CIN in LabVIEW, and
display the pixels in a LabVIEW Picture control.
 
George Zou
George Zou
0 Kudos
Message 2 of 13
(8,588 Views)
Can I pass the ActiveX IPictureDisp handle to a front panel ActiveX control for display (e.g. the ActiveX equivalent of the LV Picture Indicator) to keep it in the ActiveX layer?  Which control, and how do I install it?
 
If not, have you successfully used OLE functions to convert the reference?  Can this be done in LabVIEW?  How would I load the libraries?
 
Thank you for your comments!
 
-B 

Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 3 of 13
(8,569 Views)

LabBEAN wrote:
Can I pass the ActiveX IPictureDisp handle to a front panel ActiveX control for display (e.g. the ActiveX equivalent of the LV Picture Indicator) to keep it in the ActiveX layer?  Which control, and how do I install it?
 
I don't think that would work.
 
If not, have you successfully used OLE functions to convert the reference?
Yes.
 
Can this be done in LabVIEW?  How would I load the libraries?
I don't think so.
 
George Zou
 
George Zou
0 Kudos
Message 4 of 13
(8,566 Views)
I am able to convert and pass the rawImage Variant to a LabVIEW Picture Indicator (see attached VI).  The handle may be referencing a similar (standard?) rawImage Variant data type (albeit OLE), only this image would contain the overlayed template (explained above).  I wonder if your DLL would parse the handle object correctly.  Could you attach it / something similar as an example?
 
Or, and please forgive me for continuing to beat this drum, maybe there's an ActiveX control that accepts the handle if it is to the rawImage type?
 
-B

Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 5 of 13
(8,559 Views)
The OLE handle is not likely to be a raw image pointer.
MS doesn't give the data structure of the handle.  So you can't parse.
You have to use OLE functions and other WinAPIs to get the raw image pointer.
 
Can you give me the web page of the SDK you're using?
I might have time to make a VI for you.
 
George Zou
 
George Zou
0 Kudos
Message 6 of 13
(8,553 Views)
George,
 
Thank you in advance for any (more) time you spend on this.  Here's the link to the SDK.
 
 
I've also attached a screenshot describing the BiometricDisplay method.
 
-B

Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 7 of 13
(8,551 Views)
I've created the VI to extract ImageData from the IPictureDisp.  ImageData is a cluster for LV Picture control.
What version of LV are you using?  Please send me an email.
 
George Zou
 
George Zou
Message 8 of 13
(8,503 Views)

George,

I'm using LabVIEW 8.5.  Again, thank you.

-B


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
0 Kudos
Message 9 of 13
(8,498 Views)

Success!!

George and I took the discussion offline, and he guided me to the following solution:

How to display "stdole.picture" reference in an ActiveX control on the front panel:

(1) Drop an ActiveX container on the front panel.

(2) Right click and select "Insert ActiveX Object".

(3) Choose Microsoft Forms 2.0 Image.

(4) Pass this MS Forms 2.0 Image control reference (possibly through subVIs) to a property node (which will change to class "IImage").

(5) Select the "Enabled" property and wire (F).

(6) Select the "Picture(putRef)" or "Picture" property and wire the "stdole.picture" reference (also referred to as IPicture (NOT IPictureDisp according to George)].  This is "handler" in the attached PNG.

(7) Select the "Enabled" property and wire (T).  [The purpose of the two enables is to force the ActiveX Image control to update]

NOTE:  passing the stdole.picture reference out of the VI and executing the IImage property node later does NOT seem to work.

 

-- George also sells an Image Toolbox which assists with many other imaging functions --

http://www.geocities.com/gzou999/index.html

and click on "Image Toolbox" on the left....


Certified LabVIEW Architect
TestScript: Free Python/LabVIEW Connector

One global to rule them all,
One double-click to find them,
One interface to bring them all
and in the panel bind them.
Message 10 of 13
(8,447 Views)