How can I count pixels which are touching each other?

1 回表示 (過去 30 日間)
BAM
BAM 2018 年 4 月 30 日
コメント済み: BAM 2018 年 5 月 1 日
Hi everyone, I am new to MATLAB and I need to find out how to count Red color pixels above a certain threshold which are touching each other. By knowing the size of one pixel in [mm] I would like to get the length of the pixels touching each other. Could you help me to develop a code for that? Thank you in advance.
  2 件のコメント
John BG
John BG 2018 年 5 月 1 日
編集済み: John BG 2018 年 5 月 1 日
Hi Mustafa
would it be possible for you to attach an image to your question, and then tell what 'reds' do you consider above threshold, and what 'reds' should be ignored.
As you well point out, there has to be a threshold to whether tell a pixel is 'attached' to the pixel being observed, or to discard the neighbour pixels as 'not red enough'.
100% saturated red has RGB values [1 0 0].
But [.8 0 0] is also red. Or [.8 .1 .1] too.
So what kind of threshold do you have in mind to make the decision?
John BG
BAM
BAM 2018 年 5 月 1 日
Sorry for the unclear question. Saying red pixels I mean only red color channel from RGB ( interested in thresholding only the Red channel pixels brightness). I would like to threshold video frames which have brightness value 1.10 times more than the first frame (used as a reference brightness value).

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

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by