필터 지우기
필터 지우기

How to display only red parts of an image?

조회 수: 10 (최근 30일)
Harshan Desu
Harshan Desu 2020년 4월 8일
댓글: Harshan Desu 2020년 4월 16일
The Image above is an output from using the savitky_golay_filter made by Image Analyst. I am working on taking edges out of an image. I need only the red edges I produced from the image, curve fit and find Trajectory.
This is a college project Im working. Would be great if someone could guide me as deadlines shortcoming.
Attached is the image below of how I want my output to be:
I am stuck at part (c). Outline.
Thanks in advace,
~Harshan Desu

채택된 답변

Mehmed Saad
Mehmed Saad 2020년 4월 8일
편집: Mehmed Saad 2020년 4월 8일
You have to get R component which means you have to find out value of R greater than both G and B in RGB data. (May be some threshold like 2 times G or B etc)
suppose the variable rgbtest has the data of pciture you've posted
then
red_comp = rbgtest(:,:,1)>rbgtest(:,:,2) & rbgtest(:,:,1)>rbgtest(:,:,3);
imshow(red_comp)
  댓글 수: 5
Mehmed Saad
Mehmed Saad 2020년 4월 8일
편집: Mehmed Saad 2020년 4월 8일
I think you should spend some time on it. Also try playing with the conditions which differs red from other colors
red_comp = rbgtest(:,:,1)>rbgtest(:,:,2) & rbgtest(:,:,1)>rbgtest(:,:,3);
Harshan Desu
Harshan Desu 2020년 4월 16일
I tried all different conditions and all suggestions I got here sir, nothing is helping me out to get neat and smooth edges. Please help me out.
This is my another question link:

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by