You should be able to do it from the Terminal in OS X with the following command:
Replace "file.dmg" with the path to your .dmg (you can just drag the file onto the Terminal window to automatically put in the path) and "file.img" with the path of where you want your output file to end up.
Code:
hdiutil convert file.dmg -format RdWr -o file.img