Basically, I threshold the original image and then get a binary image, where all surrounding area is black, but the boundary of the note are bright. It's easy to locate the upleft corner and bottom right corner of the note. Then everything can be worked out based on the 4 corners of the rectangle.
Sorry no Chinese input right now, I will explain in Chinese later on.