图像提取基于matlab DNA编解码多尺度形态学提取眼前节组织含Matlab源码 1191期
Posted 紫极神光
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了图像提取基于matlab DNA编解码多尺度形态学提取眼前节组织含Matlab源码 1191期相关的知识,希望对你有一定的参考价值。
一、简介
基于matlab DNA编解码多尺度形态学提取眼前节组织
二、源代码
clc; clear all; close all;
if exist(fullfile(pwd, 'dt.mat'), 'file')
load(fullfile(pwd, 'dt.mat'));
figure; imshow(result, []);
return;
end
Img = imread('images\\image.bmp');
Gf1 = Main_Process(Img, 1);
Gf2 = Main_Process(Img, 2);
Gf3 = Main_Process(Img, 3);
Gf4 = Main_Process(Img, 4);
Gf5 = Main_Process(Img, 5);
G1 = Gf1;
G2 = Gf2;
G3 = Gf3;
G4 = Gf4;
G5 = Gf5;
ua1 = Coef(Gf1, G);
ua2 = Coef(Gf2, G);
ua3 = Coef(Gf3, G);
ua4 = Coef(Gf4, G);
ua5 = Coef(Gf5, G);
u = [ua1, ua2, ua3, ua4, ua5];
u = u/sum(u);
Gf = Edge_One(G, u);
result = Gf5;
figure; imshow(result, []);
function Inversef = supoles(fa, f)
Inversef = 0;
N = length(f);
for i = 1 : N
fb = fi;
diff_fab = usim(fa, f);
Inversef = Inversef + diff_fab;
end
function H = compute_infos(I)
level = 256;
dat = double(I);
p = zeros(1, level);
for i = 1 : size(dat, 1)
for j = 1 : size(dat, 2)
temp = dat(i,j);
p(1, temp+1) = p(1, temp+1) + 1;
end
end
p = p/(size(dat, 1)*size(dat, 2));
H = 0;
for i = 1 : level
if p(i) ~= 0
H = H + p(i)*log2(p(i));
end
end
H = -H;
function ua = Coef(fa, f)
N = length(f);
s = [];
for i = 1 : N
fi = fi;
si = supoles(fi, f);
s = [s si];
end
sp = min(s(:));
sa = supoles(fa, f);
ka = sp/sa;
k = 0;
for i = 1 : N
fb = fi;
s = [];
for i = 1 : N
fi = fi;
si = supoles(fi, f);
s = [s si];
end
sp = min(s);
sb = supoles(fb, f);
kb = sp/sa;
k = k + kb;
end
ua = ka/k;
function [Gi, ng] = Multi_Process(I, g, n)
if nargin < 3
n = 6;
end
ng = g;
for i = 1:n
ng = imdilate(ng, g);
end
Gi1 = imopen(I, ng);
Gi1 = imdilate(Gi1, ng);
Gi2 = imclose(I, ng);
Gi2 = imerode(Gi2, ng);
Gi = imsubtract(Gi1, Gi2);
三、运行结果
四、备注
版本:2014a
以上是关于图像提取基于matlab DNA编解码多尺度形态学提取眼前节组织含Matlab源码 1191期的主要内容,如果未能解决你的问题,请参考以下文章
图像加密基于matlab DNA混沌系统图像加密含Matlab源码 1190期
图像加密基于matlab DNA混沌系统图像加密含Matlab源码 1190期
图像融合基于matlab多尺度奇异值分解图像融合含Matlab源码 2040期