Undigested food in stool, what could be the causes?

May be normal. Finding undigested parts of vegetables, corn, etc can be normal. "housecleaning" of gut will empty things out of the stomach, and further downstream, after several hours, to prevent stagnation of contents and overgrowth of bacteria. If associated with cramps, weight loss, fatty stools, and voracious appetite could be signs of a significant digestive issue.
FIBER not digestible. Fiber is not digestible! many foods can pass through the G.I. Tract intact; corn kernals with their waxy covering can get through easily. However, fiber is needed for colon health to provide 'bulk' whereas low fiber diets have been linked to colon cancer. Another cause of undigested food is increased transit time during diarrheal illness or irritable bowel syndrome--foods just get through faster.