PDA

View Full Version : avoid overlay image effecting imagedata



mih
August 11, 2004, 12:32:14
How to avoid the overlay-image effecting the imagedata?

When using the overlayimage the videodata(imagedata) is overwritten by the overlayimagedata.
This influences my results of imageprocessing.
I need only the original videodata in the imagedata array without any data from overlayimage.

Is there a way to avoid this effect.
My Overlayimage should only exist for displaying.

Johannes Vogel
August 12, 2004, 12:31:31
Hello,

At the moment, the only way to overcome this problem is to render the overlay yourself onto the buffers and display them with GDI functions. If you send a request to support@imagingcontrol.com, we will send you a simple sample showing how to do this.

mih
August 19, 2004, 18:08:59
Thanks for the example.

Now the dll returnes the result-image to VB.

How can I display this imagedata (typ variant) in IC-control or Picturebox again?

The Advanced Sample uses type ImageBuffer but I don`t know how to transform to it.

Please help me.

Stefan Geissler
August 20, 2004, 07:39:10
Hello,



Dim ImageData As Variant

ICImagingControl1.MemorySnapImage
ImageData = ICImagingControl1.MemoryGetImageData
'Perform image processing here

ICImagingControl1.MemoryReleaseImageData ImageData
' The following line displays the image data.
ICImagingControl1.Display



You may also use the DisplayImageBuffer method of IC Imaging Control. The ImageBuffer has also a GetImageData method, that returns the Variant array.

Have a look to http://www.imagingcontrol.com/ic/docs/html/activex/MultipleBuffers.htm
for using ImageBuffers.
With the CurrentIndex property of the ImageBuffers collection you will query the last image buffer that received a frame. To use the ImageBuffer and ImageBuffers Collection, you must set the LiveCaptureContinuous property of IC Imaging Control to true.

With the DisplayImageBuffer method of IC Imaging Control you can display the Imagebuffer you have manipulated.



Dim Current As Integer

Current ICImagingControl1.ImageBuffers.CurrentIndex
ICImagingControl1.ImageBuffers.Item(Current).Lock
ImageData = ICImagingControl1.ImageBuffers.Item(Current).GetIm ageData
' Perform Image Processing
ICImagingControl1.ImageBuffers.Item(Current).Relea seImageData ImageData
ICImagingControl1.DisplayImageBuffer ICImagingControl1.ImageBuffers.Item(Current)
ICImagingControl1.ImageBuffers.Item(Current).Unloc k


To see the result in the IC Imaging Control window, you must set LiveDisplay to false.

mih
August 30, 2004, 12:57:10
Thank you for everything.
Now it works very fast.

But there are still some problems:

I can only return the imagedata(variant) to the source-IC-control. Even if i return it to another IC-Control, it is displayed in the source IC-control.

I would need a Control, only for displaying a imagedata-array(variant) because
in my application i need the original-videos (in IC-controls) and the resulting-images in other controls(image-displays).

Ist there a control that takes an imagedata(variant) only for displaying it?
Or can I give this variant-array to an picturebox.

Stefan Geissler
August 30, 2004, 14:57:48
Hello,

You can use the Picture property of IC Imaging Control to display the live video frames in a PictueBox.



Dim ImageData As Variant

ICImagingControl1.MemorySnapImage

PictureBox.Picture = ICImagingControl1.ImageBuffers.Item(ICImagingContr ol1.ImageBuffers.CurrentIndex).Picture


ImageData = ICImagingControl1.MemoryGetImageData
'Perform image processing here


ICImagingControl1.MemoryReleaseImageData ImageData
' The following line displays the image data.
ICImagingControl1.Display

This code sample displays the snapped image in a picture box and starts the image processing after this.