![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
图像切割
苏打水的杯子
北航虚拟现实国家重点实验室博士研究生
展开
-
图像阈值化分割
import cv2import numpyfrom matplotlib import pyplot as pltimg = cv2.imread('C:\\Users\\Desktop\\58_2_test.jpg', 0)# 对图像进行阈值分割# img = cv2.imread('4.jpg', 0)ret, thresh1 = cv2.threshold(img, 100, 255, cv2.THRESH_BINARY) # binary (黑白二值)ret, thresh.原创 2021-02-20 20:36:47 · 93 阅读 · 0 评论 -
图像切割matlab程序
clc;clear all;[pathname,filename] = uigetfile('*.*','选择图片','E:\裂纹\NG2裂纹\');src_path =strcat(filename,pathname) ;dst_path = 'E:\学习资料\MATLAB程序\裂纹分割\';if ~exist('E:\学习资料\MATLAB程序\裂纹分割\') mkdir('...原创 2018-03-28 16:28:10 · 2704 阅读 · 1 评论 -
批量截图
clcclearclose allpic = imread('E:\裂纹\a\2\43.bmp');for i = 1:5 close all imshow(pic); [x,y] = ginput(1) %确定图像上的两点利用ginput函数,返回值是两点的坐标 pic_1 = imcrop(pic,[x,y,24,24]); %利用imcrop函数对图像进行...原创 2018-05-05 21:06:07 · 708 阅读 · 0 评论