Click here to Skip to main content
15,886,069 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
See more:
I'm designing interface with visual c# for my image processing project. I need point selection on an image and classification these points for using in my image processing code at vhdl.

Original image will stay at a picturebox and I will use selected image in another picturebox.

How I can select points on an image?
Posted

1 solution

I'm assuming you want to select points in the UI from the picturebox. In which case, you can use the MouseDown event, check e.Buttons == MouseButtons.Left, and use e.Location (or e.Position, can't remember the property name) for your images X/Y for where the user clicks, and you can add this to an array/list.

You can also use the picturebox Paint event to redraw previously clicked points from your array/list to show the user some visual feedback.
 
Share this answer
 
Comments
s_n_m_ 12-Apr-12 10:16am    
thank you. Yes I will select in the UI and use MouseDown event. And in addition to this, I will select twenty points and put a red point to each one of them while I select. How can I do it?
MarqW 12-Apr-12 10:19am    
I answered your additional question in my first post - You need to handle the Paint event of the PictureBox, then using e.Graphics draw rectangles (or circles etc.) at your stored 20 points
s_n_m_ 12-Apr-12 10:26am    
Thank you again. I understand now.
MarqW 12-Apr-12 10:27am    
No problems

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900