Hi Michael,
Thanks for supplying the source data. I downloaded it before Xmas but holidays intervened.
You supplied 98 geolocated JPEG RGB images. Two are low resolution images and the other 96 are 4x higher resolution. Of these 98 images, 21 contain a black border region of varying size and position. You want to merge these images into a single raster that preserves the high resolution data (overwriting the low) and that does not include the black border regions.
We do not currently support located JPEG images in Pro Advanced. They get loaded by MapInfo, not the raster engine. However, we do have a driver that supports PNG and JPG but it is currently not shipped. I hope it will ship in the v17 release. To process this data I activated this driver and upgraded it to support ESRI world registration files.
With this driver I was then able to batch convert all the JPG images to MRR. I used the PNG compression codec in the MRR to prevent any further information loss.
Before you can merge the images, you have to remove the black regions. I can do this with a flood-fill edit operation. I manually pick a seed pixel to initiate a flood fill which changes all the adjacent black pixels to invalid cells. This works, but only to a point. Lossy compression codecs like JPEG blur the boundary between the black cells and the valid imagery. JPEG is better than ECW in this regard because it only blurs the boundary out to the JPEG block size, whereas ECW injects noise into the entire image which makes it even harder to identify the invalid pixels.
To resolve this issue I introduced some color space tolerance into the flood fill operation. This removes all the black. The tolerance has to be quite large, so it tends to eat out some real image pixels in some cases. But it is hard to imagine how you can get a perfect result for data like this.
I executed this operation manually on the 21 affected images. This processing operation is not available to users at the current time.
Then I executed a merge operation using the simple union and stamp options. I chose one of the high resolution rasters as the key raster (to define cell size etc). The two low resolution rasters need to be listed first, then all the high resolution rasters. If I use the PNG codec (preferred, as it does not introduce any more noise), the MRR is 3.2 GB. Using JPEG it is 809 MB. I can upload this smaller raster to the cloud so I will send you a link via email.
One clear take away from this exercise is - get your imagery delivered in a lossless compression format like PNG or TIFF. If you want to process images that use a lossy codec, you end up introducing more and more noise.
So in summary - I have managed to process this data and produce a high quality result, but I had to use (and upgrade) tools that are not currently available to Pro Advanced users. But thanks for sharing because it was a valuable exercise and I think it will be a common experience for users. I will post some pictures below.