The forum is to discuss topics related to different areas of image processing and computer vision.
Im working on a project to find codes like 1D barcodes and 2D codes like qr, datamatrix etc..
Actually I wanted to start with the detection and decoding of a datamatrix code.
Therefore I am using the Aforge.net libary to get the picture of my webcam and already tried so filters etc..
Nevertheless I do not have a clue, how I could extract only the code.. I thought about blobs, but a datamatrix-code has many small squares, but I need the whole code.
Thanks for your help!
See attachment: im getting so far
Nobody, who could help ?
So far Ive tried some other filters, like:
- "Fill Holes" to fill the empty squares in the code, the find the hole code as one blob, extracting this area from the original, but the fill hole filter does not work because there are clear lines between the single Squares of the code. --> Fails
- "Shrink" to Shrink to the area, the code is located. But the code will be read from any object, for example a metal card like in my test cases, so it only shrinks to the border of the object. Furthermore the information, which area of the original remains, got lost.
- "DIlatation" to create one Big Square. Unfortunately the dilatation works only very smooth, so no big chances are happening.
are there any other ideas guys ?
Here my Status:
Here is something to have a look at. It is not about data matrix, qr-code, etc. But some ideas may be in common. Here is the main thing you need to solve - find bounding quadrilateral for the matrix code. Essentially you need to find 4 corners of the quadrilateral, which contains only the matrix. Once this is done, the rest will be much easier.
Thanks for the reply!
Yeah, thats my idea too. At the moment i was thinking about searching the typical "Finding Pattern" of the DataMatrix Code in this picture. So I made a Picture only with this Pattern, and now i wanted to search for it in my new picture from the webcam.
Would that be possible too?
I already know the link you told me... unfortunately my problem is, that die squares are not linked, but seperated by a little space (see above). Like I wrote above, my idea was to link them by using a filter which would wide up the squares..
any other ideas?
New Idea: going through every blob, and checking, if its the farest cornerpoint, if yes, it get saved in Realcorners.. and the Blob Realcorners gets extracted at the end. But this doent work either. Is it possible, that there is no order in the given back List of IntPoints after this command? " corners = PointsCloud.FindQuadrilateralCorners(edgepoints) " ?
No, as documentation says, poits are always ordered. See here.
Unforunately this idea doesnt work either.
Is there any other chance to find the significant "L-Pattern" ?
There are many softwares, which can find this Datamatrixcode in nanoseconds, but I cannot guess for what they are searching..
Which idea? If you were trying to use FindQuadrilateralCorners() without any extra code, then of course it would not work. In your data matrix you don't have a small "brick" in one of the corners. So FindQuadrilateralCorners() will not be able to find you proper bounding quadrilateral. It can be used as a starting point. But then one of the corners (maybe several) will need to be shifted in such a way that all small squares of the code are inside of the quadrilateral. When you get to this, then you can extract quadrilateral as a rectangular image and analyse it.
Idea, I refered to:
The Problem is to find a way, to recognize the "L-Pattern". Every Datamatrix Code got a full line in x- and y-directory, this is called "L-pattern". After recognizing this part, it would be easy to create a rectangle by calculating the missing 4th corner and then extracting it.
But I got no clue, how this step could be done...
Is there any way to find the row and column of the binarized picture, which got the highest value for white? maybe this would work..
or easier: finding rows and columns with very characteristic black-white changes