Click here to Skip to main content
15,887,333 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to detect the barcode in the image using the image processing in Opencv C++,When i tried to detect the barcode image by using the different transformation process such as converting into gray,threshold_binary,blur with these output format taking contour for the image at that time the image is not taking contour correctly.I don't know how to solve that problem.

What I have tried:

With the given image i am converting the process into gray,thresh_binary,gaussian_blur & then by getting this output am taking contour for that output result

findContours(blur, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point pt(3,3));

the output of the contour is different from the expected result, i want to draw the barcode rect using the contour draw.So, i don't know how to resolve that problem or i don't know am doing the process way is right.
Posted
Updated 27-Dec-16 23:36pm
Comments
Richard MacCutchan 28-Dec-16 5:22am    
I don't know OpenCV, but the issue is just a case of finding the dark and light bars, and comparing the widths of each. Should certainly be a lot simpler that face recognition.
Member 12624812 28-Dec-16 5:29am    
Do you know reference link for that??
Richard MacCutchan 28-Dec-16 5:42am    
Do you know how to think for yourself?

Look at a barcode, it is just a sequence of dark and light bars. How difficult can it be to create a simple algorithm to examine each one in turn and build up set of values that decode it?

1 solution

You may find a lot of info on the web just using Google. See, for instance: OpenCV – UPC Barcode Reader Part 1 | Félix Abecassis[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900