Absolutely, fresh corn can be a great substitute for canned corn in these recipes. Just make sure you cook the fresh corn first before using it in recipes where the canned variant is supposed to be used straight from the can. Similarly you can use canned corn in place of fresh corn in recipes.