Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 10, 2009, 08:07 PM   #1
larswik
macrumors 65816
 
Join Date: Sep 2006
Image matching software for Cigars.

Just a slight OT question. Is there any software / code on the market that you can add to your own programs or stand alone that can analyze images and determine what it is?

I am opening a Cigar Store. Cigars all look the same for the most part besides the labels on them. I am hoping to write a 'simple' app for the Point Of Purchase that the employee can just put the cigar in front of a USB camera and then it identifies the cigar from a photo that is on file. My worries are that an unaware employee can sell a $30 cigar for $5 because they don't know better. Also some cigars have the same labels but are different sizes.

You can't really bar code cigars so I thought an image base system that can match it to ones that are on file and give you the price?

-Lars
larswik is offline   0 Reply With Quote
Old Apr 10, 2009, 09:35 PM   #2
GorillaPaws
macrumors 6502a
 
GorillaPaws's Avatar
 
Join Date: Oct 2003
Location: Richmond, VA
I don't really have any specific knowledge on this subject, but from my general understanding of the state of technology, the type of thing you're looking to do is VERY difficult. I would think implementing some sort of numbering/inventory system with tags of some kind would be the way to go. You could have a human browse through an image database to double-check, but using software to compare images is still really hard to do.

A photo is really just a grid of color boxes to a computer, and 2 different photos of the same object (especially with different angles, lighting, distances, backgrounds etc.) will look completely different to a computer. Like I said though, I'm not really an expert at this kind of thing, so perhaps someone else might know of a better solution. Best of luck to you.
GorillaPaws is offline   0 Reply With Quote
Old Apr 10, 2009, 09:41 PM   #3
jamesarm97
macrumors 6502a
 
Join Date: Sep 2006
The app SnapTell has this form of recognition so to speak. It identifies music cd, and games and dvds. They have other companies using their engine to do specific searches but I don't know what it takes to use them or how much $$. Check out their website, just search for snaptell
jamesarm97 is offline   0 Reply With Quote
Old Apr 10, 2009, 09:46 PM   #4
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
Knowing nothing of cigars, i would suggest another system than trying image recognition. Especially if sometimes a mere size difference means a different "product" as far as your system is concerned.

I don't know if plastic "sleeves" over cigars would taint them, but that would be a place a label could go (people swapping sleeves is the same sort of problem every store has with people retagging, so you'd need some means of preventing that... sealing the wrappers, etc.). If this wouldn't work, then perhaps some sort of "access control" system to the individual cigars? Say, the customer is given a tag to scan, card to swipe, etc. and when they want a particular cigar they swipe the card, scan an rfid tag, etc. near the case, indicate a quantity by some means, and the case will open/dispense the proper number of cigars. While they are in the store, the system would track the type and quantity of cigars they've swiped for. Then the person at the desk would swipe their card/tag/etc. at the register, and visually inspect that, in general, the quantity and type is what they'd swiped for. This obviously requires more specialized hardware, but it was the first thing that sprung to mind. It might be easier to purchase premade vending machines that don't "drop" the items which accept credit cards and allow purchases to be made from there?

Again, this is well outside my areas of expertise, but i thought i'd put the suggestions out there.

-Lee
lee1210 is offline   0 Reply With Quote
Old Apr 10, 2009, 09:51 PM   #5
GorillaPaws
macrumors 6502a
 
GorillaPaws's Avatar
 
Join Date: Oct 2003
Location: Richmond, VA
Quote:
Originally Posted by jamesarm97 View Post
The app SnapTell has this form of recognition so to speak. It identifies music cd, and games and dvds. They have other companies using their engine to do specific searches but I don't know what it takes to use them or how much $$. Check out their website, just search for snaptell
The SnapTell stuff looks really impressive. Thanks for the reference.

EDIT: I thought about the sleeves you mentioned Lee, but I think humidity with cigars is a big deal and I'm not sure how sleeves would affect that (although perhaps you could use breathable sleeves made out of something other than plastic).

Last edited by GorillaPaws; Apr 10, 2009 at 11:21 PM.
GorillaPaws is offline   0 Reply With Quote
Old Apr 11, 2009, 01:53 AM   #6
larswik
Thread Starter
macrumors 65816
 
