Hi guys,
I have some difficulties to understand the product without the source code.
First
I don't understand the link between TImagenView.IEBitmap and TIEVisionImage.
In the next code
ImageEnView1.IO.LoadFromFile( ImageEnView1.IO.ExecuteOpenDialog() );
ImageEnView1.IEBitmap.PixelFormat := ie8g;
ImageEnView1.Update();
ImageEnView2.IEBitMap.Assign(ImageEnView1.IEBitmap);
//The two images are right if I comment the rest of the code
Img1:= ImageEnView1.IEBitMap.GetIEVisionImage;//I link ImageEnView1 and Img1
Img2:= ImageEnView2.IEBitMap.GetIEVisionImage;//I link ImageEnView2 and Img2
Img2.setZero;
ImageEnView2.Update;//The ImageEnView2 is black if I comment the rest of the code
Img2.operatorASSIGN(Img1);
ImageEnView2.Update;// The imageEnView2 is always black!!!!
Second.
I don't understand how is it possible to link a TIEVisionImage built with a TImageEnView to see the image. Example
procedure TMainForm.TestMenuItem1Click(Sender: TObject);
var
Img:TIEVIsionImage;
begin
// An ImageEnView is created in the main window
Img.create(ImageEnView.IEBitmap.Width, ImageEnView1.IEBitmap.Height, ievUINT8, 3);//I create an empty TIEVisonImage with the right size et richt channels
Img.setValue(IEVisionScalar(127, 127, 127));// I color it in grey
//??????? How to say that the ImageEnView.IEBitmap.GetIEVisionImage is precisely Img
ImageEnView.Update;
end;
Third
A lot of functions are wrong for example:
procedure TMainForm.Test2MenuItemClick(Sender: TObject);
var
BorderType:TIEVisionBorderType;
Img1,Img2:TIEVisionImage;
begin
ImageEnView1.IO.LoadFromFile( ImageEnView1.IO.ExecuteOpenDialog() ); //Original Image
ImageEnView2.IEBitmap.Assign(ImageEnView1.IEBitmap); // Transformed Image
Img1:=ImageEnView1.IEBitmap.GetIEVisionImage;
Img2:=ImageEnView2.IEBitmap.GetIEVisionImage;
BorderType:=ievBORDER_CONSTANT;// = 0,
// BorderType:=ievBORDER_REPLICATE;// = 1,
// BorderType:=ievBORDER_REFLECT;// = 2,
// BorderType:=ievBORDER_WRAP;// = 3,
// BorderType:=ievBORDER_REFLECT_101;// = 4,
// BorderType:=ievBORDER_TRANSPARENT;// = 5,
// BorderType:=ievBORDER_ISOLATED;// = 16
// Only the three first values work, the next four give a little understandable message "Erreur non spécifiée" in french meaning "Unknown Error" in english
Img1.Blur(Img2,IEVisionSize(20,20), IEVisionPoint(-1, -1),BorderType);
ImageEnView2.Update;
end;
Fourth
For some methods the documentation is poor:
function findContours(mode: TIEVisionContourRetrMode; method: TIEVisionContourApproxMethod; offset: TIEVisionPoint): TIEVisionVectorObjRef; safecall;
Impossible to understand what is returned by this method
My aim is to build a lot of TimageEnView: ImageEnView1, ImageEnView2, ImgaeNView3, ImageEnView4, linked with a lot of TIEVisonImage Img1, Img2, Img3, Img4 and make a lot of tra,nsformation to pass from Imga1 to Img2 and from Img2 ti Img3 and from Img3 to Imge4 et see at screen yhe different transformations.
Perhaps is-it possible to get the source code in order to understand the link between ImageEn and OpenCV.
Best regards.