nanshe/advanced_image_processing.py: Solution to deal with missing lines on boundaries.
nanshe/advanced_image_processing.py: Moved allocation and point determination statements to the if statement.