It's funny... the UX person in me was thinking it would be easier just to take a picture of your shopping cart and have it highlight the items you shouldn't purchase. Just based on packaging. Then I thought ... hey ... an even better idea would be to hold the phone up in front of the shelves and have all of the offending items X'd out.
Then I thought ... man ... all of this would be a LOT easier if Google Glass had a better camera! Maybe Apple will make a better pair of glasses and in the not too distant future we can just walk up the aisles and have all the products we wouldn't want to support X'd out for us.
Point is... in the future you will most likely not have to scan the bar code. The software will just put X'es over all of the products that are "bad" by some definition set by you. That would be a pretty interesting use of something like Glass I think.