English 中文(简体)
如何在Matlab的科罗分辨的图像中标出物体
原标题:How to Count number Objects in an Image identify by Color in Matlab

我想将每个彩色的图像中的物体数计算在内。

例:我想把黄米或绿色大米列入图像。

“entergraph

请让我在一定程度上这样做?

最佳回答
问题回答

假设您在矩阵表a上有一个形象(大小m*n*3),你想找到有色标的物体序号<>[r,g,b]。

first, select only pixels with the correct color:

bb = (a(:,:,1) == r & a(:,:,2) == g &a(:,:,3) == b);

Than:

[~,num] = bwlabel(bb,8)

<代码>num为物体数目。





相关问题
Resources for Image Recognition

I am looking for a recommendation for an introduction to image processing algorithms (face and shape recognition, etc.) and wondered if anyone had an good recommendations, either for books, ...

Good reference book for digital image processing? [closed]

I am learning digital image processing on my own and would like recomendations on good reference books. If you know of books to definately stay away from that would be useful as well. Thanks

Python Tesseract can t recognize this font

I have this image: I want to read it to a string using python, which I didn t think would be that hard. I came upon tesseract, and then a wrapper for python scripts using tesseract. So I started ...

What s the quickest way to parallelize code?

I have an image processing routine that I believe could be made very parallel very quickly. Each pixel needs to have roughly 2k operations done on it in a way that doesn t depend on the operations ...

Computing object statistics from the second central moments

I m currently working on writing a version of the MATLAB RegionProps function for GNU Octave. I have most of it implemented, but I m still struggling with the implementation of a few parts. I had ...

Viola-Jones face detection claims 180k features

I ve been implementing an adaptation of Viola-Jones face detection algorithm. The technique relies upon placing a subframe of 24x24 pixels within an image, and subsequently placing rectangular ...

热门标签