Disclosure: I made some of the tools I will be proposing! These are not free but trials save recovered/repaired photos as scaled down BMP files
If files are available (not deleted or lost):
JPEG-Repair can be used to repair corrupt JPEG headers, edit raw JPEG data but also extract JPEGs from for example damaged RAW photos. I added the JPEG extraction option specifically for this purpose as I found already available tools such as Stellar Repair for Photo (formerly Stellar JPEG Repair) and Kernel Photo repair often fail to extract the embedded high resolution JPEG.
JPEG Repair allows you to specify minimum resolution thus forcing it to skip thumbnail and medium resolution JPEGs. I found NEF (Nikon RAW photos) sometimes (or always?) embed three JPEGs, thumbnail, medium and full resolution preview.
Files can be processed in batch.
Lost RAW photos
JpegDigger can recover JPEGs, even those embedded in RAW photos and even if these are deleted or lost due to for example file system corruption. Again it is possible to specify a minimum resolution to skip thumbnails. The tool offers various options to skip corrupt files or repair them to the degree they can at least be decoded by photo viewers, or even to manually reconstruct fragmented files.