Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations pierreick on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help in finding out X-Y co-ordinates of an image.

Status
Not open for further replies.

DesEngineer4

Mechanical
Feb 19, 2013
181

Hello,

I'm working on a project, my objective was to find the X-Y Maximum & X-Y Minimum coordinates. I have taken an image as attached (Input_image) and prepared some python code(attached as Python Code), I'm getting too many coordinates (attached as results). I need only 4 coordinates of an image as marked in yellow in the attached required coordinates. Please review my code and kindly help me with the solution. Thank you for your time and support.

Thanks & Regards,
Sam
 
 https://files.engineering.com/getfile.aspx?folder=182dd450-6d94-4086-9f45-7914aba88a87&file=Image_processing.zip
Replies continue below

Recommended for you

Is "input_image.jpg" supposed to be "coordinate8.jpg"? You've not included the very image that the program is supposed to read. Your comments are confusing; you state that "Create mask of all pixels lower than threshold level" yet your code appears to set the mask to be > threshold.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
Seems to me you're looking for to max and min points in each direction or perhaps the points halfway along each edge of a bounding box

This seems like a simple step following on from determining the perimeter which is your too many results. A simple for loop to find max/min x or y? Maybe I'm missing something as your explanation is not that clear though, and the solution seems fairly obvious given the results.jpg image?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor