问题
In my current project, I need to know how to get the location of the barcode in the image with zxing, in pixel or range of pixels. My image source is Kinect v2. The main purpose is to associate barcode with body frame, which requires the location information. I'm using standard Kinect v2 SDK and visual studio 2013, in C#. I feel it's not difficult, but I need some guidance. Thank you very much in advance!
回答1:
It looks to me (referencing posts such as this) that the ResultFound action should pass a Result including ResultPoints, each with an X and Y value.
It seems like some of the details of those points depend on the type of barcode being parsed, but that would be where I'd start.
Depending on what exactly you're trying to do with the location, you may need to use a CoordinateMapper to get it into the correct coordinate system.
回答2:
But I don't know how to convert ColorFrame to Bitmap class, which is the argument of Reader.Decode() method. Do you have any clue?
There is a great Fork of Zwing that decodes ColorFrame for Kinect V1 and V2.
You simply have to build the DLL and add it to your project.
来源:https://stackoverflow.com/questions/30603745/return-barcode-location-in-the-image-while-decoding-with-zxing