我想使用opencvc ++使用图像处理来检测图像中的条形码 [英] I want to detect the barcode in the image using the image processing using opencvc++

查看:106
本文介绍了我想使用opencvc ++使用图像处理来检测图像中的条形码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Opencv C ++中的图像处理来检测图像中的条形码,当我试图通过使用不同的转换过程检测条形码图像时,例如转换为灰色,threshold_binary,使用这些输出格式模糊当时的图像没有正确地拍摄轮廓。我不知道如何解决这个问题。



我尝试了什么:



使用给定的图像我将过程转换为灰色,thresh_binary,gaussian_blur&然后通过获取此输出我的轮廓输出结果



findContours(模糊,轮廓,层次结构,CV_RETR_TREE,CV_CHAIN_APPROX_SIMPLE,Point pt(3,3));



轮廓的输出与预期的结果不同,我想使用轮廓绘制绘制条形码rect。所以,我不知道如何解决这个问题问题或者我不知道我正在做的过程是对的。

解决方案

你可以在网上找到很多信息,只需使用谷歌。例如,请参阅: OpenCV - UPC条形码阅读器第1部分| FélixAbecassis [ ^ ]。

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.

解决方案

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[^].


这篇关于我想使用opencvc ++使用图像处理来检测图像中的条形码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