Hello Divya,
The histogram does describe the whole image, just not spatially. You can compute the magnitude (total pixel count per bin):
total_pixels = sum(counts);
If by "magnitude" you mean the peak value:
max_count = max(counts);
If you want to normalize the Histogram to get probability instead of raw counts:
normalized_counts = counts / sum(counts);
If you want to view Basic Image Summary: (e.g., min, max, mean intensity):
stats.min_val = min(img1(:));
stats.max_val = max(img1(:));
stats.mean_val = mean(img1(:));
stats.std_val = std(double(img1(:)));
Hope this helps!!