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 can get edge pixels?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

supersk

99 Posts

Posted - Apr 07 2013 :  02:29:44  Show Profile  Reply
I select a region in a imageenview, how can I get the edge pixels of region. I want to use those pixels to calculate the feature of image.

w2m

USA
1990 Posts

Posted - Apr 07 2013 :  06:49:59  Show Profile  Reply
What do you mean by "edge" pixels? Do you mean get the selection coordinates? What do you mean by "features"?

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

fab

1310 Posts

Posted - Apr 08 2013 :  00:50:01  Show Profile  Reply
If you mean to "edge-detect" try:

ImageEnView1.Proc.EdgeDetect_ShenCastan();

or

ImageEnView1.Proc.EdgeDetect_Sobel();

Both methods apply to the whole image (not only to the selected area).
Go to Top of Page

supersk

99 Posts

Posted - Apr 09 2013 :  21:06:12  Show Profile  Reply
Maybe, I didn't clearly state my problem. For example, I select a polygon
area in a ImageenView, How can I get the polygon coordinate?
Go to Top of Page

w2m

USA
1990 Posts

Posted - Apr 10 2013 :  06:14:02  Show Profile  Reply
Use PolySelCount to get the number of points and PolySel to get each point or use TPointArray:
procedure TForm1.Button1Click(Sender: TObject);
var
  i: integer;
  iPoint: TPoint;
  iPoints: TPointArray;
begin
  Memo1.Lines.Clear;
  for i := 0 to ImageEnView1.PolySelCount - 1 do
  begin
    iPoint := ImageEnView1.PolySel[i];
    Memo1.Lines.Add('Point: ' + IntToStr(iPoint.X) + ',' + IntToStr(iPoint.Y));
  end;
end;

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

supersk

99 Posts

Posted - Apr 12 2013 :  01:55:47  Show Profile  Reply
if I draw a rectangle, i only get 4 points. if I draw a ellipse, maybe i will get 100 points depending on ellipse's size and shape. I want to got all the pixel of an selected region. How can i do ?
Go to Top of Page

w2m

USA
1990 Posts

Posted - Apr 12 2013 :  05:24:33  Show Profile  Reply
Do what I showed you.

William Miller
Go to Top of Page

hamidshali

Iran
51 Posts

Posted - Jun 03 2015 :  02:46:18  Show Profile  Reply
hi
i want to delete point in selected point
how i can delete one of selpoint in polyline
Go to Top of Page

spetric

Croatia
308 Posts

Posted - Jun 03 2015 :  03:36:14  Show Profile  Reply
The easiest way to detect all pixels lying on some arbitrary curve is to draw that curve (ellipse, polyline, rectangle, etc...) on some off-screen bitmap (monochrome mask) and then scan simultaneously through original bitmap and mask bitmap to apply desired action on original bitmap (if mask_pixel(x,y) > 0).

Otherwise, you'll have to have your own drawing function, that can return
a collection of pixels lying on some curve.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: