フィルターのクリア

applying 1x2 operator to my image: cannot find anything or any syntax

1 回表示 (過去 30 日間)
Sat m
Sat m 2013 年 2 月 20 日
i am able to apply sobel and prewitt operator to my grayscale image. but when i put in matlab
help edge
then it displayed syntax and format for sobel, prewitt, roberts, laplacian, zero cross and canny. but i could not find any syntax for 1x2 operator. is 1x2 operator a part of any of these above operators? please let me know syntax for 1x2 operator
  4 件のコメント
Jan
Jan 2013 年 2 月 20 日
編集済み: Jan 2013 年 2 月 20 日
You cannot find the 1x2 operator anywhere, but you ask for it. I see an epistemological problem here. It is like asking for the BlöderNasenMann operator. (Kind regards to Thorsten, who has invented it as counterpart to the dull named Quabla operator some years ago without defining the mathematical details.)
I've (this means: my favorite internet search engine) found the link at stackoverflow also, but in opposite to Walter, I did not recognize that this solves your problem already. @Walter: Kotow.
Image Analyst
Image Analyst 2013 年 2 月 21 日
So if you want it, and know of the "features" or drawbacks of it, then go ahead and use it:
filteredImage = conv2(double(grayImage), [-1 1], 'same');

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

採用された回答

Walter Roberson
Walter Roberson 2013 年 2 月 20 日

その他の回答 (1 件)

Image Analyst
Image Analyst 2013 年 2 月 20 日
編集済み: Image Analyst 2013 年 3 月 4 日
There is no 1x2 kernel for Prewitt and Sobel filters. That's not how they're defined. There is a Roberts filter like that though.
edge() applies the filters and then thresholds and thins the result to give skeletonized lines along the edges. I wish there were an option to return the original edge filtered image, but unfortunately there is not. So if you want the true Sobel filter you will have to program it yourself with imfilter() or conv2(), or if you have R2012b you can use imgradient() or imgradientxy().
  4 件のコメント
Image Analyst
Image Analyst 2013 年 2 月 23 日
Yes, there is "particular syntax" and like I said in my comment, it is this:
filteredImage = conv2(double(grayImage), [-1 1], 'same');
Sat m
Sat m 2013 年 2 月 23 日
thank you. it works

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

Community Treasure Hunt

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

Start Hunting!

Translated by