ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TIEVision new user and a lot of misunderstanding

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
gege52 Posted - Apr 24 2019 : 02:22:51
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.
8   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 09 2019 : 23:28:41
Hi

I cannot see any particular issue in your test project, so we'll need to investigate when we are next updating IEVision.

You might want to look at the FindContours code in the demo:

\Demos\IEVision\TrackObjects_LowLevel\TrackObjects.dpr

Nigel
Xequte Software
www.imageen.com
xequte Posted - May 09 2019 : 06:26:36
Hi Gerard

I received a copy of the message and have emailed you the source.



Nigel
Xequte Software
www.imageen.com
gege52 Posted - May 09 2019 : 04:20:11
Hi Nigel

This is impossible. I receive this message


There Was A Problem With Your E-mail

You do not have enough posts to email other members. If you feel that you have received this message in error, please contact the forum administrator.

But I send my Tiny Project to show what is the problem.

Best regards

attach/gege52/20195941934_TinyBlobDetection.zip
12.84 KB
xequte Posted - May 08 2019 : 03:46:53
Hi Gerard

Please email me for the source code. I cannot post it here.

Nigel
Xequte Software
www.imageen.com
gege52 Posted - May 08 2019 : 02:53:54
Hi Nigel

The ChannelFormat is right: (UINT8). This tiny code don't work

Procedure TMainForm.Test3MenuItemClick(Sender:TObject);
Var
  Img1:TIEVisionImage;
  ObjRef:TIEVisionVectorObjRef;
  ContourRetrMode:TIEVisionContourRetrMode;
  ContourApproxMethod:TIEVisionContourApproxMethod ;
  Num:integer;
Begin
    ContourRetrMode:=ievLIST;// = 1,
    ContourApproxMethod:=ievCHAIN_APPROX_NONE;// = 1,

  ImageEnView1.IO.LoadFromFile(ImageEnView1.IO.ExecuteOpenDialog()); // Original Image
  Img1:=ImageEnView1.IEBitmap.GetIEVisionImage;
  case ord(Img1.getChannelFormat)of
    0:ShowMessage('UINT8');
    1:ShowMessage('SINT8');
    2:ShowMessage('UINT16');
    3:ShowMessage('SINT16');
    4:ShowMessage('SINT32');
    5:ShowMessage('FLOAT32');
    6:ShowMessage('FLOAT64');
    else ShowMessage('Unknown');
  end;
 ObjRef:=Img1.FindContours(ContourRetrMode,ContourApproxMethod,IEVisionPoint(0,0));


The return of the last line is "Unknown Error".

Perhaps can you send me the IEVision source code.
I can send you my tiny project in order to see the problem.

Best regards

Gerard
xequte Posted - May 05 2019 : 06:16:51
Hi

FindContours requires an ievUINT8 format image, e.g. converted from ie24RGB.

Can you please check GetChannelFormat:

https://www.imageen.com/help/TIEVisionImage.getChannelFormat.html


Though, from the OpenCV documentation, these look like the valid methods: CV_CHAIN_APPROX_NONE, CV_CHAIN_APPROX_SIMPLE, CV_CHAIN_APPROX_TC89_L1, CV_CHAIN_APPROX_TC89_KCOS


Please email us for the IEVision source code.

Nigel
Xequte Software
www.imageen.com
gege52 Posted - May 03 2019 : 19:08:57
Hi Nigel

Thank for your answer to points 2 and 3

For the fourth point, the main problem is that this very simple code

Procedure TMainForm.Test3MenuItemClick(Sender:TObject);
Var
  Img1:TIEVisionImage;
  ObjRef:TIEVisionVectorObjRef;
Begin
  ImageEnView1.IO.LoadFromFile(ImageEnView1.IO.ExecuteOpenDialog()); // Original Image
  Img1:=ImageEnView1.IEBitmap.GetIEVisionImage;
  ObjRef:=Img1.FindContours(IevEXTERNAL,IevCHAIN_CODE,IEVisionPoint(0,0));
End;


don't work. I get an error with this message "Erreur non spécifiée" (in english "Unknown error") and ObjRef is nil.

the frame of opencv "FindContours" method is different of IEViosn "Findcontours" frame!!!!
It is impossible to know what is the problmem.

Is it possible to get the source code of IEVision,

Best regards
xequte Posted - Apr 28 2019 : 23:13:36
Hi

1. Let me clarify this...

2. Please use:

https://www.imageen.com/help/TIEBitmap.AssignIEVisionImage.html

// Add blue border to image
Img1 := ImageEnView1.IEBitmap.GetIEVisionImage;
Img1.makeBorder( 20, 20, 20, 20, ievBORDER_CONSTANT, IEVisionScalar(255, 0, 0 ));
ImageEnView1.IEBitmap.assignIEVisionImage( Img1 );
ImageEnView1.Update();

3. Unfortunately the OpenCV documentation is not clear on what works here. In my testing you can use ievBORDER_CONSTANT, ievBORDER_REPLICATE, ievBORDER_REFLECT or ievBORDER_REFLECT_101. I will add this to our documentation.




4. Again we are limited by the OpenCV documentation. Generally, we are providing the OpenCV documentation verbatum, but improving it where we can. In the case of findContours, the return value is not described:

https://docs.opencv.org/3.4.2/d3/dc0/group__imgproc__shape.html#ga17ed9f5d79ae97bd4c7cf18403e1689a


Source code is always available for IEVision, please email us.


Nigel
Xequte Software
www.imageen.com