MathWorks - Mobile View
  • MathWorks 㚢㚫㚦㒳㒆への㚵㚤㒳㚤㒳MathWorks 㚢㚫㚦㒳㒆への㚵㚤㒳㚤㒳
  • Access your MathWorks Account
    • マイ アカウント
    • コミュニティのプロファイル
    • ライセンスを関連付ける
    • サインアウト
  • 製品
  • ソリューション
  • アカデミア
  • サポート
  • コミュニティ
  • イベント
  • MATLAB を入手する
MathWorks
  • 製品
  • ソリューション
  • アカデミア
  • サポート
  • コミュニティ
  • イベント
  • MATLAB を入手する
  • MathWorks 㚢㚫㚦㒳㒆への㚵㚤㒳㚤㒳MathWorks 㚢㚫㚦㒳㒆への㚵㚤㒳㚤㒳
  • Access your MathWorks Account
    • マイ アカウント
    • コミュニティのプロファイル
    • ライセンスを関連付ける
    • サインアウト

ビデオ・Webセミナー

  • MathWorks
  • ビデオ
  • ビデオ ホーム
  • 検索
  • ビデオ ホーム
  • 検索
  • 営業へのお問い合わせ
  • 評価版
  Register to watch video
  • Description
  • Full Transcript
  • Related Resources

Edge Detection with MATLAB

Johanna Pingel, MathWorks

Edge detection is a common image processing technique, and can be used for a variety of applications such as image segmentation, object detection, and Hough line detection. Use edge detection effectively by using the 'edge' function in MATLAB®, and also explore the different available parameters.

Edge detection is an image processing technique for finding the boundaries of objects within images. It works by detecting changes in brightness within an image. Besides creating an interesting-looking image, edge detection can be a great pre-processing step for image segmentation.

If you have the boundary of an object created with edges, you can fill it in to detect an object's location. If you have two objects that are touching each other, you can find the edges and use that information to separate the object. You can also use edges to find objects based on texture, in certain situations where segmenting based on color may not work very well.

So let's take a look at a detailed example of how to use edges as an image pre-processing technique in MATLAB. The goal is to detect all of the windows on the garage door using edges. Let's start by searching the documentation.

I quickly learned there is a function in the image processing tool box called Edge, which performs edge detection on my image. I can simply call Edge, or if I want more control, I can choose the method of edge detection. So let's try a few of these methods out on our image and see how they perform.

I'll start by trying the Prewitt method and then Roberts and then Sobel, and I want to visualize these differences side by side. If I zoom in and look at the differences in these results, I can see subtle variations between these methods, particularly in the corners, that may have an effect of filling in these squares and finding the windows.

Now, I want to fill all of the holes in these images and compare those results. Some of the windows are not filled because of the differences in the edge detection algorithms. But I see that the last algorithm does fill all of the holes, so this will be the method that I choose to solve this particular problem.

Just to finish the algorithm quickly, I want to take my image and remove everything except for the windows. This task is very easy with one of our image processing apps. I used an app called the Image Region Analyzer to filter out objects based on certain properties-- in this case, size and solidity.

And I highly recommend checking out all of our image processing apps within the image processing tool box. Finally, I can show the results of the edge detection. First, showing the original image, and then showing the windows grayed out, proving that we have successfully detected all of the windows in the image.

One final tip-- if you're experimenting with edge detection, and you're not getting the results you expect, there are other parameters that you can change, a popular one being the sensitivity. Using the default sensitivity, we are still missing a lot of the right side of the owl. But I can quickly increase and decrease the sensitivity and visualize those results.

A lower sensitivity gives me all of the edges that I need to move forward. To learn even more about edge detection, click on the links to bring you to more examples and documentation in MATLAB.

Related Products

  • Image Processing Toolbox

Learn More

Edge
Edge Detection Documentation

Feedback

Featured Product

Image Processing Toolbox

  • Request Trial
  • Get Pricing

Up Next:

30:17
Designing a Digital Camera Pipeline with MATLAB

Related Videos:

39:01
Thermal Analysis with MATLAB and FLIR cameras
56:56
Brainstorm: Imaging Neural Activity at the Speed of Brain...
46:05
Rapid Development of Image Processing Algorithms with MATLAB
40:21
Introduction to MATLAB with Image Processing Toolbox

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web site

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • 営業へのお問い合わせ
  • 評価版

製品を見る

  • MATLAB
  • Simulink
  • 学生向けソフトウェア
  • ハードウェア サポート
  • File Exchange
試す、購入する
  • ダウンロード
  • 評価版ソフトウェア
  • 営業へのお問い合わせ
  • 価格とライセンス
使い方を学ぶ
  • ドキュメンテーション
  • チュートリアル
  • MATLAB の例
  • ビデオ・Webセミナー
  • トレーニング

サポートを受ける

  • インストールのヘルプ
  • MATLAB Answers
  • 技術コンサルティング
  • ライセンスセンター
  • サポートへのお問い合わせ

MathWorks について

  • 採用情報
  • ニュースルーム
  • 社会貢献
  • 営業へのお問い合わせ
  • MathWorks について

MathWorks

Accelerating the pace of engineering and science

MathWorksはエンジニアや研究者向け数値解析ソフトウェアのリーディングカンパニーです。

ディスカバー…

  • Select a Web Site United States
  • 特許
  • 商標
  • プライバシー ポリシー
  • 違法コピー防止
  • アプリケーション ステータス

© 1994-2021 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

MATLAB を語ろう