|
Re: 1D/2D Barcodes with Camera (Micro QR, Semacode, etc.)
I follow what you are asking for, and I think it can be written above Imaq to work relatively well. You will not find a single block or call that does this unless this is a subset of what the 2D bar code stuff can do. Again, I'm not that familiar with these.
If you want to do it as described, I'd say that the first task is to find the quadrilateral defined by the two color edge. You can do this with color or with edge detection. IMaq doesn't have a red-near-blue or X-near-Y convolution, but you can build one by grabbing the pixels, or you can look for the blobs of the first color, and search in the appropriate place for the second color -- which is what the target examples did last year, at least the LV one did it this way.
Once you have a blob that scores high on the bicolor and looks like a valid quad, you can extract a line at as many areas within the quad as you need, and decide how you sample the line to decide if it is a 0 or 1. You can also at this point use some of the binary characterization functions to see which scores highest. All of these should be fast, but I couldn't say which will be more robust without doing them.
I'd love to hear how it goes, and I'll help out a bit, but I can't really spend much time on this, especially for the next week -- NIWeek and the robotics summit, etc.
Good luck.
Greg McKaskle
|