Karin Hellqvist Posted May 29, 2017 Report Posted May 29, 2017 In the attached image I have four Code 128 and two Code 39. I have problem detecting them without down sampling the image first. Since I want to grade the bar codes I don't want to down sample since the code quality is reduced then. I noticed this from that sometimes some of the bar codes are found without down sampling an then the grade is higher for those. Down sampling a factor 2 sometimes work, down sampling a factor 4 always works. I have tried croping the image around the bar code but this doesn't help. I'm using IMAQ Read Barcode 2, and have tried to change the parameter Min Bar Width with no result. Is there any other parameter I can change for the algorithm to find the barcodes, without having to down sample my image. Best regards Karin HellqvistCertified LabVIEW Architect DVel Quote
JKSH Posted June 10, 2017 Report Posted June 10, 2017 The bar edges look a bit blurry. Try sharpening your image and increasing the contrast. Do these help? Quote
Karin Hellqvist Posted June 12, 2017 Author Report Posted June 12, 2017 Hi JKSH, If you refer to the vertical bars the blurry edges is due to the printer printing the barcode. This is why I want to grade the barcodes. I have tried increasing the contrast in different ways. Using downsampling I will find the barcodes, but looking at the image then the contrast is not better in that image. Quote
ShaunR Posted June 12, 2017 Report Posted June 12, 2017 You are probably just after a sharpen. sharpen.vi Quote
Karin Hellqvist Posted June 22, 2017 Author Report Posted June 22, 2017 I got some help from NI Support who help me find the setting Minimum Edge Strength which I needed to lower to 20. This is due to my blurry image quality. I think I maybe need to change my lightning to use from above instead of from below to get this improved. I know if I would like to grade according to the standards the lightning should be from above. Also my camera has manual focus and aperture, which makes it a bit hard to get better image quality. ShaunR, thanks for your example. I saw that yo didn't manage to get the full size image down as you downloaded it. It should be 2391 x 2231 pixels. I tried your filter on my image with your values and some other values but didn't get it to work. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.