added main triangles find for ref image