<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def uint8sc(im):
 """Scale the image to uint8 Parameters: im: 2d array The image Returns: -------- im: 2d array (dtype uint8) The scaled image to uint8 """

    im = np.asarray(im)
    immin = im.min()
    immax = im.max()
    imrange = immax - immin
    return cv2.convertScaleAbs(im - immin, alpha=255 / imrange)