第一次在CSDN上写markdown格式的博文 自己记录下。虽然自己之前在Jupyter上也是写过markdown的,但都是皮毛而已。
markdown
加粗: 加粗
加粗2:加粗
强调: 强调
强调2:强调
引用文本:
真正的英雄是在看清楚生活的本质后仍然热爱生活,但我一直热爱生活我也不是英雄。
语法与认识1
(1,2,3,4…)的标题写作:
- first 第一句话;
- 上标:语法[^1]的功能
语法与认识2:键盘输入
能用到的几个快捷键
插入代码:Ctrl/Command + Shift + K
插入链接:Ctrl/Command + Shift + L
插入图片:Ctrl/Command + Shift + G
插入链接与图片
链接: link.
图片这部分还没完全搞定,明白!!
插入代码片
可以去博客设置页面,选择喜欢的代码片高亮样式,下面展示的是今天写的matlab进行图像CFAR双参数分割的同样高亮的代码
clc;
clear;
close all;
% read the image data
% image1 = imread('fine_name.jpeg');
width = size(image1, 1) ; % image width
height = size(image1, 2) ; % image height
image2 = image1(:); % To col vector
% show the image
figure;
image(image1)
%% % image hist equalization processing
% log_image = log10(image1) ;
% hist_eq_log = histeq(log_image) ;
% figure;
% image(hist_eq_log)
% weibull_data = wblrnd(0.5,0.8,100,1);
% parmhat = wblfit(weibull_data);
%% % weibull calculate
image3 = [];
for i = 1:length(image2)
if image2(i) == 0
image3(i, 1) = 0.1 ;
else
image3(i, 1) = image2(i);
end
end
parmhat = wblfit(image3);
% find the thresholds
% And CSFR prob is set to 10%
% prob = wblcdf(x, parmhat(1), parmhat(2)) ;
thres1 = wblinv(0.1, parmhat(1), parmhat(2));
thres2 = wblinv(0.9, parmhat(1), parmhat(2));
% cut the target
thre_image_target = [] ;
for i = 1:length(image2)
if image2(i) > thres2
thre_image_target(i, 1) = 255;
else
thre_image_target(i, 1) = 0;
end
end
thre_image_target = reshape(thre_image_target, width, height) ;
figure(3);
image(thre_image_target)
% cut the fading
% cut the target
thre_image_fading = [] ;
for i = 1:length(image2)
if image2(i) < thres1
thre_image_fading(i, 1) = 255 ;
else
thre_image_fading(i, 1) = 0;
end
end
thre_image_fading = reshape(thre_image_fading, width, height) ;
figure(4);
image(thre_image_fading)
% write the all prcessed images to specific file
% imwrite(image1,'file_name/original.jpg')
% imwrite(thre_image_target, 'file_name\target.jpg')
% imwrite(thre_image_fading, 'file_name\fading.jpg')
% giometray aggreation
% total trunck is 8 x 8 = 64
num_slice = 16 ;
width_length_slice = floor(width / num_slice) ;
height_length_slice = floor(height /num_slice) ;
threshold = width_length_slice * height_length_slice / 6 * 255 ;
trunck_target = zeros(width, height) ;
trunck_fading = zeros(width, height) ;
trunck_target = geo_aggrea(thre_image_target, num_slice, ...
width_length_slice, height_length_slice, threshold) ;
trunck_fading = geo_aggrea(thre_image_fading, num_slice, ...
width_length_slice, height_length_slice, threshold) ;
% The last trunck
% trunck_target(width_length_slice * (num_slice - 1) + 1 : width, ...
% height_length_slice * (num_slice -1) +1 :height) = ...
% thre_image_target(width_length_slice * (num_slice - 1) + 1 : width, ...
% height_length_slice * (num_slice -1) +1 :height) ;
% trunck_fading(width_length_slice * (num_slice - 1) + 1 : width, ...
% height_length_slice * (num_slice -1) +1 :height) = ...
% thre_image_fading(width_length_slice * (num_slice - 1) + 1 : width, ...
% height_length_slice * (num_slice -1) +1 :height) ;
figure ;
image(trunck_target)
figure ;
image(trunck_fading)
output_image = xor_and(trunck_target, trunck_fading);
figure ;
image(output_image)
function trunck = geo_aggrea(image_input, num_slice, ...
width_length_slice, height_length_slice, threshold)
for i = 1:(num_slice -1)
for j = 1:(num_slice -1)
index_width = (i-1) * width_length_slice + 1 ;
end_width = i * width_length_slice ;
index_height = (j-1) * height_length_slice + 1 ;
end_heigth = j * height_length_slice ;
num_thres = sum(sum(image_input(index_width:end_width, ...
index_height:end_heigth))) ;
if num_thres > threshold
trunck(index_width:end_width, index_height:end_heigth) = ...
image_input(index_width:end_width, index_height:end_heigth) ;
else
trunck(index_width:end_width, index_height:end_heigth) = 0 ;
end
end
end
end
function xor_image = xor_and(input_image1, input_image2)
row = size(input_image1, 1) ;
col = size(input_image1, 2) ;
for i = 1:row
for j = 1:col
if (input_image1(i, j)) == 0 && (input_image2(i, j) == 0)
xor_image(i, j) = 0;
else
xor_image(i, j) = 255;
end
end
end
end
创建注脚
图像的直方图均衡化。1
KaTeX数学公式 可以通过mathtype复制获得
您可以使用渲染LaTeX数学表达式 KaTeX:
Gamma公式展示 是通过欧拉积分
引用: 你可以找到更多关于的信息 LaTeX 数学表达式[here][1].
新的甘特图功能,丰富你的文章
- 关于 甘特图 语法,以后再看吧,可以参考 [这儿][2],
UML 图表
可以使用UML图表进行渲染。 Mermaid. 例如下面产生的一个序列图::
这将产生一个流程图。:
- 关于 Mermaid 语法,以后再看吧,可以参考 [这儿][3],
FLowchart流程图
我们依旧会支持flowchart的流程图:
- 关于 Flowchart流程图 语法,以后再看吧,参考 [这儿][4].
直方图均衡化已经了解 ↩︎