I should note first that I don't quite understand what exactly you are doing. Are you trying to get images of a whole coconut or of a half coconut? And what does rice have to do with that? Do you just put some rice inside a half coconut?
Nevertheless, let me try to offer some tips to get better contrast. If you cannot use a different wavelength range, you can use the same trick that doctors do: use some contrast (dye), such as barium or water-soluble iodine. If you have a whole coconut, you can drill a narrow hole in the coconut, inject the contrast (for example, using a syringe), and shake the coconut.
I hope you follow all the safety rules working with ionizing radiation, such as X-rays, and the dye.
EDIT (7/17/2019): Your deleted answer gave more information. So it looks like you want a method to tell a normal coconut from a macapuno. Some non-X-ray methods may be more promising, for example, ultrasound testing or rotation (the same method that is used to tell a boiled egg from a raw egg).