Sweet Corn Ears Lack Kernels
Unfortunately, if the kernels are not formed they will not fill out. I would suspect the problem was caused by poor pollination, due either to rainy weather when the pollen was ready, and/or perhaps planting your corn in a row instead of a block. Since corn depends primarily on wind to transfer the pollen to the silks (which is what makes the kernels grow), you need to plant it in a block. A clump of 5 stalks per hill or a block 4 feet square is usually the base limit to ensure proper pollination. Also, corn is a heavy feeder and requires a good, steady supply of nutrients for good growth. Since the stalks look fine, though, I don't think lack of nutrients was the problem.