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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to exchange content between IEBitmap an OpenCV Mat quickly?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

supersk

105 Posts

Posted - Sep 09 2025 :  02:45:09  Show Profile  Reply
How to exchange content between IEBitmap an OpenCV Mat quickly?

xequte

39146 Posts

Posted - Sep 09 2025 :  21:55:32  Show Profile  Reply
Hi

An OpenCV Mat file would be represented in ImageEn by a TIEVisionImage:

http://www.imageen.com/help/TIEVisionImage.html

Or the alias:

http://www.imageen.com/help/TIEVisionMatrix.html


Which you would assign to a TIEBitmap as follows:

MyIEBitmap.AssignIEVisionImage( MyIEVisionImage );


Here's an example of creating a matrix:

const
  sharpenKernel: array [0..2] of array [0..2] of single = ((-1, -1, -1), (-1, 8, -1), (-1, -1, -1));
var
  k: TIEVisionImage;
  i, j: integer;
  l: PSingleArray;
begin
  // convert the kernel to TIEVisionImage
  k := IEVisionLib().createImage(3, 3, ievFLOAT32, 1);
  for i := 0 to 2 do
  begin
    l := k.getScanline(i);
    for j := 0 to 2 do
      l[j] := sharpenKernel[i, j];
  end;
...


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: