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
 [IEvo] SelectColor > Fill selection, save position
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

jritter

Germany
19 Posts

Posted - Feb 08 2017 :  09:33:36  Show Profile  Reply
Hello,

for a small project I need to find a specific color in a (binary) image, colorize every found "spot" with a different color, save the min/max X/Y coordinates of each spot and get the size of the spot in pixels.

I did something a bit similar like that a while ago in C for a simple BMP file and recently with the get/setpixel method of .Net/c#, but that's realy slow.

Now I can use IEvolution 5 and I just tried "SelectColors()" which selects all spots realy fast =).

But how can I select individual parts of the selection to fill them with different colors?
And is there an easy way to count selected pixels, and/or to get the coordinates of the "somehow shaped"-selection?

xequte

38615 Posts

Posted - Feb 09 2017 :  20:15:37  Show Profile  Reply
Hi

Get/SetPixel would be too slow.

Your best method would be to parse the scanlines:

https://www.imageen.com/ievolutionhelp/html/310fec55-f5b8-93f0-28f1-f2a07c3e7265.htm

It works in the same way as Bitmap scanline, for which there are plenty of examples on the web.

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