Typically you would overlay the shapefile on the other image and calculate statistics from the same locations but using the statistics from the new image. This assumes your images (or rather your shapefile) covers the same geographic extents on both images. If you want to use the statistics calculated within the shapefile from one image and apply it to another (perhaps because it is in a different geographic area), it is a little more complicated. You should also consider if the stats taken from one image should apply to another, especially if they are taken at different times of the year.
To apply the stats from one image for a classification in another, you will need to use ENVI Classic and the ROI tool. This also requires that both images have the same number of bands and really, the application of statistics from one image to another should only occur for images that come from the same sensor. You would first display the first image and overlay the shapefile. Then convert the shapefile to ROIs (each class should be its own ROI). In the ROI tool dialog, go to Options and select "Calculate covariance with stats' option. Select all the ROIs, and then select the 'Stats' button to plot the mean of each ROI and calculate statistics. From this dialog, select File->Save all ROI results to ENVI stats file. This will create a stats file for each ROI (class) that includes covariance which is required for algorithms such as Maximum Likelihood.
Open the second image that you want to classify with these statistics. Go to Spectral->Mapping Methods->Endmember Collection. Select your input file and select the algorithm you want to use. Then go to Import->From Stats file. Select all of your statistics files that were created from the ROIs. Import them and apply the classification algorithm to the dataset.
|