View Full Version : Displaying image processed in a IC into another one
jcarranza
May 6, 2004, 18:44:33
I have been working with the IC activeX control for doing image processing. What I want to do is the next:
1.- Display image available in one IC window
2.- Select ROI with mouse events.
3.- Make image processing in ROI.
4.- Display ROI processed in a second IC window.
As far as I have been working I already have the 3 firts steps but now I want to display de ROI processed in other IC window, but I have no idea on how to do this, I mean I don't know how to configure the second IC. Could you please help me?
Thanks a lot.
Stefan Geissler
May 7, 2004, 12:39:17
Hello,
For drawing a ROI with the mouse see the Advanced Image Processing sample in the samples\vb6 directory of your IC Imaging Control installation.
You should use a PictureBox control instead of a second IC Imaging Control.
To display the ROI in a PictureBox, your should use the PSet method of the Picture and draw pixel by pixel.
jcarranza
May 7, 2004, 19:44:44
Hi again, My last questions were on the pointer of type Pointer, I have been working on it and if I cast this to other pointer of type INTEGER I can get the data but I think there is something wrong with the answer, here is my delphi code:
procedure TForm1.ICImagingControl1ImageAvailable(ASender: TObject;
BufferIndex: Integer);
var
CurrentBuffer: ImageBuffer;
ImageData: OleVariant;
pPixel:Pointer;
pValue:PInteger;
begin
CurrentBuffer:= ICImagingControl1.ImageBuffers.Item[BufferIndex];
CurrentBuffer.Lock;
ImageData:= CurrentBuffer.GetImageData;
pPixel:=TVarData(ImageData).Varray^.data;
//HERE I DO THE CAST
pValue := pPixel;
//HERE I GET THE DATA OF pPixel in an edit Box
Edit1.Text:=IntToStr(pValue^);
//Accessing via the ID Array
Edit2.Text:=IntToStr(ID[0,0]);
(* pPixel points directly to the beginning of the image pixel data *)
CurrentBuffer.ReleaseImageData(ImageData);
ICImagingControl1.DisplayImageBuffer(CurrentBuffer );
CurrentBuffer.UnLock;
end;
When running this program I get that pValue holds a number like (-117222558) while ID[0,0] holds (245) what I think is the greyscale number. My question is how can I get the same greyscale using the pointer.
Thanks a lot.
Stefan Geissler
May 10, 2004, 08:22:15
Hello,
as i wrote in the other thread, my Delphi experiences are too poor for this issue. Sorry.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.