Opium is the air-dried latex that exudes when the unripe capsules of Papaver somniferum are incised, and it contains morphine, codeine, thebaine and papaverine. The ripe seeds contain negligible alkaloid and are used only as a food and oil source, which is why poppy seed is not a narcotic. Collecting from ripe capsules rather than unripe ones is the classic error in this question.