image recognition is definitely not a requirement
Yes it is. You need to recognise the barcode against its background in the first place, and fence it. Then you need to decode the stripes into, well, stripes. Then you need to decode the stripes into characters. That involves testing the start characters against a number of possibilities so you know what the symbology is (unless you know they will all be of one symbology.)
Then, assuming it's an EAN product style code, you need to look at the first character (eg the "6" which for me indicates South Africa- not that the country is important) which actually is significant since it explains how to decode the pattern. (The "left" and "right" sides of the barcode are encoded differently.)
If it's a barcode that actually contains data (as opposed to merely the number) like EAN-128 then there's a shit house full of further decoding to do, including check digits and the like.
It's not a trivial task. Faaaaar easier to get a gun to do all that and spit out the number....