图像处理:“可口可乐”识别的算法改进

本文翻译自:Image Processing: Algorithm Improvement for 'Coca-Cola Can' Recognition

One of the most interesting projects I've worked on in the past couple of years was a project about image processing . 我过去几年中最有趣的项目之一是关于图像处理的项目。 The goal was to develop a system to be able to recognize Coca-Cola 'cans' (note that I'm stressing the word 'cans', you'll see why in a minute). 目的是开发一个能够识别可口可乐“罐头”的系统 (请注意,我强调的是“罐头”一词,稍后您会看到原因)。 You can see a sample below, with the can recognized in the green rectangle with scale and rotation. 您可以在下面看到一个示例,该示例在带有刻度和旋转的绿色矩形中可以识别。

模板匹配

Some constraints on the project: 对项目的一些限制:

  • The background could be very noisy. 背景可能非常嘈杂。
  • The can could have any scale or rotation or even orientation (within reasonable limits). 可以有任何比例旋转或什至取向(在合理范围内)。
  • The image could have some degree of fuzziness (contours might not be entirely straight). 图像可能有一定程度的模糊性(轮廓可能不完全笔直)。
  • There could be Coca-Cola bottles in the image, and the algorithm should only detect the can ! 图像中可能有可口可乐瓶,该算法只能检测到罐头
  • The brightness of the image could vary a lot (so you can't rely "too much" on color detection). 图像的亮度可能相差很大(因此您不能过多地依赖颜色检测)。
  • The can could be partly hidden on the sides or the middle and possibly partly hidden behind a bottle. 可以部分地隐藏在两侧或中间,可能部分地隐藏了一瓶后面。
  • There could be no can at all in the image, in which case you had to find nothing and write a message saying so. 有可能是没有在图像所有,在这种情况下,你必须找到什么,写一条消息这样说。

So you could end up with tricky things like this (which in this case had my algorithm totally fail): 因此,您可能会遇到诸如此类的棘手事情(在这种情况下,我的算法完全失败了):

总失败

I did this project a while ago, and had a lot of fun doing it, and I had a decent implementation. 我前一段时间做了这个项目,并且做得很有趣,并且实现得很好。 Here are some details about my implementation: 以下是有关我的实现的一些细节:

Language : Done in C++ using OpenCV library. 语言 :使用OpenCV库在C ++中完成。

Pre-processing : For the image pre-processing, ie transforming the image into a more raw form to give to the algorithm, I used 2 methods: 预处理 :对于图像预处理,即将图像转换为更原始的形式以提供给算法,我使用了2种方法:

  1. Changing color domain from RGB to HSV and filtering based on "red" hue, saturation above a certai
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值