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
 IEvolution, c#, emgu, opencv

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

Size 
UserName:
Password:
Mode 
Format  BoldItalicizedUnderline Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailBrowse for an image to attach to your post Browse for a zip to attach to your post Insert CodeInsert QuoteInsert List
   
Message 

 

Smilies
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
fotoman Posted - May 14 2019 : 18:47:13
Hi,
I'm converting an old delphi app that uses ImageEN to a new c# app that currently uses OpenCV via a wrapper called Emgu. I want to use IEvolution to replicate what's happening in the delphi app because that app is largely debugged and the processes are well tested.

I have the following code working but I'm not sure its the best way to move images between emgu and iev. Also, the ieviewer (called Img in the snippet) doesn't update after swapping in the new image even after calling invalidate and update.

Image<Bgr, byte> Original = new Image<Bgr, byte>(new Bitmap(Img.Image.GetNetImage()));
Image<Hsv, Byte> imgHSV = Original.Convert<Hsv, Byte>();
Image<Gray, Byte>[] channels = imgHSV.Split();
channels[2] += 55;

CvInvoke.Merge(new VectorOfMat(channels[0].Mat, channels[1].Mat, channels[2].Mat), imgHSV);
pbCamera.Image = imgHSV.Convert<Bgr, Byte>();
Img.Image.CopyFromMemory(imgHSV.Convert<Bgr, Byte>().MIplImage.ImageData, imgHSV.Width, imgHSV.Height, HiComponents.IEvolution.IEImage.PixelFormat.ie24RGB, HiComponents.IEvolution.IEImage.BitmapOrigin.TOPLEFT, imgHSV.MIplImage.WidthStep);
Img.Invalidate(true);

Img.Update();


So....
A) is that the best way to move images back and forth? in ImageEN I had a bitmap available in IEBitmap but I can't find the equivalent in iev.
B) why doesn't the view update? if i click on it or zoom it will update so i know its getting the image correctly.

I'm also looking for the equivalent of TImageEn.Proc
Is there any information you can provide that will make it easier for me to move from TImageEN to IEvolution?
It seems both familiar and completely new. maybe just some architectural overview would help

Thanks!
Scott

1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 15 2019 : 05:54:19
Hi Scott

IEImage is the equivalent of IEBitmap. You can use AssignRect to copy content from one IEImage to another:

https://www.imageen.com/ievolutionhelp/html/d0f77fc6-02d9-c466-f5b7-a3e1c0058526.htm

Please use UpdateImage if the bitmap content has changed:

https://www.imageen.com/ievolutionhelp/html/db1609b7-372b-967c-83ed-bb8d1da0b850.htm

There is no Proc for IEImage, instead the proc methods are part of IEImage, e.g.

ImageEnView1.Proc.Rotate -> IEImage.Rotate

The IEvolution source may help you transition. Please email me.

Nigel
Xequte Software
www.imageen.com