fix edge scan and change draw process for second image
fix edge scannig