Answer the question
In order to leave comments, you need to log in
Determination of strokes on an image (specific barcode) of poor quality
There is a specific barcode, the data on which is encoded by the length of the bars. It has its own logic and so on. Strokes of different lengths. It is known that each line has a stroke, but not necessarily one under the other.
Determining the length of a stroke is not particularly difficult, but the quality of the resulting barcode image leaves much to be desired. The borders are blurred, the strokes under each other merge into a darker spot.
Thresholding (white and black division) can highlight a part of the image that is actually the white part, and not a stroke.
Q: How can the image quality be improved? How to highlight strokes?
Answer the question
In order to leave comments, you need to log in
Change the method of capturing barcodes, or adjust the sharpness on the optics.
It looks like a postal barcode . But it's hard to tell from this picture...
Is it possible to get multiple images of the same barcode, but each with a slightly shifted position? if so, it is possible by solving the equation and improve the quality of the image due to redundancy.
| F(X)=M1
| F(X)=M2
|…
Where X matrix is the desired image of a higher quality, Ma is the matrices of available images containing part or all of the desired image, F is the function of forming a corrupted image from a normal one (in fact, a noise function).
As far as I know, the better this function is developed (the one that most closely matches distortion and noise), the more likely it is to find X and the higher its quality. For starters, you can take F as a simple blur.
Each point = sum with coefficients from surrounding points, the coefficient decreases with increasing distance from this point, for example for the nearest surrounding points:
| F(X[a,b])=(M[a-1,b]+M[a+1,b]+M[a,b-1]+M[a,b+1])/4
This is the general situation, I personally didn’t take it seriously, in particular cases the mathematical apparatus becomes very complicated, it’s a pity that I can’t formulate requests to Google right off the bat, at one time I was even interested in ready-made implementations, for example, they are partially already in the methods of combining several photos into one large one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question