Can a picture file be renamed based on a unique barcode contained within the picture?

Solution 1:

I doubt your going to find anything off the shelf that is going to give you the functionality that your are looking for. More likely, you would need to write some custom code to parse images for barcodes, read them, then rename the images. Of course this could be not only expensive, but time consuming. So the real question should be is it cheaper to do this by hand, or hire someone to write custom software for you that you may only use a handful of times? Interns are great for either possiblity.

However, if you are willing to write some code, this code sample would be a major head start.

http://www.codeproject.com/Articles/42852/Reading-Barcodes-from-an-Image-III

It does most of the heavy lifting for you, you just need to setup a system to rename your files and add a bit of business logic in order to have it work in a batch setting. I've played with it before and it is very capable as long as your barcodes are visible.

Solution 2:

One major problem with the process as asked is that the program needs to identify the barcode without user hinting in an arbitrary image. If the barcode is large with respect to the product in the frame, then you will probably have success. Open source libraries and binaries are available which can read e.g TIFF and return a string. (ZBar was one IIRC http://www.youtube.com/watch?v=rqzQb_HMYf8 )

I have tried this with flat items approx 36 inches square (and no budget) and the barcode size was so large that it crowded out the object in the frame.

I use a camera which is remotely actuated by a networked computer and the software used captures the image directly to a file server and has a text field for appending user text to an auto-naming scheme. I know for a fact that such software is available for professional Canon and Nikon cameras. (I don't want to turn this into an advertisement, so I won't mention product, but the canon-specific software I use I purchased a number of years ago for something on the order of 50$)

Since many barcode scanners can simulate keyboard input, perhaps the photographer can use a similar solution, and then you can introduce a process where you set focus to the field in the software, use a wand reader to swipe the code (entering the part number into the field), then place the item for the shoot. Coupled with an auto timestamp, you will have prenamed files already on the server and no longer have to "sneaker-net" the images off the camera card.

Added bonus is the photographer can view the image on a large monitor prior to moving the item off the set.

(some cameras come bundled with feature limited capture software, so the old standby of having the photographer capture them to disk and then have one of your own people rename them on the fly while the item code is known is going to be better than tackling the task of identifying and renaming 3000 of them later)