Need help with Image processing using Python [closed]
I am a new programmer in Python and I am trying to do some image processing. I want to incorporate a selection feature on an image with the help of the mouse. The image will display and then the user will select a part of the image with the mouse which will get saved as a new image. I have idea about opening, displaying and saving an image but I have no idea if we can select an image in Py开发者_开发百科thon using any algorithm. Any help will be appreciated.
Regards.
Checkout PIL (Python Imaging Library):
http://www.pythonware.com/products/pil/
I am not sure what image library you are using. But to create a subset of an image using PIL look here under the chapter "Cutting, Pasting and Merging Images".
If you are trying to do some complex shape selecting instead of rectangle cutting, you may look into OpenCV library,
http://opencv.willowgarage.com/documentation/python/index.html
精彩评论