matlab | 实现图像复原 / 超分重建 / 去模糊 论文里的局部放大对比图

本文档介绍如何使用MATLAB实现图像复原、超分重建及去模糊,提供了一种通过鼠标选择bounding box左上角来生成论文中效果良好的局部放大对比图的方法。文件组织结构清晰,包括原始图像、处理结果和代码。运行代码时,需确保图像按指定方式存放,并根据提示操作,最终生成的图像将保存在代码目录下。
摘要由CSDN通过智能技术生成

效果

  • 鼠标选择bounding box 左上角位置
    鼠标选择左上角的点

  • 生成的图。该脚本以bounding box大小为基准,调整大图的大小。贴到论文里比较好看
    这里写图片描述
    这里写图片描述

文件存放形式

以图片1.jpg为例,原图存放在root文件夹,用3种方法的处理结果存放在method1method2method3子文件夹,matlab代码drawcompare.m放在root文件夹。

——root:1.jpg drawcompare.m
|————method1: 1.jpg
|————method2: 1.jpg
|————method3: 1.jpg

代码

drawcompare.m

用法:
1. 按照文件存放形式放好待比较图像
2. 运行函数代码(若报错“方框数量太多”,请减少方框数量,重新运行函数)

 函数参数分别为:
 imname:图像文件名
 fixw:(正方形)方框边长(默认为40)
 margine:留白大小(默认为10)
 nbox:方框数量(默认为2)

3. 点击图像选择方框左上角,按下回车确认(若报错“超出了图像范围”,请重新运行函数,小心的选择位置)
4. 生成的图像会保存在该代码所在目录

function []=drawcompare(imname,fixw,margine,nbox)
%input:
% imname: string image filename eg: 'street.jpg'
% fixw: bounding box size for zoom in
% margine: margine between picture elements
% nbox: number of bounding boxs
%usage:
% 1.put the origine image in the root dir
% 2.put the images (to be compared, having same file name as the origine 
% image) in different sub dir,
% 3.click the image and press enter to confirm your bounding boxs (2 box in
% this program)
% 4.new image will be save to root dir

%------------------sub dir, modify by user--------------------------------- 
me_dir = './ME';
pan_dir = './PAN';
xu_dir = './XU';
sun_dir = './SUN';
ori_dir = '.';
method_dir_list=
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值