同步操作将从 wtzhu13/ISPAlgorithmStudy 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
clc, clear, close all;testPath = 'G:\Fred\ISP\matlab\images\DPTest';subdir = dir(testPath);DPTh = 50;for ii = 1 : length( subdir )if( isequal( subdir( ii ).name, '.' )||isequal( subdir( ii ).name, '..'))continue;endfullFilePath = fullfile(testPath, subdir( ii ).name);disp(fullFilePath)img = imread(fullFilePath);[h, w, c] = size(img);imgGray = rgb2gray(img);[x, y] = find(imgGray>DPTh);numOFDP = length(x);for i=1:numOFDPif x(i) < 100if x(i) < 100 && y(i) < 100subImg = img(1: 100, 1: 100, :);elseif x(i) < 100 && y(i) > w-100subImg = img(1: 100, w-100: w, :);elsesubImg = img(1: 100, y(i)-50: y(i)+50, :);endelseif x(i) > h-100if x(i) > h-100 && y(i) > w-100subImg = img(h-100: h, w-100: w, :);elseif x(i) > h-100 && y(i) < 100subImg = img(h-100: h, 1: 100, :);elsesubImg = img(h-100: h, y(i)-50: y(i)+50, :);endelseif y(i) < 100subImg = img(x(i)-50: x(i)+50, 1:100, :);elseif y(i) > w-100subImg = img(x(i)-50: x(i)+50, w-100:w, :);elsesubImg = img(x(i)-50: x(i)+50, y(i)-50: y(i)+50, :);endendt = sprintf('%s-sub%d img',subdir( ii ).name, i);hfig = figure(); % 创建图形窗口set(hfig, 'outerposition', get(0, 'ScreenSize')); % 设置图形窗口位置和外尺寸为屏幕大小imshow(subImg);title(t);endend
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。