Drag and Save source code using openCV

When we study machine learning, we have to get a lot of image data.
And we should cut off only positive region on the image.

If we have many image to crop positive region, this source code is useful.

The method to use is..
1. input the path to crop image data.
2. number of image data 

On the image,
Click and Mouse drag ( green box line is drawn)
Space bar(save and next image)

vs 2008
OpenCV 2.43

source code