There have been a few versions of the utility imd2raw.c floating around that will take Dave Dunfield's ImageDisk-created images (i.e. an .IMD file) and make a linear binary image devoid of any metadata. This is similar to the function of Dave's IMDU.COM program's /b switch.
I've corrected a problem with the assumption that all imd2raw.c descendants to date have made: sectors that have a skew (i.e. not 1-1 interleaved) weren't linearized correctly. The skewed sectors need to be written out in "sorted" order, which is not necessarily captured/physical order. This is easily verified by comparing output from "IMDU /b" to earlier imd2raw outputs on any .IMD that has a sector skew that isn't 1, 2, 3 [...]. It's up on github here: https://github.com/RetroFloppy/imd2raw