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.