三劍客
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ###### tags: `SBD` # Mask(Kernel Map)(Filter) # 補充 ## Filter - 傳統的方式是把filter寫死 - 方法不只一種 - 目的是擴大想要的訊息,縮小不需要的資訊 #### 用面罩 ( Mask )(Kernel Map)(Filter) 對影像做捲積 ##### 古典寫死的版本 #### 可以調整步伐(Stride) #### 可以調整填充(padding) - ‘VALID’ 等於最一開始敘述的卷積計算,圖根據filter大小和stride大小而變小 - ‘SAME’,會用zero-padding的手法,讓輸入的圖不會受到kernel map的大小影響 ## 拉普拉斯算子 原理 : 將區域之間的灰階值會出現「 急劇變化 ( Abrupt change ) 」進行二次微分(會出現「 零點交叉 ( Zero-crossing ) 」) 四個方向混成一個(比較檢) 實作 : 用設計好的面罩 ( Mask )(Kernel Map)(Filter) 對影像做捲積, 可以自己調整步伐(Stride) ![](https://i.imgur.com/6LjdECs.png =50%x) ## 索伯算子 原理 : 用圖像的梯度作為判斷依據 實作 : 左邊負責偵測水平向的邊界,右邊負責偵測垂直向的邊界 ![](https://i.imgur.com/Voq3rjp.png =80%x) 公式 : A 表示輸入影像,G 表示梯度 第一步 ![](https://i.imgur.com/7QGeTMQ.png) 第二步 ![](https://i.imgur.com/b85VEwx.png) 第三步 看 G 有沒有超過門檻 ### 補充 此演算法跟Prewtit operator雷同,只差別在於第一行第二列的數值,sobel演算法為”2”和 “-2”,目的為凸顯周遭相臨的像素影響,因此比傳統權重較高,但此算法雖然加強邊緣的影響,可是也會導致卷積後的數值較高且對於梯度的求解較為粗糙,因此本研究使用正規劃消除數值較高的影響。圖9為工具設定線擷取範例圖,可手動輸入或是將遮罩設定選單選取到edge選項,且edge選項有直、橫、左斜、右斜等四個方向可選,並將對應的數值更改成想要的倍數。 ## 羅伯茨算子 原理 : 用對角線方向相鄰兩象素之差近似梯度幅值檢測邊緣, 2*2的Mask 實作 : ### X軸 -1 0 0 1 ### Y軸 0 -1 1 0 1. [d_x(i, j) = f(i + 1, j + 1) – f(i, j) ] 2. [d_y(i, j) = f(i, j + 1) – f(i + 1, j)] 3. [S = sqrt{d_x(i, j)^2 + d_y(i, j)^2} ] ## Prewitt 算子 原理 : 一階微分算子的邊緣檢測,利用像素點上下、左右鄰點的灰度差,在邊緣處達到極值檢測邊緣,去掉部分偽邊緣,對噪聲具有平滑作用 - 適合用來識別噪聲較多、灰度漸變的圖像 實作 : ### X軸 [[1,1,1],[0,0,0],[-1,-1,-1]] ### Y軸 [[-1,0,1],[-1,0,1],[-1,0,1]] ### 補充 影像處理中,邊(Edge)是用來偵測物件邊緣是否有存在亮度劇烈變化的 現象,而這些劇烈變化的點可以組成被稱為邊的曲線段,代表在該圖像中該位 置在某種方向明顯從亮到暗、或是暗到亮的變化出現,是影像處理中必經的步 驟之一,而為了更有效提取邊(Edge)的特徵發展出各有優缺點的遮罩演算法, 本研究採用兩種邊特徵擷取遮罩演算法,第一種是Prewitt operator演算法,是一種求圖像邊緣的梯度強弱方法,且權種數值皆為整數,因此計算成本相對較 小,Prewittt演算法使用四組3*3的矩陣,求得水平、垂直、左斜縣、右斜線等方向,有可以更改矩陣內的權重,延伸出八種方向,但此演算法容易受到極端 值得影響。圖8為工具設定線擷取範例圖,可手動輸入或是將遮罩設定選單選取 到edge選項,且edge選項有直、橫、左斜、右斜等四個方向可選。 # Marr-Hildreth算子(LOG濾波器, Laplacian of Gaussian) 原理 : 先對圖象平滑(Gaussian 函數) => 降低噪音 然後做拉普拉斯變換求二階微分 實作 : 1. 圖象平滑 [公式](https://www.zhihu.com/equation?tex=G_%7B%5Csigma%7D%28x%2Cy%29%3D%5Cfrac%7B1%7D%7B2%5Cpi%5Csigma%5E2%7D%5Cexp%28-%5Cfrac%7Bx%5E2%2By%5E2%7D%7B2%5Csigma%5E2%7D%29) - 函數圖像 : ![](https://i.imgur.com/ROUQEgE.jpg) - 以下图3所示的离散卷积核可以近似上面的表达式(当 [a = 14] 时) ![](https://i.imgur.com/9q6OVV9.jpg) ### 補充 # Canny算子 # 輪廓追蹤法 # 基底投射法 # 鬆弛法 # 動態規劃法 # 幾種算子的比較 Robert算子定位比較精確,但由於不包括平滑,所以對於噪聲比較敏感。Prewitt算子和Sobel算子都是一階的微分算子,而前者是平均濾波,後者是加權平均濾波且檢測的圖像邊緣可能大於2個像素。這兩者對灰度漸變低噪聲的圖像有較好的檢測效果,但是對於混合多複雜噪聲的圖像,處理效果就不理想了。LOG濾波器方法通過檢測二階導數過零點來判斷邊緣點。LOG濾波器中的a正比于低通濾波器的寬度,a越大,平滑作用越顯著,去除噪聲越好,但圖像的細節也損失越大,邊緣精度也就越低。所以在邊緣定位精度和消除噪聲級間存在着矛盾,應該根據具體問題對噪聲水平和邊緣點定位精度要求適當選取。 討論和比較了幾種常用的邊緣檢測算子。梯度算子計算簡單,但精度不高,只能檢測出圖像大致的輪廓,而對於比較細的邊緣可能會忽略。Prewitt 和Sobel 算子比Roberts 效果要好一些。LOG 濾波器和Canny 算子的檢測效果優於梯度算子,能夠檢測出圖像較細的邊緣部分。不同的系統,針對不同的環境條件和要求,選擇合適的算子來對圖像進行邊緣檢測。

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully