对于图像具有明显的双分界特征,可以使用双阈值法进行二值化操作。根据双阈值化操作方法,对8bit灰度图像使用该方法进行操作时,需要预先设定好阈值量thresh1,thresh2,且thresh1<thresh2,在thresh1到thresh2范围内的像素都被设置为maxval,其他均为0,即下面表达式:

代码实现如下:
1 |
|
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true