Change the code so that it does not use any of the shared memory that relates to the number of images.
make minor change

Signed-off-by: Enliang <ezheng@cs.unc.edu>