I believe the best way to do this would be to map the barcode that is in the search index into some textual value. For example, I believe that any barcode has a number associated with it. That is what I would store in the search index, rather than the image of the barcode. That way whenever the production like camera scans a barcode, this would be mapped to a barcode number and subsequently searched in cognitive search. You may know this already, but the Cognitive Services Vision API's (
https://azure.microsoft.com/en-us/services/cognitive-services/computer-vision/) would likely help a lot with the mapping of these barcodes to the associated values.