Join Date: Sep 2006
Wow, thanks! I got more responses then I thought that I would. I will check out the SnapTell software and price it out. Vending machines is out of the question but thans for the idea. Part of the magic is being able to walk into a room that is the correct temperature and humidity and select from 300 different cigars. about 25% of the cigars are already in wrappers that I can put bar codes on for scanning. The other 75% need some thing. As for scanning the inventory I can scan in new products from the same location and distance from the camera since the same camera would be locked down and used to retrieve the image with price.

It this wont work I'll need to look into mini bar codes that can print on something that is 10mm x 5 mm that I can stick to the back sided of the cigar labels and not the tobacco it's self.

Here is a shot of cigar labels.
http://www.postercheckout.com/Pictur...?PrintID=39993


Thanks again for the support and ideas folks!

-Lars
larswik is offline   0 Reply With Quote
Old Apr 11, 2009, 02:14 AM   #7
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
I would guess "aficionados" would want the label intact, or at least be able to remove anything that's placed over the label... but in any event, with an inventory of 300, you would just need 10 bits of data to get you more than 3x the number of products your expecting... Maybe make it 16 so you have plenty of room to cycle through product generations, years, etc. More if you think it's necessary.

I'm guessing you could get the data you need into a pretty tiny label. It seems like aztec is public domain, and "dense":
http://en.wikipedia.org/wiki/Aztec_Code

There is an online encoder here:
http://www.idautomation.com/java/aztec-servlet.html

This is the encoding of:
"2009 EL REY DOUBLE CORONA COLORADO"
You could just use a number instead, or item code, etc., but this was the result:
Name:  AztecServlet.gif
Views: 374
Size:  101 Bytes

I'm not sure what sort of scanners would be needed to scan something so small, but the data can definitely be encoded and printed very small.

Good luck!

-Lee

Edit: After a bit more readying DataMatrix seems to be more common, and is also unencumbered.
http://en.wikipedia.org/wiki/Data_Matrix

Last edited by lee1210; Apr 11, 2009 at 02:25 AM.
lee1210 is offline   0 Reply With Quote
Old Apr 11, 2009, 09:01 AM   #8
GorillaPaws
macrumors 6502a
 
GorillaPaws's Avatar
 
Join Date: Oct 2003
Location: Richmond, VA
What if you made a second label for the cigars that you would slide on with your bar-code/inventory number stuff on it? When the customer purchases the cigar, the employee would slide it off and scan it, and the customer would receive the product without any sticker residues on the factory label. Just an idea.
GorillaPaws is offline   0 Reply With Quote
Old Apr 11, 2009, 02:15 PM   #9
larswik
Thread Starter
macrumors 65816
 
Join Date: Sep 2006
Thanks, those are good ideas. Those Aztec Bar code might be the ticket if they can be printed on to a small sticker that can be placed on the back side of a cigar label.

My concern about using large slide on scanning labels or little bags that the employee removes is that it won't look as in the humidor when they are lined up. Being able to hide a small scanning stick on the back side might be the trick if they are small enough.

Imaging would be the best and I sent an email to SnapTell letting them know what I was looking for. I will look into the Aztec bar code too. Perhaps I can embed this into a POS that I am working on.

Thanks for the support

-Lars
larswik is offline   0 Reply With Quote
Old Apr 11, 2009, 08:04 PM   #10
ChrisA
macrumors G4
 
Join Date: Jan 2006
Location: Redondo Beach, California
The curent state of the art is not as good as you'd like. Right now you'd have to find an application that can tolerate mistakes. The outdoor add example given above is a perfect use of a technolog that is 90 or 99 percent accurate. I think a store clerk could do better.

Even if the technology itself were very good, do you know what a consultant would have to charge yo to integrate the pattern recognition engine into your point of sale system? This is NOT the same kind of work as where you can find some kid to build you a web site. Software engineers at this level make reasonable middle class pay and I doubt it could be done is less then 1,000 hours. Cheaper to simply hire more skilled sales help.

