フィルターのクリア

sir,I want to count objects in such a manner that a whole object will be represented as only a single pixel irrespective of its size and shape.

1 回表示 (過去 30 日間)
sir i am doing work on veichal traffic control systems.. Iam facing problem with to count objects in an image.I have used backgroun subtaction technique to get present veichals.The next task i was performing is to count number of non zero pixels,but in case if the long veichal arrives then only this single veichal can cause very large amount of non zero pixels... so I want an code which can fase such situation in such a way that for a single veichal it counts only asingle object or count it only as a single pixel.. sir plz provide me solution for this problem.I will appriciate your responce..

採用された回答

Walter Roberson
Walter Roberson 2014 年 2 月 24 日
Don't count pixels: count regions. When you regionprops() to find the centroid for tracking purposes, then the number of regions found will be the same as the length() of the structure that is output from regionprops.
  2 件のコメント
anis altaf
anis altaf 2014 年 2 月 24 日
Sir, but i want to say that i want to make any object as a closed one and to convert in a any shape such as a square...and then counting this will be easy and perfect
Dishant Arora
Dishant Arora 2014 年 2 月 24 日
You can easily count using bwlabel.
[~ , numberOfObjects] = bwlabel(BinaryImage)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by