algorithm for lasso tool in photoshop

any one of u give me a method to implement lasso
tool like in adobe photoshop.
what i am thinking is  finding edges using sobel edge opearator.
please give me a idea to implement that
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

rob_moggachConnect With a Mentor Commented:
Check out GIMP!
This is a free image manipulation program with a lot of the exact functionality of Photoshop (like the lasso tool) and the source code is a available!!!!
Excellent, excellent resource for what I think you're looking for!
Perhaps you mean magic wand tool?  The lasso does no edge detection IIRC, it just marks bounding points and closes itself with a straight line.
All Courses

From novice to tech pro — start learning today.