フィルターのクリア

How to code this in matlab

1 回表示 (過去 30 日間)
Poonam
Poonam 2013 年 3 月 26 日
Given-Seed which is selected as initial seed is centre pixel of an RGB image
For grow formula we use intensity based similarity between seed and 8 neighbour pixels of the seed
The similarity index between two neighbourhood pixels of RGB intensities (x,y) and (x+i,y+j)is given by
Dist=sqrt(Dr+Dg+Db);
where
Dr=((f(x+i,y+j,1)-f(x,y,1))^2
Dg=((f(x+i,y+j,2)-f(x,y,2))^2
Db=((f(x+i,y+j,3)-f(x,y,3))^2
  2 件のコメント
Sean de Wolski
Sean de Wolski 2013 年 3 月 26 日
What have you done so far?
Poonam
Poonam 2013 年 3 月 26 日
This is what i have done for HSV image
function d=dist(f,seed,cp8)
r=rgb2hsv(f);
[m,n]=size(r);
seed=[m/2,n/2];
Dh=(r(x+i,y+j,1)-r(x,y,1)).^2;
Ds=(r(x+i,y+j,2)-r(x,y,2)).^2;
Dv=(r(x+i,y+j,3)-r(x,y,3)).^2;
d=sqrt(Dh+Ds+Dv);

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

回答 (1 件)

Image Analyst
Image Analyst 2013 年 3 月 26 日
Calculate delta E as in my demo http://www.mathworks.com/matlabcentral/fileexchange/31118-color-segmentation-by-delta-e-color-difference. Basically that's the color difference.
Does the value of the seed change from pixel to pixel (difficult), or is it always going to be the color that you selected as the first seed point (very easy)?
  2 件のコメント
Poonam
Poonam 2013 年 3 月 26 日
seed point is going to be always the color which was selected as first seed point
Image Analyst
Image Analyst 2013 年 3 月 26 日
Then my delta E app is exactly what you want. Download it and run it. If you want, you can replace imfreehand() with ginput(1) so that you pick a single pixel rather than outlining a region.

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

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by