移除图片中的小块标签 [英] Remove small chunks of labels in an image

查看:169
本文介绍了移除图片中的小块标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的MATLAB也在图像处理,我试图定位一个人的帧。到目前为止,我已标记的裁剪图像(裁剪使用:

  ,P)

这将删除少于 P 来自二进制图片 A 的像素。


I am new in MATLAB also in image processing, I am trying to locate a person frame by frame. so far I have labeled the cropped image (cropped using PeopleDetector) like this, now if I locate exact location of person like i.e. at which pixel location '1' start and end (I know this is not right logic).

All I want is to remove little chunks of white pixels at the right side of the person. I dont know how to do that. please suggest me.

解决方案

You can use bwareaopen:

bwareaopen(A, P)

This removes all objects that have fewer than P pixels from binary image A.

这篇关于移除图片中的小块标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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