1. A method for image processing, comprising: obtaining an image comprising a writing board and a background external to the writing board; detecting a plurality of lines within the image; identifying and removing, from the plurality of lines, a first subset of lines located on the writing board in the image; identifying and removing, from the plurality of lines, a second subset of lines located in the background of the image; determining, based on the plurality of lines after the first subset and the second subset are removed, a plurality of corners of the writing board within the image; and correcting a perspective of the writing board by applying a transformation to the image based on the plurality of corners.