rebuild the rgb & gray/magnitude method, delete the center parameter, speed up