Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

passing image from Vision.VisionImage to CWIMAQControls.CWIMAQImage

       
Hi folks,

 

I took over a project and found that image is passed through bmp file on HDD which at high res and frame rate can slow the application on older hardware. After brief look I found that image classes from aquisition Vision.VisionImage and display CWIMAQControls.CWIMAQImage classes are not directly compatible.

Each class has ImageToArray and ArrayToImage functions and it works reasonably fast , at least in terms of update rate of display,  but for some reason image is rotated 90 degrees, from landscape to portret orientation. Is there any logic behind that?    If I try to do nested loop array reordering , it just crawls thanks to .NET, I guess. I did not find any image manipulation functions either on capture or display side.  Camera can make horizontal mirror image but not flip on its side.

 

Any suggestions would be appreciated.  

--------------------------------------------------------------------------------

Here is the code sample, I removed saving image to bmp file and reading from it


  'Grab Image that is to be displayed to the Image Viewer
                    ethernetSession.Grab(image, True)

                    Dim pxl As PixelValue2D = image.ImageToArray()

 'Refresh display buffer 
                    VIDEO.Images.Item(1).ArrayToImage(pxl.U8)

 

0 Kudos
Message 1 of 2
(3,408 Views)

there was similar discussion in other section and it looks like still unresolved.

 

Machine Vision -> Vision 2009 ArrayToImage Method difference

0 Kudos
Message 2 of 2
(3,399 Views)