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
 Multiple Polygon Selection
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

flatserv

Germany
22 Posts

Posted - Oct 08 2012 :  03:16:24  Show Profile  Reply
Hello,

is there a way to do more polygon selections? I need to select 2 parts of an image using polygon but if i try to select the second polygon, the first selection is away (deselected).

Background: I need to do an inner and outer selection.

klausdoege

Germany
389 Posts

Posted - Oct 08 2012 :  12:36:47  Show Profile  Reply
Hi,
TImageEnView.ForceALTkey
Declaration
property ForceALTkey:boolean;
Description
Set ForceALTkey to True to emulate pressing the ALT key.
It allows making and modifying selections or vectorial objects (for TImageEnVect component) always maintaining aspect ratio. Default is False.

I hopes that helps.

Klaus
www.klausdoege.de
Go to Top of Page

flatserv

Germany
22 Posts

Posted - Oct 09 2012 :  05:15:26  Show Profile  Reply
Hi Klaus,

thanks for your answer, but i want to make 2 selections using polygon selection. And i don't know how to select 2 completly different parts of a image at the same time without deselect.

Example:
Load a face image into editor. Now try to select 1st eye and 2nd eye without a line between eyes. Every eye must have it's own selection, not only one big polygon selection.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Oct 09 2012 :  07:08:51  Show Profile  Reply
ImageEn does not support multiple selections... meaning there can not be more than one selection at a time.... but you can create one selection with two seperated ellipses:

1. Set ImageEnView1.MouseInteract := [miSelectCircle];
2. Click on the center of the left eye and drag the mouse with the left button down to select the left eye.
3. Press and Hold the SHIFT key and click on the center of the right eye and drag the mouse with the left button down to select the right eye.

The key to making a good selection around the desired eye is to start the selection on the center of the eye.

The SHIFT key adds a new selection to the current selection.
There is only one selection but both eyes are now selected.

You can not move the selection on the left eye seperately from the the right eye because there is only one selection. Both ellipses move at the same time when you try to move the selection.

If you have to adjust the position of the ellipse on just one eye then click on the image to remove the selection and try again.
You can not move the selection on the left eye seperately from the the right eye because there is only one selection. Both ellipses move at the same time.

It would be nice to be able to position multiple selections around on the screen for this sort of thing, so you could select the first eye, reposition the selection precisely where you want it on the first eye, then press and hold the SHIFT key to select the second eye, then reposition the selection precisely where you want it over the second eye but ImageEn does not support this feature.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

flatserv

Germany
22 Posts

Posted - Oct 09 2012 :  10:12:25  Show Profile  Reply
William,

thanks a lot for your great answer, that maybe solve my problem. Maybe it is possible to add a property like ForceALTkey, named "ForceSHIFTkey"? If so i can add the function i need very easy. I hope :)
Go to Top of Page

flatserv

Germany
22 Posts

Posted - Oct 12 2012 :  10:07:59  Show Profile  Reply
Ok, i think i can use miPutPolyline, but how can i define, that a Polyline is automatically closed, if a point is near to the starting point?
Go to Top of Page

w2m

USA
1990 Posts

Posted - Oct 12 2012 :  10:23:15  Show Profile  Reply
Are you using TImageEnView or TImageEnVect? Why use polylines over an ellipse? So you can position each polyline ellipse over each eye? If so you can move each polyline seperately over each eye, but when you call RemoveRedEye, the RedEye removal will be applied to the entire image because a polyline is not a selection. ImageEnProcedures only operate on a selection or the entire image is there is no selection. There is no way to convert a polyline or other object to a selection that I can find.

In any case if you are using TImageEnVect then set PolylineEndingMode
to ieemManual, then after you create the polyline call TImageEnVect.CancelInteracts;

TImageEnVect.PolylineEndingMode

Declaration
property PolylineEndingMode:TIEPolylineEndingMode;

Description

Specifies how terminate a polyline. Default is ieemDoubleClick.
Using ieemManual you have to interrupt manually the inserting call CancelInteracts or setting a new value in MouseInteractVt.


You may also have to call TImageEnVect.ObjPolylineClosed:

TImageEnVect.ObjPolylineClosed

Declaration

property ObjPolylineClosed[hobj:integer]:boolean;

Description

ObjPolylineClosed is True if we want close the polyline (so it is like a polygon).

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

ikishchak

1 Posts

Posted - Nov 13 2012 :  11:47:28  Show Profile  Reply
See [url=http://www.ulybin.de/products/polygonlib.php?lang=en]PolygonLib[/url] - Polygon Clipping Library.
This is C++ and COM library with good performance and many operations on polygons.
[url=http://www.ulybin.de/products/polygonlib.php?lang=en#comparison]Here[/url] is performance comparison with 2 well known Polygon Clipping Libraries.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: