@mlikiowa/nanaeo 1.0.1731397296450 → 1.0.1731397433080

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="zh-CN,en,default"><head hexo-theme="https://github.com/volantis-x/hexo-theme-volantis/#5.8.0"><meta name="generator" content="Hexo 6.3.0"><meta name="Volantis" content="5.8.0"><meta charset="utf-8"><link rel="canonical" href="https://nanaeo.cn/2022/08/13/gausswave/"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://unpkg.com"><link rel="preconnect" href="https://unpkg.com" crossorigin><meta name="renderer" content="webkit"><meta name="force-rendering" content="webkit"><meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"><meta http-equiv="Content-Security-Policy" content=" default-src 'self' https:; block-all-mixed-content; base-uri 'self' https:; form-action 'self' https:; worker-src 'self' https:; connect-src 'self' https: *; img-src 'self' data: https: *; media-src 'self' https: *; font-src 'self' data: https: *; frame-src 'self' https: *; manifest-src 'self' https: *; child-src https:; script-src 'self' https: 'unsafe-inline' *; style-src 'self' https: 'unsafe-inline' *; "><meta name="HandheldFriendly" content="True"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=5"><meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"><meta content="telephone=no" name="format-detection"><link rel="preload" href="/css/style.css" as="style"><link rel="preload" href="https://nanaeo.cn/asset/Sotheby.ttf" as="font" type="font/ttf" crossorigin="anonymous"><link rel="preload" href="https://fastly.jsdelivr.net/gh/moieo/moieo@main/moieo.woff2" as="font" type="font/woff2" crossorigin="anonymous"><title>高斯滤波 - Village</title><meta name="keywords" content="DevLog,Gauss,null"><meta desc name="description" content="高斯滤波的实现 - Mlikiowa - Village"><meta property="og:type" content="article"><meta property="og:title" content="高斯滤波"><meta property="og:url" content="https://nanaeo.cn/2022/08/13/GaussWave/index.html"><meta property="og:site_name" content="Village"><meta property="og:description" content="高斯滤波的实现"><meta property="og:locale" content="zh_CN"><meta property="og:image" content="https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"><meta property="article:published_time" content="2022-08-13T16:00:00.000Z"><meta property="article:modified_time" content="2024-11-12T07:41:03.228Z"><meta property="article:author" content="Mlikiowa"><meta property="article:tag" content="DevLog"><meta property="article:tag" content="Gauss"><meta name="twitter:card" content="summary"><meta name="twitter:image" content="https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"><style>#safearea{display:none}.post-story+.post-story{content-visibility:auto;contain-intrinsic-size:10px 500px}:root{--color-site-body:#e0eeee;--color-site-bg:#e0eeee;--color-site-inner:#fff;--color-site-footer:#666;--color-card:#fff0f5;--color-text:#eea9b8;--color-block:#f6f6f6;--color-inlinecode:#ec7bb6;--color-codeblock:#e0eeee;--color-h1:#3a3a3a;--color-h2:#3a3a3a;--color-h3:#23464f;--color-h4:#23464f;--color-h5:#23464f;--color-h6:#23464f;--color-p:#23464f;--color-list:#eea9b8;--color-list-hl:#f7cdd4;--color-meta:#888;--color-read-bkg:#e0d8c8;--color-read-post:#f8f1e2;--color-copyright-bkg:#f5f5f5}*{box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;outline:0;margin:0;padding:0}::-webkit-scrollbar{height:4px;width:4px}::-webkit-scrollbar-track-piece{background:0 0}::-webkit-scrollbar-thumb{background:#fcc;cursor:pointer;border-radius:2px;-webkit-border-radius:2px}::-webkit-scrollbar-thumb:hover{background:#ff5722}html{color:var(--color-text);width:100%;height:100%;font-family:Dosis,"PingFang SC","Microsoft YaHei",Helvetica,Arial,Menlo,Monaco,monospace,sans-serif;font-size:16px}html>::-webkit-scrollbar{height:4px;width:4px}html>::-webkit-scrollbar-track-piece{background:0 0}html>::-webkit-scrollbar-thumb{background:#54b5a0 linear-gradient(45deg,rgba(255,255,255,.4) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.4) 75%,transparent 75%,transparent);cursor:pointer;border-radius:2px;-webkit-border-radius:2px}html>::-webkit-scrollbar-thumb:hover{background:#54b5a0 linear-gradient(45deg,rgba(255,255,255,.4) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.4) 75%,transparent 75%,transparent)}body{background-color:var(--color-site-body);text-rendering:optimizelegibility;-webkit-tap-highlight-color:transparent;line-height:1.6;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body.modal-active{overflow:hidden}@media screen and (max-width:680px){body.modal-active{position:fixed;top:0;right:0;bottom:0;left:0}}a{color:#ec7bb6;cursor:pointer;text-decoration:none;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}a:hover{color:#ff5722}a:active,a:hover{outline:0}ol,ul{padding-left:0}ol li,ul li{list-style:none}header{display:-webkit-box;display:-moz-box;display:block}img{border:0;background:0 0;max-width:100%}svg:not(:root){overflow:hidden}hr{-moz-box-sizing:content-box;box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;height:0;border:0;border-radius:1px;-webkit-border-radius:1px;border-bottom:1px solid rgba(238,169,184,.1)}button,input{color:inherit;font:inherit;margin:0}button{overflow:visible;text-transform:none;-webkit-appearance:button;cursor:pointer}@supports (backdrop-filter:blur(20px)){.blur{background:rgba(255,240,245,.9)!important;backdrop-filter:saturate(200%) blur(20px)}}.shadow{box-shadow:0 1px 2px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,.1)}.shadow.floatable{transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}.shadow.floatable:hover{box-shadow:0 2px 4px 0 rgba(0,0,0,.1),0 4px 8px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.1),0 4px 8px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.1)}#l_cover{min-height:64px}.cover-wrapper{top:0;left:0;max-width:100%;height:100vh;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-khtml-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-o-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;align-items:center;align-self:center;align-content:center;color:var(--color-site-inner);padding:0 16px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;position:relative;overflow:hidden;margin-bottom:-100px}.cover-wrapper .cover-bg{position:absolute;width:100%;height:100%;background-position:center;background-size:cover;-webkit-background-size:cover;-moz-background-size:cover}.cover-wrapper .cover-bg.lazyload:not(.loaded){opacity:0;-webkit-opacity:0;-moz-opacity:0}.cover-wrapper .cover-bg.lazyload.loaded{animation-delay:0s;animation-duration:.5s;animation-fill-mode:forwards;animation-timing-function:ease-out;animation-name:fadeIn}@-moz-keyframes fadeIn{0%{opacity:0;-webkit-opacity:0;-moz-opacity:0;filter:blur(12px);transform:scale(1.02);-webkit-transform:scale(1.02);-khtml-transform:scale(1.02);-moz-transform:scale(1.02);-o-transform:scale(1.02);-ms-transform:scale(1.02)}100%{opacity:1;-webkit-opacity:1;-moz-opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0;-webkit-opacity:0;-moz-opacity:0;filter:blur(12px);transform:scale(1.02);-webkit-transform:scale(1.02);-khtml-transform:scale(1.02);-moz-transform:scale(1.02);-o-transform:scale(1.02);-ms-transform:scale(1.02)}100%{opacity:1;-webkit-opacity:1;-moz-opacity:1}}@-o-keyframes fadeIn{0%{opacity:0;-webkit-opacity:0;-moz-opacity:0;filter:blur(12px);transform:scale(1.02);-webkit-transform:scale(1.02);-khtml-transform:scale(1.02);-moz-transform:scale(1.02);-o-transform:scale(1.02);-ms-transform:scale(1.02)}100%{opacity:1;-webkit-opacity:1;-moz-opacity:1}}@keyframes fadeIn{0%{opacity:0;-webkit-opacity:0;-moz-opacity:0;filter:blur(12px);transform:scale(1.02);-webkit-transform:scale(1.02);-khtml-transform:scale(1.02);-moz-transform:scale(1.02);-o-transform:scale(1.02);-ms-transform:scale(1.02)}100%{opacity:1;-webkit-opacity:1;-moz-opacity:1}}.cover-wrapper .cover-body{z-index:1;position:relative;width:100%;height:100%}.cover-wrapper#full{height:calc(100vh + 100px);padding-bottom:100px}.cover-wrapper#half{max-height:640px;min-height:400px;height:calc(36vh - 64px + 200px)}.cover-wrapper #scroll-down{width:100%;height:64px;position:absolute;bottom:100px;text-align:center;cursor:pointer}.cover-wrapper #scroll-down .scroll-down-effects{color:#fff;font-size:24px;line-height:64px;position:absolute;width:24px;left:calc(50% - 12px);text-shadow:0 1px 2px rgba(0,0,0,.1);animation:scroll-down-effect 1.5s infinite;-webkit-animation:scroll-down-effect 1.5s infinite;-khtml-animation:scroll-down-effect 1.5s infinite;-moz-animation:scroll-down-effect 1.5s infinite;-o-animation:scroll-down-effect 1.5s infinite;-ms-animation:scroll-down-effect 1.5s infinite}@-moz-keyframes scroll-down-effect{0%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}50%{top:-16px;opacity:.4;-webkit-opacity:.4;-moz-opacity:.4}100%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}}@-webkit-keyframes scroll-down-effect{0%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}50%{top:-16px;opacity:.4;-webkit-opacity:.4;-moz-opacity:.4}100%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}}@-o-keyframes scroll-down-effect{0%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}50%{top:-16px;opacity:.4;-webkit-opacity:.4;-moz-opacity:.4}100%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}}@keyframes scroll-down-effect{0%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}50%{top:-16px;opacity:.4;-webkit-opacity:.4;-moz-opacity:.4}100%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}}.cover-wrapper .cover-body{margin-top:64px;margin-bottom:100px}.cover-wrapper .cover-body,.cover-wrapper .cover-body .bottom,.cover-wrapper .cover-body .top{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;align-items:center;justify-content:center;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-o-justify-content:center;-ms-justify-content:center;max-width:100%}.cover-wrapper .cover-body .bottom{margin-top:32px}.cover-wrapper .cover-body .title{font-family:Sotheby,Helvetica,monospace;font-size:3.125rem;line-height:1.2;text-shadow:0 1px 2px rgba(0,0,0,.1)}.cover-wrapper .cover-body .subtitle{font-size:20px}.cover-wrapper .cover-body .logo{max-height:120px;max-width:calc(100% - 4 * 16px)}@media screen and (min-height:1024px){.cover-wrapper .cover-body .title{font-size:3rem}.cover-wrapper .cover-body .subtitle{font-size:1.05rem}.cover-wrapper .cover-body .logo{max-height:150px}}.cover-wrapper .cover-body .m_search{position:relative;max-width:calc(100% - 16px);width:320px;vertical-align:middle}.cover-wrapper .cover-body .m_search .form{position:relative;display:-webkit-box;display:-moz-box;display:block;width:100%}.cover-wrapper .cover-body .m_search .icon,.cover-wrapper .cover-body .m_search .input{transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}.cover-wrapper .cover-body .m_search .icon{position:absolute;display:-webkit-box;display:-moz-box;display:block;line-height:2.5rem;width:32px;top:0;left:5px;color:rgba(35,70,79,.75)}.cover-wrapper .cover-body .m_search .input{display:-webkit-box;display:-moz-box;display:block;height:2.5rem;width:100%;box-shadow:none;-webkit-box-shadow:none;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;font-size:.875rem;-webkit-appearance:none;padding-left:36px;border-radius:1.4rem;-webkit-border-radius:1.4rem;background:rgba(255,240,245,.6);backdrop-filter:blur(10px);border:none;color:var(--color-text)}@media screen and (max-width:500px){.cover-wrapper .cover-body .m_search .input{padding-left:36px}}.cover-wrapper .cover-body .m_search .input:hover{background:rgba(255,240,245,.8)}.cover-wrapper .cover-body .m_search .input:focus{background:#fff0f5}.cover-wrapper .list-h{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;flex-wrap:wrap;-webkit-flex-wrap:wrap;-khtml-flex-wrap:wrap;-moz-flex-wrap:wrap;-o-flex-wrap:wrap;-ms-flex-wrap:wrap;align-items:stretch;border-radius:4px;-webkit-border-radius:4px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.cover-wrapper .list-h a{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 0;-ms-flex:1 0;flex:1 0;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;font-weight:600}.cover-wrapper .list-h a img{display:-webkit-box;display:-moz-box;display:block;border-radius:2px;-webkit-border-radius:2px;margin:4px;min-width:40px;max-width:44px}@media screen and (max-width:768px){.cover-wrapper .list-h a img{min-width:36px;max-width:40px}}@media screen and (max-width:500px){.cover-wrapper .list-h a img{margin:2px 4px;min-width:32px;max-width:36px}}@media screen and (max-width:375px){.cover-wrapper .list-h a img{min-width:28px;max-width:32px}}.cover-wrapper{max-width:100%}.cover-wrapper.search .bottom .menu{margin-top:16px}.cover-wrapper.search .bottom .menu .list-h a{white-space:nowrap;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;align-items:baseline;padding:2px;margin:4px;color:var(--color-site-inner);opacity:.75;-webkit-opacity:.75;-moz-opacity:.75;text-shadow:0 1px 2px rgba(0,0,0,.05);border-bottom:2px solid transparent}.cover-wrapper.search .bottom .menu .list-h a i{margin-right:4px}.cover-wrapper.search .bottom .menu .list-h a p{font-size:.9375rem}.cover-wrapper.search .bottom .menu .list-h a.active,.cover-wrapper.search .bottom .menu .list-h a:active,.cover-wrapper.search .bottom .menu .list-h a:hover{opacity:1;-webkit-opacity:1;-moz-opacity:1;border-bottom:2px solid var(--color-site-inner)}@font-face{font-family:Dosis;src:url(https://fastly.jsdelivr.net/gh/moieo/moieo@main/moieo.woff2);font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Sotheby;src:url(https://nanaeo.cn/asset/Sotheby.ttf);font-weight:400;font-style:normal;font-display:swap}.l_header{position:fixed;z-index:1000;top:0;width:100%;height:64px;background:var(--color-card);box-shadow:0 1px 2px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,.1)}.l_header.auto{transition:opacity .4s ease;-webkit-transition:opacity .4s ease;-khtml-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-o-transition:opacity .4s ease;-ms-transition:opacity .4s ease;visibility:hidden}.l_header.auto.show{opacity:1!important;-webkit-opacity:1!important;-moz-opacity:1!important;visibility:visible}.l_header .container{margin-left:16px;margin-right:16px}.l_header #wrapper{height:100%;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.l_header #wrapper .nav-main,.l_header #wrapper .nav-sub{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-khtml-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-o-flex-wrap:nowrap;-ms-flex-wrap:nowrap;justify-content:space-between;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-o-justify-content:space-between;-ms-justify-content:space-between;align-items:center}.l_header #wrapper .nav-main{transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}.l_header #wrapper.sub .nav-main{transform:translateY(-64px);-webkit-transform:translateY(-64px);-khtml-transform:translateY(-64px);-moz-transform:translateY(-64px);-o-transform:translateY(-64px);-ms-transform:translateY(-64px)}.l_header #wrapper .nav-sub{transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease;opacity:0;-webkit-opacity:0;-moz-opacity:0;height:64px;width:calc(100% - 2 * 16px);position:absolute}.l_header #wrapper .nav-sub ::-webkit-scrollbar{display:-webkit-box;display:-moz-box;display:none}@media screen and (min-width:2048px){.l_header #wrapper .nav-sub{max-width:55vw;margin:auto}}.l_header #wrapper.sub .nav-sub{opacity:1;-webkit-opacity:1;-moz-opacity:1}.l_header #wrapper .title{position:relative;color:var(--color-text);padding-left:24px;max-height:64px}.l_header #wrapper .nav-main .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:0;line-height:64px;padding:0 24px;font-size:1.25rem;font-family:Sotheby,Helvetica,monospace}.l_header #wrapper .nav-main .title img{height:64px}.l_header .nav-sub{max-width:1080px;margin:auto}.l_header .nav-sub .title{font-weight:700;font-family:Dosis,"PingFang SC","Microsoft YaHei",Helvetica,Arial,Menlo,Monaco,monospace,sans-serif;line-height:1.2;max-height:64px;white-space:normal;flex-shrink:1}.l_header .switcher{display:-webkit-box;display:-moz-box;display:none;line-height:64px;align-items:center}.l_header .switcher .s-toc{display:-webkit-box;display:-moz-box;display:none}@media screen and (max-width:768px){.l_header .switcher .s-toc{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex}}.l_header .switcher>li{height:48px;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease;margin:2px}@media screen and (max-width:500px){.l_header .switcher>li{margin:0 1px;height:48px}}.l_header .switcher>li>a{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;justify-content:center;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-o-justify-content:center;-ms-justify-content:center;align-items:center;width:48px;height:48px;padding:.85em 1.1em;border-radius:100px;-webkit-border-radius:100px;border:none;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease;color:#fcc}.l_header .switcher>li>a:hover{border:none}.l_header .switcher>li>a.active,.l_header .switcher>li>a:active{border:none;background:var(--color-site-bg)}@media screen and (max-width:500px){.l_header .switcher>li>a{width:36px;height:48px}}.l_header .nav-sub .switcher{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex}.l_header .m_search{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;height:64px;width:240px;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}@media screen and (max-width:1024px){.l_header .m_search{width:44px;min-width:44px}.l_header .m_search input::placeholder{opacity:0;-webkit-opacity:0;-moz-opacity:0}.l_header .m_search:hover{width:240px}.l_header .m_search:hover input::placeholder{opacity:1;-webkit-opacity:1;-moz-opacity:1}}@media screen and (min-width:500px){.l_header .m_search:hover .input{width:100%}.l_header .m_search:hover .input::placeholder{opacity:1;-webkit-opacity:1;-moz-opacity:1}}@media screen and (max-width:500px){.l_header .m_search{min-width:0}.l_header .m_search input::placeholder{opacity:1;-webkit-opacity:1;-moz-opacity:1}}.l_header .m_search .form{position:relative;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;width:100%;align-items:center}.l_header .m_search .icon{position:absolute;width:36px;left:5px;color:var(--color-meta)}@media screen and (max-width:500px){.l_header .m_search .icon{display:-webkit-box;display:-moz-box;display:none}}.l_header .m_search .input{display:-webkit-box;display:-moz-box;display:block;padding-top:8px;padding-bottom:8px;line-height:1.3;width:100%;color:var(--color-text);background:#ffe6ee;box-shadow:none;-webkit-box-shadow:none;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;padding-left:40px;font-size:.875rem;border-radius:8px;-webkit-border-radius:8px;border:none;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}@media screen and (min-width:500px){.l_header .m_search .input:focus{box-shadow:0 4px 8px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 4px 8px 0 rgba(0,0,0,.1)}}@media screen and (max-width:500px){.l_header .m_search .input{background:var(--color-block);padding-left:8px;border:none}.l_header .m_search .input:focus,.l_header .m_search .input:hover{border:none}}@media (max-width:500px){.l_header .m_search{left:0;width:0;overflow:hidden;position:absolute;background:#fff;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}.l_header .m_search .input{border-radius:32px;-webkit-border-radius:32px;margin-left:16px;padding-left:16px}.l_header.z_search-open .m_search{width:100%}.l_header.z_search-open .m_search .input{width:calc(100% - 120px)}}ul.m-pc>li>a{color:inherit;border-bottom:2px solid transparent}ul.m-pc>li>a.active,ul.m-pc>li>a:active{border-bottom:2px solid #fcc}ul.list-v li:hover>ul.list-v,ul.m-pc li:hover>ul.list-v{display:-webkit-box;display:-moz-box;display:block}ul.nav-list-h{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;align-items:stretch}ul.nav-list-h>li{position:relative;justify-content:center;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-o-justify-content:center;-ms-justify-content:center;height:100%;line-height:2.4;border-radius:4px;-webkit-border-radius:4px}ul.nav-list-h>li>a{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:600}ul.list-v{z-index:1;display:-webkit-box;display:-moz-box;display:none;position:absolute;background:var(--color-card);box-shadow:0 2px 4px 0 rgba(0,0,0,.08),0 4px 8px 0 rgba(0,0,0,.08),0 8px 16px 0 rgba(0,0,0,.08);-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.08),0 4px 8px 0 rgba(0,0,0,.08),0 8px 16px 0 rgba(0,0,0,.08);margin-top:-6px;border-radius:4px;-webkit-border-radius:4px;padding:8px 0}ul.list-v.show{display:-webkit-box;display:-moz-box;display:block}ul.list-v hr{margin-top:8px;margin-bottom:8px}ul.list-v>li{white-space:nowrap;word-break:keep-all}ul.list-v>li.header{font-size:.78125rem;font-weight:700;line-height:2em;color:var(--color-meta);margin:8px 16px 4px}ul.list-v>li.header i{margin-right:8px}ul.list-v>li ul{margin-left:0;display:-webkit-box;display:-moz-box;display:none;margin-top:-40px}ul.list-v .aplayer-container{min-height:64px;padding:6px 16px}ul.list-v>li>a{transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease;display:-webkit-box;display:-moz-box;display:block;color:var(--color-list);font-size:.875rem;font-weight:700;line-height:36px;padding:0 20px 0 16px;text-overflow:ellipsis;margin:0 4px;border-radius:4px;-webkit-border-radius:4px}@media screen and (max-width:1024px){ul.list-v>li>a{line-height:40px}}ul.list-v>li>a>i{margin-right:8px}ul.list-v>li>a.active,ul.list-v>li>a:active{color:var(--color-list-hl)}ul.list-v>li>a:hover{color:var(--color-list-hl);background:var(--color-site-bg)}.l_header .menu>ul>li>a{display:-webkit-box;display:-moz-box;display:block;padding:0 8px}.l_header .menu>ul>li>a>i{margin-right:4px}.l_header ul.nav-list-h>li{color:var(--color-list);line-height:64px}.l_header ul.nav-list-h>li>a{max-height:64px;overflow:hidden;color:inherit}.l_header ul.nav-list-h>li>a.active,.l_header ul.nav-list-h>li>a:active{color:#fcc}.l_header ul.nav-list-h>li:hover>a{color:var(--color-list-hl)}.l_header ul.nav-list-h>li i.music{animation:rotate-effect 1.5s linear infinite;-webkit-animation:rotate-effect 1.5s linear infinite;-khtml-animation:rotate-effect 1.5s linear infinite;-moz-animation:rotate-effect 1.5s linear infinite;-o-animation:rotate-effect 1.5s linear infinite;-ms-animation:rotate-effect 1.5s linear infinite}@-moz-keyframes rotate-effect{0%{transform:rotate(0);-webkit-transform:rotate(0);-khtml-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0)}25%{transform:rotate(90deg);-webkit-transform:rotate(90deg);-khtml-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg)}50%{transform:rotate(180deg);-webkit-transform:rotate(180deg);-khtml-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg)}75%{transform:rotate(270deg);-webkit-transform:rotate(270deg);-khtml-transform:rotate(270deg);-moz-transform:rotate(270deg);-o-transform:rotate(270deg);-ms-transform:rotate(270deg)}100%{transform:rotate(360deg);-webkit-transform:rotate(360deg);-khtml-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg)}}@-webkit-keyframes rotate-effect{0%{transform:rotate(0);-webkit-transform:rotate(0);-khtml-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0)}25%{transform:rotate(90deg);-webkit-transform:rotate(90deg);-khtml-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg)}50%{transform:rotate(180deg);-webkit-transform:rotate(180deg);-khtml-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg)}75%{transform:rotate(270deg);-webkit-transform:rotate(270deg);-khtml-transform:rotate(270deg);-moz-transform:rotate(270deg);-o-transform:rotate(270deg);-ms-transform:rotate(270deg)}100%{transform:rotate(360deg);-webkit-transform:rotate(360deg);-khtml-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg)}}@-o-keyframes rotate-effect{0%{transform:rotate(0);-webkit-transform:rotate(0);-khtml-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0)}25%{transform:rotate(90deg);-webkit-transform:rotate(90deg);-khtml-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg)}50%{transform:rotate(180deg);-webkit-transform:rotate(180deg);-khtml-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg)}75%{transform:rotate(270deg);-webkit-transform:rotate(270deg);-khtml-transform:rotate(270deg);-moz-transform:rotate(270deg);-o-transform:rotate(270deg);-ms-transform:rotate(270deg)}100%{transform:rotate(360deg);-webkit-transform:rotate(360deg);-khtml-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg)}}@keyframes rotate-effect{0%{transform:rotate(0);-webkit-transform:rotate(0);-khtml-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0)}25%{transform:rotate(90deg);-webkit-transform:rotate(90deg);-khtml-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg)}50%{transform:rotate(180deg);-webkit-transform:rotate(180deg);-khtml-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg)}75%{transform:rotate(270deg);-webkit-transform:rotate(270deg);-khtml-transform:rotate(270deg);-moz-transform:rotate(270deg);-o-transform:rotate(270deg);-ms-transform:rotate(270deg)}100%{transform:rotate(360deg);-webkit-transform:rotate(360deg);-khtml-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg)}}.menu-phone li ul.list-v{right:calc(100% - .5 * 16px)}.menu-phone li ul.list-v ul{right:calc(100% - .5 * 16px)}#wrapper{max-width:1080px;margin:auto}@media screen and (min-width:2048px){#wrapper{max-width:55vw}}#wrapper .menu{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1;-ms-flex:1 1;flex:1 1;margin:0 16px 0 0}#wrapper .menu .list-v ul{left:calc(100% - .5 * 16px)}.menu-phone{display:-webkit-box;display:-moz-box;display:none;margin-top:16px;right:8px;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}.menu-phone ul{right:calc(100% - .5 * 16px)}@media screen and (max-width:500px){.menu-phone{display:-webkit-box;display:-moz-box;display:block}}.l_header{max-width:65vw;left:calc((100% - 65vw) * .5);border-bottom-left-radius:8px;border-bottom-right-radius:8px}@media screen and (max-width:2048px){.l_header{max-width:1112px;left:calc((100% - 1112px) * .5)}}@media screen and (max-width:1112px){.l_header{left:0;border-radius:0;-webkit-border-radius:0;max-width:100%}}@media screen and (max-width:500px){.l_header .container{margin-left:0;margin-right:0}.l_header #wrapper .nav-main .title{padding-left:16px;padding-right:16px}.l_header #wrapper .nav-sub{width:100%}.l_header #wrapper .nav-sub .title{overflow-y:scroll;margin-top:2px;padding:8px 16px}.l_header #wrapper .switcher{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;margin-right:8px}.l_header .menu{display:-webkit-box;display:-moz-box;display:none}}@media screen and (max-width:500px){.list-v li{max-width:270px}}#u-search{display:-webkit-box;display:-moz-box;display:none;position:fixed;top:0;left:0;width:100%;height:100%;padding:60px 20px;z-index:1001}@media screen and (max-width:680px){#u-search{padding:0}}</style><link rel="stylesheet" href="/css/style.css" media="print" onload='this.media="all",this.onload=null'><noscript><link rel="stylesheet" href="/css/style.css"></noscript><script>window.MSInputMethodContext&&document.documentMode&&document.write('<style>html{overflow-x: hidden !important;overflow-y: hidden !important;}.kill-ie{text-align:center;height: 100%;margin-top: 15%;margin-bottom: 5500%;}.kill-t{font-size: 2rem;}.kill-c{font-size: 1.2rem;}#l_header,#l_body{display: none;}</style><div class="kill-ie"><span class="kill-t"><b>抱歉,您的浏览器无法访问本站</b></span><br/><span class="kill-c">微软已经于2016年终止了对 Internet Explorer (IE) 10 及更早版本的支持,<br/>继续使用存在极大的安全隐患,请使用当代主流的浏览器进行访问。</span><br/><a target="_blank" rel="noopener" href="https://blogs.windows.com/windowsexperience/2021/05/19/the-future-of-internet-explorer-on-windows-10-is-in-microsoft-edge/"><strong>了解详情 ></strong></a></div>')</script><noscript><style>html{overflow-x:hidden!important;overflow-y:hidden!important}.kill-noscript{text-align:center;height:100%;margin-top:15%;margin-bottom:5500%}.kill-t{font-size:2rem}.kill-c{font-size:1.2rem}#l_body,#l_header{display:none}</style><div class="kill-noscript"> <span class="kill-t"><b>抱歉,您的浏览器无法访问本站</b></span><br> <span class="kill-c">本页面需要浏览器支持(启用)JavaScript</span><br> <a target="_blank" rel="noopener" href="https://www.baidu.com/s?wd=启用JavaScript"><strong>了解详情 ></strong></a></div></noscript><script>function volantisEventListener(e,t,s){this.type=e,this.f=t,this.ele=s}function volantisDom(e){return e||(e=document.createElement("div")),this.ele=e,this.ele.find=e=>{let t=this.ele.querySelector(e);if(t)return new volantisDom(t)},this.ele.hasClass=e=>this.ele.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)")),this.ele.addClass=e=>(this.ele.classList.add(e),this.ele),this.ele.removeClass=e=>(this.ele.classList.remove(e),this.ele),this.ele.toggleClass=e=>(this.ele.hasClass(e)?this.ele.removeClass(e):this.ele.addClass(e),this.ele),this.ele.on=(e,t,s=1)=>(this.ele.addEventListener(e,t,!1),s&&volantis.EventListener.list.push(new volantisEventListener(e,t,this.ele)),this.ele),this.ele.click=(e,t)=>(this.ele.on("click",e,t),this.ele),this.ele.scroll=(e,t)=>(this.ele.on("scroll",e,t),this.ele),this.ele.html=e=>(this.ele.innerHTML=e,this.ele),this.ele.hide=e=>(this.ele.style.display="none",this.ele),this.ele.show=e=>(this.ele.style.display="block",this.ele),this.ele}function RunItem(){function e(e,t){this.name=t||e.name,this.run=()=>{try{e()}catch(e){console.log(e)}}}this.list=[],this.start=()=>{for(var e=0;e<this.list.length;e++)this.list[e].run()},this.push=(t,s,l=!0)=>{let n=t;l&&(n=()=>{volantis.requestAnimationFrame(t)});var i=new e(n,s);this.list.push(i)},this.remove=e=>{for(let t=0;t<this.list.length;t++){this.list[t].name==e&&this.list.splice(t,1)}}}function errorImgAvatar(e){e.src="https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/avatar/round/3442075.svg",e.onerror=null}function errorImgCover(e){e.src="https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/cover/76b86c0226ffd.svg",e.onerror=null}window.volantis={},volantis.debug="env",volantis.dom={},volantis.GLOBAL_CONFIG={debug:"env",cdn:{js:{app:"/js/app.js",parallax:"/js/plugins/parallax.js",rightMenu:"/js/plugins/rightMenu.js",rightMenus:"/js/plugins/rightMenus.js",sites:"/js/plugins/tags/sites.js",friends:"/js/plugins/tags/friends.js",contributors:"/js/plugins/tags/contributors.js",search:"/js/search/hexo.js"},css:{style:"/css/style.css"}},default:{avatar:"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/avatar/round/3442075.svg",link:"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/link/8f277b4ee0ecd.svg",cover:"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/cover/76b86c0226ffd.svg",image:"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/image/2659360.svg"},lastupdate:new Date(1731397287301),sidebar:{for_page:["blogger","category","webinfo"],for_post:["toc"],webinfo:{lastupd:{enable:!0,friendlyShow:!0},runtime:{data:"2022/08/05",unit:"天"}}},plugins:{message:{enable:!0,css:"https://fastly.jsdelivr.net/npm/volantis-static/libs/izitoast/dist/css/iziToast.min.css",js:"https://fastly.jsdelivr.net/npm/volantis-static/libs/izitoast/dist/js/iziToast.min.js",icon:{default:"fa-solid fa-info-circle light-blue",quection:"fa-solid fa-question-circle light-blue"},time:{default:5e3,quection:2e4},position:"topRight",transitionIn:"bounceInLeft",transitionOut:"fadeOutRight",titleColor:"var(--color-text)",messageColor:"var(--color-text)",backgroundColor:"var(--color-card)",zindex:2147483647,copyright:{enable:!0,title:"知识共享许可协议",message:"请遵守 CC BY-NC-SA 4.0 协议。",icon:"far fa-copyright light-blue"},aplayer:{enable:!0,play:"fa-solid fa-play",pause:"fa-solid fa-pause"},rightmenu:{enable:!0,notice:!0}},fancybox:{css:"https://fastly.jsdelivr.net/npm/volantis-static/libs/@fancyapps/ui/dist/fancybox.css",js:"https://fastly.jsdelivr.net/npm/volantis-static/libs/@fancyapps/ui/dist/fancybox.umd.js"}}},volantis.EventListener={},volantis.EventListener.list=[],volantis.EventListener.remove=()=>{volantis.EventListener.list.forEach((function(e){e.ele.removeEventListener(e.type,e.f,!1)})),volantis.EventListener.list=[]},volantis.dom.$=e=>e?new volantisDom(e):null,volantis.pjax={},volantis.pjax.method={complete:new RunItem,error:new RunItem,send:new RunItem},volantis.pjax=Object.assign(volantis.pjax,{push:volantis.pjax.method.complete.push,error:volantis.pjax.method.error.push,send:volantis.pjax.method.send.push}),volantis.rightmenu={},volantis.rightmenu.method={handle:new RunItem},volantis.rightmenu=Object.assign(volantis.rightmenu,{handle:volantis.rightmenu.method.handle.push}),volantis.dark={},volantis.dark.method={toggle:new RunItem},volantis.dark=Object.assign(volantis.dark,{push:volantis.dark.method.toggle.push}),volantis.js=(e,t)=>new Promise(s=>{setTimeout((function(){var l=document.getElementsByTagName("head")[0]||document.documentElement,n=document.createElement("script");if(n.setAttribute("type","text/javascript"),t)if(JSON.stringify(t))for(let e in t)"onload"==e?n[e]=()=>{t[e](),s()}:(n[e]=t[e],n.onload=s);else n.onload=()=>{t(),s()};else n.onload=s;n.setAttribute("src",e),l.appendChild(n)}))}),volantis.css=e=>new Promise(t=>{setTimeout((function(){var s=document.createElement("link");s.rel="stylesheet",s.href=e,s.onload=t,document.getElementsByTagName("head")[0].appendChild(s)}))}),volantis.import={jQuery:()=>"undefined"==typeof jQuery?volantis.js("https://fastly.jsdelivr.net/npm/volantis-static/libs/jquery/dist/jquery.min.js"):new Promise(e=>{e()})},volantis.requestAnimationFrame=e=>{window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame),window.requestAnimationFrame(e)},volantis.layoutHelper=(e,t,s)=>{function l(e,t,s){volantis.tempDiv=document.createElement("div"),volantis.tempDiv.innerHTML=t;let l=document.querySelector("#layoutHelper-"+e);l&&(s&&(l.innerHTML=""),l.append(volantis.tempDiv))}s=Object.assign({clean:!1,pjax:!0},s),l(e,t,s.clean),s.pjax&&volantis.pjax.push(()=>{l(e,t,s.clean)},"layoutHelper-"+e)},volantis.scroll={engine:new RunItem,unengine:new RunItem},volantis.scroll=Object.assign(volantis.scroll,{push:volantis.scroll.engine.push}),volantis.scroll.getScrollTop=()=>{let e;return window.pageYOffset?e=window.pageYOffset:document.compatMode&&"BackCompat"!=document.compatMode?e=document.documentElement.scrollTop:document.body&&(e=document.body.scrollTop),e},volantis.scroll.handleScrollEvents=()=>{volantis.scroll.lastScrollTop=volantis.scroll.getScrollTop(),volantis.requestAnimationFrame((function e(){const t=volantis.scroll.getScrollTop();volantis.scroll.lastScrollTop!==t?(volantis.scroll.del=t-volantis.scroll.lastScrollTop,volantis.scroll.lastScrollTop=t,volantis.scroll.unengine.list=[],volantis.scroll.engine.start()):volantis.scroll.unengine.start(),volantis.requestAnimationFrame(e)}))},volantis.scroll.handleScrollEvents(),volantis.scroll.ele=null,volantis.scroll.to=(e,t={})=>{e&&(volantis.scroll.ele=e,opt={top:e.getBoundingClientRect().top+document.documentElement.scrollTop,behavior:"smooth"},"top"in t&&(opt.top=t.top),"behavior"in t&&(opt.behavior=t.behavior),"addTop"in t&&(opt.top+=t.addTop),"observerDic"in t||(t.observerDic=100),window.scrollTo(opt),t.observer&&setTimeout(()=>{volantis.scroll.ele==e&&volantis.scroll.unengine.push(()=>{let s=e.getBoundingClientRect().top;s>=-t.observerDic&&s<=t.observerDic||volantis.scroll.to(e,t),volantis.scroll.unengine.remove("unengineObserver")},"unengineObserver")},1e3))},volantis.cleanContentVisibility=()=>{document.querySelector(".post-story")&&(console.log("cleanContentVisibility"),document.querySelectorAll(".post-story").forEach(e=>{e.classList.remove("post-story")}))}</script></head><body itemscope itemtype="http://schema.org/WebPage"><header itemscope itemtype="http://schema.org/WPHeader" id="l_header" class="l_header auto shadow floatable blur" style="opacity:0"><div class="container"><div id="wrapper"><div class="nav-sub"><p class="title"></p><ul class="switcher nav-list-h m-phone" id="pjax-header-nav-list"><li><a id="s-comment" class="fa-solid fa-comments fa-fw" target="_self" href="/" onclick="return!1" title="comment"></a></li><li><a id="s-toc" class="s-toc fa-solid fa-list fa-fw" target="_self" href="/" onclick="return!1" title="toc"></a></li></ul></div><div class="nav-main"> <a class="title flat-box" target="_self" href="/">Mlikiowa</a><div class="menu navigation"><ul class="nav-list-h m-pc"><li><a class="menuitem flat-box faa-parent animated-hover" href="/" title="博客" active-action="action-home"><i class="fa-solid fa-rss fa-fw"></i> 博客</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/categories/" title="分类" active-action="action-categories"><i class="fa-solid fa-folder-open fa-fw"></i> 分类</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/tags/" title="标签" active-action="action-tags"><i class="fa-solid fa-tags fa-fw"></i> 标签</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/archives/" title="归档" active-action="action-archives"><i class="fa-solid fa-archive fa-fw"></i> 归档</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/friends/" title="友链" active-action="action-friends"><i class="fa-solid fa-link fa-fw"></i> 友链</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/about/" title="关于" active-action="action-about"><i class="fa-solid fa-info-circle fa-fw"></i> 关于</a></li></ul></div><div class="m_search"><form name="searchform" class="form u-search-form"><i class="icon fa-solid fa-search fa-fw"></i> <input type="text" class="input u-search-input" placeholder="Search..."></form></div><ul class="switcher nav-list-h m-phone"><li><a class="s-search fa-solid fa-search fa-fw" target="_self" href="/" onclick="return!1" title="search"></a></li><li><a class="s-menu fa-solid fa-bars fa-fw" target="_self" href="/" onclick="return!1" title="menu"></a><ul class="menu-phone list-v navigation white-box"><li><a class="menuitem flat-box faa-parent animated-hover" href="/" title="博客" active-action="action-home"><i class="fa-solid fa-rss fa-fw"></i> 博客</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/categories/" title="分类" active-action="action-categories"><i class="fa-solid fa-folder-open fa-fw"></i> 分类</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/tags/" title="标签" active-action="action-tags"><i class="fa-solid fa-tags fa-fw"></i> 标签</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/archives/" title="归档" active-action="action-archives"><i class="fa-solid fa-archive fa-fw"></i> 归档</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/friends/" title="友链" active-action="action-friends"><i class="fa-solid fa-link fa-fw"></i> 友链</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/about/" title="关于" active-action="action-about"><i class="fa-solid fa-info-circle fa-fw"></i> 关于</a></li></ul></li></ul></div></div></div></header><div id="l_body"><div id="l_cover"><div id="half" class="cover-wrapper post search" style=""><div class="cover-bg lazyload placeholder" data-bg="https://p.sda1.dev/14/9c10c89b76f81a29ebf02802518f7226/%E5%A3%81%E7%BA%B8-6.webp"></div><div class="cover-body"><div class="top"><p class="title">Mlikiowa Home Village</p></div><div class="bottom"><div class="m_search"><form name="searchform" class="form u-search-form"> <input type="text" class="input u-search-input" placeholder="A Wonderful Theme for Hexo"><i class="icon fa-solid fa-search fa-fw"></i></form></div><div class="menu navigation"><div class="list-h"><a href="/" active-action="action-home"><p>博客</p></a><a href="/categories/" target="_self" active-action="action-categories"><p>分类</p></a><a href="/tags/" active-action="action-tags"><p>标签</p></a><a href="/archives/" active-action="action-archives"><p>归档</p></a><a href="/friends/" active-action="action-friends"><p>友链</p></a><a href="/about/" active-action="action-about"><p>关于</p></a></div></div></div></div><div id="scroll-down" style="display:none"><i class="fa fa-chevron-down scroll-down-effects"></i></div></div></div><div id="safearea"><div class="body-wrapper"><div id="l_main" class=""><article itemscope itemtype="http://schema.org/Article" class="article post white-box reveal md shadow floatable blur article-type-post" id="post" itemscope itemprop="blogPost"><link itemprop="mainEntityOfPage" href="https://nanaeo.cn/2022/08/13/GaussWave/"><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Village"></span><span hidden itemprop="post" itemscope itemtype="http://schema.org/Post"><meta itemprop="name" content="Village"><meta itemprop="description" content="It is a little blog~"></span><span hidden><meta itemprop="image" content="https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"></span><div class="article-meta" id="top"><h1 class="title" itemprop="name headline"> 高斯滤波</h1><div class="new-meta-box"><div class="new-meta-item author" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" class="author" href="/" rel="nofollow"><img itemprop="image" src="https://q1.qlogo.cn/g?b=qq&nk=1627126029&s=100" class="lazyload" data-srcset="https://q1.qlogo.cn/g?b=qq&nk=1627126029&s=100" srcset="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="><p itemprop="name">Mlikiowa</p></a></div><div class="new-meta-item category"><i class="fas fa-folder-open fa-fw" aria-hidden="true"></i> <a class="category-link" href="/categories/DevLog/">DevLog</a> <span hidden itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/DevLog/" itemprop="url"><span itemprop="name">DevLog</span></a></span></div><div class="new-meta-item date" itemprop="dateCreated datePublished" datetime="2022-08-13T16:00:00+00:00"><a class="notlink"><i class="fas fa-calendar-alt fa-fw" aria-hidden="true"></i><p>发布于:2022年8月14日</p></a></div><div class="new-meta-item wordcount"><a class="notlink"><i class="fas fa-keyboard fa-fw" aria-hidden="true"></i><p>字数:2k 字</p></a></div><div class="new-meta-item readtime"><a class="notlink"><i class="fas fa-hourglass-half fa-fw" aria-hidden="true"></i><p>时长:7 分钟</p></a></div></div></div><div id="layoutHelper-page-plugins"></div><div id="post-body" itemprop="articleBody"><p>高斯滤波的实现</p><span id="more"></span><div class="story post-story"><h2 id="本文提示"><a href="#本文提示" class="headerlink" title="本文提示"></a>本文提示</h2><p>本文提供了相关代码和算法仅为示例学习,并非标准案例,并且OpenCV提供了高斯滤波函数,如果遇到不明白的概念和地方可以参考引用文章理解,也可以尝试在搜索引擎上搜索相关概念和图片示例,由于本站资源原因,暂不提供图片。</p><p>tips: 本文为了方便仅是灰度图片处理<br>如果需要彩色图片应该尝试修改代码三种通道进行分别处理或其它方法。</p></div><div class="story post-story"><h2 id="概念理解-部分来自百科等"><a href="#概念理解-部分来自百科等" class="headerlink" title="概念理解(部分来自百科等)"></a>概念理解(部分来自百科等)</h2><h3 id="滤波"><a href="#滤波" class="headerlink" title="滤波"></a>滤波</h3><p>滤波就对图像像素点及其邻域点的灰度值按照一定的参数规则进行加权平均,可以有效滤去理想图像中叠加的高频噪声。常用的滤波有线性滤波、中值滤波、均值滤波、双边滤波、高斯滤波等。滤波有抑制噪声的作用,但这会使得图像边缘模糊。(摘自别的地方)</p><h3 id="低通滤波"><a href="#低通滤波" class="headerlink" title="低通滤波"></a>低通滤波</h3><p>低通滤波是一种过滤方式,规则为低频信号能正常通过,而超过设定临界值的高频信号则被阻隔、减弱,图像处理领域可用来模糊。</p><h3 id="高通滤波"><a href="#高通滤波" class="headerlink" title="高通滤波"></a>高通滤波</h3><p>高通滤波(high-pass filter) 是一种过滤方式,规则为高频信号能正常通过,而低于设定临界值的低频信号则被阻隔、减弱。但是阻隔、减弱的幅度则会依据不同的频率以及不同的滤波程序(目的)而改变,图像处理领域可用于锐化。</p><h3 id="高斯滤波"><a href="#高斯滤波" class="headerlink" title="高斯滤波"></a>高斯滤波</h3><p>高斯滤波是一种线性平滑滤波,适用于消除高斯噪声,广泛应用于图像处理的减噪过程,对处理呈现正态分布(高斯分布)的噪声(包括图像噪声)效果显著。<br>tips: 常用高斯模糊就是使用高斯滤波完成的, 高斯模糊是低通滤波的一种, 也就是滤波函数是低通高斯函数, 但是高斯滤波是指用高斯函数作为滤波函数, 至于是不是模糊,要看是高斯低通还是高斯高通, 低通就是模糊, 高通就是锐化。</p><h3 id="核算子、模板、结构都是一种"><a href="#核算子、模板、结构都是一种" class="headerlink" title="核算子、模板、结构都是一种"></a>核算子、模板、结构都是一种</h3><p>当我们进行图像处理时时,使用到的权用一个矩阵表示,可以利用该矩阵计算对应像素,同时我们叫这个矩阵为核算子、模板、结构。(示例见前提指明)<br>大小可小可大,并且一般为奇数,<br>Que:核大小为什么是都是类似3×3&#x2F;5×5 奇数呢?<br>其中一个原因是定位中心锚点,偶数是无法确定中心点的。</p><h3 id="滤波核"><a href="#滤波核" class="headerlink" title="滤波核"></a>滤波核</h3><p>当进行滤波时,里面是核的内容是权重并且可以用于处理像素,那么该核称为滤波核。<br>(通俗解释 专业解释 请查询资料)</p><h3 id="归一化"><a href="#归一化" class="headerlink" title="归一化"></a>归一化</h3><p>就是生成核或者说模板加起来的权不为一,这时候我们核内每一个值除以核内总值,就实现了归一化。</p><h3 id="卷积核"><a href="#卷积核" class="headerlink" title="卷积核"></a>卷积核</h3><p>如果一个核被用于卷积那么该核也可以被称为卷积核。(通俗解释 专业解释 请查询资料)</p><h3 id="高斯核"><a href="#高斯核" class="headerlink" title="高斯核"></a>高斯核</h3><p>那么高斯核固然就是高斯分布生成的核了</p></div><div class="story post-story"><h2 id="环境与依赖"><a href="#环境与依赖" class="headerlink" title="环境与依赖"></a>环境与依赖</h2><p>Python 本次使用的编程语言<br>OpenCV 跨平台计算机视觉库<br>Windows11 本文中代码运行系统</p><h3 id="OpenCv库安装"><a href="#OpenCv库安装" class="headerlink" title="OpenCv库安装"></a>OpenCv库安装</h3><p>(清华源 可自行切换)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python</span><br><span class="line">pip install opencv-contrib-python -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python</span><br></pre></td></tr></table></figure></div><div class="story post-story"><h2 id="举例"><a href="#举例" class="headerlink" title="举例"></a>举例</h2><p>最终滤波核示例 (提示:权请保证和为1 此处已经归一化 但并非真实情况)<br>0.1 0.1 0.2<br>0.1 0.1 0.1<br>0.1 0.1 0.1</p><p>为3×3网格坐标结构<br>该模板大小 3×3</p></div><div class="story post-story"><h2 id="算法过程"><a href="#算法过程" class="headerlink" title="算法过程"></a>算法过程</h2><h3 id="高斯滤波实现方法"><a href="#高斯滤波实现方法" class="headerlink" title="高斯滤波实现方法"></a>高斯滤波实现方法</h3><p>看完以上相信各位并没有很多理解,并不要紧,联系实际我们进一步进行<br>高斯滤波通常情况下有两种实现方式,一是用离散化窗口滑窗卷积, 另一种通过傅里叶变换,其中第一种毕竟常见,可能这时候有人又问了,这又是什么,别急,咱先慢慢来,离散化窗口滑窗卷积其实就是进行有限次的移动核运算区域的卷积运算,那么我们可以开始了。</p><h3 id="算法过程-1"><a href="#算法过程-1" class="headerlink" title="算法过程"></a>算法过程</h3><p>0.图像灰度处理 (为了方便)</p><ol><li>生成滤波核</li><li>进行卷积处理图像</li></ol><h3 id="生成滤波核"><a href="#生成滤波核" class="headerlink" title="生成滤波核"></a>生成滤波核</h3><p><img src="https://s2.loli.net/2022/08/14/4dgAQ2RCInSM8m6.gif" class="lazyload" data-srcset="https://s2.loli.net/2022/08/14/4dgAQ2RCInSM8m6.gif" srcset="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="CodeCogsEqn.gif"><br>(此处为一维高斯函数)</p><p>sigma 为标准差 图像平滑程度取决于该值<br>我们使用高斯函数进行生成对应滤波核<br>离中心点越远那么边缘值的权值越小,我们依照高斯二维函数就可以生成对应滤波核。<br>代码具体参考如下</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">def GaussKernel(size,k,sigma):</span><br><span class="line"> _t = np.zeros((size,size),np.float32)</span><br><span class="line"> for i in range (size):</span><br><span class="line"> for j in range (size):</span><br><span class="line"> norm = math.pow(i-k,2) + pow(j-k,2)</span><br><span class="line"> _t[i,j] = math.exp(-norm/(2*math.pow(sigma,2)))/2*math.pi*pow(sigma,2)</span><br><span class="line"> sum = np.sum(_t)</span><br><span class="line"> kernel = _t/sum</span><br><span class="line"> return kernel</span><br></pre></td></tr></table></figure><h3 id="卷积生成"><a href="#卷积生成" class="headerlink" title="卷积生成"></a>卷积生成</h3><p>然后我们使用对应的滤波权值进行乘以像素值,就可以生成新值,但是滤波核仅3×3大小,我们在原图像每一个像素点运算一次,即可生成新的图形。<br>运算为: 每个像素点周围点 权×值 的和为中心点新值。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">def mygaussFilter(img_gray,kernel):</span><br><span class="line"> h,w = img_gray.shape</span><br><span class="line"> k_h,k_w = kernel.shape</span><br><span class="line"> for i in range(int(k_h/2),h-int(k_h/2)):</span><br><span class="line"> for j in range(int(k_h/2),w-int(k_h/2)):</span><br><span class="line"> sum = 0</span><br><span class="line"> for k in range(0,k_h):</span><br><span class="line"> for l in range(0,k_h):</span><br><span class="line"> sum += img_gray[i-int(k_h/2)+k,j-int(k_h/2)+l]*kernel[k,l]</span><br><span class="line"> img_gray[i,j] = sum</span><br><span class="line"> return img_gray</span><br></pre></td></tr></table></figure></div><div class="story post-story"><h2 id="样例代码"><a href="#样例代码" class="headerlink" title="样例代码"></a>样例代码</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br></pre></td><td class="code"><pre><span class="line">import math</span><br><span class="line">import cv2</span><br><span class="line">import numpy as np</span><br><span class="line">def GaussKernel(size,k,sigma):</span><br><span class="line"> _t = np.zeros((size,size),np.float32)</span><br><span class="line"> for i in range (size):</span><br><span class="line"> for j in range (size):</span><br><span class="line"> norm = math.pow(i-k,2) + pow(j-k,2)</span><br><span class="line"> _t[i,j] = math.exp(-norm/(2*math.pow(sigma,2)))/2*math.pi*pow(sigma,2)</span><br><span class="line"> sum = np.sum(_t)</span><br><span class="line"> kernel = _t/sum</span><br><span class="line"> return kernel</span><br><span class="line"></span><br><span class="line">def mygaussFilter(img_gray,kernel):</span><br><span class="line"> h,w = img_gray.shape</span><br><span class="line"> k_h,k_w = kernel.shape</span><br><span class="line"> for i in range(int(k_h/2),h-int(k_h/2)):</span><br><span class="line"> for j in range(int(k_h/2),w-int(k_h/2)):</span><br><span class="line"> sum = 0</span><br><span class="line"> for k in range(0,k_h):</span><br><span class="line"> for l in range(0,k_h):</span><br><span class="line"> sum += img_gray[i-int(k_h/2)+k,j-int(k_h/2)+l]*kernel[k,l]</span><br><span class="line"> img_gray[i,j] = sum</span><br><span class="line"> return img_gray</span><br><span class="line"></span><br><span class="line">if __name__ == &#x27;__main__&#x27;:</span><br><span class="line"> img = cv2.imread(&quot;demo.jpg&quot;)</span><br><span class="line"> img_gray = cv2.cvtColor(img,cv2.COLOR_RGB2GRAY)</span><br><span class="line"> img_g = img_gray.copy()</span><br><span class="line"> k=1</span><br><span class="line"> size = 2*k+1</span><br><span class="line"> kernel = gausskernel(size,k,1.5)</span><br><span class="line"> print(kernel)</span><br><span class="line"> img_B,img_G,img_R = cv2.split(img)</span><br><span class="line"> img_gauss_B = mygaussFilter(img_B,kernel)</span><br><span class="line"> img_gauss_G = mygaussFilter(img_G,kernel)</span><br><span class="line"> img_gauss_R = mygaussFilter(img_R,kernel)</span><br><span class="line"> img_gauss = cv2.merge([img_gauss_B,img_gauss_G,img_gauss_R])</span><br><span class="line"> img_comp = np.hstack((img,img_gauss))</span><br><span class="line"> cv2.imshow(&quot;gauss&quot;,img_comp)</span><br><span class="line"> cv2.waitKey(0)</span><br></pre></td></tr></table></figure></div><div class="story post-story"><h2 id="直接OpenCV操作-非原理实现方案-使用封装方法"><a href="#直接OpenCV操作-非原理实现方案-使用封装方法" class="headerlink" title="直接OpenCV操作(非原理实现方案 使用封装方法)"></a>直接OpenCV操作(非原理实现方案 使用封装方法)</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">import cv2</span><br><span class="line">Gn=cv2.imread(&quot;Gaussian_noise.jpg&quot;) </span><br><span class="line">Gf=cv2.GaussianBlur(Gn,(3,3),0,0)</span><br><span class="line">cv2.imshow(&quot;噪声图像&quot;,Gn)</span><br><span class="line">cv2.imshow(&quot;滤波图像&quot;,Gf)</span><br><span class="line">cv2.waitKey()</span><br><span class="line">cv2.destroyAllWindows()</span><br></pre></td></tr></table></figure></div><div class="story post-story"><h2 id="Que-边界点的处理"><a href="#Que-边界点的处理" class="headerlink" title="Que: 边界点的处理"></a>Que: 边界点的处理</h2><p>如果一个点处于边界,周边没有足够的点,怎么办?<br>一个变通方法,就是把已有的点拷贝到另一面的对应位置,模拟出完整的矩阵。<br>当然我们这里很简单,就是进行矩阵补零上去,用零进行模拟完整矩阵。</p></div><div class="story post-story"><h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>高斯滤波可以让图像高斯噪声降低,并且平滑图像,并且opencv等库已经提供封装,我们可以很快的使用</p></div><div class="story post-story"><h2 id="文章引用"><a href="#文章引用" class="headerlink" title="文章引用"></a>文章引用</h2><p>高斯滤波<br><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_51571728/article/details/121527964">https://blog.csdn.net/weixin_51571728/article/details/121527964</a><br>高斯滤波核<br><a target="_blank" rel="noopener" href="https://blog.csdn.net/qqq777_/article/details/112800310">https://blog.csdn.net/qqq777_/article/details/112800310</a><br>有关线性滤波、滤波核的基本概念(概念理解)<br><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_42664622/article/details/103672899">https://blog.csdn.net/weixin_42664622/article/details/103672899</a><br>数字图像处理基础 — 高斯滤波<br><a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/82569305">https://zhuanlan.zhihu.com/p/82569305</a><br>图像滤波原理(不推荐)<br><a target="_blank" rel="noopener" href="https://view.inews.qq.com/a/20220425A06HHF00">https://view.inews.qq.com/a/20220425A06HHF00</a></p></div><div class="story post-story"><h2 id="提示"><a href="#提示" class="headerlink" title="提示"></a>提示</h2><p>该文章并不准确,如果有错误请积极指出。</p></div></div><div class="footer"><div class="copyright license"><div class="license-title">高斯滤波</div><div class="license-link"><a href="https://nanaeo.cn/2022/08/13/GaussWave/">https://nanaeo.cn/2022/08/13/GaussWave/</a></div><div class="license-meta"><div class="license-meta-item"><div class="license-meta-title">本文作者</div><div class="license-meta-text">Mlikiowa</div></div><div class="license-meta-item"><div class="license-meta-title">发布于</div><div class="license-meta-text">2022年8月14日</div></div><div class="license-meta-item"><div class="license-meta-title">更新于</div><div class="license-meta-text">2024年11月12日</div></div><div class="license-meta-item"><div class="license-meta-title">许可协议</div><div class="license-meta-text"><a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh#" target="_blank">CC BY-NC-SA 4.0</a></div></div></div><div class="license-statement">署名-非商业性使用-相同方式共享 4.0 国际。</div></div></div><div class="article-meta" id="bottom"><div class="new-meta-box"><div class="new-meta-item date" itemprop="dateModified" datetime="2024-11-12T15:41:03+08:00"><a class="notlink"><i class="fa-solid fa-edit fa-fw" aria-hidden="true"></i><p>更新于:2024年11月12日</p></a></div><div class="new-meta-item meta-tags"><a class="tag" href="/tags/DevLog/" rel="nofollow"><i class="fas fa-hashtag fa-fw" aria-hidden="true"></i><p>DevLog</p></a></div><div class="new-meta-item meta-tags"><a class="tag" href="/tags/Gauss/" rel="nofollow"><i class="fas fa-hashtag fa-fw" aria-hidden="true"></i><p>Gauss</p></a></div> <span hidden itemprop="keywords">DevLog Gauss</span></div></div><div class="prev-next"><a class="prev" href="/2023/12/30/2023end/"><p class="title"><i class="fa-solid fa-chevron-left" aria-hidden="true"></i>博客优化与压缩软件</p><p class="content">近况很久没更新博客了,我觉得回来水一篇,大家也不用考虑我会跑路了,博客域名续了10年,别问钱哪里来的,问就是免费报销的。说回来,很久没写文了不是别的原因,就是因为没米赚没什么回报,而且说仅仅为了...</p></a><a class="next" href="/2022/08/04/NewBlog/"><p class="title">新博客建好啦<i class="fa-solid fa-chevron-right" aria-hidden="true"></i></p><p class="content">Hi Hexo,I am Mlikiowa!是全新的Hexo&#x2F;vlolantis博客,我又回来写博客了! 回忆2019.Previous 使用过Emlog Wordpress来搭建...</p></a></div></article><article class="post white-box shadow floatable blur" id="comments"><span hidden><meta itemprop="discussionUrl" content="/2022/08/13/GaussWave/index.html#comments"></span><p ct><i class="fa-solid fa-comments"></i> 评论</p><div id="layoutHelper-comments"></div></article></div><aside id="l_side" itemscope itemtype="http://schema.org/WPSideBar"><div class="widget-sticky pjax"><section class="widget toc-wrapper desktop mobile" id="toc-div"><header><i class="fa-solid fa-list fa-fw" aria-hidden="true"></i> <span class="name">Content</span></header><div class="content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%9C%AC%E6%96%87%E6%8F%90%E7%A4%BA"><span class="toc-text">本文提示</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A6%82%E5%BF%B5%E7%90%86%E8%A7%A3-%E9%83%A8%E5%88%86%E6%9D%A5%E8%87%AA%E7%99%BE%E7%A7%91%E7%AD%89"><span class="toc-text">概念理解(部分来自百科等)</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%BB%A4%E6%B3%A2"><span class="toc-text">滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BD%8E%E9%80%9A%E6%BB%A4%E6%B3%A2"><span class="toc-text">低通滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E9%80%9A%E6%BB%A4%E6%B3%A2"><span class="toc-text">高通滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E6%96%AF%E6%BB%A4%E6%B3%A2"><span class="toc-text">高斯滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%A0%B8%E7%AE%97%E5%AD%90%E3%80%81%E6%A8%A1%E6%9D%BF%E3%80%81%E7%BB%93%E6%9E%84%E9%83%BD%E6%98%AF%E4%B8%80%E7%A7%8D"><span class="toc-text">核算子、模板、结构都是一种</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%BB%A4%E6%B3%A2%E6%A0%B8"><span class="toc-text">滤波核</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%BD%92%E4%B8%80%E5%8C%96"><span class="toc-text">归一化</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8D%B7%E7%A7%AF%E6%A0%B8"><span class="toc-text">卷积核</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E6%96%AF%E6%A0%B8"><span class="toc-text">高斯核</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%8E%AF%E5%A2%83%E4%B8%8E%E4%BE%9D%E8%B5%96"><span class="toc-text">环境与依赖</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#OpenCv%E5%BA%93%E5%AE%89%E8%A3%85"><span class="toc-text">OpenCv库安装</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%BE%E4%BE%8B"><span class="toc-text">举例</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AE%97%E6%B3%95%E8%BF%87%E7%A8%8B"><span class="toc-text">算法过程</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E6%96%AF%E6%BB%A4%E6%B3%A2%E5%AE%9E%E7%8E%B0%E6%96%B9%E6%B3%95"><span class="toc-text">高斯滤波实现方法</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%AE%97%E6%B3%95%E8%BF%87%E7%A8%8B-1"><span class="toc-text">算法过程</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%94%9F%E6%88%90%E6%BB%A4%E6%B3%A2%E6%A0%B8"><span class="toc-text">生成滤波核</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8D%B7%E7%A7%AF%E7%94%9F%E6%88%90"><span class="toc-text">卷积生成</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A0%B7%E4%BE%8B%E4%BB%A3%E7%A0%81"><span class="toc-text">样例代码</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%9B%B4%E6%8E%A5OpenCV%E6%93%8D%E4%BD%9C-%E9%9D%9E%E5%8E%9F%E7%90%86%E5%AE%9E%E7%8E%B0%E6%96%B9%E6%A1%88-%E4%BD%BF%E7%94%A8%E5%B0%81%E8%A3%85%E6%96%B9%E6%B3%95"><span class="toc-text">直接OpenCV操作(非原理实现方案 使用封装方法)</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Que-%E8%BE%B9%E7%95%8C%E7%82%B9%E7%9A%84%E5%A4%84%E7%90%86"><span class="toc-text">Que: 边界点的处理</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%80%BB%E7%BB%93"><span class="toc-text">总结</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E7%AB%A0%E5%BC%95%E7%94%A8"><span class="toc-text">文章引用</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%8F%90%E7%A4%BA"><span class="toc-text">提示</span></a></li></ol></div></section></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div></aside><pjax><script>window.pdata={},pdata.ispage=!0,pdata.commentPath="",pdata.commentPlaceholder="",pdata.commentConfig={};var l_header=document.getElementById("l_header");l_header.classList.remove("show");var cover_wrapper=document.querySelector("#l_cover .cover-wrapper"),scroll_down=document.getElementById("scroll-down");cover_wrapper.id="half",cover_wrapper.style.display="",scroll_down.style.display="none"</script></pjax></div><footer class="footer clearfix" itemscope itemtype="http://schema.org/WPFooter"><br><br><div class="copyright"><p>⌘ Hexo With Volantis</p></div></footer><a id="s-top" class="fa-solid fa-arrow-up fa-fw" href="/" onclick="return!1" title="top"></a></div></div><div><script>volantis.dom.bodyAnchor=volantis.dom.$(document.getElementById("safearea")),volantis.dom.topBtn=volantis.dom.$(document.getElementById("s-top")),volantis.dom.wrapper=volantis.dom.$(document.getElementById("wrapper")),volantis.dom.coverAnchor=volantis.dom.$(document.querySelector("#l_cover .cover-wrapper")),volantis.dom.switcher=volantis.dom.$(document.querySelector("#l_header .switcher .s-search")),volantis.dom.header=volantis.dom.$(document.getElementById("l_header")),volantis.dom.search=volantis.dom.$(document.querySelector("#l_header .m_search")),volantis.dom.mPhoneList=volantis.dom.$(document.querySelectorAll("#l_header .m-phone .list-v"))</script><script>volantis.css("https://fastly.jsdelivr.net/npm/volantis-static/libs/@fortawesome/fontawesome-free/css/all.min.css")</script><script src="/js/app.js"></script><script>function loadIssuesJS(){null!=document.getElementById("sites-api")&&"undefined"==typeof SitesJS&&volantis.js("/js/plugins/tags/sites.js");null!=document.getElementById("friends-api")&&"undefined"==typeof FriendsJS&&volantis.js("/js/plugins/tags/friends.js");null!=document.getElementById("contributors-api")&&"undefined"==typeof ContributorsJS&&volantis.js("/js/plugins/tags/contributors.js")}loadIssuesJS(),volantis.pjax.push(()=>{loadIssuesJS()})</script><script defer="defer" src="https://fastly.jsdelivr.net/npm/volantis-static/libs/vanilla-lazyload/dist/lazyload.min.js"></script><script>window.lazyLoadOptions={elements_selector:".lazyload",threshold:0},window.addEventListener("LazyLoad::Initialized",(function(n){window.lazyLoadInstance=n.detail.instance}),!1),document.addEventListener("DOMContentLoaded",(function(){lazyLoadInstance.update()})),document.addEventListener("pjax:complete",(function(){lazyLoadInstance.update()}))</script><script>window.FPConfig={delay:0,ignoreKeywords:["#"],maxRPS:6,hoverDelay:0}</script><script defer="defer" src="https://fastly.jsdelivr.net/npm/volantis-static/libs/flying-pages/flying-pages.min.js"></script><script>function check_giscus(){return"dark"===volantis.dark.mode?volantis.giscus.Theme="dark":volantis.giscus.Theme="light",document.getElementById("giscus_container")}function pjax_giscus(){const t=check_giscus();if(!t)return;let e=Object.assign({theme:{light:"light",dark:"dark"},repo:"Mlikiowa/MliKiowa.github.io","repo-id":"R_kgDOHxvLiA",category:"General","category-id":"DIC_kwDOHxvLiM4CQr9N",mapping:"url","reactions-enabled":"1","emit-metadata":"0",lang:"zh-CN"},pdata.commentConfig);const s=document.createElement("script");s.setAttribute("src","https://giscus.app/client.js"),Object.keys(e).forEach(t=>{"theme"!=t&&s.setAttribute("data-"+t,e[t])}),s.setAttribute("data-theme",volantis.giscus.Theme),s.setAttribute("crossorigin","anonymous"),t.appendChild(s)}function dark_giscus(){if(!check_giscus())return;const t={setConfig:{theme:volantis.giscus.Theme}};document.querySelector("iframe.giscus-frame").contentWindow.postMessage({giscus:t},"https://giscus.app")}volantis.layoutHelper("comments",'<div id="giscus_container"></div>'),volantis.giscus={},pjax_giscus(),volantis.pjax.push(pjax_giscus),volantis.dark.push(dark_giscus)</script><script>const SearchServiceDataPathRoot="/".endsWith("/")?"/":"//",SearchServiceDataPath=SearchServiceDataPathRoot+"content.json";function loadSearchScript(){return volantis.js("/js/search/hexo.js")}function loadSearchService(){loadSearchScript(),document.querySelectorAll(".input.u-search-input").forEach(e=>{e.removeEventListener("focus",loadSearchService,!1)}),document.querySelectorAll(".u-search-form").forEach(e=>{e.addEventListener("submit",e=>{e.preventDefault()},!1)})}function OpenSearch(e){"undefined"==typeof SearchService?loadSearchScript().then(()=>{SearchService.setQueryText(e),SearchService.search()}):(SearchService.setQueryText(e),SearchService.search())}if(window.location.search&&/^\?s=/g.test(window.location.search)){OpenSearch(decodeURI(window.location.search).replace(/\ /g,"-").replace(/^\?s=/g,""))}document.querySelectorAll(".input.u-search-input").forEach(e=>{e.addEventListener("focus",loadSearchService,!1)})</script><script>function pjax_highlightjs_copyCode(){(document.querySelector(".highlight .code pre")||document.querySelector(".article pre code"))&&VolantisApp.utilCopyCode(".highlight .code pre, .article pre code")}volantis.requestAnimationFrame(pjax_highlightjs_copyCode),volantis.pjax.push(pjax_highlightjs_copyCode)</script><script>function load_swiper(){document.querySelectorAll(".swiper-container")[0]&&(volantis.css("https://fastly.jsdelivr.net/npm/volantis-static/libs/swiper/swiper-bundle.min.css"),volantis.js("https://fastly.jsdelivr.net/npm/volantis-static/libs/swiper/swiper-bundle.min.js").then(()=>{pjax_swiper()}))}function pjax_swiper(){volantis.swiper=new Swiper(".swiper-container",{slidesPerView:"auto",spaceBetween:8,centeredSlides:!0,loop:!0,pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})}load_swiper(),volantis.pjax.push(()=>{document.querySelectorAll(".swiper-container")[0]&&(void 0===volantis.swiper?load_swiper():pjax_swiper())})</script><pjax></pjax><script>function listennSidebarTOC(){const t=document.querySelectorAll(".toc li");if(!t.length)return;let e=[];[...t].map(t=>{const n=t.querySelector(".toc-link"),i=document.getElementById(decodeURI(n.getAttribute("href")).replace("#",""));return e.push(i),n.setAttribute("onclick","return false;"),n.setAttribute("toc-action","toc-"+decodeURI(n.getAttribute("href")).replace("#","")),n.setAttribute("href","/"),n.addEventListener("click",t=>{t.preventDefault(),volantis.scroll.to(i,{addTop:5,observer:!0}),history.pushState(null,document.title,"#"+i.id)}),i});function n(t){if(t.classList.contains("active-current"))return;document.querySelectorAll(".toc .active").forEach(t=>{t.classList.remove("active","active-current")}),t.classList.add("active","active-current");let e=t.parentNode;for(;!e.matches(".toc");)e.matches("li")&&e.classList.add("active"),e=e.parentNode}volantis.activateNavIndex=0,n(t[volantis.activateNavIndex]),volantis.scroll.push(()=>{if(e[0].getBoundingClientRect().top>=0)volantis.activateNavIndex=0;else if(e[e.length-1].getBoundingClientRect().top<0)volantis.activateNavIndex=e.length-1;else for(let t=0;t<e.length;t++){const n=e[t],i=e[(t+1)%e.length];if(n.getBoundingClientRect().top<0&&i.getBoundingClientRect().top>=0){volantis.activateNavIndex=t;break}}n(t[volantis.activateNavIndex])})}document.addEventListener("DOMContentLoaded",()=>{volantis.requestAnimationFrame(listennSidebarTOC)}),document.addEventListener("pjax:success",()=>{volantis.requestAnimationFrame(listennSidebarTOC)})</script><script>try{let e=(e,t,n=2)=>Math.abs(e-t)<=n,t=(t,n)=>!e(t.width,n.width)||!e(t.height,n.height),n=new WeakMap,i=(e,i=e.getClientBoundingRect())=>{let o=n.get(e);o&&!t(o,i)||(n.set(e,i),e.style["contain-intrinsic-size"]=`${i.width}px ${i.height}px`)},o=new IntersectionObserver((e,t)=>{e.forEach(e=>{i(e.target,e.boundingClientRect)})},{rootMargin:"500px 0px 500px 0px"}),r=new ResizeObserver((e,t)=>{e.forEach(e=>{i(e.target,e.contentRect)})}),s=e=>{let t=document.querySelectorAll(e);t.length&&(t.forEach(e=>{o.observe(e),r.observe(e)}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{t[0].style["content-visibility"]="auto"})}))},a=()=>{"content-visibility"in document.documentElement.style&&s(".post-story")};a(),volantis.pjax.push(a)}catch(e){console.log(e)}</script><script>document.onreadystatechange=function(){if("complete"==document.readyState){const{saveData:e,effectiveType:t}=navigator.connection||navigator.mozConnection||navigator.webkitConnection||{};("none"==getComputedStyle(document.querySelector("#safearea"),null).display||e||/2g/.test(t))&&(document.querySelectorAll(".reveal").forEach((function(e){e.style.opacity="1"})),document.querySelector("#safearea").style.display="block")}}</script><script type="application/ld+json">[{"@context":"http://schema.org","@type":"Organization","name":"Village","url":"https://nanaeo.cn/","logo":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}},{"@context":"http://schema.org","@type":"Person","name":"Mlikiowa","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"},"url":"https://nanaeo.cn/","sameAs":["https://github.com/volantis-x"],"description":"It is a little blog~"},{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https://nanaeo.cn/","name":"Village"}},{"@type":"ListItem","position":2,"item":{"@id":"https://nanaeo.cn/categories/DevLog/","name":"DevLog"}},{"@type":"ListItem","position":3,"item":{"@id":"https://nanaeo.cn/2022/08/13/GaussWave/","name":"高斯滤波"}}]},{"@context":"http://schema.org","@type":"WebSite","name":"Village","url":"https://nanaeo.cn/","keywords":null,"description":"It is a little blog~","author":{"@type":"Person","name":"Mlikiowa","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"},"url":"https://nanaeo.cn/","description":"It is a little blog~"},"publisher":{"@type":"Organization","name":"Village","url":"https://nanaeo.cn/","logo":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}},"potentialAction":{"@type":"SearchAction","name":"Site Search","target":{"@type":"EntryPoint","urlTemplate":"https://nanaeo.cn?s={search_term_string}"},"query-input":"required name=search_term_string"}},{"@context":"http://schema.org","@type":"BlogPosting","headline":"高斯滤波","description":"高斯滤波的实现","inLanguage":["zh-CN","en","default"],"mainEntityOfPage":{"@type":"WebPage","@id":"https://nanaeo.cn/2022/08/13/GaussWave/"},"author":{"@type":"Person","name":"Mlikiowa","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"},"url":"https://nanaeo.cn/"},"publisher":{"@type":"Organization","name":"Village","logo":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}},"url":"https://nanaeo.cn/2022/08/13/GaussWave/","wordCount":7,"datePublished":"2022-08-13T16:00:00.000Z","dateModified":"2024-11-12T07:41:03.228Z","articleSection":"DevLog","keywords":"DevLog,Gauss","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}}]</script><script src="https://fastly.jsdelivr.net/npm/volantis-static/libs/pjax/pjax.min.js"></script><script>var pjax;document.addEventListener("DOMContentLoaded",(function(){pjax=new Pjax({elements:'a[href]:not([href^="#"]):not([href="javascript:void(0)"]):not([pjax-fancybox]):not([onclick="return false;"]):not([onclick="return!1"]):not([target="_blank"]):not([target="view_window"]):not([href$=".xml"])',selectors:["head title","head meta[name=keywords]","head meta[name=description]","#l_main","#pjax-header-nav-list",".pjax","pjax","script[data-pjax], .pjax-reload script"],cacheBust:!1,timeout:5e3})})),document.addEventListener("pjax:send",(function(e){try{var t=window.location.pathname,n=e.triggerElement.href,a=[""];""!=a[0]&&a.forEach(e=>{-1==t.indexOf(e)&&-1==n.indexOf(e)||(window.location.href=n)})}catch(e){}volantis.pjax.method.send.start()})),document.addEventListener("pjax:complete",(function(){volantis.pjax.method.complete.start()})),document.addEventListener("pjax:error",(function(e){volantis.debug?(console.error(e),console.log("pjax error: \n"+JSON.stringify(e))):(volantis.pjax.method.error.start(),window.location.href=e.triggerElement.href)}))</script></div><script data-pjax async src="https://ackee.nanaeo.cn/tracker.js" data-ackee-server="https://ackee.nanaeo.cn" data-ackee-domain-id="3e94aa30-5cea-4f2b-9ec6-c0178d3beb0c"></script><script>"serviceWorker"in navigator&&navigator.serviceWorker.register("/volantis-sw.js").then((function(e){e.onupdatefound=function(){var r=e.installing;r.onstatechange=function(){switch(r.state){case"installed":navigator.serviceWorker.controller?console.log("Updated serviceWorker."):console.log("serviceWorker Sucess!");break;case"redundant":console.log("The installing service worker became redundant.")}}}})).catch((function(e){console.log("Error during service worker registration:",e)}))</script></body></html>
1
+ <!DOCTYPE html><html lang="zh-CN,en,default"><head hexo-theme="https://github.com/volantis-x/hexo-theme-volantis/#5.8.0"><meta name="generator" content="Hexo 6.3.0"><meta name="Volantis" content="5.8.0"><meta charset="utf-8"><link rel="canonical" href="https://nanaeo.cn/2022/08/13/gausswave/"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://unpkg.com"><link rel="preconnect" href="https://unpkg.com" crossorigin><meta name="renderer" content="webkit"><meta name="force-rendering" content="webkit"><meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"><meta http-equiv="Content-Security-Policy" content=" default-src 'self' https:; block-all-mixed-content; base-uri 'self' https:; form-action 'self' https:; worker-src 'self' https:; connect-src 'self' https: *; img-src 'self' data: https: *; media-src 'self' https: *; font-src 'self' data: https: *; frame-src 'self' https: *; manifest-src 'self' https: *; child-src https:; script-src 'self' https: 'unsafe-inline' *; style-src 'self' https: 'unsafe-inline' *; "><meta name="HandheldFriendly" content="True"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=5"><meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"><meta content="telephone=no" name="format-detection"><link rel="preload" href="/css/style.css" as="style"><link rel="preload" href="https://nanaeo.cn/asset/Sotheby.ttf" as="font" type="font/ttf" crossorigin="anonymous"><link rel="preload" href="https://fastly.jsdelivr.net/gh/moieo/moieo@main/moieo.woff2" as="font" type="font/woff2" crossorigin="anonymous"><title>高斯滤波 - Village</title><meta name="keywords" content="DevLog,Gauss,null"><meta desc name="description" content="高斯滤波的实现 - Mlikiowa - Village"><meta property="og:type" content="article"><meta property="og:title" content="高斯滤波"><meta property="og:url" content="https://nanaeo.cn/2022/08/13/GaussWave/index.html"><meta property="og:site_name" content="Village"><meta property="og:description" content="高斯滤波的实现"><meta property="og:locale" content="zh_CN"><meta property="og:image" content="https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"><meta property="article:published_time" content="2022-08-13T16:00:00.000Z"><meta property="article:modified_time" content="2024-11-12T07:43:21.816Z"><meta property="article:author" content="Mlikiowa"><meta property="article:tag" content="DevLog"><meta property="article:tag" content="Gauss"><meta name="twitter:card" content="summary"><meta name="twitter:image" content="https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"><style>#safearea{display:none}.post-story+.post-story{content-visibility:auto;contain-intrinsic-size:10px 500px}:root{--color-site-body:#e0eeee;--color-site-bg:#e0eeee;--color-site-inner:#fff;--color-site-footer:#666;--color-card:#fff0f5;--color-text:#eea9b8;--color-block:#f6f6f6;--color-inlinecode:#ec7bb6;--color-codeblock:#e0eeee;--color-h1:#3a3a3a;--color-h2:#3a3a3a;--color-h3:#23464f;--color-h4:#23464f;--color-h5:#23464f;--color-h6:#23464f;--color-p:#23464f;--color-list:#eea9b8;--color-list-hl:#f7cdd4;--color-meta:#888;--color-read-bkg:#e0d8c8;--color-read-post:#f8f1e2;--color-copyright-bkg:#f5f5f5}*{box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;outline:0;margin:0;padding:0}::-webkit-scrollbar{height:4px;width:4px}::-webkit-scrollbar-track-piece{background:0 0}::-webkit-scrollbar-thumb{background:#fcc;cursor:pointer;border-radius:2px;-webkit-border-radius:2px}::-webkit-scrollbar-thumb:hover{background:#ff5722}html{color:var(--color-text);width:100%;height:100%;font-family:Dosis,"PingFang SC","Microsoft YaHei",Helvetica,Arial,Menlo,Monaco,monospace,sans-serif;font-size:16px}html>::-webkit-scrollbar{height:4px;width:4px}html>::-webkit-scrollbar-track-piece{background:0 0}html>::-webkit-scrollbar-thumb{background:#54b5a0 linear-gradient(45deg,rgba(255,255,255,.4) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.4) 75%,transparent 75%,transparent);cursor:pointer;border-radius:2px;-webkit-border-radius:2px}html>::-webkit-scrollbar-thumb:hover{background:#54b5a0 linear-gradient(45deg,rgba(255,255,255,.4) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.4) 50%,rgba(255,255,255,.4) 75%,transparent 75%,transparent)}body{background-color:var(--color-site-body);text-rendering:optimizelegibility;-webkit-tap-highlight-color:transparent;line-height:1.6;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body.modal-active{overflow:hidden}@media screen and (max-width:680px){body.modal-active{position:fixed;top:0;right:0;bottom:0;left:0}}a{color:#ec7bb6;cursor:pointer;text-decoration:none;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}a:hover{color:#ff5722}a:active,a:hover{outline:0}ol,ul{padding-left:0}ol li,ul li{list-style:none}header{display:-webkit-box;display:-moz-box;display:block}img{border:0;background:0 0;max-width:100%}svg:not(:root){overflow:hidden}hr{-moz-box-sizing:content-box;box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;height:0;border:0;border-radius:1px;-webkit-border-radius:1px;border-bottom:1px solid rgba(238,169,184,.1)}button,input{color:inherit;font:inherit;margin:0}button{overflow:visible;text-transform:none;-webkit-appearance:button;cursor:pointer}@supports (backdrop-filter:blur(20px)){.blur{background:rgba(255,240,245,.9)!important;backdrop-filter:saturate(200%) blur(20px)}}.shadow{box-shadow:0 1px 2px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,.1)}.shadow.floatable{transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}.shadow.floatable:hover{box-shadow:0 2px 4px 0 rgba(0,0,0,.1),0 4px 8px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.1),0 4px 8px 0 rgba(0,0,0,.1),0 8px 16px 0 rgba(0,0,0,.1)}#l_cover{min-height:64px}.cover-wrapper{top:0;left:0;max-width:100%;height:100vh;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-khtml-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-o-flex-wrap:nowrap;-ms-flex-wrap:nowrap;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;align-items:center;align-self:center;align-content:center;color:var(--color-site-inner);padding:0 16px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;position:relative;overflow:hidden;margin-bottom:-100px}.cover-wrapper .cover-bg{position:absolute;width:100%;height:100%;background-position:center;background-size:cover;-webkit-background-size:cover;-moz-background-size:cover}.cover-wrapper .cover-bg.lazyload:not(.loaded){opacity:0;-webkit-opacity:0;-moz-opacity:0}.cover-wrapper .cover-bg.lazyload.loaded{animation-delay:0s;animation-duration:.5s;animation-fill-mode:forwards;animation-timing-function:ease-out;animation-name:fadeIn}@-moz-keyframes fadeIn{0%{opacity:0;-webkit-opacity:0;-moz-opacity:0;filter:blur(12px);transform:scale(1.02);-webkit-transform:scale(1.02);-khtml-transform:scale(1.02);-moz-transform:scale(1.02);-o-transform:scale(1.02);-ms-transform:scale(1.02)}100%{opacity:1;-webkit-opacity:1;-moz-opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0;-webkit-opacity:0;-moz-opacity:0;filter:blur(12px);transform:scale(1.02);-webkit-transform:scale(1.02);-khtml-transform:scale(1.02);-moz-transform:scale(1.02);-o-transform:scale(1.02);-ms-transform:scale(1.02)}100%{opacity:1;-webkit-opacity:1;-moz-opacity:1}}@-o-keyframes fadeIn{0%{opacity:0;-webkit-opacity:0;-moz-opacity:0;filter:blur(12px);transform:scale(1.02);-webkit-transform:scale(1.02);-khtml-transform:scale(1.02);-moz-transform:scale(1.02);-o-transform:scale(1.02);-ms-transform:scale(1.02)}100%{opacity:1;-webkit-opacity:1;-moz-opacity:1}}@keyframes fadeIn{0%{opacity:0;-webkit-opacity:0;-moz-opacity:0;filter:blur(12px);transform:scale(1.02);-webkit-transform:scale(1.02);-khtml-transform:scale(1.02);-moz-transform:scale(1.02);-o-transform:scale(1.02);-ms-transform:scale(1.02)}100%{opacity:1;-webkit-opacity:1;-moz-opacity:1}}.cover-wrapper .cover-body{z-index:1;position:relative;width:100%;height:100%}.cover-wrapper#full{height:calc(100vh + 100px);padding-bottom:100px}.cover-wrapper#half{max-height:640px;min-height:400px;height:calc(36vh - 64px + 200px)}.cover-wrapper #scroll-down{width:100%;height:64px;position:absolute;bottom:100px;text-align:center;cursor:pointer}.cover-wrapper #scroll-down .scroll-down-effects{color:#fff;font-size:24px;line-height:64px;position:absolute;width:24px;left:calc(50% - 12px);text-shadow:0 1px 2px rgba(0,0,0,.1);animation:scroll-down-effect 1.5s infinite;-webkit-animation:scroll-down-effect 1.5s infinite;-khtml-animation:scroll-down-effect 1.5s infinite;-moz-animation:scroll-down-effect 1.5s infinite;-o-animation:scroll-down-effect 1.5s infinite;-ms-animation:scroll-down-effect 1.5s infinite}@-moz-keyframes scroll-down-effect{0%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}50%{top:-16px;opacity:.4;-webkit-opacity:.4;-moz-opacity:.4}100%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}}@-webkit-keyframes scroll-down-effect{0%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}50%{top:-16px;opacity:.4;-webkit-opacity:.4;-moz-opacity:.4}100%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}}@-o-keyframes scroll-down-effect{0%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}50%{top:-16px;opacity:.4;-webkit-opacity:.4;-moz-opacity:.4}100%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}}@keyframes scroll-down-effect{0%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}50%{top:-16px;opacity:.4;-webkit-opacity:.4;-moz-opacity:.4}100%{top:0;opacity:1;-webkit-opacity:1;-moz-opacity:1}}.cover-wrapper .cover-body{margin-top:64px;margin-bottom:100px}.cover-wrapper .cover-body,.cover-wrapper .cover-body .bottom,.cover-wrapper .cover-body .top{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:vertical;-moz-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;align-items:center;justify-content:center;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-o-justify-content:center;-ms-justify-content:center;max-width:100%}.cover-wrapper .cover-body .bottom{margin-top:32px}.cover-wrapper .cover-body .title{font-family:Sotheby,Helvetica,monospace;font-size:3.125rem;line-height:1.2;text-shadow:0 1px 2px rgba(0,0,0,.1)}.cover-wrapper .cover-body .subtitle{font-size:20px}.cover-wrapper .cover-body .logo{max-height:120px;max-width:calc(100% - 4 * 16px)}@media screen and (min-height:1024px){.cover-wrapper .cover-body .title{font-size:3rem}.cover-wrapper .cover-body .subtitle{font-size:1.05rem}.cover-wrapper .cover-body .logo{max-height:150px}}.cover-wrapper .cover-body .m_search{position:relative;max-width:calc(100% - 16px);width:320px;vertical-align:middle}.cover-wrapper .cover-body .m_search .form{position:relative;display:-webkit-box;display:-moz-box;display:block;width:100%}.cover-wrapper .cover-body .m_search .icon,.cover-wrapper .cover-body .m_search .input{transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}.cover-wrapper .cover-body .m_search .icon{position:absolute;display:-webkit-box;display:-moz-box;display:block;line-height:2.5rem;width:32px;top:0;left:5px;color:rgba(35,70,79,.75)}.cover-wrapper .cover-body .m_search .input{display:-webkit-box;display:-moz-box;display:block;height:2.5rem;width:100%;box-shadow:none;-webkit-box-shadow:none;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;font-size:.875rem;-webkit-appearance:none;padding-left:36px;border-radius:1.4rem;-webkit-border-radius:1.4rem;background:rgba(255,240,245,.6);backdrop-filter:blur(10px);border:none;color:var(--color-text)}@media screen and (max-width:500px){.cover-wrapper .cover-body .m_search .input{padding-left:36px}}.cover-wrapper .cover-body .m_search .input:hover{background:rgba(255,240,245,.8)}.cover-wrapper .cover-body .m_search .input:focus{background:#fff0f5}.cover-wrapper .list-h{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;flex-wrap:wrap;-webkit-flex-wrap:wrap;-khtml-flex-wrap:wrap;-moz-flex-wrap:wrap;-o-flex-wrap:wrap;-ms-flex-wrap:wrap;align-items:stretch;border-radius:4px;-webkit-border-radius:4px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.cover-wrapper .list-h a{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 0;-ms-flex:1 0;flex:1 0;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;font-weight:600}.cover-wrapper .list-h a img{display:-webkit-box;display:-moz-box;display:block;border-radius:2px;-webkit-border-radius:2px;margin:4px;min-width:40px;max-width:44px}@media screen and (max-width:768px){.cover-wrapper .list-h a img{min-width:36px;max-width:40px}}@media screen and (max-width:500px){.cover-wrapper .list-h a img{margin:2px 4px;min-width:32px;max-width:36px}}@media screen and (max-width:375px){.cover-wrapper .list-h a img{min-width:28px;max-width:32px}}.cover-wrapper{max-width:100%}.cover-wrapper.search .bottom .menu{margin-top:16px}.cover-wrapper.search .bottom .menu .list-h a{white-space:nowrap;-webkit-box-direction:normal;-moz-box-direction:normal;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;align-items:baseline;padding:2px;margin:4px;color:var(--color-site-inner);opacity:.75;-webkit-opacity:.75;-moz-opacity:.75;text-shadow:0 1px 2px rgba(0,0,0,.05);border-bottom:2px solid transparent}.cover-wrapper.search .bottom .menu .list-h a i{margin-right:4px}.cover-wrapper.search .bottom .menu .list-h a p{font-size:.9375rem}.cover-wrapper.search .bottom .menu .list-h a.active,.cover-wrapper.search .bottom .menu .list-h a:active,.cover-wrapper.search .bottom .menu .list-h a:hover{opacity:1;-webkit-opacity:1;-moz-opacity:1;border-bottom:2px solid var(--color-site-inner)}@font-face{font-family:Dosis;src:url(https://fastly.jsdelivr.net/gh/moieo/moieo@main/moieo.woff2);font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Sotheby;src:url(https://nanaeo.cn/asset/Sotheby.ttf);font-weight:400;font-style:normal;font-display:swap}.l_header{position:fixed;z-index:1000;top:0;width:100%;height:64px;background:var(--color-card);box-shadow:0 1px 2px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 1px 2px 0 rgba(0,0,0,.1)}.l_header.auto{transition:opacity .4s ease;-webkit-transition:opacity .4s ease;-khtml-transition:opacity .4s ease;-moz-transition:opacity .4s ease;-o-transition:opacity .4s ease;-ms-transition:opacity .4s ease;visibility:hidden}.l_header.auto.show{opacity:1!important;-webkit-opacity:1!important;-moz-opacity:1!important;visibility:visible}.l_header .container{margin-left:16px;margin-right:16px}.l_header #wrapper{height:100%;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.l_header #wrapper .nav-main,.l_header #wrapper .nav-sub{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-khtml-flex-wrap:nowrap;-moz-flex-wrap:nowrap;-o-flex-wrap:nowrap;-ms-flex-wrap:nowrap;justify-content:space-between;-webkit-justify-content:space-between;-khtml-justify-content:space-between;-moz-justify-content:space-between;-o-justify-content:space-between;-ms-justify-content:space-between;align-items:center}.l_header #wrapper .nav-main{transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}.l_header #wrapper.sub .nav-main{transform:translateY(-64px);-webkit-transform:translateY(-64px);-khtml-transform:translateY(-64px);-moz-transform:translateY(-64px);-o-transform:translateY(-64px);-ms-transform:translateY(-64px)}.l_header #wrapper .nav-sub{transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease;opacity:0;-webkit-opacity:0;-moz-opacity:0;height:64px;width:calc(100% - 2 * 16px);position:absolute}.l_header #wrapper .nav-sub ::-webkit-scrollbar{display:-webkit-box;display:-moz-box;display:none}@media screen and (min-width:2048px){.l_header #wrapper .nav-sub{max-width:55vw;margin:auto}}.l_header #wrapper.sub .nav-sub{opacity:1;-webkit-opacity:1;-moz-opacity:1}.l_header #wrapper .title{position:relative;color:var(--color-text);padding-left:24px;max-height:64px}.l_header #wrapper .nav-main .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex-shrink:0;line-height:64px;padding:0 24px;font-size:1.25rem;font-family:Sotheby,Helvetica,monospace}.l_header #wrapper .nav-main .title img{height:64px}.l_header .nav-sub{max-width:1080px;margin:auto}.l_header .nav-sub .title{font-weight:700;font-family:Dosis,"PingFang SC","Microsoft YaHei",Helvetica,Arial,Menlo,Monaco,monospace,sans-serif;line-height:1.2;max-height:64px;white-space:normal;flex-shrink:1}.l_header .switcher{display:-webkit-box;display:-moz-box;display:none;line-height:64px;align-items:center}.l_header .switcher .s-toc{display:-webkit-box;display:-moz-box;display:none}@media screen and (max-width:768px){.l_header .switcher .s-toc{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex}}.l_header .switcher>li{height:48px;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease;margin:2px}@media screen and (max-width:500px){.l_header .switcher>li{margin:0 1px;height:48px}}.l_header .switcher>li>a{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;justify-content:center;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-o-justify-content:center;-ms-justify-content:center;align-items:center;width:48px;height:48px;padding:.85em 1.1em;border-radius:100px;-webkit-border-radius:100px;border:none;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease;color:#fcc}.l_header .switcher>li>a:hover{border:none}.l_header .switcher>li>a.active,.l_header .switcher>li>a:active{border:none;background:var(--color-site-bg)}@media screen and (max-width:500px){.l_header .switcher>li>a{width:36px;height:48px}}.l_header .nav-sub .switcher{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex}.l_header .m_search{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;height:64px;width:240px;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}@media screen and (max-width:1024px){.l_header .m_search{width:44px;min-width:44px}.l_header .m_search input::placeholder{opacity:0;-webkit-opacity:0;-moz-opacity:0}.l_header .m_search:hover{width:240px}.l_header .m_search:hover input::placeholder{opacity:1;-webkit-opacity:1;-moz-opacity:1}}@media screen and (min-width:500px){.l_header .m_search:hover .input{width:100%}.l_header .m_search:hover .input::placeholder{opacity:1;-webkit-opacity:1;-moz-opacity:1}}@media screen and (max-width:500px){.l_header .m_search{min-width:0}.l_header .m_search input::placeholder{opacity:1;-webkit-opacity:1;-moz-opacity:1}}.l_header .m_search .form{position:relative;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;width:100%;align-items:center}.l_header .m_search .icon{position:absolute;width:36px;left:5px;color:var(--color-meta)}@media screen and (max-width:500px){.l_header .m_search .icon{display:-webkit-box;display:-moz-box;display:none}}.l_header .m_search .input{display:-webkit-box;display:-moz-box;display:block;padding-top:8px;padding-bottom:8px;line-height:1.3;width:100%;color:var(--color-text);background:#ffe6ee;box-shadow:none;-webkit-box-shadow:none;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;padding-left:40px;font-size:.875rem;border-radius:8px;-webkit-border-radius:8px;border:none;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}@media screen and (min-width:500px){.l_header .m_search .input:focus{box-shadow:0 4px 8px 0 rgba(0,0,0,.1);-webkit-box-shadow:0 4px 8px 0 rgba(0,0,0,.1)}}@media screen and (max-width:500px){.l_header .m_search .input{background:var(--color-block);padding-left:8px;border:none}.l_header .m_search .input:focus,.l_header .m_search .input:hover{border:none}}@media (max-width:500px){.l_header .m_search{left:0;width:0;overflow:hidden;position:absolute;background:#fff;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}.l_header .m_search .input{border-radius:32px;-webkit-border-radius:32px;margin-left:16px;padding-left:16px}.l_header.z_search-open .m_search{width:100%}.l_header.z_search-open .m_search .input{width:calc(100% - 120px)}}ul.m-pc>li>a{color:inherit;border-bottom:2px solid transparent}ul.m-pc>li>a.active,ul.m-pc>li>a:active{border-bottom:2px solid #fcc}ul.list-v li:hover>ul.list-v,ul.m-pc li:hover>ul.list-v{display:-webkit-box;display:-moz-box;display:block}ul.nav-list-h{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;align-items:stretch}ul.nav-list-h>li{position:relative;justify-content:center;-webkit-justify-content:center;-khtml-justify-content:center;-moz-justify-content:center;-o-justify-content:center;-ms-justify-content:center;height:100%;line-height:2.4;border-radius:4px;-webkit-border-radius:4px}ul.nav-list-h>li>a{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-weight:600}ul.list-v{z-index:1;display:-webkit-box;display:-moz-box;display:none;position:absolute;background:var(--color-card);box-shadow:0 2px 4px 0 rgba(0,0,0,.08),0 4px 8px 0 rgba(0,0,0,.08),0 8px 16px 0 rgba(0,0,0,.08);-webkit-box-shadow:0 2px 4px 0 rgba(0,0,0,.08),0 4px 8px 0 rgba(0,0,0,.08),0 8px 16px 0 rgba(0,0,0,.08);margin-top:-6px;border-radius:4px;-webkit-border-radius:4px;padding:8px 0}ul.list-v.show{display:-webkit-box;display:-moz-box;display:block}ul.list-v hr{margin-top:8px;margin-bottom:8px}ul.list-v>li{white-space:nowrap;word-break:keep-all}ul.list-v>li.header{font-size:.78125rem;font-weight:700;line-height:2em;color:var(--color-meta);margin:8px 16px 4px}ul.list-v>li.header i{margin-right:8px}ul.list-v>li ul{margin-left:0;display:-webkit-box;display:-moz-box;display:none;margin-top:-40px}ul.list-v .aplayer-container{min-height:64px;padding:6px 16px}ul.list-v>li>a{transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease;display:-webkit-box;display:-moz-box;display:block;color:var(--color-list);font-size:.875rem;font-weight:700;line-height:36px;padding:0 20px 0 16px;text-overflow:ellipsis;margin:0 4px;border-radius:4px;-webkit-border-radius:4px}@media screen and (max-width:1024px){ul.list-v>li>a{line-height:40px}}ul.list-v>li>a>i{margin-right:8px}ul.list-v>li>a.active,ul.list-v>li>a:active{color:var(--color-list-hl)}ul.list-v>li>a:hover{color:var(--color-list-hl);background:var(--color-site-bg)}.l_header .menu>ul>li>a{display:-webkit-box;display:-moz-box;display:block;padding:0 8px}.l_header .menu>ul>li>a>i{margin-right:4px}.l_header ul.nav-list-h>li{color:var(--color-list);line-height:64px}.l_header ul.nav-list-h>li>a{max-height:64px;overflow:hidden;color:inherit}.l_header ul.nav-list-h>li>a.active,.l_header ul.nav-list-h>li>a:active{color:#fcc}.l_header ul.nav-list-h>li:hover>a{color:var(--color-list-hl)}.l_header ul.nav-list-h>li i.music{animation:rotate-effect 1.5s linear infinite;-webkit-animation:rotate-effect 1.5s linear infinite;-khtml-animation:rotate-effect 1.5s linear infinite;-moz-animation:rotate-effect 1.5s linear infinite;-o-animation:rotate-effect 1.5s linear infinite;-ms-animation:rotate-effect 1.5s linear infinite}@-moz-keyframes rotate-effect{0%{transform:rotate(0);-webkit-transform:rotate(0);-khtml-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0)}25%{transform:rotate(90deg);-webkit-transform:rotate(90deg);-khtml-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg)}50%{transform:rotate(180deg);-webkit-transform:rotate(180deg);-khtml-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg)}75%{transform:rotate(270deg);-webkit-transform:rotate(270deg);-khtml-transform:rotate(270deg);-moz-transform:rotate(270deg);-o-transform:rotate(270deg);-ms-transform:rotate(270deg)}100%{transform:rotate(360deg);-webkit-transform:rotate(360deg);-khtml-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg)}}@-webkit-keyframes rotate-effect{0%{transform:rotate(0);-webkit-transform:rotate(0);-khtml-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0)}25%{transform:rotate(90deg);-webkit-transform:rotate(90deg);-khtml-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg)}50%{transform:rotate(180deg);-webkit-transform:rotate(180deg);-khtml-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg)}75%{transform:rotate(270deg);-webkit-transform:rotate(270deg);-khtml-transform:rotate(270deg);-moz-transform:rotate(270deg);-o-transform:rotate(270deg);-ms-transform:rotate(270deg)}100%{transform:rotate(360deg);-webkit-transform:rotate(360deg);-khtml-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg)}}@-o-keyframes rotate-effect{0%{transform:rotate(0);-webkit-transform:rotate(0);-khtml-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0)}25%{transform:rotate(90deg);-webkit-transform:rotate(90deg);-khtml-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg)}50%{transform:rotate(180deg);-webkit-transform:rotate(180deg);-khtml-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg)}75%{transform:rotate(270deg);-webkit-transform:rotate(270deg);-khtml-transform:rotate(270deg);-moz-transform:rotate(270deg);-o-transform:rotate(270deg);-ms-transform:rotate(270deg)}100%{transform:rotate(360deg);-webkit-transform:rotate(360deg);-khtml-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg)}}@keyframes rotate-effect{0%{transform:rotate(0);-webkit-transform:rotate(0);-khtml-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0)}25%{transform:rotate(90deg);-webkit-transform:rotate(90deg);-khtml-transform:rotate(90deg);-moz-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg)}50%{transform:rotate(180deg);-webkit-transform:rotate(180deg);-khtml-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg)}75%{transform:rotate(270deg);-webkit-transform:rotate(270deg);-khtml-transform:rotate(270deg);-moz-transform:rotate(270deg);-o-transform:rotate(270deg);-ms-transform:rotate(270deg)}100%{transform:rotate(360deg);-webkit-transform:rotate(360deg);-khtml-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg)}}.menu-phone li ul.list-v{right:calc(100% - .5 * 16px)}.menu-phone li ul.list-v ul{right:calc(100% - .5 * 16px)}#wrapper{max-width:1080px;margin:auto}@media screen and (min-width:2048px){#wrapper{max-width:55vw}}#wrapper .menu{-webkit-box-flex:1;-moz-box-flex:1;-webkit-flex:1 1;-ms-flex:1 1;flex:1 1;margin:0 16px 0 0}#wrapper .menu .list-v ul{left:calc(100% - .5 * 16px)}.menu-phone{display:-webkit-box;display:-moz-box;display:none;margin-top:16px;right:8px;transition:all .28s ease;-webkit-transition:all .28s ease;-khtml-transition:all .28s ease;-moz-transition:all .28s ease;-o-transition:all .28s ease;-ms-transition:all .28s ease}.menu-phone ul{right:calc(100% - .5 * 16px)}@media screen and (max-width:500px){.menu-phone{display:-webkit-box;display:-moz-box;display:block}}.l_header{max-width:65vw;left:calc((100% - 65vw) * .5);border-bottom-left-radius:8px;border-bottom-right-radius:8px}@media screen and (max-width:2048px){.l_header{max-width:1112px;left:calc((100% - 1112px) * .5)}}@media screen and (max-width:1112px){.l_header{left:0;border-radius:0;-webkit-border-radius:0;max-width:100%}}@media screen and (max-width:500px){.l_header .container{margin-left:0;margin-right:0}.l_header #wrapper .nav-main .title{padding-left:16px;padding-right:16px}.l_header #wrapper .nav-sub{width:100%}.l_header #wrapper .nav-sub .title{overflow-y:scroll;margin-top:2px;padding:8px 16px}.l_header #wrapper .switcher{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;display:flex;margin-right:8px}.l_header .menu{display:-webkit-box;display:-moz-box;display:none}}@media screen and (max-width:500px){.list-v li{max-width:270px}}#u-search{display:-webkit-box;display:-moz-box;display:none;position:fixed;top:0;left:0;width:100%;height:100%;padding:60px 20px;z-index:1001}@media screen and (max-width:680px){#u-search{padding:0}}</style><link rel="stylesheet" href="/css/style.css" media="print" onload='this.media="all",this.onload=null'><noscript><link rel="stylesheet" href="/css/style.css"></noscript><script>window.MSInputMethodContext&&document.documentMode&&document.write('<style>html{overflow-x: hidden !important;overflow-y: hidden !important;}.kill-ie{text-align:center;height: 100%;margin-top: 15%;margin-bottom: 5500%;}.kill-t{font-size: 2rem;}.kill-c{font-size: 1.2rem;}#l_header,#l_body{display: none;}</style><div class="kill-ie"><span class="kill-t"><b>抱歉,您的浏览器无法访问本站</b></span><br/><span class="kill-c">微软已经于2016年终止了对 Internet Explorer (IE) 10 及更早版本的支持,<br/>继续使用存在极大的安全隐患,请使用当代主流的浏览器进行访问。</span><br/><a target="_blank" rel="noopener" href="https://blogs.windows.com/windowsexperience/2021/05/19/the-future-of-internet-explorer-on-windows-10-is-in-microsoft-edge/"><strong>了解详情 ></strong></a></div>')</script><noscript><style>html{overflow-x:hidden!important;overflow-y:hidden!important}.kill-noscript{text-align:center;height:100%;margin-top:15%;margin-bottom:5500%}.kill-t{font-size:2rem}.kill-c{font-size:1.2rem}#l_body,#l_header{display:none}</style><div class="kill-noscript"> <span class="kill-t"><b>抱歉,您的浏览器无法访问本站</b></span><br> <span class="kill-c">本页面需要浏览器支持(启用)JavaScript</span><br> <a target="_blank" rel="noopener" href="https://www.baidu.com/s?wd=启用JavaScript"><strong>了解详情 ></strong></a></div></noscript><script>function volantisEventListener(e,t,s){this.type=e,this.f=t,this.ele=s}function volantisDom(e){return e||(e=document.createElement("div")),this.ele=e,this.ele.find=e=>{let t=this.ele.querySelector(e);if(t)return new volantisDom(t)},this.ele.hasClass=e=>this.ele.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)")),this.ele.addClass=e=>(this.ele.classList.add(e),this.ele),this.ele.removeClass=e=>(this.ele.classList.remove(e),this.ele),this.ele.toggleClass=e=>(this.ele.hasClass(e)?this.ele.removeClass(e):this.ele.addClass(e),this.ele),this.ele.on=(e,t,s=1)=>(this.ele.addEventListener(e,t,!1),s&&volantis.EventListener.list.push(new volantisEventListener(e,t,this.ele)),this.ele),this.ele.click=(e,t)=>(this.ele.on("click",e,t),this.ele),this.ele.scroll=(e,t)=>(this.ele.on("scroll",e,t),this.ele),this.ele.html=e=>(this.ele.innerHTML=e,this.ele),this.ele.hide=e=>(this.ele.style.display="none",this.ele),this.ele.show=e=>(this.ele.style.display="block",this.ele),this.ele}function RunItem(){function e(e,t){this.name=t||e.name,this.run=()=>{try{e()}catch(e){console.log(e)}}}this.list=[],this.start=()=>{for(var e=0;e<this.list.length;e++)this.list[e].run()},this.push=(t,s,l=!0)=>{let n=t;l&&(n=()=>{volantis.requestAnimationFrame(t)});var i=new e(n,s);this.list.push(i)},this.remove=e=>{for(let t=0;t<this.list.length;t++){this.list[t].name==e&&this.list.splice(t,1)}}}function errorImgAvatar(e){e.src="https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/avatar/round/3442075.svg",e.onerror=null}function errorImgCover(e){e.src="https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/cover/76b86c0226ffd.svg",e.onerror=null}window.volantis={},volantis.debug="env",volantis.dom={},volantis.GLOBAL_CONFIG={debug:"env",cdn:{js:{app:"/js/app.js",parallax:"/js/plugins/parallax.js",rightMenu:"/js/plugins/rightMenu.js",rightMenus:"/js/plugins/rightMenus.js",sites:"/js/plugins/tags/sites.js",friends:"/js/plugins/tags/friends.js",contributors:"/js/plugins/tags/contributors.js",search:"/js/search/hexo.js"},css:{style:"/css/style.css"}},default:{avatar:"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/avatar/round/3442075.svg",link:"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/link/8f277b4ee0ecd.svg",cover:"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/cover/76b86c0226ffd.svg",image:"https://fastly.jsdelivr.net/npm/volantis-static/media/placeholder/image/2659360.svg"},lastupdate:new Date(1731397424489),sidebar:{for_page:["blogger","category","webinfo"],for_post:["toc"],webinfo:{lastupd:{enable:!0,friendlyShow:!0},runtime:{data:"2022/08/05",unit:"天"}}},plugins:{message:{enable:!0,css:"https://fastly.jsdelivr.net/npm/volantis-static/libs/izitoast/dist/css/iziToast.min.css",js:"https://fastly.jsdelivr.net/npm/volantis-static/libs/izitoast/dist/js/iziToast.min.js",icon:{default:"fa-solid fa-info-circle light-blue",quection:"fa-solid fa-question-circle light-blue"},time:{default:5e3,quection:2e4},position:"topRight",transitionIn:"bounceInLeft",transitionOut:"fadeOutRight",titleColor:"var(--color-text)",messageColor:"var(--color-text)",backgroundColor:"var(--color-card)",zindex:2147483647,copyright:{enable:!0,title:"知识共享许可协议",message:"请遵守 CC BY-NC-SA 4.0 协议。",icon:"far fa-copyright light-blue"},aplayer:{enable:!0,play:"fa-solid fa-play",pause:"fa-solid fa-pause"},rightmenu:{enable:!0,notice:!0}},fancybox:{css:"https://fastly.jsdelivr.net/npm/volantis-static/libs/@fancyapps/ui/dist/fancybox.css",js:"https://fastly.jsdelivr.net/npm/volantis-static/libs/@fancyapps/ui/dist/fancybox.umd.js"}}},volantis.EventListener={},volantis.EventListener.list=[],volantis.EventListener.remove=()=>{volantis.EventListener.list.forEach((function(e){e.ele.removeEventListener(e.type,e.f,!1)})),volantis.EventListener.list=[]},volantis.dom.$=e=>e?new volantisDom(e):null,volantis.pjax={},volantis.pjax.method={complete:new RunItem,error:new RunItem,send:new RunItem},volantis.pjax=Object.assign(volantis.pjax,{push:volantis.pjax.method.complete.push,error:volantis.pjax.method.error.push,send:volantis.pjax.method.send.push}),volantis.rightmenu={},volantis.rightmenu.method={handle:new RunItem},volantis.rightmenu=Object.assign(volantis.rightmenu,{handle:volantis.rightmenu.method.handle.push}),volantis.dark={},volantis.dark.method={toggle:new RunItem},volantis.dark=Object.assign(volantis.dark,{push:volantis.dark.method.toggle.push}),volantis.js=(e,t)=>new Promise(s=>{setTimeout((function(){var l=document.getElementsByTagName("head")[0]||document.documentElement,n=document.createElement("script");if(n.setAttribute("type","text/javascript"),t)if(JSON.stringify(t))for(let e in t)"onload"==e?n[e]=()=>{t[e](),s()}:(n[e]=t[e],n.onload=s);else n.onload=()=>{t(),s()};else n.onload=s;n.setAttribute("src",e),l.appendChild(n)}))}),volantis.css=e=>new Promise(t=>{setTimeout((function(){var s=document.createElement("link");s.rel="stylesheet",s.href=e,s.onload=t,document.getElementsByTagName("head")[0].appendChild(s)}))}),volantis.import={jQuery:()=>"undefined"==typeof jQuery?volantis.js("https://fastly.jsdelivr.net/npm/volantis-static/libs/jquery/dist/jquery.min.js"):new Promise(e=>{e()})},volantis.requestAnimationFrame=e=>{window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame),window.requestAnimationFrame(e)},volantis.layoutHelper=(e,t,s)=>{function l(e,t,s){volantis.tempDiv=document.createElement("div"),volantis.tempDiv.innerHTML=t;let l=document.querySelector("#layoutHelper-"+e);l&&(s&&(l.innerHTML=""),l.append(volantis.tempDiv))}s=Object.assign({clean:!1,pjax:!0},s),l(e,t,s.clean),s.pjax&&volantis.pjax.push(()=>{l(e,t,s.clean)},"layoutHelper-"+e)},volantis.scroll={engine:new RunItem,unengine:new RunItem},volantis.scroll=Object.assign(volantis.scroll,{push:volantis.scroll.engine.push}),volantis.scroll.getScrollTop=()=>{let e;return window.pageYOffset?e=window.pageYOffset:document.compatMode&&"BackCompat"!=document.compatMode?e=document.documentElement.scrollTop:document.body&&(e=document.body.scrollTop),e},volantis.scroll.handleScrollEvents=()=>{volantis.scroll.lastScrollTop=volantis.scroll.getScrollTop(),volantis.requestAnimationFrame((function e(){const t=volantis.scroll.getScrollTop();volantis.scroll.lastScrollTop!==t?(volantis.scroll.del=t-volantis.scroll.lastScrollTop,volantis.scroll.lastScrollTop=t,volantis.scroll.unengine.list=[],volantis.scroll.engine.start()):volantis.scroll.unengine.start(),volantis.requestAnimationFrame(e)}))},volantis.scroll.handleScrollEvents(),volantis.scroll.ele=null,volantis.scroll.to=(e,t={})=>{e&&(volantis.scroll.ele=e,opt={top:e.getBoundingClientRect().top+document.documentElement.scrollTop,behavior:"smooth"},"top"in t&&(opt.top=t.top),"behavior"in t&&(opt.behavior=t.behavior),"addTop"in t&&(opt.top+=t.addTop),"observerDic"in t||(t.observerDic=100),window.scrollTo(opt),t.observer&&setTimeout(()=>{volantis.scroll.ele==e&&volantis.scroll.unengine.push(()=>{let s=e.getBoundingClientRect().top;s>=-t.observerDic&&s<=t.observerDic||volantis.scroll.to(e,t),volantis.scroll.unengine.remove("unengineObserver")},"unengineObserver")},1e3))},volantis.cleanContentVisibility=()=>{document.querySelector(".post-story")&&(console.log("cleanContentVisibility"),document.querySelectorAll(".post-story").forEach(e=>{e.classList.remove("post-story")}))}</script></head><body itemscope itemtype="http://schema.org/WebPage"><header itemscope itemtype="http://schema.org/WPHeader" id="l_header" class="l_header auto shadow floatable blur" style="opacity:0"><div class="container"><div id="wrapper"><div class="nav-sub"><p class="title"></p><ul class="switcher nav-list-h m-phone" id="pjax-header-nav-list"><li><a id="s-comment" class="fa-solid fa-comments fa-fw" target="_self" href="/" onclick="return!1" title="comment"></a></li><li><a id="s-toc" class="s-toc fa-solid fa-list fa-fw" target="_self" href="/" onclick="return!1" title="toc"></a></li></ul></div><div class="nav-main"> <a class="title flat-box" target="_self" href="/">Mlikiowa</a><div class="menu navigation"><ul class="nav-list-h m-pc"><li><a class="menuitem flat-box faa-parent animated-hover" href="/" title="博客" active-action="action-home"><i class="fa-solid fa-rss fa-fw"></i> 博客</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/categories/" title="分类" active-action="action-categories"><i class="fa-solid fa-folder-open fa-fw"></i> 分类</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/tags/" title="标签" active-action="action-tags"><i class="fa-solid fa-tags fa-fw"></i> 标签</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/archives/" title="归档" active-action="action-archives"><i class="fa-solid fa-archive fa-fw"></i> 归档</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/friends/" title="友链" active-action="action-friends"><i class="fa-solid fa-link fa-fw"></i> 友链</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/about/" title="关于" active-action="action-about"><i class="fa-solid fa-info-circle fa-fw"></i> 关于</a></li></ul></div><div class="m_search"><form name="searchform" class="form u-search-form"><i class="icon fa-solid fa-search fa-fw"></i> <input type="text" class="input u-search-input" placeholder="Search..."></form></div><ul class="switcher nav-list-h m-phone"><li><a class="s-search fa-solid fa-search fa-fw" target="_self" href="/" onclick="return!1" title="search"></a></li><li><a class="s-menu fa-solid fa-bars fa-fw" target="_self" href="/" onclick="return!1" title="menu"></a><ul class="menu-phone list-v navigation white-box"><li><a class="menuitem flat-box faa-parent animated-hover" href="/" title="博客" active-action="action-home"><i class="fa-solid fa-rss fa-fw"></i> 博客</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/categories/" title="分类" active-action="action-categories"><i class="fa-solid fa-folder-open fa-fw"></i> 分类</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/tags/" title="标签" active-action="action-tags"><i class="fa-solid fa-tags fa-fw"></i> 标签</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/archives/" title="归档" active-action="action-archives"><i class="fa-solid fa-archive fa-fw"></i> 归档</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/friends/" title="友链" active-action="action-friends"><i class="fa-solid fa-link fa-fw"></i> 友链</a></li><li><a class="menuitem flat-box faa-parent animated-hover" href="/about/" title="关于" active-action="action-about"><i class="fa-solid fa-info-circle fa-fw"></i> 关于</a></li></ul></li></ul></div></div></div></header><div id="l_body"><div id="l_cover"><div id="half" class="cover-wrapper post search" style=""><div class="cover-bg lazyload placeholder" data-bg="https://p.sda1.dev/14/9c10c89b76f81a29ebf02802518f7226/%E5%A3%81%E7%BA%B8-6.webp"></div><div class="cover-body"><div class="top"><p class="title">Mlikiowa Home Village</p></div><div class="bottom"><div class="m_search"><form name="searchform" class="form u-search-form"> <input type="text" class="input u-search-input" placeholder="A Wonderful Theme for Hexo"><i class="icon fa-solid fa-search fa-fw"></i></form></div><div class="menu navigation"><div class="list-h"><a href="/" active-action="action-home"><p>博客</p></a><a href="/categories/" target="_self" active-action="action-categories"><p>分类</p></a><a href="/tags/" active-action="action-tags"><p>标签</p></a><a href="/archives/" active-action="action-archives"><p>归档</p></a><a href="/friends/" active-action="action-friends"><p>友链</p></a><a href="/about/" active-action="action-about"><p>关于</p></a></div></div></div></div><div id="scroll-down" style="display:none"><i class="fa fa-chevron-down scroll-down-effects"></i></div></div></div><div id="safearea"><div class="body-wrapper"><div id="l_main" class=""><article itemscope itemtype="http://schema.org/Article" class="article post white-box reveal md shadow floatable blur article-type-post" id="post" itemscope itemprop="blogPost"><link itemprop="mainEntityOfPage" href="https://nanaeo.cn/2022/08/13/GaussWave/"><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Village"></span><span hidden itemprop="post" itemscope itemtype="http://schema.org/Post"><meta itemprop="name" content="Village"><meta itemprop="description" content="It is a little blog~"></span><span hidden><meta itemprop="image" content="https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"></span><div class="article-meta" id="top"><h1 class="title" itemprop="name headline"> 高斯滤波</h1><div class="new-meta-box"><div class="new-meta-item author" itemprop="author" itemscope itemtype="http://schema.org/Person"> <a itemprop="url" class="author" href="/" rel="nofollow"><img itemprop="image" src="https://q1.qlogo.cn/g?b=qq&nk=1627126029&s=100" class="lazyload" data-srcset="https://q1.qlogo.cn/g?b=qq&nk=1627126029&s=100" srcset="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="><p itemprop="name">Mlikiowa</p></a></div><div class="new-meta-item category"><i class="fas fa-folder-open fa-fw" aria-hidden="true"></i> <a class="category-link" href="/categories/DevLog/">DevLog</a> <span hidden itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/DevLog/" itemprop="url"><span itemprop="name">DevLog</span></a></span></div><div class="new-meta-item date" itemprop="dateCreated datePublished" datetime="2022-08-13T16:00:00+00:00"><a class="notlink"><i class="fas fa-calendar-alt fa-fw" aria-hidden="true"></i><p>发布于:2022年8月14日</p></a></div><div class="new-meta-item wordcount"><a class="notlink"><i class="fas fa-keyboard fa-fw" aria-hidden="true"></i><p>字数:2k 字</p></a></div><div class="new-meta-item readtime"><a class="notlink"><i class="fas fa-hourglass-half fa-fw" aria-hidden="true"></i><p>时长:7 分钟</p></a></div></div></div><div id="layoutHelper-page-plugins"></div><div id="post-body" itemprop="articleBody"><p>高斯滤波的实现</p><span id="more"></span><div class="story post-story"><h2 id="本文提示"><a href="#本文提示" class="headerlink" title="本文提示"></a>本文提示</h2><p>本文提供了相关代码和算法仅为示例学习,并非标准案例,并且OpenCV提供了高斯滤波函数,如果遇到不明白的概念和地方可以参考引用文章理解,也可以尝试在搜索引擎上搜索相关概念和图片示例,由于本站资源原因,暂不提供图片。</p><p>tips: 本文为了方便仅是灰度图片处理<br>如果需要彩色图片应该尝试修改代码三种通道进行分别处理或其它方法。</p></div><div class="story post-story"><h2 id="概念理解-部分来自百科等"><a href="#概念理解-部分来自百科等" class="headerlink" title="概念理解(部分来自百科等)"></a>概念理解(部分来自百科等)</h2><h3 id="滤波"><a href="#滤波" class="headerlink" title="滤波"></a>滤波</h3><p>滤波就对图像像素点及其邻域点的灰度值按照一定的参数规则进行加权平均,可以有效滤去理想图像中叠加的高频噪声。常用的滤波有线性滤波、中值滤波、均值滤波、双边滤波、高斯滤波等。滤波有抑制噪声的作用,但这会使得图像边缘模糊。(摘自别的地方)</p><h3 id="低通滤波"><a href="#低通滤波" class="headerlink" title="低通滤波"></a>低通滤波</h3><p>低通滤波是一种过滤方式,规则为低频信号能正常通过,而超过设定临界值的高频信号则被阻隔、减弱,图像处理领域可用来模糊。</p><h3 id="高通滤波"><a href="#高通滤波" class="headerlink" title="高通滤波"></a>高通滤波</h3><p>高通滤波(high-pass filter) 是一种过滤方式,规则为高频信号能正常通过,而低于设定临界值的低频信号则被阻隔、减弱。但是阻隔、减弱的幅度则会依据不同的频率以及不同的滤波程序(目的)而改变,图像处理领域可用于锐化。</p><h3 id="高斯滤波"><a href="#高斯滤波" class="headerlink" title="高斯滤波"></a>高斯滤波</h3><p>高斯滤波是一种线性平滑滤波,适用于消除高斯噪声,广泛应用于图像处理的减噪过程,对处理呈现正态分布(高斯分布)的噪声(包括图像噪声)效果显著。<br>tips: 常用高斯模糊就是使用高斯滤波完成的, 高斯模糊是低通滤波的一种, 也就是滤波函数是低通高斯函数, 但是高斯滤波是指用高斯函数作为滤波函数, 至于是不是模糊,要看是高斯低通还是高斯高通, 低通就是模糊, 高通就是锐化。</p><h3 id="核算子、模板、结构都是一种"><a href="#核算子、模板、结构都是一种" class="headerlink" title="核算子、模板、结构都是一种"></a>核算子、模板、结构都是一种</h3><p>当我们进行图像处理时时,使用到的权用一个矩阵表示,可以利用该矩阵计算对应像素,同时我们叫这个矩阵为核算子、模板、结构。(示例见前提指明)<br>大小可小可大,并且一般为奇数,<br>Que:核大小为什么是都是类似3×3&#x2F;5×5 奇数呢?<br>其中一个原因是定位中心锚点,偶数是无法确定中心点的。</p><h3 id="滤波核"><a href="#滤波核" class="headerlink" title="滤波核"></a>滤波核</h3><p>当进行滤波时,里面是核的内容是权重并且可以用于处理像素,那么该核称为滤波核。<br>(通俗解释 专业解释 请查询资料)</p><h3 id="归一化"><a href="#归一化" class="headerlink" title="归一化"></a>归一化</h3><p>就是生成核或者说模板加起来的权不为一,这时候我们核内每一个值除以核内总值,就实现了归一化。</p><h3 id="卷积核"><a href="#卷积核" class="headerlink" title="卷积核"></a>卷积核</h3><p>如果一个核被用于卷积那么该核也可以被称为卷积核。(通俗解释 专业解释 请查询资料)</p><h3 id="高斯核"><a href="#高斯核" class="headerlink" title="高斯核"></a>高斯核</h3><p>那么高斯核固然就是高斯分布生成的核了</p></div><div class="story post-story"><h2 id="环境与依赖"><a href="#环境与依赖" class="headerlink" title="环境与依赖"></a>环境与依赖</h2><p>Python 本次使用的编程语言<br>OpenCV 跨平台计算机视觉库<br>Windows11 本文中代码运行系统</p><h3 id="OpenCv库安装"><a href="#OpenCv库安装" class="headerlink" title="OpenCv库安装"></a>OpenCv库安装</h3><p>(清华源 可自行切换)</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python</span><br><span class="line">pip install opencv-contrib-python -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python</span><br></pre></td></tr></table></figure></div><div class="story post-story"><h2 id="举例"><a href="#举例" class="headerlink" title="举例"></a>举例</h2><p>最终滤波核示例 (提示:权请保证和为1 此处已经归一化 但并非真实情况)<br>0.1 0.1 0.2<br>0.1 0.1 0.1<br>0.1 0.1 0.1</p><p>为3×3网格坐标结构<br>该模板大小 3×3</p></div><div class="story post-story"><h2 id="算法过程"><a href="#算法过程" class="headerlink" title="算法过程"></a>算法过程</h2><h3 id="高斯滤波实现方法"><a href="#高斯滤波实现方法" class="headerlink" title="高斯滤波实现方法"></a>高斯滤波实现方法</h3><p>看完以上相信各位并没有很多理解,并不要紧,联系实际我们进一步进行<br>高斯滤波通常情况下有两种实现方式,一是用离散化窗口滑窗卷积, 另一种通过傅里叶变换,其中第一种毕竟常见,可能这时候有人又问了,这又是什么,别急,咱先慢慢来,离散化窗口滑窗卷积其实就是进行有限次的移动核运算区域的卷积运算,那么我们可以开始了。</p><h3 id="算法过程-1"><a href="#算法过程-1" class="headerlink" title="算法过程"></a>算法过程</h3><p>0.图像灰度处理 (为了方便)</p><ol><li>生成滤波核</li><li>进行卷积处理图像</li></ol><h3 id="生成滤波核"><a href="#生成滤波核" class="headerlink" title="生成滤波核"></a>生成滤波核</h3><p><img src="https://s2.loli.net/2022/08/14/4dgAQ2RCInSM8m6.gif" class="lazyload" data-srcset="https://s2.loli.net/2022/08/14/4dgAQ2RCInSM8m6.gif" srcset="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="CodeCogsEqn.gif"><br>(此处为一维高斯函数)</p><p>sigma 为标准差 图像平滑程度取决于该值<br>我们使用高斯函数进行生成对应滤波核<br>离中心点越远那么边缘值的权值越小,我们依照高斯二维函数就可以生成对应滤波核。<br>代码具体参考如下</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">def GaussKernel(size,k,sigma):</span><br><span class="line"> _t = np.zeros((size,size),np.float32)</span><br><span class="line"> for i in range (size):</span><br><span class="line"> for j in range (size):</span><br><span class="line"> norm = math.pow(i-k,2) + pow(j-k,2)</span><br><span class="line"> _t[i,j] = math.exp(-norm/(2*math.pow(sigma,2)))/2*math.pi*pow(sigma,2)</span><br><span class="line"> sum = np.sum(_t)</span><br><span class="line"> kernel = _t/sum</span><br><span class="line"> return kernel</span><br></pre></td></tr></table></figure><h3 id="卷积生成"><a href="#卷积生成" class="headerlink" title="卷积生成"></a>卷积生成</h3><p>然后我们使用对应的滤波权值进行乘以像素值,就可以生成新值,但是滤波核仅3×3大小,我们在原图像每一个像素点运算一次,即可生成新的图形。<br>运算为: 每个像素点周围点 权×值 的和为中心点新值。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">def mygaussFilter(img_gray,kernel):</span><br><span class="line"> h,w = img_gray.shape</span><br><span class="line"> k_h,k_w = kernel.shape</span><br><span class="line"> for i in range(int(k_h/2),h-int(k_h/2)):</span><br><span class="line"> for j in range(int(k_h/2),w-int(k_h/2)):</span><br><span class="line"> sum = 0</span><br><span class="line"> for k in range(0,k_h):</span><br><span class="line"> for l in range(0,k_h):</span><br><span class="line"> sum += img_gray[i-int(k_h/2)+k,j-int(k_h/2)+l]*kernel[k,l]</span><br><span class="line"> img_gray[i,j] = sum</span><br><span class="line"> return img_gray</span><br></pre></td></tr></table></figure></div><div class="story post-story"><h2 id="样例代码"><a href="#样例代码" class="headerlink" title="样例代码"></a>样例代码</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br></pre></td><td class="code"><pre><span class="line">import math</span><br><span class="line">import cv2</span><br><span class="line">import numpy as np</span><br><span class="line">def GaussKernel(size,k,sigma):</span><br><span class="line"> _t = np.zeros((size,size),np.float32)</span><br><span class="line"> for i in range (size):</span><br><span class="line"> for j in range (size):</span><br><span class="line"> norm = math.pow(i-k,2) + pow(j-k,2)</span><br><span class="line"> _t[i,j] = math.exp(-norm/(2*math.pow(sigma,2)))/2*math.pi*pow(sigma,2)</span><br><span class="line"> sum = np.sum(_t)</span><br><span class="line"> kernel = _t/sum</span><br><span class="line"> return kernel</span><br><span class="line"></span><br><span class="line">def mygaussFilter(img_gray,kernel):</span><br><span class="line"> h,w = img_gray.shape</span><br><span class="line"> k_h,k_w = kernel.shape</span><br><span class="line"> for i in range(int(k_h/2),h-int(k_h/2)):</span><br><span class="line"> for j in range(int(k_h/2),w-int(k_h/2)):</span><br><span class="line"> sum = 0</span><br><span class="line"> for k in range(0,k_h):</span><br><span class="line"> for l in range(0,k_h):</span><br><span class="line"> sum += img_gray[i-int(k_h/2)+k,j-int(k_h/2)+l]*kernel[k,l]</span><br><span class="line"> img_gray[i,j] = sum</span><br><span class="line"> return img_gray</span><br><span class="line"></span><br><span class="line">if __name__ == &#x27;__main__&#x27;:</span><br><span class="line"> img = cv2.imread(&quot;demo.jpg&quot;)</span><br><span class="line"> img_gray = cv2.cvtColor(img,cv2.COLOR_RGB2GRAY)</span><br><span class="line"> img_g = img_gray.copy()</span><br><span class="line"> k=1</span><br><span class="line"> size = 2*k+1</span><br><span class="line"> kernel = gausskernel(size,k,1.5)</span><br><span class="line"> print(kernel)</span><br><span class="line"> img_B,img_G,img_R = cv2.split(img)</span><br><span class="line"> img_gauss_B = mygaussFilter(img_B,kernel)</span><br><span class="line"> img_gauss_G = mygaussFilter(img_G,kernel)</span><br><span class="line"> img_gauss_R = mygaussFilter(img_R,kernel)</span><br><span class="line"> img_gauss = cv2.merge([img_gauss_B,img_gauss_G,img_gauss_R])</span><br><span class="line"> img_comp = np.hstack((img,img_gauss))</span><br><span class="line"> cv2.imshow(&quot;gauss&quot;,img_comp)</span><br><span class="line"> cv2.waitKey(0)</span><br></pre></td></tr></table></figure></div><div class="story post-story"><h2 id="直接OpenCV操作-非原理实现方案-使用封装方法"><a href="#直接OpenCV操作-非原理实现方案-使用封装方法" class="headerlink" title="直接OpenCV操作(非原理实现方案 使用封装方法)"></a>直接OpenCV操作(非原理实现方案 使用封装方法)</h2><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">import cv2</span><br><span class="line">Gn=cv2.imread(&quot;Gaussian_noise.jpg&quot;) </span><br><span class="line">Gf=cv2.GaussianBlur(Gn,(3,3),0,0)</span><br><span class="line">cv2.imshow(&quot;噪声图像&quot;,Gn)</span><br><span class="line">cv2.imshow(&quot;滤波图像&quot;,Gf)</span><br><span class="line">cv2.waitKey()</span><br><span class="line">cv2.destroyAllWindows()</span><br></pre></td></tr></table></figure></div><div class="story post-story"><h2 id="Que-边界点的处理"><a href="#Que-边界点的处理" class="headerlink" title="Que: 边界点的处理"></a>Que: 边界点的处理</h2><p>如果一个点处于边界,周边没有足够的点,怎么办?<br>一个变通方法,就是把已有的点拷贝到另一面的对应位置,模拟出完整的矩阵。<br>当然我们这里很简单,就是进行矩阵补零上去,用零进行模拟完整矩阵。</p></div><div class="story post-story"><h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>高斯滤波可以让图像高斯噪声降低,并且平滑图像,并且opencv等库已经提供封装,我们可以很快的使用</p></div><div class="story post-story"><h2 id="文章引用"><a href="#文章引用" class="headerlink" title="文章引用"></a>文章引用</h2><p>高斯滤波<br><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_51571728/article/details/121527964">https://blog.csdn.net/weixin_51571728/article/details/121527964</a><br>高斯滤波核<br><a target="_blank" rel="noopener" href="https://blog.csdn.net/qqq777_/article/details/112800310">https://blog.csdn.net/qqq777_/article/details/112800310</a><br>有关线性滤波、滤波核的基本概念(概念理解)<br><a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_42664622/article/details/103672899">https://blog.csdn.net/weixin_42664622/article/details/103672899</a><br>数字图像处理基础 — 高斯滤波<br><a target="_blank" rel="noopener" href="https://zhuanlan.zhihu.com/p/82569305">https://zhuanlan.zhihu.com/p/82569305</a><br>图像滤波原理(不推荐)<br><a target="_blank" rel="noopener" href="https://view.inews.qq.com/a/20220425A06HHF00">https://view.inews.qq.com/a/20220425A06HHF00</a></p></div><div class="story post-story"><h2 id="提示"><a href="#提示" class="headerlink" title="提示"></a>提示</h2><p>该文章并不准确,如果有错误请积极指出。</p></div></div><div class="footer"><div class="copyright license"><div class="license-title">高斯滤波</div><div class="license-link"><a href="https://nanaeo.cn/2022/08/13/GaussWave/">https://nanaeo.cn/2022/08/13/GaussWave/</a></div><div class="license-meta"><div class="license-meta-item"><div class="license-meta-title">本文作者</div><div class="license-meta-text">Mlikiowa</div></div><div class="license-meta-item"><div class="license-meta-title">发布于</div><div class="license-meta-text">2022年8月14日</div></div><div class="license-meta-item"><div class="license-meta-title">更新于</div><div class="license-meta-text">2024年11月12日</div></div><div class="license-meta-item"><div class="license-meta-title">许可协议</div><div class="license-meta-text"><a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh#" target="_blank">CC BY-NC-SA 4.0</a></div></div></div><div class="license-statement">署名-非商业性使用-相同方式共享 4.0 国际。</div></div></div><div class="article-meta" id="bottom"><div class="new-meta-box"><div class="new-meta-item date" itemprop="dateModified" datetime="2024-11-12T15:43:21+08:00"><a class="notlink"><i class="fa-solid fa-edit fa-fw" aria-hidden="true"></i><p>更新于:2024年11月12日</p></a></div><div class="new-meta-item meta-tags"><a class="tag" href="/tags/DevLog/" rel="nofollow"><i class="fas fa-hashtag fa-fw" aria-hidden="true"></i><p>DevLog</p></a></div><div class="new-meta-item meta-tags"><a class="tag" href="/tags/Gauss/" rel="nofollow"><i class="fas fa-hashtag fa-fw" aria-hidden="true"></i><p>Gauss</p></a></div> <span hidden itemprop="keywords">DevLog Gauss</span></div></div><div class="prev-next"><a class="prev" href="/2023/12/30/2023end/"><p class="title"><i class="fa-solid fa-chevron-left" aria-hidden="true"></i>博客优化与压缩软件</p><p class="content">近况很久没更新博客了,我觉得回来水一篇,大家也不用考虑我会跑路了,博客域名续了10年,别问钱哪里来的,问就是免费报销的。说回来,很久没写文了不是别的原因,就是因为没米赚没什么回报,而且说仅仅为了...</p></a><a class="next" href="/2022/08/04/NewBlog/"><p class="title">新博客建好啦<i class="fa-solid fa-chevron-right" aria-hidden="true"></i></p><p class="content">Hi Hexo,I am Mlikiowa!是全新的Hexo&#x2F;vlolantis博客,我又回来写博客了! 回忆2019.Previous 使用过Emlog Wordpress来搭建...</p></a></div></article><article class="post white-box shadow floatable blur" id="comments"><span hidden><meta itemprop="discussionUrl" content="/2022/08/13/GaussWave/index.html#comments"></span><p ct><i class="fa-solid fa-comments"></i> 评论</p><div id="layoutHelper-comments"></div></article></div><aside id="l_side" itemscope itemtype="http://schema.org/WPSideBar"><div class="widget-sticky pjax"><section class="widget toc-wrapper desktop mobile" id="toc-div"><header><i class="fa-solid fa-list fa-fw" aria-hidden="true"></i> <span class="name">Content</span></header><div class="content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%9C%AC%E6%96%87%E6%8F%90%E7%A4%BA"><span class="toc-text">本文提示</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A6%82%E5%BF%B5%E7%90%86%E8%A7%A3-%E9%83%A8%E5%88%86%E6%9D%A5%E8%87%AA%E7%99%BE%E7%A7%91%E7%AD%89"><span class="toc-text">概念理解(部分来自百科等)</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%BB%A4%E6%B3%A2"><span class="toc-text">滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%BD%8E%E9%80%9A%E6%BB%A4%E6%B3%A2"><span class="toc-text">低通滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E9%80%9A%E6%BB%A4%E6%B3%A2"><span class="toc-text">高通滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E6%96%AF%E6%BB%A4%E6%B3%A2"><span class="toc-text">高斯滤波</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%A0%B8%E7%AE%97%E5%AD%90%E3%80%81%E6%A8%A1%E6%9D%BF%E3%80%81%E7%BB%93%E6%9E%84%E9%83%BD%E6%98%AF%E4%B8%80%E7%A7%8D"><span class="toc-text">核算子、模板、结构都是一种</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%BB%A4%E6%B3%A2%E6%A0%B8"><span class="toc-text">滤波核</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%BD%92%E4%B8%80%E5%8C%96"><span class="toc-text">归一化</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8D%B7%E7%A7%AF%E6%A0%B8"><span class="toc-text">卷积核</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E6%96%AF%E6%A0%B8"><span class="toc-text">高斯核</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%8E%AF%E5%A2%83%E4%B8%8E%E4%BE%9D%E8%B5%96"><span class="toc-text">环境与依赖</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#OpenCv%E5%BA%93%E5%AE%89%E8%A3%85"><span class="toc-text">OpenCv库安装</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E4%B8%BE%E4%BE%8B"><span class="toc-text">举例</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%AE%97%E6%B3%95%E8%BF%87%E7%A8%8B"><span class="toc-text">算法过程</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%AB%98%E6%96%AF%E6%BB%A4%E6%B3%A2%E5%AE%9E%E7%8E%B0%E6%96%B9%E6%B3%95"><span class="toc-text">高斯滤波实现方法</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%AE%97%E6%B3%95%E8%BF%87%E7%A8%8B-1"><span class="toc-text">算法过程</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%94%9F%E6%88%90%E6%BB%A4%E6%B3%A2%E6%A0%B8"><span class="toc-text">生成滤波核</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%8D%B7%E7%A7%AF%E7%94%9F%E6%88%90"><span class="toc-text">卷积生成</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%A0%B7%E4%BE%8B%E4%BB%A3%E7%A0%81"><span class="toc-text">样例代码</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E7%9B%B4%E6%8E%A5OpenCV%E6%93%8D%E4%BD%9C-%E9%9D%9E%E5%8E%9F%E7%90%86%E5%AE%9E%E7%8E%B0%E6%96%B9%E6%A1%88-%E4%BD%BF%E7%94%A8%E5%B0%81%E8%A3%85%E6%96%B9%E6%B3%95"><span class="toc-text">直接OpenCV操作(非原理实现方案 使用封装方法)</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Que-%E8%BE%B9%E7%95%8C%E7%82%B9%E7%9A%84%E5%A4%84%E7%90%86"><span class="toc-text">Que: 边界点的处理</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%80%BB%E7%BB%93"><span class="toc-text">总结</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%96%87%E7%AB%A0%E5%BC%95%E7%94%A8"><span class="toc-text">文章引用</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E6%8F%90%E7%A4%BA"><span class="toc-text">提示</span></a></li></ol></div></section></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div><div class="pjax"></div></aside><pjax><script>window.pdata={},pdata.ispage=!0,pdata.commentPath="",pdata.commentPlaceholder="",pdata.commentConfig={};var l_header=document.getElementById("l_header");l_header.classList.remove("show");var cover_wrapper=document.querySelector("#l_cover .cover-wrapper"),scroll_down=document.getElementById("scroll-down");cover_wrapper.id="half",cover_wrapper.style.display="",scroll_down.style.display="none"</script></pjax></div><footer class="footer clearfix" itemscope itemtype="http://schema.org/WPFooter"><br><br><div class="copyright"><p>⌘ Hexo With Volantis</p></div></footer><a id="s-top" class="fa-solid fa-arrow-up fa-fw" href="/" onclick="return!1" title="top"></a></div></div><div><script>volantis.dom.bodyAnchor=volantis.dom.$(document.getElementById("safearea")),volantis.dom.topBtn=volantis.dom.$(document.getElementById("s-top")),volantis.dom.wrapper=volantis.dom.$(document.getElementById("wrapper")),volantis.dom.coverAnchor=volantis.dom.$(document.querySelector("#l_cover .cover-wrapper")),volantis.dom.switcher=volantis.dom.$(document.querySelector("#l_header .switcher .s-search")),volantis.dom.header=volantis.dom.$(document.getElementById("l_header")),volantis.dom.search=volantis.dom.$(document.querySelector("#l_header .m_search")),volantis.dom.mPhoneList=volantis.dom.$(document.querySelectorAll("#l_header .m-phone .list-v"))</script><script>volantis.css("https://fastly.jsdelivr.net/npm/volantis-static/libs/@fortawesome/fontawesome-free/css/all.min.css")</script><script src="/js/app.js"></script><script>function loadIssuesJS(){null!=document.getElementById("sites-api")&&"undefined"==typeof SitesJS&&volantis.js("/js/plugins/tags/sites.js");null!=document.getElementById("friends-api")&&"undefined"==typeof FriendsJS&&volantis.js("/js/plugins/tags/friends.js");null!=document.getElementById("contributors-api")&&"undefined"==typeof ContributorsJS&&volantis.js("/js/plugins/tags/contributors.js")}loadIssuesJS(),volantis.pjax.push(()=>{loadIssuesJS()})</script><script defer="defer" src="https://fastly.jsdelivr.net/npm/volantis-static/libs/vanilla-lazyload/dist/lazyload.min.js"></script><script>window.lazyLoadOptions={elements_selector:".lazyload",threshold:0},window.addEventListener("LazyLoad::Initialized",(function(n){window.lazyLoadInstance=n.detail.instance}),!1),document.addEventListener("DOMContentLoaded",(function(){lazyLoadInstance.update()})),document.addEventListener("pjax:complete",(function(){lazyLoadInstance.update()}))</script><script>window.FPConfig={delay:0,ignoreKeywords:["#"],maxRPS:6,hoverDelay:0}</script><script defer="defer" src="https://fastly.jsdelivr.net/npm/volantis-static/libs/flying-pages/flying-pages.min.js"></script><script>function check_giscus(){return"dark"===volantis.dark.mode?volantis.giscus.Theme="dark":volantis.giscus.Theme="light",document.getElementById("giscus_container")}function pjax_giscus(){const t=check_giscus();if(!t)return;let e=Object.assign({theme:{light:"light",dark:"dark"},repo:"Mlikiowa/MliKiowa.github.io","repo-id":"R_kgDOHxvLiA",category:"General","category-id":"DIC_kwDOHxvLiM4CQr9N",mapping:"url","reactions-enabled":"1","emit-metadata":"0",lang:"zh-CN"},pdata.commentConfig);const s=document.createElement("script");s.setAttribute("src","https://giscus.app/client.js"),Object.keys(e).forEach(t=>{"theme"!=t&&s.setAttribute("data-"+t,e[t])}),s.setAttribute("data-theme",volantis.giscus.Theme),s.setAttribute("crossorigin","anonymous"),t.appendChild(s)}function dark_giscus(){if(!check_giscus())return;const t={setConfig:{theme:volantis.giscus.Theme}};document.querySelector("iframe.giscus-frame").contentWindow.postMessage({giscus:t},"https://giscus.app")}volantis.layoutHelper("comments",'<div id="giscus_container"></div>'),volantis.giscus={},pjax_giscus(),volantis.pjax.push(pjax_giscus),volantis.dark.push(dark_giscus)</script><script>const SearchServiceDataPathRoot="/".endsWith("/")?"/":"//",SearchServiceDataPath=SearchServiceDataPathRoot+"content.json";function loadSearchScript(){return volantis.js("/js/search/hexo.js")}function loadSearchService(){loadSearchScript(),document.querySelectorAll(".input.u-search-input").forEach(e=>{e.removeEventListener("focus",loadSearchService,!1)}),document.querySelectorAll(".u-search-form").forEach(e=>{e.addEventListener("submit",e=>{e.preventDefault()},!1)})}function OpenSearch(e){"undefined"==typeof SearchService?loadSearchScript().then(()=>{SearchService.setQueryText(e),SearchService.search()}):(SearchService.setQueryText(e),SearchService.search())}if(window.location.search&&/^\?s=/g.test(window.location.search)){OpenSearch(decodeURI(window.location.search).replace(/\ /g,"-").replace(/^\?s=/g,""))}document.querySelectorAll(".input.u-search-input").forEach(e=>{e.addEventListener("focus",loadSearchService,!1)})</script><script>function pjax_highlightjs_copyCode(){(document.querySelector(".highlight .code pre")||document.querySelector(".article pre code"))&&VolantisApp.utilCopyCode(".highlight .code pre, .article pre code")}volantis.requestAnimationFrame(pjax_highlightjs_copyCode),volantis.pjax.push(pjax_highlightjs_copyCode)</script><script>function load_swiper(){document.querySelectorAll(".swiper-container")[0]&&(volantis.css("https://fastly.jsdelivr.net/npm/volantis-static/libs/swiper/swiper-bundle.min.css"),volantis.js("https://fastly.jsdelivr.net/npm/volantis-static/libs/swiper/swiper-bundle.min.js").then(()=>{pjax_swiper()}))}function pjax_swiper(){volantis.swiper=new Swiper(".swiper-container",{slidesPerView:"auto",spaceBetween:8,centeredSlides:!0,loop:!0,pagination:{el:".swiper-pagination",clickable:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})}load_swiper(),volantis.pjax.push(()=>{document.querySelectorAll(".swiper-container")[0]&&(void 0===volantis.swiper?load_swiper():pjax_swiper())})</script><pjax></pjax><script>function listennSidebarTOC(){const t=document.querySelectorAll(".toc li");if(!t.length)return;let e=[];[...t].map(t=>{const n=t.querySelector(".toc-link"),i=document.getElementById(decodeURI(n.getAttribute("href")).replace("#",""));return e.push(i),n.setAttribute("onclick","return false;"),n.setAttribute("toc-action","toc-"+decodeURI(n.getAttribute("href")).replace("#","")),n.setAttribute("href","/"),n.addEventListener("click",t=>{t.preventDefault(),volantis.scroll.to(i,{addTop:5,observer:!0}),history.pushState(null,document.title,"#"+i.id)}),i});function n(t){if(t.classList.contains("active-current"))return;document.querySelectorAll(".toc .active").forEach(t=>{t.classList.remove("active","active-current")}),t.classList.add("active","active-current");let e=t.parentNode;for(;!e.matches(".toc");)e.matches("li")&&e.classList.add("active"),e=e.parentNode}volantis.activateNavIndex=0,n(t[volantis.activateNavIndex]),volantis.scroll.push(()=>{if(e[0].getBoundingClientRect().top>=0)volantis.activateNavIndex=0;else if(e[e.length-1].getBoundingClientRect().top<0)volantis.activateNavIndex=e.length-1;else for(let t=0;t<e.length;t++){const n=e[t],i=e[(t+1)%e.length];if(n.getBoundingClientRect().top<0&&i.getBoundingClientRect().top>=0){volantis.activateNavIndex=t;break}}n(t[volantis.activateNavIndex])})}document.addEventListener("DOMContentLoaded",()=>{volantis.requestAnimationFrame(listennSidebarTOC)}),document.addEventListener("pjax:success",()=>{volantis.requestAnimationFrame(listennSidebarTOC)})</script><script>try{let e=(e,t,n=2)=>Math.abs(e-t)<=n,t=(t,n)=>!e(t.width,n.width)||!e(t.height,n.height),n=new WeakMap,i=(e,i=e.getClientBoundingRect())=>{let o=n.get(e);o&&!t(o,i)||(n.set(e,i),e.style["contain-intrinsic-size"]=`${i.width}px ${i.height}px`)},o=new IntersectionObserver((e,t)=>{e.forEach(e=>{i(e.target,e.boundingClientRect)})},{rootMargin:"500px 0px 500px 0px"}),r=new ResizeObserver((e,t)=>{e.forEach(e=>{i(e.target,e.contentRect)})}),s=e=>{let t=document.querySelectorAll(e);t.length&&(t.forEach(e=>{o.observe(e),r.observe(e)}),requestAnimationFrame(()=>{requestAnimationFrame(()=>{t[0].style["content-visibility"]="auto"})}))},a=()=>{"content-visibility"in document.documentElement.style&&s(".post-story")};a(),volantis.pjax.push(a)}catch(e){console.log(e)}</script><script>document.onreadystatechange=function(){if("complete"==document.readyState){const{saveData:e,effectiveType:t}=navigator.connection||navigator.mozConnection||navigator.webkitConnection||{};("none"==getComputedStyle(document.querySelector("#safearea"),null).display||e||/2g/.test(t))&&(document.querySelectorAll(".reveal").forEach((function(e){e.style.opacity="1"})),document.querySelector("#safearea").style.display="block")}}</script><script type="application/ld+json">[{"@context":"http://schema.org","@type":"Organization","name":"Village","url":"https://nanaeo.cn/","logo":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}},{"@context":"http://schema.org","@type":"Person","name":"Mlikiowa","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"},"url":"https://nanaeo.cn/","sameAs":["https://github.com/volantis-x"],"description":"It is a little blog~"},{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https://nanaeo.cn/","name":"Village"}},{"@type":"ListItem","position":2,"item":{"@id":"https://nanaeo.cn/categories/DevLog/","name":"DevLog"}},{"@type":"ListItem","position":3,"item":{"@id":"https://nanaeo.cn/2022/08/13/GaussWave/","name":"高斯滤波"}}]},{"@context":"http://schema.org","@type":"WebSite","name":"Village","url":"https://nanaeo.cn/","keywords":null,"description":"It is a little blog~","author":{"@type":"Person","name":"Mlikiowa","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"},"url":"https://nanaeo.cn/","description":"It is a little blog~"},"publisher":{"@type":"Organization","name":"Village","url":"https://nanaeo.cn/","logo":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}},"potentialAction":{"@type":"SearchAction","name":"Site Search","target":{"@type":"EntryPoint","urlTemplate":"https://nanaeo.cn?s={search_term_string}"},"query-input":"required name=search_term_string"}},{"@context":"http://schema.org","@type":"BlogPosting","headline":"高斯滤波","description":"高斯滤波的实现","inLanguage":["zh-CN","en","default"],"mainEntityOfPage":{"@type":"WebPage","@id":"https://nanaeo.cn/2022/08/13/GaussWave/"},"author":{"@type":"Person","name":"Mlikiowa","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png"},"url":"https://nanaeo.cn/"},"publisher":{"@type":"Organization","name":"Village","logo":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}},"url":"https://nanaeo.cn/2022/08/13/GaussWave/","wordCount":7,"datePublished":"2022-08-13T16:00:00.000Z","dateModified":"2024-11-12T07:43:21.816Z","articleSection":"DevLog","keywords":"DevLog,Gauss","image":{"@type":"ImageObject","url":"https://fastly.jsdelivr.net/npm/volantis-static/media/org.volantis/blog/favicon/android-chrome-192x192.png","width":192,"height":192}}]</script><script src="https://fastly.jsdelivr.net/npm/volantis-static/libs/pjax/pjax.min.js"></script><script>var pjax;document.addEventListener("DOMContentLoaded",(function(){pjax=new Pjax({elements:'a[href]:not([href^="#"]):not([href="javascript:void(0)"]):not([pjax-fancybox]):not([onclick="return false;"]):not([onclick="return!1"]):not([target="_blank"]):not([target="view_window"]):not([href$=".xml"])',selectors:["head title","head meta[name=keywords]","head meta[name=description]","#l_main","#pjax-header-nav-list",".pjax","pjax","script[data-pjax], .pjax-reload script"],cacheBust:!1,timeout:5e3})})),document.addEventListener("pjax:send",(function(e){try{var t=window.location.pathname,n=e.triggerElement.href,a=[""];""!=a[0]&&a.forEach(e=>{-1==t.indexOf(e)&&-1==n.indexOf(e)||(window.location.href=n)})}catch(e){}volantis.pjax.method.send.start()})),document.addEventListener("pjax:complete",(function(){volantis.pjax.method.complete.start()})),document.addEventListener("pjax:error",(function(e){volantis.debug?(console.error(e),console.log("pjax error: \n"+JSON.stringify(e))):(volantis.pjax.method.error.start(),window.location.href=e.triggerElement.href)}))</script></div><script data-pjax async src="https://ackee.nanaeo.cn/tracker.js" data-ackee-server="https://ackee.nanaeo.cn" data-ackee-domain-id="3e94aa30-5cea-4f2b-9ec6-c0178d3beb0c"></script><script>"serviceWorker"in navigator&&navigator.serviceWorker.register("/volantis-sw.js").then((function(e){e.onupdatefound=function(){var r=e.installing;r.onstatechange=function(){switch(r.state){case"installed":navigator.serviceWorker.controller?console.log("Updated serviceWorker."):console.log("serviceWorker Sucess!");break;case"redundant":console.log("The installing service worker became redundant.")}}}})).catch((function(e){console.log("Error during service worker registration:",e)}))</script></body></html>