But it's kind of moot because I assume you would require very high level of accuracy.
ChrisA is offline   0 Reply With Quote
Old Apr 12, 2009, 04:26 AM   #11
lazydog
macrumors 6502a
 
Join Date: Sep 2005
Location: Cramlington, UK
Send a message via MSN to lazydog
Hi

I think it would be straight forward to measure the length and diameter of the cigar in software, and also to identify the label. I'm not so sure about colour because being a none smoker I imagine all cigars as the same brown. Now the question is, given the length, diameter and label of a particular cigar, would this information be enough to identify it completely? You need to bear in mind how consistent the length and diameter are for a particular cigar type.

b e n
lazydog is offline   0 Reply With Quote
Old Apr 13, 2009, 04:16 AM   #12
larswik
Thread Starter
macrumors 65816
 
Join Date: Sep 2006
Good Points. I think the Aztec Code might be the solution here. I think I can print those small enough to place on the back side of the cigar label.

It would be ideal to have this as a POS or on the side just to do a price check without POS integration.

I'll see if I get an email back from SnapTell this week.

-Lars
larswik is offline   0 Reply With Quote
Old Apr 13, 2009, 02:58 PM   #13
Sander
macrumors 6502
 
Join Date: Apr 2008
I thought I'd chime in as I do image processing for a living.

The 1000 hours estimate quoted above seems a little out of line to me, and I also think that if you are technically savvy, you don't really need the expensive consultants. However, I don't think your simple "webcam" solution would be sufficient. (Close, but no cigar - I couldn't resist)

What you will need is a setup with good lighting and a good (black-and-white) industrial camera. Mount this stuff near the cash register on some kind of fixed contraption; since you mention that the difference is sometimes only in size, it's tough for the setup to distinguish a small cigar held closely to the camera, and a larger one held further away. You'd instruct the employee to place the cigars on the desk, label side up, under the camera.

There are software packages out there which you can "train" yourself to recognize various objects.

BUT you may be solving the wrong problem here. If you are opening a specialist cigar store, you should probably invest in an employee who knows one cigar from another.

If I walk into a store like that, I would expect the employee to be knowledgeable. If he tells me he is out of "Heeren van Ruysdael Composition 12" I don't want him to suggest some "Balmoral Overland" because they're just about the same in size.
Sander is offline   0 Reply With Quote
Old Apr 13, 2009, 03:02 PM   #14
jamesarm97
macrumors 6502a
 
Join Date: Sep 2006
Quote:
Originally Posted by larswik View Post
Imaging would be the best and I sent an email to SnapTell letting them know what I was looking for. I will look into the Aztec bar code too. Perhaps I can embed this into a POS that I am working on.

Thanks for the support

-Lars
Let me know what they say, I have looked at them (gave the reference), but not enough to inquire about the terms and fees.

- James
jamesarm97 is offline   0 Reply With Quote
Old Apr 13, 2009, 03:08 PM   #15
michael.lauden
macrumors 68020
 
michael.lauden's Avatar
 
Join Date: Dec 2008
yeah that idea would be very very very hard to pull off.
michael.lauden is offline   0 Reply With Quote
Old Apr 13, 2009, 03:23 PM   #16
Consultant
macrumors G5
 
Consultant's Avatar
 
Join Date: Jun 2007
Everyone should walk around with a modified iPhone! =p

iPhone macro mod
http://www.iclarified.com/entry/index.php?enid=1744

They do make an app sort of like that for pharmacists to show the different type of medications.
Consultant is offline   0 Reply With Quote
Old Apr 13, 2009, 03:24 PM   #17
gjw4u
macrumors 6502
 
Join Date: Dec 2008
Location: Switzerland
OP tags would not work for various Cuban 'Cabinet Selection' cigars, e.g. Punch or Partagas, as these do not have a cigar band. So where would you want to place a tag on such cigars?
__________________
;-> gjw
- iPhone 4 / iMac 27'' i5 -
gjw4u is offline   0 Reply With Quote
Old Apr 13, 2009, 03:33 PM   #18
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
obviously the solution here is smokable RFID chips that are inserted into each cigar. =)

-Lee
lee1210 is offline   0 Reply With Quote
Old Apr 14, 2009, 11:27 PM   #19
larswik
Thread Starter
macrumors 65816
 
Join Date: Sep 2006
Some great and crazy ideas that made me laugh, Thanks. I am not planing on carrying any cigars without labels. I have room for 250 - 300 different cigars. Punch and Partagas both make cigars with labels.

Sander- thanks for the info on the set up. Is there any software that you can recommend since you work in the world of imaging?

Also SnapTell has not responded back to me today.

-Lars
larswik is offline   0 Reply With Quote
Old Apr 16, 2009, 07:42 AM   #20
Sander
macrumors 6502
 
Join Date: Apr 2008
Cognex and the Matrox Image Library are widely used. There are also companies which deliver the whole chain (acquisition hardware + image processing software). I was impressed by NeuroCheck at the last trade show I went to (Vision 2008) (http://www.neurocheck.com/). Be prepared to bring your wallet, though.

Many of these applications can quite easily be programmed to measure critical dimensions automatically (diameter, length, tapering, even OCR of the label) but it would require a bit of extra work to map these numbers to cigar types.
Sander is offline   0 Reply With Quote
Old Apr 16, 2009, 02:29 PM   #21
xyzeugene
macrumors newbie
 
Join Date: Feb 2009
Cost effective system.

I am an auditor so I have done inventories in the past. The question here is controls and costs. Having a bin system with bar-codes on the bin would probably be your best bet as opposed to an unreliable image scanning deal. On top of that you have daily inventories of each bin to catch the flub ups. I am not sure if there is barcoding software for mac-osx, but I do know that a barcode system in XP for around $150 for basic functionality.

Quote:
Originally Posted by larswik View Post
Just a slight OT question. Is there any software / code on the market that you can add to your own programs or stand alone that can analyze images and determine what it is?

I am opening a Cigar Store. Cigars all look the same for the most part besides the labels on them. I am hoping to write a 'simple' app for the Point Of Purchase that the employee can just put the cigar in front of a USB camera and then it identifies the cigar from a photo that is on file. My worries are that an unaware employee can sell a $30 cigar for $5 because they don't know better. Also some cigars have the same labels but are different sizes.

You can't really bar code cigars so I thought an image base system that can match it to ones that are on file and give you the price?

-Lars
__________________
13" White MacBook, 2.4 GHz, 4 GB RAM, 500 GB HD ; OsX 10.5; VMs: Ubuntu 8.10, WinXP Pro SP3, OsX 10.5; IDEs: XCode 3.12, Delphi 2009, VS.net 2008 SP1
xyzeugene is offline   0 Reply With Quote
Old Apr 16, 2009, 05:37 PM   #22
larswik
Thread Starter
macrumors 65816
 
Join Date: Sep 2006
Thanks again for all the input. I think I found a work around. Imaging recognition would be nice but I don't think it is an option at this point. SnapTell still has not responded to my email.

The trick seems to be a small bar code like Aztec code or QR code that I can print from a small 1/4" brothers desktop label printer. When I get a box of 24 cigars in I can print out a label strip and cut each one up and stick it to the back of the cigar label.

The question at this point is can I print a QR code labels that small? The print is a 360 dpi. but will a scanner read it or is there any optical recognition that can be used. If that is the case I can use a USB micro focus camera.

Thanks!

-Lars
larswik is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Cigars Meister Community Discussion 30 Aug 16, 2014 09:17 PM
Any nMP users smoke cigars? Gav Mack Mac Pro 8 Jan 17, 2014 09:10 PM
Mac Music Software: Mix mp3s with auto beat matching VideoBeagle Digital Audio 9 May 10, 2013 11:43 AM
Music Software: Mix mp3s with auto beat matching VideoBeagle Mac Applications and Mac App Store 4 May 9, 2013 02:33 PM
Advice needed on software for blending, beat matching and making mix tsam19 Digital Audio 4 Sep 21, 2012 11:04 PM

Forum Jump

All times are GMT -5. The time now is 10:27 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC