View Single Post
  #3   Spotlight this post!  
Unread 28-11-2007, 11:39
tommy_chai tommy_chai is offline
Registered User
no team
 
Join Date: Oct 2007
Location: Msia
Posts: 12
tommy_chai is an unknown quantity at this point
Re: How to filter the points to get only the left most and right most?

The code from my previous post is to store the x and y coordinates which are detected into corner_list[n]. However, i need to filter it and save the left most and right most corner points, assume to be (x1,y1) and (x2,y2).

Can you show me how to get the correct x and y while there are two left most points with the same x-position? The height of my image is 80 pixels. So, if there is any left most or right most points with the same x-position, i will choose the one with y value nearest to 40 pixels. Can you show me how to program it and connected to my posted program?

Sorry I have just joined the world of programming. Any help will be appreciated. Thanks.